Bumped copyright dates for 2013
[barry.git] / desktop / src / TaskEditDlg.h
blob56f1918b37c845e6bba76a76ac8e400260c39895
1 ///
2 /// \file TaskEditDlg.h
3 /// Dialog class to handle the editing of the Task record
4 ///
6 /*
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"
28 #include "guitimet.h"
29 #include <wx/wx.h>
30 #include <wx/image.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>
36 // end wxGlade
37 #include <wx/dateevt.h>
39 // begin wxGlade: ::extracode
40 // end wxGlade
43 class TaskEditDlg : public wxDialog
45 public:
46 // begin wxGlade: TaskEditDlg::ids
47 // end wxGlade
49 private:
50 // begin wxGlade: TaskEditDlg::methods
51 void set_properties();
52 void do_layout();
53 // end wxGlade
55 protected:
56 Barry::TimeZones m_static_zones;
57 const Barry::TimeZones *m_zones;
58 Barry::Task &m_rec;
59 StringSync m_strings;
60 GUITimeT m_DueDateObj;
61 GUITimeT m_ReminderDateObj;
62 GUITimeT m_RecurEndDateObj;
63 int m_reminder_hours, m_reminder_minutes;
64 int m_interval;
65 int m_recur_choice;
66 bool m_weekdays[7];
67 bool m_relative_date;
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;
117 // end wxGlade
119 wxSizer *bottom_buttons;
120 wxSizer *m_top_sizer;
122 DECLARE_EVENT_TABLE(); // sets to protected:
124 protected:
125 // helper functions
126 void RedoLayout();
127 void EnableDueDate(bool enable = true);
128 void EnableReminderDate(bool enable = true);
129 void EnableRecurMode(bool recur = true);
131 public:
132 TaskEditDlg(wxWindow* parent, Barry::Task &rec, bool editable,
133 const Barry::TimeZones *device_zones);
135 virtual bool TransferDataToWindow();
136 virtual bool TransferDataFromWindow();
138 public:
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
146 #endif