tvplanit: Add component editor for TVpPrintPreviewDialog

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8491 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-09-19 16:18:08 +00:00
parent 96a78dc93d
commit 45da1b1781
11 changed files with 97 additions and 13 deletions

View File

@ -1328,6 +1328,10 @@ msgstr "Aufgabenliste"
msgid "Task list - " msgid "Task list - "
msgstr "Aufgabenliste - " msgstr "Aufgabenliste - "
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr "Dialog testen..."
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "Text" msgstr "Text"

View File

@ -1310,6 +1310,10 @@ msgstr "Task list"
msgid "Task list - " msgid "Task list - "
msgstr "Task list - " msgstr "Task list - "
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr "Test dialog..."
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "Text" msgstr "Text"

View File

@ -1317,6 +1317,10 @@ msgstr ""
msgid "Task list - " msgid "Task list - "
msgstr "" msgstr ""
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "" msgstr ""

View File

@ -1332,6 +1332,10 @@ msgstr "Liste des tâches"
msgid "Task list - " msgid "Task list - "
msgstr "Liste des tâches -" msgstr "Liste des tâches -"
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "" msgstr ""
@ -1388,7 +1392,7 @@ msgid "Tuesday"
msgstr "Mardi" msgstr "Mardi"
#: vpsr.rsunabletoopen #: vpsr.rsunabletoopen
#, fuzzy, object-pascal-format #, object-pascal-format, fuzzy, badformat
#| msgid "Error: Unable to open " #| msgid "Error: Unable to open "
msgid "Error: Unable to open %s" msgid "Error: Unable to open %s"
msgstr "Erreur: Incapable d'ouvrir" msgstr "Erreur: Incapable d'ouvrir"
@ -1698,7 +1702,7 @@ msgid "Invalid XML Character found"
msgstr "Caractère XML non valide trouvé" msgstr "Caractère XML non valide trouvé"
#: vpsr.sinvalidxmlversion #: vpsr.sinvalidxmlversion
#, fuzzy, object-pascal-format #, object-pascal-format, fuzzy, badformat
msgid "XMLPartner does not support XML specification greater than %s" msgid "XMLPartner does not support XML specification greater than %s"
msgstr "XMLPartner ne supporte pas la spécification XML supérieure à" msgstr "XMLPartner ne supporte pas la spécification XML supérieure à"
@ -1807,10 +1811,11 @@ msgid "End of input while looking for delimiter: "
msgstr "Fin de l'entrée tout en recherchant delimiter:" msgstr "Fin de l'entrée tout en recherchant delimiter:"
#: vpsr.sunknownaxis #: vpsr.sunknownaxis
#, fuzzy, object-pascal-format #, object-pascal-format, fuzzy, badformat
msgid "Unknown axis specifier: %s" msgid "Unknown axis specifier: %s"
msgstr "Spécificateur d'axe inconnu" msgstr "Spécificateur d'axe inconnu"
#: vpsr.sxmldecnotatbeg #: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element" msgid "The XML declaration must appear before the first element"
msgstr "La déclaration XML doit apparaître avant le premier élément" msgstr "La déclaration XML doit apparaître avant le premier élément"

View File

@ -1328,6 +1328,10 @@ msgstr "Taaklijst"
msgid "Task list - " msgid "Task list - "
msgstr "Taaklijst - " msgstr "Taaklijst - "
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "" msgstr ""

View File

@ -1327,6 +1327,10 @@ msgstr "Lista zadań"
msgid "Task list - " msgid "Task list - "
msgstr "Lista zadań - " msgstr "Lista zadań - "
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "Tekst" msgstr "Tekst"

View File

@ -1300,6 +1300,10 @@ msgstr ""
msgid "Task list - " msgid "Task list - "
msgstr "" msgstr ""
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "" msgstr ""

View File

@ -1326,6 +1326,10 @@ msgstr "Список задач"
msgid "Task list - " msgid "Task list - "
msgstr "Список задач - " msgstr "Список задач - "
#: vpsr.rstestdialog
msgid "Test dialog..."
msgstr ""
#: vpsr.rstextcaption #: vpsr.rstextcaption
msgid "Text" msgid "Text"
msgstr "" msgstr ""

View File

@ -64,7 +64,7 @@ type
TVpPrtFmtEditor = class(TfrmPrnFormat) TVpPrtFmtEditor = class(TfrmPrnFormat)
public public
Designer : TIDesigner; Designer: TIDesigner;
end; end;

View File

@ -26,7 +26,7 @@
{* *} {* *}
{* ***** END LICENSE BLOCK ***** *} {* ***** END LICENSE BLOCK ***** *}
{$I Vp.INC} { Compiler Version Defines } {$I vp.inc} { Compiler Version Defines }
{$R vpreg.res} { Palette Glyphs } {$R vpreg.res} { Palette Glyphs }
@ -91,9 +91,9 @@ type
TVpDateProperty = class (TFloatProperty) TVpDateProperty = class (TFloatProperty)
public public
procedure Edit; override; procedure Edit; override;
function GetAttributes : TPropertyAttributes; override; function GetAttributes: TPropertyAttributes; override;
function GetValue : string; override; function GetValue: string; override;
procedure SetValue (const Value : string); override; procedure SetValue(const Value: string); override;
end; end;
TVpGeneralFileNameProperty = class (TStringProperty) TVpGeneralFileNameProperty = class (TStringProperty)
@ -139,10 +139,8 @@ type
TVpAboutProperty = class(TStringProperty) TVpAboutProperty = class(TStringProperty)
public public
function GetAttributes: TPropertyAttributes; function GetAttributes: TPropertyAttributes; override;
override; procedure Edit; override;
procedure Edit;
override;
end; end;
TVpFlexDSEditor = class(TComponentEditor) TVpFlexDSEditor = class(TComponentEditor)
@ -151,6 +149,15 @@ type
function GetVerbCount: Integer; override; function GetVerbCount: Integer; override;
end; end;
TVpBaseDialogComponentEditor = class(TComponentEditor)
private
procedure TestDialog;
public
function GetVerbCount: Integer; override;
function GetVerb(Index: Integer): string; override;
procedure ExecuteVerb(Index: Integer); override;
end;
procedure Register; procedure Register;
@ -161,7 +168,7 @@ uses
DbTables, { VCL - BDE runtime unit } DbTables, { VCL - BDE runtime unit }
VpWavPE, { Wav File Finder - Property Editor } VpWavPE, { Wav File Finder - Property Editor }
{$ENDIF} {$ENDIF}
VpMisc, VpSR, VpMisc,
{ Component Units } { Component Units }
VpBase, { Base classes for Vp } VpBase, { Base classes for Vp }
@ -568,6 +575,37 @@ begin
end; end;
{ TVpBaseDialogComponentEditor }
procedure TVpBaseDialogComponentEditor.TestDialog;
begin
with Component as TVpBaseDialog do Execute;
end;
function TVpBaseDialogComponentEditor.GetVerbCount: Integer;
begin
Result := 1;
end;
function TVpBaseDialogComponentEditor.GetVerb(Index: integer): string;
begin
case Index of
0: Result := RSTestDialog;
else
Result := inherited GetVerb(Index);
end;
end;
procedure TVpBaseDialogComponentEditor.ExecuteVerb(Index: Integer);
begin
case Index of
0: TestDialog;
else
inherited ExecuteVerb(Index);
end;
end;
{******************************************************************************} {******************************************************************************}
{ Component registration } { Component registration }
{******************************************************************************} {******************************************************************************}
@ -580,6 +618,18 @@ begin
RegisterComponentEditor(TVpNavBar, TVpNavBarEditor); RegisterComponentEditor(TVpNavBar, TVpNavBarEditor);
RegisterComponentEditor(TVpControlLink, TVpPrtFmtPropertyEditor); RegisterComponentEditor(TVpControlLink, TVpPrtFmtPropertyEditor);
RegisterComponentEditor(TVpFlexDataStore, TVpFlexDSEditor); RegisterComponentEditor(TVpFlexDataStore, TVpFlexDSEditor);
RegisterComponentEditor(TVpPrintPreviewDialog, TVpBaseDialogComponentEditor);
{ The next dialog is already handled by the TVpPrtFmtPropertyEditor:
RegisterComponentEditor(TVpPrintFormatEditDialog, TVpBaseDialogComponentEditor);
}
{ The following dialogs have a different Execute method and require existing
planner item data and, thus, are not useful at design-time:
RegisterComponentEditor(TVpResourceEditDialog, TVpBaseDialogComponentEditor);
RegisterComponentEditor(TVpEventEditDialog, TVpBaseDialogComponentEditor);
RegisterComponentEditor(TVpContactEditDialog, TVpBaseDialogComponentEditor);
RegisterComponentEditor(TVpTaskEditDialog, TVpBaseDialogComponentEditor);
RegisterComponentEditor(TVpNotificationDialog, TVpBaseDialogComponentEditor);
}
{----------------------------------------------------------------------------} {----------------------------------------------------------------------------}
{ register property editors } { register property editors }

View File

@ -360,6 +360,7 @@ resourcestring
{ Misc strings } { Misc strings }
RSCategoryDesc = 'Category %d'; RSCategoryDesc = 'Category %d';
RSTestDialog = 'Test dialog...';
{ Print format list } { Print format list }
RSSaveFormatChangesToFile = 'Save format to file?'; RSSaveFormatChangesToFile = 'Save format to file?';