13 #include "yatish_recording.xpm" 15 const char *
not_used = _(
"translator-credits");
20 #include <wx/string.h> 75 wxBoxSizer* BoxSizer2;
76 wxBoxSizer* BoxSizer3;
77 wxBoxSizer* BoxSizer4;
78 wxBoxSizer* BoxSizer5;
83 wxMenuItem* menuitemEditActivity;
84 wxMenuItem* menuitemEditChart;
85 wxMenuItem* menuitemEditLastmonth;
86 wxMenuItem* menuitemEditLastweek;
87 wxMenuItem* menuitemEditNew;
88 wxMenuItem* menuitemEditReset;
89 wxMenuItem* menuitemEditSettings;
90 wxMenuItem* menuitemEditTable;
91 wxMenuItem* menuitemEditThismonth;
92 wxMenuItem* menuitemEditThisweek;
93 wxMenuItem* menuitemEditToday;
94 wxMenuItem* menuitemEditYesteday;
95 wxMenuItem* menuitemFileQuit;
96 wxMenuItem* menuitemHelpAbout;
97 wxMenuItem* menuitemHelpUser;
99 wxPanel* panelCurrent;
101 wxStaticBoxSizer* StaticBoxSizer1;
102 wxStaticBoxSizer* StaticBoxSizer2;
103 wxStaticBoxSizer* StaticBoxSizer3;
104 wxStaticText* StaticText1;
106 Create(parent, wxID_ANY, _(
"YATiSh"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T(
"wxID_ANY"));
107 BoxSizer1 =
new wxBoxSizer(wxVERTICAL);
108 notebook =
new wxNotebook(
this, idNotebook, wxDefaultPosition, wxDefaultSize, 0, _T(
"idNotebook"));
109 panelCurrent =
new wxPanel(notebook, idPanelCurrent, wxDefaultPosition, wxDefaultSize, 0, _T(
"idPanelCurrent"));
110 BoxSizer2 =
new wxBoxSizer(wxVERTICAL);
111 BoxSizer2->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
112 StaticBoxSizer1 =
new wxStaticBoxSizer(wxHORIZONTAL, panelCurrent, _(
"Select project, task and tool"));
113 choiceProject =
new wxChoice(panelCurrent, idChoiceProject, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceProject"));
114 StaticBoxSizer1->Add(choiceProject, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10);
115 choiceTask =
new wxChoice(panelCurrent, idChoiceTask, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceTask"));
116 StaticBoxSizer1->Add(choiceTask, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10);
117 choiceTool =
new wxChoice(panelCurrent, idChoiceTool, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceTool"));
118 StaticBoxSizer1->Add(choiceTool, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10);
119 BoxSizer2->Add(StaticBoxSizer1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
120 BoxSizer2->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
121 BoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
122 buttonStart =
new wxButton(panelCurrent, idButtonStart, _(
"&RECORD"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"idButtonStart"));
123 BoxSizer3->Add(buttonStart, 1, wxALL|wxEXPAND, 5);
124 buttonStop =
new wxButton(panelCurrent, idButtonStop, _(
"&STOP"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"idButtonStop"));
125 BoxSizer3->Add(buttonStop, 1, wxALL|wxEXPAND, 5);
126 BoxSizer2->Add(BoxSizer3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
127 BoxSizer2->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
128 panelCurrent->SetSizer(BoxSizer2);
129 BoxSizer2->Fit(panelCurrent);
130 BoxSizer2->SetSizeHints(panelCurrent);
131 panelList =
new wxPanel(notebook, idPanelList, wxDefaultPosition, wxDefaultSize, 0, _T(
"idPanelList"));
132 BoxSizer4 =
new wxBoxSizer(wxVERTICAL);
133 BoxSizer5 =
new wxBoxSizer(wxHORIZONTAL);
134 StaticBoxSizer2 =
new wxStaticBoxSizer(wxHORIZONTAL, panelList, _(
"Table"));
135 choiceTable =
new wxChoice(panelList, idChoiceTable, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceTable"));
136 choiceTable->Append(_(
"Client"));
137 choiceTable->Append(_(
"Task"));
138 choiceTable->Append(_(
"Tool"));
139 choiceTable->Append(_(
"Project"));
140 choiceTable->Append(_(
"Activity"));
141 choiceTable->SetSelection( choiceTable->Append(_(
"Timeslot")) );
142 StaticBoxSizer2->Add(choiceTable, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
143 BoxSizer5->Add(StaticBoxSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
144 StaticBoxSizer3 =
new wxStaticBoxSizer(wxHORIZONTAL, panelList, _(
"Date interval (inclusive)"));
145 datePicker1 =
new wxDatePickerCtrl(panelList, idDatePicker1, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY, wxDefaultValidator, _T(
"idDatePicker1"));
146 StaticBoxSizer3->Add(datePicker1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
147 datePicker2 =
new wxDatePickerCtrl(panelList, idDatePicker2, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY, wxDefaultValidator, _T(
"idDatePicker2"));
148 StaticBoxSizer3->Add(datePicker2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
149 BoxSizer5->Add(StaticBoxSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
150 BoxSizer5->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
151 buttonPDF =
new wxButton(panelList, idButtonPDF, _(
"Export PDF"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"idButtonPDF"));
152 BoxSizer5->Add(buttonPDF, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
153 BoxSizer4->Add(BoxSizer5, 0, wxALL|wxEXPAND, 5);
154 listCtrl =
new wxListCtrl(panelList, idListCtrl, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL, wxDefaultValidator, _T(
"idListCtrl"));
155 BoxSizer4->Add(listCtrl, 1, wxALL|wxEXPAND, 5);
156 panelList->SetSizer(BoxSizer4);
157 BoxSizer4->Fit(panelList);
158 BoxSizer4->SetSizeHints(panelList);
159 panelChart =
new wxPanel(notebook, idPanelChart, wxDefaultPosition, wxDefaultSize, 0, _T(
"idPanelChart"));
160 StaticText1 =
new wxStaticText(panelChart, wxID_ANY, _(
"Coming soon..."), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
161 notebook->AddPage(panelCurrent, _(
"Current activity"),
false);
162 notebook->AddPage(panelList, _(
"List/Edit"),
false);
163 notebook->AddPage(panelChart, _(
"Charts"),
false);
164 BoxSizer1->Add(notebook, 3, wxALL|wxEXPAND, 0);
165 textCtrl =
new wxTextCtrl(
this, idTextCtrl, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY, wxDefaultValidator, _T(
"idTextCtrl"));
166 BoxSizer1->Add(textCtrl, 1, wxALL|wxEXPAND, 5);
168 menuBar =
new wxMenuBar();
169 Menu1 =
new wxMenu();
170 menuitemFileConnect =
new wxMenuItem(Menu1, idFileConnect, _(
"&Connect\tCtrl-C"), _(
"Connect to a (remote) MySQL/MariaDB server"), wxITEM_NORMAL);
171 Menu1->Append(menuitemFileConnect);
172 menuitemFileUpdate =
new wxMenuItem(Menu1, idFileUpdate, _(
"&Update\tCtrl-U"), _(
"Update remote database"), wxITEM_NORMAL);
173 Menu1->Append(menuitemFileUpdate);
174 menuitemFileUpdate->Enable(
false);
175 menuitemFileUpload =
new wxMenuItem(Menu1, idFileUpload, _(
"Up&load"), _(
"Replace remote data (by local)"), wxITEM_NORMAL);
176 Menu1->Append(menuitemFileUpload);
177 menuitemFileUpload->Enable(
false);
178 menuitemFileDownload =
new wxMenuItem(Menu1, idFileDownload, _(
"&Download"), _(
"Replace local data (by remote)"), wxITEM_NORMAL);
179 Menu1->Append(menuitemFileDownload);
180 menuitemFileDownload->Enable(
false);
181 Menu1->AppendSeparator();
182 menuitemFileQuit =
new wxMenuItem(Menu1, idFileQuit, _(
"&Quit\tCtrl-Q"), wxEmptyString, wxITEM_NORMAL);
183 Menu1->Append(menuitemFileQuit);
184 menuBar->Append(Menu1, _(
"&File"));
185 Menu2 =
new wxMenu();
186 menuitemEditActivity =
new wxMenuItem(Menu2, idEditActivity, _(
"&Activity\tCtrl-A"), _(
"Start/stop current activity"), wxITEM_NORMAL);
187 Menu2->Append(menuitemEditActivity);
188 menuitemEditTable =
new wxMenuItem(Menu2, idEditTable, _(
"&Tables\tCtrl-T"), _(
"Edit any table"), wxITEM_NORMAL);
189 Menu2->Append(menuitemEditTable);
190 menuitemEditChart =
new wxMenuItem(Menu2, idEditChart, _(
"&Charts\tCtrl-G"), _(
"Look at various charts"), wxITEM_NORMAL);
191 Menu2->Append(menuitemEditChart);
192 Menu2->AppendSeparator();
193 menuitemEditNew =
new wxMenuItem(Menu2, idEditNew, _(
"&New record...\tCtrl-N"), _(
"Add a record to the currently selected table"), wxITEM_NORMAL);
194 Menu2->Append(menuitemEditNew);
195 menuitemEditReset =
new wxMenuItem(Menu2, idEditReset, _(
"&Reset filter\tCtrl-R"), _(
"Reset the viewing filter"), wxITEM_NORMAL);
196 Menu2->Append(menuitemEditReset);
197 Menu2->AppendSeparator();
198 menuitemEditToday =
new wxMenuItem(Menu2, idEditToday, _(
"Today"), _(
"Time interval to show: today"), wxITEM_NORMAL);
199 Menu2->Append(menuitemEditToday);
200 menuitemEditThisweek =
new wxMenuItem(Menu2, idEditThisweek, _(
"This week"), _(
"Time interval to show: this week"), wxITEM_NORMAL);
201 Menu2->Append(menuitemEditThisweek);
202 menuitemEditThismonth =
new wxMenuItem(Menu2, idEditThismonth, _(
"This month"), _(
"Time interval to show: this month"), wxITEM_NORMAL);
203 Menu2->Append(menuitemEditThismonth);
204 menuitemEditYesteday =
new wxMenuItem(Menu2, idEditYesterday, _(
"Yesterday"), _(
"Time interval to show: yesterday"), wxITEM_NORMAL);
205 Menu2->Append(menuitemEditYesteday);
206 menuitemEditLastweek =
new wxMenuItem(Menu2, idEditLastweek, _(
"Last week"), _(
"Time interval to show: last week"), wxITEM_NORMAL);
207 Menu2->Append(menuitemEditLastweek);
208 menuitemEditLastweek->Enable(
false);
209 menuitemEditLastmonth =
new wxMenuItem(Menu2, idEditLastmonth, _(
"Last month"), _(
"Time interval to show: last month"), wxITEM_NORMAL);
210 Menu2->Append(menuitemEditLastmonth);
211 Menu2->AppendSeparator();
212 menuitemEditSettings =
new wxMenuItem(Menu2, idEditSettings, _(
"&Settings...\tCtrl-S"), _(
"Set user preferences"), wxITEM_NORMAL);
213 Menu2->Append(menuitemEditSettings);
214 menuBar->Append(Menu2, _(
"&Edit"));
215 Menu3 =
new wxMenu();
216 menuitemHelpUser =
new wxMenuItem(Menu3, idHelpUser, _(
"&User guide\tF1"), wxEmptyString, wxITEM_NORMAL);
217 Menu3->Append(menuitemHelpUser);
218 menuitemHelpAbout =
new wxMenuItem(Menu3, idHelpAbout, _(
"&About..."), wxEmptyString, wxITEM_NORMAL);
219 Menu3->Append(menuitemHelpAbout);
220 menuBar->Append(Menu3, _(
"&Help"));
222 statusBar =
new wxStatusBar(
this, idStatusBar, 0, _T(
"idStatusBar"));
223 int __wxStatusBarWidths_1[3] = { 65, 85, -1 };
224 int __wxStatusBarStyles_1[3] = { wxSB_RAISED, wxSB_RAISED, wxSB_NORMAL };
225 statusBar->SetFieldsCount(3,__wxStatusBarWidths_1);
226 statusBar->SetStatusStyles(3,__wxStatusBarStyles_1);
227 SetStatusBar(statusBar);
228 timer.SetOwner(
this, idTimer);
229 BoxSizer1->Fit(
this);
230 BoxSizer1->SetSizeHints(
this);
244 Connect(idFileQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&
yatishFrame::OnQuit);
257 Connect(idHelpUser,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&
yatishFrame::OnHelp);
265 SetIcon ( wxIcon (yatish_xpm) );
266 yatishHelp.Initialize (wxStandardPaths::Get().GetDataDir() + wxFILE_SEP_PATH +
"yatish");
267 buttonStop->Disable(); clockStart = wxDateTime::Now();
268 UpdateClock(); UpdateStatus (
mysql_off); SetStatusBarPane (2);
269 masterDB.SetLimit (settings.limitRow, settings.rowLimit);
270 if (settings.log2text)
271 defaultLog = wxLog::SetActiveTarget(
new wxLogTextCtrl (textCtrl) );
273 textCtrl->Hide(); BoxSizer1->Fit (
this); BoxSizer1->SetSizeHints (
this);
275 ResetChoices(); ResetPickers(); UpdateColumns();
276 SetStatusText (wxEmptyString, 2);
278 switch ( masterDB.RunningTimeslots() ) {
286 wxLogError (_(
"Several yatish were inappropriately terminated!") );
288 buttonPDF->Disable(); panelChart->Hide();
298 wxDateTime now = wxDateTime::Now();
300 SetStatusText ( elapsed.Format() );
306 SetStatusText (
"MySQL ON", 1);
309 SetStatusText (
"MySQL OFF", 1);
312 SetStatusText (
"MySQL ERR", 1);
321 if (!choiceOK) wxLogError (
"Reset of choices failed for panel #1");
327 if (lastActivityID == wxNOT_FOUND) {
347 listCtrl->AppendColumn(_(
"Duration") );
348 listCtrl->AppendColumn(_(
"Project") );
349 listCtrl->AppendColumn(_(
"Client") );
354 listCtrl->AppendColumn(_(
"Project") );
355 listCtrl->AppendColumn(_(
"Client") );
361 listCtrl->AppendColumn(_(
"Client") );
373 wxLogError (
"Updating listCrl failed (panel #2)");
374 for (
int col = 0; col <
listCtrl->GetColumnCount(); col++)
375 listCtrl->SetColumnWidth (col, wxLIST_AUTOSIZE_USEHEADER);
436 wxMessageBox (_(
"Please stop the current activity"),
437 _(
"Update refused"), wxOK);
441 if (err == 2006 || err == 2013) {
442 wxLogMessage (_(
"MySQL connection timed out: try to reconnect...") );
449 if ( wxMessageBox ( _(
"Remote data (if any) will be\noverwritten by local ones."),
451 wxICON_EXCLAMATION|wxOK|wxCANCEL|wxCANCEL_DEFAULT )
452 == wxCANCEL )
return;
453 SetStatusText (_(
"Please wait, working..."), 2);
455 SetStatusText (wxEmptyString, 2);
456 if (err == 2006 || err == 2013) {
457 wxLogMessage (_(
"MySQL connection timed out: try to reconnect...") );
464 if ( wxMessageBox ( _(
"Local data (if any) will be\noverwritten by remote ones."),
466 wxICON_EXCLAMATION|wxOK|wxCANCEL|wxCANCEL_DEFAULT )
467 == wxCANCEL )
return;
468 SetStatusText (_(
"Please wait, working..."), 2);
470 SetStatusText (wxEmptyString, 2);
471 if (err == 2006 || err == 2013) {
472 wxLogMessage (_(
"MySQL connection timed out: try to reconnect...") );
476 int page =
notebook->GetSelection();
490 event.Enable (
notebook->GetSelection() != 0);
496 event.Enable (
notebook->GetSelection() != 1);
503 event.Enable (
false);
507 int dlgEnd = wxID_CANCEL;
511 dlgEnd = dlg.ShowModal();
514 dlgEnd = dlg.ShowModal();
517 dlgEnd = dlg.ShowModal();
520 dlgEnd = dlg.ShowModal();
522 if (dlgEnd != wxID_CANCEL) {
530 event.Enable (
notebook->GetSelection() == 1);
542 event.Enable (
notebook->GetSelection() == 1 && filterAvailable);
546 wxDateTime dt = wxDateTime::Today();
560 wxDateTime dt = wxDateTime::Today();
562 dt.SetToPrevWeekDay (wxDateTime::Mon);
570 wxDateTime dt = wxDateTime::Today();
580 wxDateTime dt = wxDateTime::Today();
581 dt -= wxDateSpan::Day();
590 wxDateTime dt = wxDateTime::Today();
591 dt -= wxDateSpan::Week();
592 dt.SetToNextWeekDay (wxDateTime::Sun);
594 dt.SetToPrevWeekDay (wxDateTime::Mon);
602 wxDateTime dt = wxDateTime::Today();
603 dt -= wxDateSpan::Month();
604 dt.SetToLastMonthDay();
615 menu.Append (
idEditToday, _(
"Today"), _(
"Time interval to show: today") );
616 menu.Append (
idEditThisweek, _(
"This week"), _(
"Time interval to show: this week") );
617 menu.Append (
idEditThismonth, _(
"This month"), _(
"Time interval to show: this month") );
623 menu.Append (
idEditYesterday, _(
"Yesterday"), _(
"Time interval to show: yesterday") );
624 menu.Append (
idEditLastweek, _(
"Last week"), _(
"Time interval to show: last week") );
625 menu.Append (
idEditLastmonth, _(
"Last month"), _(
"Time interval to show: last month") );
631 menu.Append (
idEditNew, _(
"New record..."), _(
"Add a record to the currently selected table") );
632 menu.Append (
idEditReset, _(
"Reset filter"), _(
"Reset the viewing filter") );
641 if (dlg.ShowModal() == wxID_CANCEL)
return;
655 wxAboutDialogInfo info;
656 info.SetName (
"Yatish");
657 info.SetVersion (
"0.2");
658 wxString what (_(
"Yet Another TIme SHeet\n" 659 "Time tracking for freelancers/homeworkers\n" 661 what << wxVERSION_STRING;
662 what <<
"\n+wxDatabase\n+Code::Blocks\n+wxSmith";
663 info.SetDescription (what);
664 info.SetCopyright (
"(C) 2020 EIF-services");
665 info.SetLicence (
"This program is free software:\n" 666 "you can redistribute it and/or modify it\n" 667 "under the terms of the GNU General Public License\n" 668 "as published by the Free Software Foundation,\n" 669 "either version 3 of the License, or (at your option) any later version.\n" 670 "This program is distributed in the hope that it will be useful,\n" 671 "but WITHOUT ANY WARRANTY; without even the implied warranty\n" 672 "of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" 673 "See the GNU General Public License for more details.\n" 674 "You should have received a copy of the GNU General Public License\n" 675 "along with this program. If not, see https://www.gnu.org/licenses/");
676 info.SetWebSite(
"https://www.eif-services.eu/yatish");
677 wxString me (L
"Nicolas P\u00E9renne <nicolas.perenne@eif-services.eu>");
678 info.AddDeveloper (me);
679 wxAboutBox (info,
this);
685 if (event.GetSelection() == 0) {
686 SetStatusText (wxEmptyString, 2);
689 if (event.GetSelection() == 1) {
700 wxLogError (
"Timeslot could not be started");
713 SetIcon ( wxIcon (yatish_recording_xpm) );
718 wxLogError (
"Timeslot could not be stopped");
724 SetIcon ( wxIcon (yatish_xpm) );
753 int project_col = -1,
771 int col =
event.GetColumn();
772 int ret = wxID_CANCEL;
773 if (col == project_col) {
775 ret = dlg.ShowModal();
777 if (col == client_col) {
779 ret = dlg.ShowModal();
781 if (col == task_col) {
783 ret = dlg.ShowModal();
785 if (col == tool_col) {
787 ret = dlg.ShowModal();
789 if (ret == wxID_OK) {
796 if ( !wxGetKeyState (WXK_SHIFT) ) {
801 long row_id =
event.GetIndex(), sql_id =
listCtrl->GetItemData (row_id);
802 switch ( event.GetKeyCode() ) {
804 {
int dlgEnd = wxID_CANCEL;
807 dlgEnd = dlg.ShowModal();
810 dlgEnd = dlg.ShowModal();
813 dlgEnd = dlg.ShowModal();
815 if (
listCtrl->GetItemText (row_id, 1) .IsEmpty() ) {
816 wxMessageBox (_(
"Won't edit the current activity\n(first close it)."),
817 _(
"Change selection"), wxOK);
820 dlgEnd = dlg.ShowModal();
823 if (dlgEnd != wxID_CANCEL)
UpdateRows (tid); }
void OnMenuitemEditLastweekSelected(wxCommandEvent &event)
void OnMenuitemEditTableUpdate(wxUpdateUIEvent &)
wxDatePickerCtrl * datePicker1
void OnMenuitemFileDownloadSelected(wxCommandEvent &event)
Interacts with yatish tables in a MySQL/MariaDB database.
bool StopTimeslot()
Stops current timeslot.
static const long idHelpUser
static const long idEditSettings
static const long idHelpAbout
wxDateTime First()
Obtains the minimum time in column start from currently selected rows of table yatish_timeslot.
void OnQuit(wxCommandEvent &event)
static const long idNotebook
int Download()
Downloads slaveDB into masterDB.
static const long idEditToday
static const long idPanelCurrent
static const long idFileDownload
static const long idEditLastmonth
static const long idEditChart
static const long idTimer
static const long idEditReset
static const long idEditLastweek
void OnMenuitemFileConnectSelected(wxCommandEvent &event)
void OnMenuitemFileUploadSelected(wxCommandEvent &event)
void OnHelp(wxCommandEvent &event)
void OnContextMenu3(wxContextMenuEvent &)
void OnMenuitemEditThisweekSelected(wxCommandEvent &event)
void SetLastDay(const wxDateTime &)
Sets private member lastDay (for future SQL queries).
static const long idButtonStop
wxHtmlHelpController yatishHelp
void OnMenuitemEditActivityUpdate(wxUpdateUIEvent &)
static const long idChoiceTable
long LastActivity()
Reads the last activity_id in yatish_timeslot.
wxMenuItem * menuitemFileUpdate
void OnMenuitemEditYestedaySelected(wxCommandEvent &event)
void OnMenuitemEditTodayUpdate(wxUpdateUIEvent &)
void OnListColumnClick(wxListEvent &event)
static const long idPanelChart
void OnDatePicker2Changed(wxDateEvent &event)
void OnChoiceTableSelect(wxCommandEvent &event)
static const long idButtonStart
static const long idFileConnect
void OnMenuitemEditTableSelected(wxCommandEvent &event)
void OnMenuitemEditNewSelected(wxCommandEvent &event)
static const long idButtonPDF
static const long idEditThisweek
void OnDatePicker1Changed(wxDateEvent &event)
void OnAbout(wxCommandEvent &event)
void SetLimit(bool b, int i)
wxString FilteredTotal()
Writes the total and average durations of currently viewed timeslots.
bool StartTimeslot(int, int, int)
Starts a new row in the timeslot table.
static const long idFileUpload
void OnMenuitemEditSettingsSelected(wxCommandEvent &event)
void OnMenuitemEditActivitySelected(wxCommandEvent &event)
static const long idChoiceTask
void OnMenuitemEditThismonthSelected(wxCommandEvent &event)
void SetFirstDay(const wxDateTime &)
Sets private member firstDay (for future SQL queries).
bool Delete(tableID, long)
Marks a local record for deletion.
void OnButtonStartClick(wxCommandEvent &event)
void OnContextMenu2(wxContextMenuEvent &)
void UpdateStatus(mysqlStatus)
static const long idStatusBar
wxDatePickerCtrl * datePicker2
static const long idDatePicker2
static const long idEditActivity
void OnMenuitemFileUpdateSelected(wxCommandEvent &event)
int ChoiceSelector(tableID, long)
Finds the proper index for selection in a wxChoice.
static const long idEditTable
void OnClose(wxCloseEvent &event)
static const long idChoiceTool
bool FillList(wxListCtrl *, tableID)
Fills a wxListCtrl.
static const long idFileUpdate
void OnNotebookPageChanged(wxNotebookEvent &event)
static const long idEditThismonth
void OnListKeyDown(wxListEvent &event)
int Upload()
Uploads masterDB into slaveDB.
void OnMenuitemEditChartUpdate(wxUpdateUIEvent &)
wxMenuItem * menuitemFileDownload
static const long idPanelList
int Commit()
Updates slaveDB with records of masterDB where the sync field is not 'S'.
wxDateTime Last()
Obtains the maximum time in column start from currently selected rows of table yatish_timeslot.
static const long idEditYesterday
void OnMenuitemEditLastmonthSelected(wxCommandEvent &event)
void OnMenuitemEditResetSelected(wxCommandEvent &event)
static const long idFileQuit
wxMenuItem * menuitemFileUpload
void OnMenuitemEditTodaySelected(wxCommandEvent &event)
bool FillChoice(wxChoice *, tableID)
Fills a wxChoice.
static const long idDatePicker1
void OnContextMenu1(wxContextMenuEvent &)
static const long idEditNew
static const long idChoiceProject
void OnTimerTrigger(wxTimerEvent &event)
static const long idListCtrl
void OnMenuitemEditResetUpdate(wxUpdateUIEvent &)
void OnButtonStopClick(wxCommandEvent &event)
void OnMenuitemEditNewUpdate(wxUpdateUIEvent &)
void OnMenuitemEditChartSelected(wxCommandEvent &event)
wxMenuItem * menuitemFileConnect
static const long idTextCtrl