diff --git a/components/tvplanit/examples/datastores/fb/readme.txt b/components/tvplanit/examples/datastores/fb/readme.txt
index fa019e022..211e29787 100644
--- a/components/tvplanit/examples/datastores/fb/readme.txt
+++ b/components/tvplanit/examples/datastores/fb/readme.txt
@@ -1,6 +1,10 @@
This demo shows how a Firebird database can be used for VisualPlanIt. It
takes advantage of the prebuilt TVpFirefordDatastore.
+Login parameters for the created database:
+ username: SYSDBA
+ password: masterkey
+
NOTE:
The project creates a new database on the fly. For reasons unknown at the moment,
an exception is raised here if started from the IDE. This does not happen any
diff --git a/components/tvplanit/examples/datastores/flex/access/tools/camain.pas b/components/tvplanit/examples/datastores/flex/access/tools/camain.pas
index 8a675242d..903c456ca 100644
--- a/components/tvplanit/examples/datastores/flex/access/tools/camain.pas
+++ b/components/tvplanit/examples/datastores/flex/access/tools/camain.pas
@@ -267,7 +267,7 @@ begin
'CREATE TABLE Resources ( '+
'ResourceID COUNTER, ' +
'Description VARCHAR(255), '+
- 'Notes VARCHAR, '+ // 1024 --> -
+ 'Notes VARCHAR, '+ // 1024 --> -
'ImageIndex INTEGER, '+
'ResourceActive LOGICAL, '+ // BOOL --> LOGICAL
'UserField0 VARCHAR(100), '+
diff --git a/components/tvplanit/examples/datastores/sqlite3/project1.lpi b/components/tvplanit/examples/datastores/sqlite3/project1.lpi
index 2d81d24bd..e4adbac99 100644
--- a/components/tvplanit/examples/datastores/sqlite3/project1.lpi
+++ b/components/tvplanit/examples/datastores/sqlite3/project1.lpi
@@ -24,16 +24,19 @@
-
+
-
+
-
+
-
+
+
+
+
diff --git a/components/tvplanit/examples/datastores/sqlite3/unit1.lfm b/components/tvplanit/examples/datastores/sqlite3/unit1.lfm
index b5cb35b24..b7ef81086 100644
--- a/components/tvplanit/examples/datastores/sqlite3/unit1.lfm
+++ b/components/tvplanit/examples/datastores/sqlite3/unit1.lfm
@@ -54,6 +54,7 @@ object Form1: TForm1
Align = alClient
TabIndex = 0
TabOrder = 1
+ OnChange = PageControl1Change
object TabSheet1: TTabSheet
Caption = 'Events and tasks'
ClientHeight = 624
@@ -152,8 +153,12 @@ object Form1: TForm1
DayNameStyle = dsShort
DrawingStyle = dsFlat
EventDayStyle = []
+ HeadAttributes.Color = clBtnFace
LineColor = clGray
TimeFormat = tf12Hour
+ TodayAttributes.Color = clSilver
+ TodayAttributes.BorderPen.Color = clRed
+ TodayAttributes.BorderPen.Width = 3
OffDayColor = clSilver
SelectedDayColor = clRed
ShowEvents = True
@@ -244,6 +249,64 @@ object Form1: TForm1
DrawingStyle = dsFlat
end
end
+ object TabSheet3: TTabSheet
+ Caption = 'Grids'
+ ClientHeight = 624
+ ClientWidth = 972
+ object DBNavigator: TDBNavigator
+ Left = 8
+ Height = 25
+ Top = 8
+ Width = 241
+ BevelOuter = bvNone
+ ChildSizing.EnlargeHorizontal = crsScaleChilds
+ ChildSizing.EnlargeVertical = crsScaleChilds
+ ChildSizing.ShrinkHorizontal = crsScaleChilds
+ ChildSizing.ShrinkVertical = crsScaleChilds
+ ChildSizing.Layout = cclLeftToRightThenTopToBottom
+ ChildSizing.ControlsPerLine = 100
+ ClientHeight = 25
+ ClientWidth = 241
+ Options = []
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 264
+ Height = 25
+ Top = 8
+ Width = 120
+ Caption = 'Apply to planner'
+ TabOrder = 1
+ end
+ object TabControl1: TTabControl
+ Left = 8
+ Height = 577
+ Top = 39
+ Width = 960
+ OnChange = TabControl1Change
+ TabIndex = 0
+ Tabs.Strings = (
+ 'Resources'
+ 'Contacts'
+ 'Events'
+ 'Tasks'
+ )
+ Anchors = [akTop, akLeft, akRight, akBottom]
+ BorderSpacing.Around = 8
+ TabOrder = 2
+ object Grid: TDBGrid
+ Left = 2
+ Height = 552
+ Top = 23
+ Width = 956
+ Align = alClient
+ Color = clWindow
+ Columns = <>
+ Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgThumbTracking]
+ TabOrder = 1
+ end
+ end
+ end
end
object VpControlLink1: TVpControlLink
DataStore = VpSqlite3Datastore1
@@ -292,11 +355,14 @@ object Form1: TForm1
CategoryColorMap.Category8.Description = 'Category 8'
CategoryColorMap.Category9.Color = clMaroon
CategoryColorMap.Category9.Description = 'Category 9'
+ HiddenCategories.BackgroundColor = clSilver
+ HiddenCategories.Color = clGray
EnableEventTimer = True
PlayEventSounds = True
Connection = SQLite3Connection1
AutoConnect = False
AutoCreate = False
+ DayBuffer = 31
left = 136
top = 192
end
@@ -317,4 +383,345 @@ object Form1: TForm1
left = 256
top = 120
end
+ object QryAllResources: TSQLQuery
+ PacketRecords = -1
+ FieldDefs = <
+ item
+ Name = 'ResourceID'
+ Attributes = [faReadonly]
+ DataType = ftAutoInc
+ Precision = -1
+ end
+ item
+ Name = 'Description'
+ DataType = ftString
+ Precision = -1
+ Size = 255
+ end
+ item
+ Name = 'Notes'
+ DataType = ftString
+ Precision = -1
+ Size = 255
+ end
+ item
+ Name = 'ImageIndex'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'ResourceActive'
+ DataType = ftBoolean
+ Precision = -1
+ end
+ item
+ Name = 'UserField0'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField1'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField2'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField3'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField4'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField5'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField6'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField7'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField8'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'UserField9'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end>
+ Database = SQLite3Connection1
+ Transaction = SQLTransaction1
+ SQL.Strings = (
+ 'SELECT * FROM Resources'
+ )
+ Options = [sqoKeepOpenOnCommit, sqoAutoCommit]
+ Params = <>
+ UsePrimaryKeyAsKey = False
+ left = 560
+ top = 160
+ end
+ object QryAllContacts: TSQLQuery
+ PacketRecords = -1
+ FieldDefs = <
+ item
+ Name = 'RecordID'
+ Attributes = [faReadonly]
+ DataType = ftAutoInc
+ Precision = -1
+ end
+ item
+ Name = 'ResourceID'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'FirstName'
+ DataType = ftString
+ Precision = -1
+ Size = 50
+ end
+ item
+ Name = 'LastName'
+ DataType = ftString
+ Precision = -1
+ Size = 50
+ end
+ item
+ Name = 'Birthdate'
+ DataType = ftDateTime
+ Precision = -1
+ end
+ item
+ Name = 'Anniversary'
+ DataType = ftDateTime
+ Precision = -1
+ end
+ item
+ Name = 'Title'
+ DataType = ftString
+ Precision = -1
+ Size = 50
+ end
+ item
+ Name = 'Company'
+ DataType = ftString
+ Precision = -1
+ Size = 50
+ end
+ item
+ Name = 'Job_Position'
+ DataType = ftString
+ Precision = -1
+ Size = 30
+ end
+ item
+ Name = 'Address'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'City'
+ DataType = ftString
+ Precision = -1
+ Size = 50
+ end
+ item
+ Name = 'State'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Zip'
+ DataType = ftString
+ Precision = -1
+ Size = 10
+ end
+ item
+ Name = 'Country'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Notes'
+ DataType = ftString
+ Precision = -1
+ Size = 255
+ end
+ item
+ Name = 'Phone1'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Phone2'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Phone3'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Phone4'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'Phone5'
+ DataType = ftString
+ Precision = -1
+ Size = 25
+ end
+ item
+ Name = 'PhoneType1'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'PhoneType2'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'PhoneType3'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'PhoneType4'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'PhoneType5'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'Category'
+ DataType = ftInteger
+ Precision = -1
+ end
+ item
+ Name = 'EMail'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'Custom1'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'Custom2'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'Custom3'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end
+ item
+ Name = 'Custom4'
+ DataType = ftString
+ Precision = -1
+ Size = 100
+ end>
+ Database = SQLite3Connection1
+ Transaction = SQLTransaction1
+ SQL.Strings = (
+ 'SELECT * FROM Contacts'
+ )
+ Options = [sqoKeepOpenOnCommit, sqoAutoCommit]
+ Params = <>
+ UsePrimaryKeyAsKey = False
+ left = 560
+ top = 214
+ end
+ object QryAllEvents: TSQLQuery
+ PacketRecords = -1
+ FieldDefs = <>
+ Database = SQLite3Connection1
+ Transaction = SQLTransaction1
+ SQL.Strings = (
+ 'SELECT * FROM Events'
+ )
+ Options = [sqoKeepOpenOnCommit, sqoAutoCommit]
+ Params = <>
+ UsePrimaryKeyAsKey = False
+ left = 560
+ top = 274
+ end
+ object QryAllTasks: TSQLQuery
+ PacketRecords = -1
+ FieldDefs = <>
+ Database = SQLite3Connection1
+ Transaction = SQLTransaction1
+ SQL.Strings = (
+ 'SELECT * FROM Tasks'
+ )
+ Options = [sqoKeepOpenOnCommit, sqoAutoCommit]
+ Params = <>
+ UsePrimaryKeyAsKey = False
+ left = 560
+ top = 341
+ end
+ object DsAllResources: TDataSource
+ DataSet = QryAllResources
+ left = 656
+ top = 160
+ end
+ object DsAllContacts: TDataSource
+ DataSet = QryAllContacts
+ left = 659
+ top = 214
+ end
+ object DsAllEvents: TDataSource
+ DataSet = QryAllEvents
+ left = 654
+ top = 274
+ end
+ object DsAllTasks: TDataSource
+ DataSet = QryAllTasks
+ left = 656
+ top = 341
+ end
end
diff --git a/components/tvplanit/examples/datastores/sqlite3/unit1.pas b/components/tvplanit/examples/datastores/sqlite3/unit1.pas
index 046ee02eb..b3d520f04 100644
--- a/components/tvplanit/examples/datastores/sqlite3/unit1.pas
+++ b/components/tvplanit/examples/datastores/sqlite3/unit1.pas
@@ -6,9 +6,9 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
- StdCtrls, ComCtrls, VpBaseDS, VpDayView, VpWeekView, VpTaskList,
- VpContactGrid, VpMonthView, VpResEditDlg, VpContactButtons, VpSQLite3DS,
- sqlite3conn, sqldb, VpData;
+ StdCtrls, ComCtrls, DbCtrls, DBGrids, VpBaseDS, VpDayView, VpWeekView,
+ VpTaskList, VpContactGrid, VpMonthView, VpResEditDlg, VpContactButtons,
+ VpSQLite3DS, sqlite3conn, sqldb, db, VpData;
type
@@ -17,16 +17,29 @@ type
TForm1 = class(TForm)
BtnNewRes: TButton;
BtnEditRes: TButton;
+ Button1: TButton;
+ DBNavigator: TDBNavigator;
+ DsAllContacts: TDataSource;
+ DsAllEvents: TDataSource;
+ DsAllResources: TDataSource;
+ DsAllTasks: TDataSource;
+ Grid: TDBGrid;
PageControl1: TPageControl;
Panel1: TPanel;
Panel2: TPanel;
+ QryAllContacts: TSQLQuery;
+ QryAllEvents: TSQLQuery;
+ QryAllResources: TSQLQuery;
+ QryAllTasks: TSQLQuery;
Splitter1: TSplitter;
Splitter2: TSplitter;
Splitter3: TSplitter;
SQLite3Connection1: TSQLite3Connection;
SQLTransaction1: TSQLTransaction;
+ TabControl1: TTabControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
+ TabSheet3: TTabSheet;
VpContactButtonBar1: TVpContactButtonBar;
VpContactGrid1: TVpContactGrid;
VpControlLink1: TVpControlLink;
@@ -40,6 +53,8 @@ type
procedure BtnNewResClick(Sender: TObject);
procedure BtnEditResClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
+ procedure PageControl1Change(Sender: TObject);
+ procedure TabControl1Change(Sender: TObject);
private
{ private declarations }
public
@@ -99,5 +114,32 @@ begin
end;
end;
+procedure TForm1.PageControl1Change(Sender: TObject);
+begin
+ if PageControl1.PageIndex = 2 then TabControl1Change(nil);
+end;
+
+procedure TForm1.TabControl1Change(Sender: TObject);
+var
+ i: Integer;
+ Datasource: TDataSource;
+begin
+ DsAllResources.Dataset.Close;
+ DsAllContacts.Dataset.Close;
+ DsAllEvents.Dataset.Close;
+ DsAllTasks.Dataset.Close;
+
+ case TabControl1.TabIndex of
+ 0: Grid.Datasource := DsAllResources;
+ 1: Grid.Datasource := DsAllContacts;
+ 2: Grid.Datasource := DsAllEvents;
+ 3: Grid.Datasource := DsAllTasks;
+ end;
+ DBNavigator.Datasource := Grid.Datasource;
+ Grid.Datasource.Dataset.Open;
+ for i:=0 to Grid.Columns.Count-1 do
+ Grid.Columns[i].Width := 100;;
+end;
+
end.
diff --git a/components/tvplanit/languages/vpsr.de.po b/components/tvplanit/languages/vpsr.de.po
index e6b49f850..ae0974c3a 100644
--- a/components/tvplanit/languages/vpsr.de.po
+++ b/components/tvplanit/languages/vpsr.de.po
@@ -173,6 +173,11 @@ msgstr "Kategorie"
msgid "Category %d"
msgstr "Kategorie %d"
+#: vpsr.rscategorylabel
+msgctxt "vpsr.rscategorylabel"
+msgid "Category:"
+msgstr "Kategorie:"
+
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
@@ -197,6 +202,7 @@ msgid "Other"
msgstr "Andere"
#: vpsr.rscategorylbl
+msgctxt "vpsr.rscategorylbl"
msgid "Category:"
msgstr "Kategorie:"
@@ -329,7 +335,8 @@ msgctxt "vpsr.rsdescriptionlbl"
msgid "Description:"
msgstr "Beschreibung:"
-#: vpsr.rsdetails
+#: vpsr.rsdetailslabel
+msgctxt "vpsr.rsdetailslabel"
msgid "Details:"
msgstr "Details:"
@@ -364,9 +371,10 @@ msgstr "Beschreibung"
msgid "Task"
msgstr "Aufgabe"
-#: vpsr.rsduedate
+#: vpsr.rsduedatelabel
+msgctxt "vpsr.rsduedatelabel"
msgid "Due date:"
-msgstr "Fälligkeitsdatum:"
+msgstr "Fällig am:"
#: vpsr.rsduplicateresource
msgid "Error: Duplicate resource."
@@ -478,6 +486,10 @@ msgstr "Von Ihrem Zeitplan?"
msgid "Height"
msgstr "Höhe"
+#: vpsr.rshigh
+msgid "High"
+msgstr "Hoch"
+
#: vpsr.rshomeaddress
msgid "Home address"
msgstr "Zuhause"
@@ -565,6 +577,10 @@ msgstr "Ort"
msgid "Location:"
msgstr "Ort:"
+#: vpsr.rslow
+msgid "Low"
+msgstr "Niedrig"
+
#: vpsr.rslsaturday
msgctxt "vpsr.rslsaturday"
msgid "S"
@@ -707,6 +723,10 @@ msgstr "keine"
msgid "No print formats have been defined"
msgstr "Es sind keine Druckformate definiert."
+#: vpsr.rsnormal
+msgid "Normal"
+msgstr "Normal"
+
#: vpsr.rsnotdoneyet
msgid "This feature is not implemented at this time."
msgstr "Dieses Feature ist zur Zeit nicht implementiert."
@@ -980,6 +1000,10 @@ msgstr "&Drucken"
msgid "Print"
msgstr "Drucken"
+#: vpsr.rsprioritylabel
+msgid "Priority:"
+msgstr "Priorität:"
+
#: vpsr.rsprtcontrolowner
msgid "Print controller is not owned by a TVpControlLink!"
msgstr "Print Controll hat nicht TVpControlLink als Owner"
diff --git a/components/tvplanit/languages/vpsr.fr.po b/components/tvplanit/languages/vpsr.fr.po
index 50dff8f87..f60425b32 100644
--- a/components/tvplanit/languages/vpsr.fr.po
+++ b/components/tvplanit/languages/vpsr.fr.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2016-09-12 22:32+0200\n"
+"PO-Revision-Date: 2016-09-17 17:11+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -130,7 +130,6 @@ msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
-#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Professionnel"
@@ -180,6 +179,11 @@ msgstr "Catégorie"
msgid "Category %d"
msgstr "Catégorie %d"
+#: vpsr.rscategorylabel
+msgctxt "vpsr.rscategorylabel"
+msgid "Category:"
+msgstr "Catégorie:"
+
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
@@ -204,6 +208,7 @@ msgid "Other"
msgstr "Autre"
#: vpsr.rscategorylbl
+msgctxt "vpsr.rscategorylbl"
msgid "Category:"
msgstr "Catégorie:"
@@ -336,7 +341,8 @@ msgctxt "vpsr.rsdescriptionlbl"
msgid "Description:"
msgstr "Sujet:"
-#: vpsr.rsdetails
+#: vpsr.rsdetailslabel
+msgctxt "vpsr.rsdetailslabel"
msgid "Details:"
msgstr "Détails:"
@@ -359,8 +365,6 @@ msgid "Print preview"
msgstr "Aperçu avant impression"
#: vpsr.rsdlgreseditcaption
-#, fuzzy
-#| msgid "Resource Edit"
msgid "Resource edit"
msgstr "Modifier la resource"
@@ -373,9 +377,8 @@ msgstr "Déscription"
msgid "Task"
msgstr "Tache"
-#: vpsr.rsduedate
-#, fuzzy
-#| msgid "Due Date:"
+#: vpsr.rsduedatelabel
+msgctxt "vpsr.rsduedatelabel"
msgid "Due date:"
msgstr "Date d'échéance:"
@@ -489,18 +492,20 @@ msgstr "de votre agenda?"
msgid "Height"
msgstr ""
+#: vpsr.rshigh
+msgid "High"
+msgstr ""
+
#: vpsr.rshomeaddress
msgid "Home address"
msgstr ""
#: vpsr.rshomeaddresslabel
-#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Maison"
#: vpsr.rshomeemaillabel
-#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Maison"
@@ -578,6 +583,10 @@ msgstr ""
msgid "Location:"
msgstr "Lieu:"
+#: vpsr.rslow
+msgid "Low"
+msgstr ""
+
#: vpsr.rslsaturday
msgctxt "vpsr.rslsaturday"
msgid "S"
@@ -720,6 +729,10 @@ msgstr ""
msgid "No print formats have been defined"
msgstr "Formats d'impression non-défini"
+#: vpsr.rsnormal
+msgid "Normal"
+msgstr ""
+
#: vpsr.rsnotdoneyet
msgid "This feature is not implemented at this time."
msgstr "Cette fonctionnalité n'est pas mise en œuvre à ce moment"
@@ -759,7 +772,6 @@ msgid "&Open Item"
msgstr "&Item ouvert"
#: vpsr.rsotheremaillabel
-#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Autre"
@@ -797,7 +809,6 @@ msgid "This operation cannot be undone!"
msgstr "Ce processus est irreversible!"
#: vpsr.rspersonalwebsitelabel
-#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Personnel"
@@ -995,6 +1006,10 @@ msgstr "&Imprimer"
msgid "Print"
msgstr "Imprimer"
+#: vpsr.rsprioritylabel
+msgid "Priority:"
+msgstr ""
+
#: vpsr.rsprtcontrolowner
msgid "Print controller is not owned by a TVpControlLink!"
msgstr "Le contrôleur d'impression n'est pas la propriété d'un TVpControlLink!"
@@ -1243,13 +1258,11 @@ msgid "Work address"
msgstr ""
#: vpsr.rsworkaddresslabel
-#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Travail"
#: vpsr.rsworkemaillabel
-#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Travail"
@@ -1578,4 +1591,3 @@ msgstr "Spécificateur d'axe inconnu"
#: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element"
msgstr "La déclaration XML doit apparaître avant le premier élément"
-
diff --git a/components/tvplanit/languages/vpsr.nl.po b/components/tvplanit/languages/vpsr.nl.po
index 40f19641e..cf6ba9d08 100644
--- a/components/tvplanit/languages/vpsr.nl.po
+++ b/components/tvplanit/languages/vpsr.nl.po
@@ -124,7 +124,6 @@ msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
-#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Zakelijk"
@@ -174,6 +173,11 @@ msgstr "Categorie"
msgid "Category %d"
msgstr "Categorie %d"
+#: vpsr.rscategorylabel
+msgctxt "vpsr.rscategorylabel"
+msgid "Category:"
+msgstr "Categorie:"
+
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
@@ -198,6 +202,7 @@ msgid "Other"
msgstr "Anders"
#: vpsr.rscategorylbl
+msgctxt "vpsr.rscategorylbl"
msgid "Category:"
msgstr "Categorie:"
@@ -330,7 +335,8 @@ msgctxt "vpsr.rsdescriptionlbl"
msgid "Description:"
msgstr "Onderwerp:"
-#: vpsr.rsdetails
+#: vpsr.rsdetailslabel
+msgctxt "vpsr.rsdetailslabel"
msgid "Details:"
msgstr "Details:"
@@ -353,8 +359,6 @@ msgid "Print preview"
msgstr "Afdruk voorbeeld"
#: vpsr.rsdlgreseditcaption
-#, fuzzy
-#| msgid "Resource Edit"
msgid "Resource edit"
msgstr "Middel bewerken"
@@ -367,9 +371,8 @@ msgstr "Omschrijving"
msgid "Task"
msgstr "Taak"
-#: vpsr.rsduedate
-#, fuzzy
-#| msgid "Due Date:"
+#: vpsr.rsduedatelabel
+msgctxt "vpsr.rsduedatelabel"
msgid "Due date:"
msgstr "Vervaldatum:"
@@ -483,18 +486,20 @@ msgstr "van uw tijdschema?"
msgid "Height"
msgstr ""
+#: vpsr.rshigh
+msgid "High"
+msgstr ""
+
#: vpsr.rshomeaddress
msgid "Home address"
msgstr ""
#: vpsr.rshomeaddresslabel
-#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Thuis"
#: vpsr.rshomeemaillabel
-#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Thuis"
@@ -572,6 +577,10 @@ msgstr ""
msgid "Location:"
msgstr "Plaats:"
+#: vpsr.rslow
+msgid "Low"
+msgstr ""
+
#: vpsr.rslsaturday
msgctxt "vpsr.rslsaturday"
msgid "S"
@@ -714,6 +723,10 @@ msgstr ""
msgid "No print formats have been defined"
msgstr "Er zijn geen afdrukformaten gedefinieerd."
+#: vpsr.rsnormal
+msgid "Normal"
+msgstr ""
+
#: vpsr.rsnotdoneyet
msgid "This feature is not implemented at this time."
msgstr "Dit onderdeel is nog niet geimplementeerd."
@@ -753,7 +766,6 @@ msgid "&Open Item"
msgstr "&Open Item"
#: vpsr.rsotheremaillabel
-#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Andere"
@@ -791,7 +803,6 @@ msgid "This operation cannot be undone!"
msgstr "Deze operatie kan niet ongedaan gemaakt worden!"
#: vpsr.rspersonalwebsitelabel
-#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Persoonlijk"
@@ -989,6 +1000,10 @@ msgstr "&Afdrukken"
msgid "Print"
msgstr "Afdrukken"
+#: vpsr.rsprioritylabel
+msgid "Priority:"
+msgstr ""
+
#: vpsr.rsprtcontrolowner
msgid "Print controller is not owned by a TVpControlLink!"
msgstr "Print Controller heeft niet TVpControlLink als Owner"
@@ -1237,13 +1252,11 @@ msgid "Work address"
msgstr ""
#: vpsr.rsworkaddresslabel
-#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Werk"
#: vpsr.rsworkemaillabel
-#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Werk"
@@ -1572,4 +1585,3 @@ msgstr "Onbekende as specificatie: %s"
#: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element"
msgstr "De XML declaratie moet voor het eerste element staan"
-
diff --git a/components/tvplanit/languages/vpsr.po b/components/tvplanit/languages/vpsr.po
index 958a697c1..4388f56ff 100644
--- a/components/tvplanit/languages/vpsr.po
+++ b/components/tvplanit/languages/vpsr.po
@@ -163,6 +163,11 @@ msgstr ""
msgid "Category %d"
msgstr ""
+#: vpsr.rscategorylabel
+msgctxt "vpsr.rscategorylabel"
+msgid "Category:"
+msgstr ""
+
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
@@ -187,6 +192,7 @@ msgid "Other"
msgstr ""
#: vpsr.rscategorylbl
+msgctxt "vpsr.rscategorylbl"
msgid "Category:"
msgstr ""
@@ -319,7 +325,8 @@ msgctxt "vpsr.rsdescriptionlbl"
msgid "Description:"
msgstr ""
-#: vpsr.rsdetails
+#: vpsr.rsdetailslabel
+msgctxt "vpsr.rsdetailslabel"
msgid "Details:"
msgstr ""
@@ -354,7 +361,8 @@ msgstr ""
msgid "Task"
msgstr ""
-#: vpsr.rsduedate
+#: vpsr.rsduedatelabel
+msgctxt "vpsr.rsduedatelabel"
msgid "Due date:"
msgstr ""
@@ -468,6 +476,10 @@ msgstr ""
msgid "Height"
msgstr ""
+#: vpsr.rshigh
+msgid "High"
+msgstr ""
+
#: vpsr.rshomeaddress
msgid "Home address"
msgstr ""
@@ -555,6 +567,10 @@ msgstr ""
msgid "Location:"
msgstr ""
+#: vpsr.rslow
+msgid "Low"
+msgstr ""
+
#: vpsr.rslsaturday
msgctxt "vpsr.rslsaturday"
msgid "S"
@@ -697,6 +713,10 @@ msgstr ""
msgid "No print formats have been defined"
msgstr ""
+#: vpsr.rsnormal
+msgid "Normal"
+msgstr ""
+
#: vpsr.rsnotdoneyet
msgid "This feature is not implemented at this time."
msgstr ""
@@ -970,6 +990,10 @@ msgstr ""
msgid "Print"
msgstr ""
+#: vpsr.rsprioritylabel
+msgid "Priority:"
+msgstr ""
+
#: vpsr.rsprtcontrolowner
msgid "Print controller is not owned by a TVpControlLink!"
msgstr ""
diff --git a/components/tvplanit/languages/vpsr.ru.po b/components/tvplanit/languages/vpsr.ru.po
index 1471f9f32..d5bd7ad1a 100644
--- a/components/tvplanit/languages/vpsr.ru.po
+++ b/components/tvplanit/languages/vpsr.ru.po
@@ -124,7 +124,6 @@ msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
-#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Дела"
@@ -174,6 +173,11 @@ msgstr "Категория"
msgid "Category %d"
msgstr "Категория %d"
+#: vpsr.rscategorylabel
+msgctxt "vpsr.rscategorylabel"
+msgid "Category:"
+msgstr "Категория:"
+
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
@@ -198,6 +202,7 @@ msgid "Other"
msgstr "Другое"
#: vpsr.rscategorylbl
+msgctxt "vpsr.rscategorylbl"
msgid "Category:"
msgstr "Категория:"
@@ -330,7 +335,8 @@ msgctxt "vpsr.rsdescriptionlbl"
msgid "Description:"
msgstr "Описание:"
-#: vpsr.rsdetails
+#: vpsr.rsdetailslabel
+msgctxt "vpsr.rsdetailslabel"
msgid "Details:"
msgstr "Детали:"
@@ -353,8 +359,6 @@ msgid "Print preview"
msgstr "Предварительный просмотр печати"
#: vpsr.rsdlgreseditcaption
-#, fuzzy
-#| msgid "Resource Edit"
msgid "Resource edit"
msgstr "Редактор ресурсов"
@@ -367,9 +371,8 @@ msgstr "Описание"
msgid "Task"
msgstr "Задача"
-#: vpsr.rsduedate
-#, fuzzy
-#| msgid "Due Date:"
+#: vpsr.rsduedatelabel
+msgctxt "vpsr.rsduedatelabel"
msgid "Due date:"
msgstr "Срок:"
@@ -483,18 +486,20 @@ msgstr "из вашего расписания?"
msgid "Height"
msgstr "Высота"
+#: vpsr.rshigh
+msgid "High"
+msgstr ""
+
#: vpsr.rshomeaddress
msgid "Home address"
msgstr ""
#: vpsr.rshomeaddresslabel
-#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Домашний"
#: vpsr.rshomeemaillabel
-#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Домашний"
@@ -572,6 +577,10 @@ msgstr ""
msgid "Location:"
msgstr "Расположение:"
+#: vpsr.rslow
+msgid "Low"
+msgstr ""
+
#: vpsr.rslsaturday
msgctxt "vpsr.rslsaturday"
msgid "S"
@@ -714,6 +723,10 @@ msgstr ""
msgid "No print formats have been defined"
msgstr "Не определён формат печати"
+#: vpsr.rsnormal
+msgid "Normal"
+msgstr ""
+
#: vpsr.rsnotdoneyet
msgid "This feature is not implemented at this time."
msgstr "Эта возможность не рализована."
@@ -753,7 +766,6 @@ msgid "&Open Item"
msgstr "Открыть эелемент"
#: vpsr.rsotheremaillabel
-#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Другой"
@@ -791,7 +803,6 @@ msgid "This operation cannot be undone!"
msgstr ""
#: vpsr.rspersonalwebsitelabel
-#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Персонал"
@@ -989,6 +1000,10 @@ msgstr "Печать"
msgid "Print"
msgstr "Печать"
+#: vpsr.rsprioritylabel
+msgid "Priority:"
+msgstr ""
+
#: vpsr.rsprtcontrolowner
msgid "Print controller is not owned by a TVpControlLink!"
msgstr ""
@@ -1237,13 +1252,11 @@ msgid "Work address"
msgstr ""
#: vpsr.rsworkaddresslabel
-#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Рабочий"
#: vpsr.rsworkemaillabel
-#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Рабочий"
@@ -1572,4 +1585,3 @@ msgstr ""
#: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element"
msgstr ""
-
diff --git a/components/tvplanit/source/vpdata.pas b/components/tvplanit/source/vpdata.pas
index fed50a2a0..edd7bda5b 100644
--- a/components/tvplanit/source/vpdata.pas
+++ b/components/tvplanit/source/vpdata.pas
@@ -60,13 +60,14 @@ type
TVpContactSort = (csLastFirst, csFirstLast);
+ TVpTaskPriority = (tpLow=-1, tpNormal=0, tpHigh=1);
+
TVpOverlayPattern = (opSolid, opClear, opHorizontal, opVertical,
opFDiagonal, opBDiagonal, opCross, opDiagCross);
TVpOverlayDetail = (odResource, odEventDescription, odEventCategory);
TVpOverlayDetails = set of TVpOverlayDetail;
-
{ forward declarations }
TVpResource = class;
TVpResourceGroup = class;
@@ -440,8 +441,6 @@ type
property Complete: Boolean read FComplete write SetComplete;
property CreatedOn: TDateTime read FCreatedOn write SetCreatedOn;
property CompletedOn: TDateTIme read FCompletedOn write SetCompletedOn;
-
- { Not implemented yet }
property Priority: Integer read FPriority write SetPriority;
property Category: Integer read FCategory write SetCategory;
diff --git a/components/tvplanit/source/vpdbds.pas b/components/tvplanit/source/vpdbds.pas
index 3aa8d4eba..9af9ef1e4 100644
--- a/components/tvplanit/source/vpdbds.pas
+++ b/components/tvplanit/source/vpdbds.pas
@@ -60,20 +60,16 @@ type
{ internal methods }
procedure LoadContact(AContact: TVpContact); virtual;
+ procedure LoadTask(ATask: TVpTask); virtual;
procedure SetFilterCriteria(ATable: TDataset; AUseDateTime: Boolean;
AResourceID: Integer; AStartDateTime, AEndDateTime: TDateTime); virtual;
protected {properties that may be surfaced later}
- property ReadOnly : boolean
- read FReadOnly write SetReadOnly default False;
- property ResourceTable : TDataset
- read GetResourceTable;
- property EventsTable : TDataset
- read GetEventsTable;
- property ContactsTable : TDataset
- read GetContactsTable;
- property TasksTable : TDataset
- read GetTasksTable;
+ property ReadOnly: boolean read FReadOnly write SetReadOnly default False;
+ property ResourceTable: TDataset read GetResourceTable;
+ property EventsTable: TDataset read GetEventsTable;
+ property ContactsTable: TDataset read GetContactsTable;
+ property TasksTable: TDataset read GetTasksTable;
public
constructor Create(AOwner: TComponent); override;
@@ -244,7 +240,8 @@ begin
Required := false;
end;
end; {with FieldDefs do}
- end else if TableName = EventsTableName then begin
+ end else
+ if TableName = EventsTableName then begin
with FieldDefs do begin
Clear;
{ Record ID }
@@ -818,7 +815,8 @@ begin
Required := false;
end;
end; {with FieldDefs do}
- end else if TableName = TasksTableName then begin
+ end else
+ if TableName = TasksTableName then begin
with FieldDefs do begin
Clear;
{ Record ID }
@@ -1203,7 +1201,7 @@ begin
end; {while}
end; {with EventsTable}
end;
-{=====}
+
{ Loads the contact from the current cursor position of the contacts table }
procedure TVpCustomDBDataStore.LoadContact(AContact: TVpContact);
var
@@ -1358,6 +1356,44 @@ begin
end;
end;
+{ Loads the task from the current cursor position of the task table }
+procedure TVpCustomDBDatastore.LoadTask(ATask: TVpTask);
+var
+ F: TField;
+begin
+ with TasksTable do begin
+ ATask.RecordID := FieldByName('RecordID').AsInteger;
+ ATask.Complete := FieldByName('Complete').AsBoolean;
+ ATask.Description := FieldByName('Description').AsString;
+ ATask.Details := FieldByName('Details').AsString;
+ ATask.CreatedOn := FieldByName('CreatedOn').AsDateTime;
+ ATask.CompletedOn := FieldByName('CompletedOn').AsDateTime;
+ ATask.Priority := FieldByName('Priority').AsInteger;
+ ATask.Category := FieldByName('Category').AsInteger;
+ ATask.DueDate := FieldByName('DueDate').AsDateTime;
+ F := FindField('UserField0');
+ if F <> nil then ATask.UserField0 := F.AsString;
+ F := FindField('UserField1');
+ if F <> nil then ATask.UserField1 := F.AsString;
+ F := FindField('UserField2');
+ if F <> nil then ATask.UserField2 := F.AsString;
+ F := FindField('UserField3');
+ if F <> nil then ATask.UserField3 := F.AsString;
+ F := FindField('UserField4');
+ if F <> nil then ATask.UserField4 := F.AsString;
+ F := FindField('UserField5');
+ if F <> nil then ATask.UserField5 := F.AsString;
+ F := FindField('UserField6');
+ if F <> nil then ATask.UserField6 := F.AsString;
+ F := FindField('UserField7');
+ if F <> nil then ATask.UserField7 := F.AsString;
+ F := FindField('UserField8');
+ if F <> nil then ATask.UserField8 := F.AsString;
+ F := FindField('UserField9');
+ if F <> nil then ATask.UserField9 := F.AsString;
+ end;
+end;
+
procedure TVpCustomDBDataStore.LoadTasks;
var
Task: TVpTask;
@@ -1372,36 +1408,8 @@ begin
First;
while not EOF do begin
Task := Resource.Tasks.AddTask(GetNextID(TasksTableName));
- task.loading := true;
- Task.RecordID := FieldByName('RecordID').AsInteger;
- Task.Complete := FieldByName('Complete').AsBoolean;
- Task.Description := FieldByName('Description').AsString;
- Task.Details := FieldByName('Details').AsString;
- Task.CreatedOn := FieldByName('CreatedOn').AsDateTime;
- Task.CompletedOn := FieldByName('CompletedOn').AsDateTime;
- Task.Priority := FieldByName('Priority').AsInteger;
- Task.Category := FieldByName('Category').AsInteger;
- Task.DueDate := FieldByName('DueDate').AsDateTime;
- F := FindField('UserField0');
- if F <> nil then Task.UserField0 := F.AsString;
- F := FindField('UserField1');
- if F <> nil then Task.UserField1 := F.AsString;
- F := FindField('UserField2');
- if F <> nil then Task.UserField2 := F.AsString;
- F := FindField('UserField3');
- if F <> nil then Task.UserField3 := F.AsString;
- F := FindField('UserField4');
- if F <> nil then Task.UserField4 := F.AsString;
- F := FindField('UserField5');
- if F <> nil then Task.UserField5 := F.AsString;
- F := FindField('UserField6');
- if F <> nil then Task.UserField6 := F.AsString;
- F := FindField('UserField7');
- if F <> nil then Task.UserField7 := F.AsString;
- F := FindField('UserField8');
- if F <> nil then Task.UserField8 := F.AsString;
- F := FindField('UserField9');
- if F <> nil then Task.UserField9 := F.AsString;
+ Task.loading := true;
+ LoadTask(Task);
Task.Loading := false;
Next;
end; {while}
@@ -2084,14 +2092,34 @@ end;
{=====}
procedure TVpCustomDBDataStore.RefreshTasks;
+var
+ task: TVpTask;
begin
+ if Resource <> nil then begin
+ Resource.Tasks.ClearTasks;
+ with TasksTable do begin
+ SetFilterCriteria(TasksTable, False, Resource.ResourceID, 0, 0);
+ First;
+ while not EOF do begin
+ task := Resource.Tasks.AddTask(FieldByName('RecordID').AsInteger);
+ task.Loading := true;
+ LoadTask(task);
+ task.Loading := false;
+ Next;
+ end;
+ end;
+ // LoadContacts;
+ end;
+ inherited;
+end;
+(*
if Resource <> nil then begin
Resource.Tasks.ClearTasks;
LoadTasks;
end;
inherited;
end;
-{=====}
+*)
procedure TVpCustomDBDataStore.RefreshResource;
var
diff --git a/components/tvplanit/source/vpmisc.pas b/components/tvplanit/source/vpmisc.pas
index 6ff6939cd..e95fef85c 100644
--- a/components/tvplanit/source/vpmisc.pas
+++ b/components/tvplanit/source/vpmisc.pas
@@ -134,6 +134,8 @@ function GetEndLine(EndTime: TDateTime; Granularity: TVpGranularity): Integer;
function LineToStartTime(Line: Integer; Granularity: TVpGranularity): TDateTime;
function GetLineDuration(Granularity: TVpGranularity): Double;
+function TaskPriorityToStr(APriority: TVpTaskPriority): String;
+
function AutoHeight(ARadioGroup: TRadioGroup): Integer;
function GetButtonWidth(AButton: TButton): Integer;
function GetLabelWidth(ALabel: TLabel): Integer;
@@ -616,7 +618,16 @@ function GetLineDuration(Granularity: TVpGranularity): Double;
begin
Result := GranularityMinutes[Granularity] / MinutesInDay;
end;
-{=====}
+
+function TaskPriorityToStr(APriority: TVpTaskPriority): String;
+begin
+ Result := '';
+ case APriority of
+ tpLow : Result := RSLow;
+ tpNormal : Result := RSNormal;
+ tpHigh : Result := RSHigh;
+ end;
+end;
function AutoHeight(ARadioGroup: TRadioGroup): Integer;
var
diff --git a/components/tvplanit/source/vpsr.inc b/components/tvplanit/source/vpsr.inc
index cba207eec..52a6c4643 100644
--- a/components/tvplanit/source/vpsr.inc
+++ b/components/tvplanit/source/vpsr.inc
@@ -98,6 +98,10 @@ resourcestring
RSCategoryLabel4 = 'Personal';
RSCategoryLabel5 = 'Other';
+ RSLow = 'Low';
+ RSNormal = 'Normal';
+ RSHigh = 'High';
+
RSWeekOf = 'Week of';
RSThrough = 'Through';
RSSunday = 'Sunday';
@@ -270,11 +274,13 @@ resourcestring
{ Task Edit Dialog Captions }
RSDlgTaskEdit = 'Task';
- RSDueDate = 'Due date:';
- RSDetails = 'Details:';
RSTaskComplete = 'Task complete';
RSCreatedOn = 'Created on';
RSCompletedOn = 'Completed on';
+ RSDueDateLabel = 'Due date:';
+ RSDetailsLabel = 'Details:';
+ RSPriorityLabel = 'Priority:';
+ RSCategoryLabel = 'Category:';
{ Resource Edit Dialog Captions }
RSDlgResEditCaption = 'Resource edit';
diff --git a/components/tvplanit/source/vptaskeditdlg.lfm b/components/tvplanit/source/vptaskeditdlg.lfm
index 9a0bac43e..459f784e4 100644
--- a/components/tvplanit/source/vptaskeditdlg.lfm
+++ b/components/tvplanit/source/vptaskeditdlg.lfm
@@ -1,12 +1,12 @@
object TaskEditForm: TTaskEditForm
Left = 284
- Height = 378
- Top = 286
+ Height = 411
+ Top = 253
Width = 547
HorzScrollBar.Page = 545
VertScrollBar.Page = 339
Caption = 'TaskEditForm'
- ClientHeight = 378
+ ClientHeight = 411
ClientWidth = 547
OnCreate = FormCreate
OnShow = FormShow
@@ -15,7 +15,7 @@ object TaskEditForm: TTaskEditForm
object ButtonPanel: TPanel
Left = 0
Height = 37
- Top = 341
+ Top = 374
Width = 547
Align = alBottom
BevelOuter = bvNone
@@ -61,7 +61,7 @@ object TaskEditForm: TTaskEditForm
end
object PageControl1: TPageControl
Left = 0
- Height = 341
+ Height = 374
Top = 0
Width = 547
TabStop = False
@@ -71,29 +71,29 @@ object TaskEditForm: TTaskEditForm
TabOrder = 0
object tabTask: TTabSheet
Caption = 'Task'
- ClientHeight = 313
+ ClientHeight = 346
ClientWidth = 539
object DueDateLbl: TLabel
Left = 52
Height = 15
- Top = 44
+ Top = 78
Width = 50
Caption = 'Due date:'
FocusControl = DueDateEdit
ParentColor = False
end
- object CreatedOnLbl: TLabel
+ object LblCreatedOn: TLabel
Left = 52
Height = 15
- Top = 69
+ Top = 103
Width = 61
Caption = 'Created on:'
ParentColor = False
end
- object CompletedOnLbl: TLabel
+ object LblCompletedOn: TLabel
Left = 333
Height = 15
- Top = 69
+ Top = 103
Width = 79
Caption = 'Completed on:'
ParentColor = False
@@ -101,7 +101,7 @@ object TaskEditForm: TTaskEditForm
object Bevel1: TBevel
Left = 4
Height = 2
- Top = 32
+ Top = 64
Width = 529
Anchors = [akTop, akLeft, akRight]
Shape = bsTopLine
@@ -109,7 +109,7 @@ object TaskEditForm: TTaskEditForm
object imgCalendar: TImage
Left = 8
Height = 32
- Top = 38
+ Top = 72
Width = 32
AutoSize = True
Picture.Data = {
@@ -218,7 +218,7 @@ object TaskEditForm: TTaskEditForm
object imgCompleted: TImage
Left = 290
Height = 32
- Top = 38
+ Top = 72
Width = 32
AutoSize = True
Picture.Data = {
@@ -257,18 +257,18 @@ object TaskEditForm: TTaskEditForm
TabOrder = 0
Text = 'DescriptionEdit'
end
- object CompleteCB: TCheckBox
+ object CbComplete: TCheckBox
Left = 333
Height = 19
- Top = 43
+ Top = 77
Width = 72
Caption = 'Complete'
TabOrder = 2
end
object DetailsMemo: TMemo
Left = 4
- Height = 208
- Top = 96
+ Height = 209
+ Top = 128
Width = 529
Anchors = [akTop, akLeft, akRight, akBottom]
Lines.Strings = (
@@ -282,8 +282,8 @@ object TaskEditForm: TTaskEditForm
object DueDateEdit: TDateEdit
Left = 128
Height = 23
- Top = 41
- Width = 103
+ Top = 75
+ Width = 120
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone
ButtonWidth = 23
@@ -328,6 +328,58 @@ object TaskEditForm: TTaskEditForm
TabOrder = 1
Text = 'DueDateEdit'
end
+ object LblCategory: TLabel
+ Left = 62
+ Height = 15
+ Top = 36
+ Width = 51
+ Caption = 'Category:'
+ FocusControl = CbCategory
+ ParentColor = False
+ end
+ object CbCategory: TComboBox
+ Left = 128
+ Height = 23
+ Top = 32
+ Width = 120
+ ItemHeight = 15
+ ItemIndex = 0
+ Items.Strings = (
+ 'Business'
+ 'Clients'
+ 'Family'
+ 'Other'
+ 'Personal'
+ )
+ Style = csDropDownList
+ TabOrder = 4
+ Text = 'Business'
+ end
+ object LblPriority: TLabel
+ Left = 281
+ Height = 15
+ Top = 36
+ Width = 41
+ Caption = 'Priority:'
+ FocusControl = CbPriority
+ ParentColor = False
+ end
+ object CbPriority: TComboBox
+ Left = 333
+ Height = 23
+ Top = 32
+ Width = 120
+ ItemHeight = 15
+ ItemIndex = 1
+ Items.Strings = (
+ 'low'
+ 'normal'
+ 'high'
+ )
+ Style = csDropDownList
+ TabOrder = 5
+ Text = 'normal'
+ end
end
end
end
diff --git a/components/tvplanit/source/vptaskeditdlg.pas b/components/tvplanit/source/vptaskeditdlg.pas
index a908c81e4..1f29464c8 100644
--- a/components/tvplanit/source/vptaskeditdlg.pas
+++ b/components/tvplanit/source/vptaskeditdlg.pas
@@ -52,6 +52,10 @@ type
TTaskEditForm = class(TForm)
ButtonPanel: TPanel;
+ CbCategory: TComboBox;
+ CbPriority: TComboBox;
+ LblCategory: TLabel;
+ LblPriority: TLabel;
OKBtn: TButton;
CancelBtn: TButton;
PageControl1: TPageControl;
@@ -59,9 +63,9 @@ type
DescriptionEdit: TEdit;
DueDateLbl: TLabel;
DueDateEdit: TDateEdit;
- CompleteCB: TCheckBox;
- CreatedOnLbl: TLabel;
- CompletedOnLbl: TLabel;
+ CbComplete: TCheckBox;
+ LblCreatedOn: TLabel;
+ LblCompletedOn: TLabel;
DetailsMemo: TMemo;
ResourceNameLbl: TLabel;
Bevel1: TBevel;
@@ -76,7 +80,10 @@ type
FReturnCode: TVpEditorReturnCode;
FTask: TVpTask;
FResource: TVpResource;
+ FBtnHeight: Integer;
+ FEditHeight: Integer;
procedure PositionControls;
+ procedure SetCaptions;
public
procedure PopulateSelf;
procedure DePopulateSelf;
@@ -94,8 +101,8 @@ type
teTask: TVpTask;
public
constructor Create(AOwner: TComponent); override;
- function Execute(Task: TVpTask): Boolean; reintroduce;
function AddNewTask: Boolean;
+ function Execute(Task: TVpTask): Boolean; reintroduce;
published
{properties}
property DataStore;
@@ -119,38 +126,62 @@ uses
procedure TTaskEditForm.FormCreate(Sender: TObject);
begin
FReturnCode := rtAbandon;
+ FBtnHeight := ScaleY(OKBtn.Height, DesignTimeDPI);
+ FEditHeight := ScaleY(DueDateEdit.Height, DesignTimeDPI);
end;
-{=====}
procedure TTaskEditForm.DePopulateSelf;
begin
Task.Description := DescriptionEdit.Text;
Task.DueDate := DueDateEdit.Date;
Task.Details := DetailsMemo.Text;
- Task.Complete := CompleteCB.Checked;
- DueDateLbl.Caption := RSDueDate;
+ Task.Complete := CbComplete.Checked;
+ Task.Priority := CbPriority.ItemIndex-1;
+ Task.Category := CbCategory.ItemIndex;
+// DueDateLbl.Caption := RSDueDateLabel;
end;
{=====}
-procedure TTaskEditForm.PopulateSelf;
+procedure TTaskEditForm.SetCaptions;
+var
+ ct: TVpCategoryType;
+ tp: TVpTaskPriority;
begin
ResourceNameLbl.Caption := Resource.Description;
- CompleteCB.Caption := RSTaskComplete;
- DueDateLbl.Caption := RSDueDate;
+ CbComplete.Caption := RSTaskComplete;
+ DueDateLbl.Caption := RSDueDateLabel;
OKBtn.Caption := RSOKBtn;
CancelBtn.Caption := RSCancelBtn;
TabTask.Caption := RSDlgTaskEdit;
+ LblPriority.Caption := RSPriorityLabel;
+ LblCategory.Caption := RSCategoryLabel;
+
+ CbCategory.Items.Clear;
+ for ct in TVpCategoryType do
+ CbCategory.Items.Add(CategoryLabel(ct));
+
+ CbPriority.Items.Clear;
+ for tp in TVpTaskPriority do
+ CbPriority.Items.Add(TaskPriorityToStr(tp));
+end;
+
+procedure TTaskEditForm.PopulateSelf;
+begin
+ SetCaptions;
DescriptionEdit.Text := Task.Description;
DueDateEdit.Date := Task.DueDate;
DetailsMemo.Text := Task.Details;
- CompleteCB.Checked := Task.Complete;
+ CbComplete.Checked := Task.Complete;
if Task.CompletedOn <> 0 then
- CompletedOnLbl.Caption := RSCompletedOn + ' ' + FormatDateTime(DefaultFormatSettings.ShortDateFormat, Task.CompletedOn)
+ LblCompletedOn.Caption := RSCompletedOn + ' ' + FormatDateTime('ddddd', Task.CompletedOn)
+ // 'ddddd' = DefaultFormatSettings.ShortDateFormat
else
- CompletedOnLbl.Visible := False;
- CompletedOnLbl.Visible := CompleteCB.Checked;
- CreatedOnLbl.Caption := RSCreatedOn + ' ' + FormatDateTime(DefaultFormatSettings.ShortDateFormat, Task.CreatedOn);
+ LblCompletedOn.Visible := False;
+ LblCompletedOn.Visible := CbComplete.Checked;
+ LblCreatedOn.Caption := RSCreatedOn + ' ' + FormatDateTime('ddddd', Task.CreatedOn);
+ CbPriority.ItemIndex := Task.Priority + 1;
+ CbCategory.ItemIndex := Task.Category;
PositionControls;
end;
@@ -163,14 +194,18 @@ var
w: Integer;
cnv: TControlCanvas;
cb: TCheckbox;
- editHeight: Integer;
begin
VBevelDist := ScaleY(VBevelDist, DesignTimeDPI);
VDist := ScaleY(VDist, DesignTimeDPI);
HDist := ScaleX(HDist, DesignTimeDPI);
- editHeight := ScaleY(DueDateEdit.Height, DesignTimeDPI);
- OKBtn.Height := ScaleY(OKBtn.Height, DesignTimeDPI);
+ DescriptionEdit.Height := FEditHeight;
+ DueDateEdit.Height := FEditHeight;
+ DueDateEdit.ButtonWidth := FEditHeight;
+ CbCategory.Height := FEditHeight;
+ CbPriority.Height := FEditHeight;
+
+ OKBtn.Height := FBtnHeight;
OKBtn.Top := VDist;
CancelBtn.Height := OKBtn.Height;
CancelBtn.Top := OKBtn.Top;
@@ -178,7 +213,6 @@ begin
ResourceNameLbl.Font.Size := ScaleY(ResourceNameLbl.Font.Size, DesignTimeDPI);
ResourceNameLbl.Top := OKBtn.Top + (OKBtn.Height - ScaleY(ResourceNameLbl.Height, DesignTimeDPI)) div 2;
- DueDateEdit.ButtonWidth := ScaleX(DueDateEdit.Height, DesigntimeDPI);
DueDateEdit.Left := DueDateLbl.Left + GetLabelWidth(DueDateLbl) + HDist;
cnv := TControlCanvas.Create;
try
@@ -192,21 +226,30 @@ begin
if RightOf(DueDateEdit) + 3*HDist > ImgCompleted.Left then begin
ImgCompleted.Left := RightOf(DueDateEdit) + 3*HDist;
- CompleteCB.Left := RightOf(ImgCompleted) + HDist;
- CompletedOnLbl.Left := CompleteCB.Left;
+ CbComplete.Left := RightOf(ImgCompleted) + HDist;
+ LblCompletedOn.Left := CbComplete.Left;
cnv := TControlCanvas.Create;
try
- cnv.Control := CompleteCB;
- cnv.Font.Assign(CompleteCB.Font);
- w := cnv.TextWidth(CompleteCB.Caption) + GetSystemMetrics(SM_CXMENUCHECK);
+ cnv.Control := CbComplete;
+ cnv.Font.Assign(CbComplete.Font);
+ w := cnv.TextWidth(CbComplete.Caption) + GetSystemMetrics(SM_CXMENUCHECK);
finally
cnv.Free;
end;
- w := Max(GetlabelWidth(CompletedOnLbl), w);
- ClientWidth := ClientWidth - tabTask.ClientWidth + CompleteCB.Left + w + HDist*2;
+ w := Max(GetlabelWidth(LblCompletedOn), w);
+ ClientWidth := ClientWidth - tabTask.ClientWidth + CbComplete.Left + w + HDist*2;
end;
+ CbCategory.Left := DueDateEdit.Left;
+ LblCategory.Left := CbCategory.Left - HDist - GetLabelWidth(LblCategory);
+
+ if RightOf(CbCategory) + 3*HDist + GetLabelWidth(LblPriority) + HDist > CbComplete.Left then
+ CbPriority.Left := CbPriority.Parent.ClientWidth - HDist - CbPriority.Width
+ else
+ CbPriority.Left := CbComplete.Left;
+ LblPriority.Left := CbPriority.Left - HDist - GetLabelWidth(LblPriority);
+
OKBtn.Width := Max(GetButtonWidth(OKBtn), GetButtonWidth(CancelBtn));
CancelBtn.Width := OKBtn.Width;
{$IFDEF MSWINDOWS}
@@ -221,18 +264,23 @@ begin
OKBtn.TabOrder := 1;
{$ENDIF}
- Bevel1.Top := DescriptionEdit.Top + editHeight + VBevelDist; //BottomOf(DescriptionEdit) + VBevelDist;
+ CbCategory.Top := BottomOf(DescriptionEdit) + VDist;
+ LblCategory.Top := CbCategory.Top + (CbCategory.Height - LblCategory.Height) div 2;
+ CbPriority.Top := CbCategory.Top;
+ LblPriority.Top := LblCategory.Top;
+
+ //Bevel1.Top := DescriptionEdit.Top + editHeight + VBevelDist; //BottomOf(DescriptionEdit) + VBevelDist;
ImgCalendar.Top := Bevel1.Top + 2 + VBevelDist;
ImgCompleted.Top := ImgCalendar.Top;
DueDateEdit.Top := ImgCalendar.Top; // + (ImgCalendar.Height - DueDateEdit.Height) div 2;
DueDateLbl.Top := DueDateEdit.Top + (DueDateEdit.Height - DueDateLbl.Height) div 2;
- CompleteCB.Top := ImgCompleted.Top; // + (ImgCompleted.Height - CompleteCB.Height) div 2;
+ CbComplete.Top := ImgCompleted.Top; // + (ImgCompleted.Height - CbComplete.Height) div 2;
- CreatedOnLbl.Top := DueDateEdit.Top + editHeight + VDist; //BottomOf(DueDateEdit) + VDist;
- CompletedOnLbl.Top := CreatedOnLbl.Top;
+ LblCreatedOn.Top := DueDateEdit.Top + FEditHeight + VDist; //BottomOf(DueDateEdit) + VDist;
+ LblCompletedOn.Top := LblCreatedOn.Top;
- DetailsMemo.Top := BottomOf(CreatedOnLbl) + VBevelDist;
+ DetailsMemo.Top := BottomOf(LblCreatedOn) + VBevelDist;
DetailsMemo.Height := tabTask.ClientHeight - DetailsMemo.Top - DescriptionEdit.Top;
end;
{=====}
diff --git a/components/tvplanit/source/vptasklistpainter.pas b/components/tvplanit/source/vptasklistpainter.pas
index d561ad330..ab42acf02 100644
--- a/components/tvplanit/source/vptasklistpainter.pas
+++ b/components/tvplanit/source/vptasklistpainter.pas
@@ -429,6 +429,9 @@ begin
else
RenderCanvas.Font.Color := RealNormalColor;
end;
+ if Task.Priority = ord(tpHigh) then
+ RenderCanvas.Font.Style := RenderCanvas.Font.Style + [fsBold] else
+ RenderCanvas.Font.Style := RenderCanvas.Font.style - [fsBold];
{ if this is the selected task, set highlight text color }
if (Task = FActiveTask) and