2 /// \file TaskEditDlg.h
3 /// Dialog class to handle the editing of the Task record
7 Copyright (C) 2012-2013, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #ifndef __BARRYDESKTOP_TASK_EDIT_DLG_H__
23 #define __BARRYDESKTOP_TASK_EDIT_DLG_H__
25 //#define wxUSE_DATEPICKCTRL 1
27 #include "StringSync.h"
31 #include <barry/barry.h>
32 // begin wxGlade: ::dependencies
33 #include <wx/spinctrl.h>
34 #include <wx/statline.h>
35 #include <wx/datectrl.h>
37 #include <wx/dateevt.h>
39 // begin wxGlade: ::extracode
43 class TaskEditDlg
: public wxDialog
46 // begin wxGlade: TaskEditDlg::ids
50 // begin wxGlade: TaskEditDlg::methods
51 void set_properties();
56 Barry::TimeZones m_static_zones
;
57 const Barry::TimeZones
*m_zones
;
60 GUITimeT m_DueDateObj
;
61 GUITimeT m_ReminderDateObj
;
62 GUITimeT m_RecurEndDateObj
;
63 int m_reminder_hours
, m_reminder_minutes
;
68 std::string m_categories
;
70 // begin wxGlade: TaskEditDlg::attributes
71 wxStaticText
* label_1
;
72 wxTextCtrl
* m_TaskSummary
;
73 wxStaticLine
* static_line_1
;
74 wxStaticText
* label_2
;
75 wxChoice
* m_StatusChoice
;
76 wxStaticText
* label_9
;
77 wxChoice
* m_PriorityChoice
;
78 wxStaticText
* label_5
;
79 wxCheckBox
* m_DueCheck
;
80 wxDatePickerCtrl
* m_DueDateCtrl
;
81 wxSpinCtrl
* m_DueHoursSpinner
;
82 wxStaticText
* label_11
;
83 wxSpinCtrl
* m_DueMinutesSpinner
;
84 wxStaticText
* label_8
;
85 wxChoice
* m_TimezoneChoice
;
86 wxStaticText
* label_10
;
87 wxCheckBox
* m_ReminderCheck
;
88 wxDatePickerCtrl
* m_ReminderDateCtrl
;
89 wxSpinCtrl
* m_ReminderHoursSpinner
;
90 wxStaticText
* label_6
;
91 wxSpinCtrl
* m_ReminderMinutesSpinner
;
92 wxStaticLine
* static_line_2
;
93 wxStaticText
* label_18
;
94 wxChoice
* m_RecurrenceChoice
;
95 wxStaticText
* RecurIntervalLabel
;
96 wxStaticText
* RecurIntervalLabelB
;
97 wxSpinCtrl
* m_IntervalSpinner
;
98 wxStaticText
* m_IntervalUnitLabel
;
99 wxStaticText
* RecurDaysLabel
;
100 wxCheckBox
* m_SunCheck
;
101 wxCheckBox
* m_MonCheck
;
102 wxCheckBox
* m_TueCheck
;
103 wxCheckBox
* m_WedCheck
;
104 wxCheckBox
* m_ThuCheck
;
105 wxCheckBox
* m_FriCheck
;
106 wxCheckBox
* m_SatCheck
;
107 wxStaticText
* RecurRelativeDateLabel
;
108 wxCheckBox
* m_RelativeDateCheck
;
109 wxStaticText
* RecurEndDateLabel
;
110 wxCheckBox
* m_NeverEndsCheck
;
111 wxDatePickerCtrl
* m_RecurEndDateCtrl
;
112 wxStaticLine
* static_line_3
;
113 wxStaticText
* label_4
;
114 wxTextCtrl
* m_CategoriesText
;
115 wxStaticText
* label_3
;
116 wxTextCtrl
* m_NotesText
;
119 wxSizer
*bottom_buttons
;
120 wxSizer
*m_top_sizer
;
122 DECLARE_EVENT_TABLE(); // sets to protected:
127 void EnableDueDate(bool enable
= true);
128 void EnableReminderDate(bool enable
= true);
129 void EnableRecurMode(bool recur
= true);
132 TaskEditDlg(wxWindow
* parent
, Barry::Task
&rec
, bool editable
,
133 const Barry::TimeZones
*device_zones
);
135 virtual bool TransferDataToWindow();
136 virtual bool TransferDataFromWindow();
139 virtual void OnDueCheck(wxCommandEvent
&event
); // wxGlade: <event_handler>
140 virtual void OnRecurrenceChoice(wxCommandEvent
&event
); // wxGlade: <event_handler>
141 virtual void OnEndDateCheckbox(wxCommandEvent
&event
); // wxGlade: <event_handler>
142 virtual void OnReminderCheck(wxCommandEvent
&event
); // wxGlade: <event_handler>
143 }; // wxGlade: end class