2 /// \file CalendarEditDlg.h
3 /// Dialog class to handle the editing of the Calendar record
7 Copyright (C) 2012, 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_CALENDAR_EDIT_DLG_H__
23 #define __BARRYDESKTOP_CALENDAR_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>
41 // begin wxGlade: ::extracode
45 class CalendarEditDlg
: public wxDialog
48 // begin wxGlade: CalendarEditDlg::ids
52 // begin wxGlade: CalendarEditDlg::methods
53 void set_properties();
58 Barry::Calendar
&m_rec
;
60 GUITimeT m_StartDateObj
;
61 GUITimeT m_EndDateObj
;
62 GUITimeT m_RecurEndDateObj
;
63 int m_duration_hours
, m_duration_minutes
;
64 int m_reminder_hours
, m_reminder_minutes
;
68 std::string m_organizer
, m_invited
, m_accepted_by
;
70 // begin wxGlade: CalendarEditDlg::attributes
71 wxStaticText
* label_1
;
72 wxTextCtrl
* m_Subject
;
73 wxStaticText
* label_2
;
74 wxTextCtrl
* m_Location
;
75 wxStaticLine
* static_line_1
;
76 wxStaticText
* label_4
;
77 wxCheckBox
* m_AllDayCheck
;
78 wxStaticText
* label_5
;
79 wxDatePickerCtrl
* m_StartDateCtrl
;
80 wxSpinCtrl
* m_StartHoursSpinner
;
81 wxStaticText
* label_11
;
82 wxSpinCtrl
* m_StartMinutesSpinner
;
83 wxStaticText
* label_6
;
84 wxDatePickerCtrl
* m_EndDateCtrl
;
85 wxSpinCtrl
* m_EndHoursSpinner
;
86 wxStaticText
* label_12
;
87 wxSpinCtrl
* m_EndMinutesSpinner
;
88 wxStaticText
* label_7
;
89 wxSpinCtrl
* m_DurationHoursSpinner
;
90 wxStaticText
* label_13
;
91 wxSpinCtrl
* m_DurationMinutesSpinner
;
92 wxStaticText
* label_17
;
93 wxStaticText
* label_8
;
94 wxChoice
* m_TimezoneChoice
;
95 wxStaticText
* label_9
;
96 wxChoice
* m_ShowAsChoice
;
97 wxStaticText
* label_10
;
98 wxSpinCtrl
* m_ReminderHoursSpinner
;
99 wxStaticText
* label_13_copy
;
100 wxSpinCtrl
* m_ReminderMinutesSpinner
;
101 wxStaticText
* label_17_copy
;
102 wxStaticLine
* static_line_2
;
103 wxStaticText
* label_18
;
104 wxChoice
* m_RecurrenceChoice
;
105 wxStaticText
* label_19
;
106 wxStaticText
* label_23
;
107 wxSpinCtrl
* m_IntervalSpinner
;
108 wxStaticText
* m_IntervalUnitLabel
;
109 wxStaticText
* label_20
;
110 wxCheckBox
* m_SunCheck
;
111 wxCheckBox
* m_MonCheck
;
112 wxCheckBox
* m_TueCheck
;
113 wxCheckBox
* m_WedCheck
;
114 wxCheckBox
* m_ThuCheck
;
115 wxCheckBox
* m_FriCheck
;
116 wxCheckBox
* m_SatCheck
;
117 wxStaticText
* label_21
;
118 wxCheckBox
* m_RelativeDateCheck
;
119 wxStaticText
* label_22
;
120 wxCheckBox
* m_NeverEndsCheck
;
121 wxDatePickerCtrl
* m_RecurEndDateCtrl
;
122 wxStaticLine
* static_line_3
;
123 wxStaticText
* label_14
;
124 wxTextCtrl
* m_OrganizerText
;
125 wxStaticText
* label_15
;
126 wxTextCtrl
* m_InvitedText
;
127 wxStaticText
* label_16
;
128 wxTextCtrl
* m_AcceptedByText
;
129 wxStaticLine
* static_line_4
;
130 wxRadioBox
* m_ClassRadioBox
;
131 wxStaticLine
* static_line_5
;
132 wxStaticText
* label_3
;
133 wxTextCtrl
* m_NotesText
;
136 DECLARE_EVENT_TABLE(); // sets to protected:
139 CalendarEditDlg(wxWindow
* parent
, Barry::Calendar
&rec
, bool editable
);
141 virtual bool TransferDataToWindow();
142 virtual bool TransferDataFromWindow();
145 virtual void OnAllDayEvent(wxCommandEvent
&event
); // wxGlade: <event_handler>
146 virtual void OnStartDateChanged(wxDateEvent
&event
); // wxGlade: <event_handler>
147 virtual void OnStartHoursSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
148 virtual void OnStartMinutesSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
149 virtual void OnEndDateChanged(wxDateEvent
&event
); // wxGlade: <event_handler>
150 virtual void OnEndHoursSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
151 virtual void OnEndMinutesSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
152 virtual void OnDurationHoursSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
153 virtual void OnDurationMinutesSpin(wxSpinEvent
&event
); // wxGlade: <event_handler>
154 virtual void OnRecurrenceChoice(wxCommandEvent
&event
); // wxGlade: <event_handler>
155 virtual void OnEndDateCheckbox(wxCommandEvent
&event
); // wxGlade: <event_handler>
156 }; // wxGlade: end class