author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koeditorrecurrence.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/koeditorrecurrence.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorrecurrence.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index 75e0c73..6c012bd 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h | |||
@@ -14,43 +14,45 @@ | |||
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef _KOEDITORRECURRENCE_H | 23 | #ifndef _KOEDITORRECURRENCE_H |
24 | #define _KOEDITORRECURRENCE_H | 24 | #define _KOEDITORRECURRENCE_H |
25 | 25 | ||
26 | #include <qframe.h> | 26 | #include <q3frame.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qcheckbox.h> | 28 | #include <qcheckbox.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qgroupbox.h> | 30 | #include <q3groupbox.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | #include <qmultilineedit.h> | 33 | #include <q3multilineedit.h> |
34 | #include <qlistview.h> | 34 | #include <q3listview.h> |
35 | #include <qradiobutton.h> | 35 | #include <qradiobutton.h> |
36 | #include <qbuttongroup.h> | 36 | #include <q3buttongroup.h> |
37 | #include <Q3ListBox> | ||
38 | #include <Q3ComboBox> | ||
37 | 39 | ||
38 | #include <kdialogbase.h> | 40 | #include <kdialogbase.h> |
39 | 41 | ||
40 | #include <libkcal/event.h> | 42 | #include <libkcal/event.h> |
41 | 43 | ||
42 | #include "ktimeedit.h" | 44 | #include "ktimeedit.h" |
43 | 45 | ||
44 | class QWidgetStack; | 46 | class Q3WidgetStack; |
45 | class QSpinBox; | 47 | class QSpinBox; |
46 | 48 | ||
47 | class KDateEdit; | 49 | class KDateEdit; |
48 | 50 | ||
49 | using namespace KCal; | 51 | using namespace KCal; |
50 | 52 | ||
51 | class RecurBase : public QWidget | 53 | class RecurBase : public QWidget |
52 | { | 54 | { |
53 | public: | 55 | public: |
54 | RecurBase( QWidget *parent = 0, const char *name = 0 ); | 56 | RecurBase( QWidget *parent = 0, const char *name = 0 ); |
55 | 57 | ||
56 | void setFrequency( int ); | 58 | void setFrequency( int ); |
@@ -89,49 +91,49 @@ class RecurMonthly : public RecurBase | |||
89 | void setByPos( int count, int weekday ); | 91 | void setByPos( int count, int weekday ); |
90 | 92 | ||
91 | bool byDay(); | 93 | bool byDay(); |
92 | bool byPos(); | 94 | bool byPos(); |
93 | 95 | ||
94 | int day(); | 96 | int day(); |
95 | 97 | ||
96 | int count(); | 98 | int count(); |
97 | int weekday(); | 99 | int weekday(); |
98 | 100 | ||
99 | private: | 101 | private: |
100 | QRadioButton *mByDayRadio; | 102 | QRadioButton *mByDayRadio; |
101 | QComboBox *mByDayCombo; | 103 | Q3ComboBox *mByDayCombo; |
102 | 104 | ||
103 | QRadioButton *mByPosRadio; | 105 | QRadioButton *mByPosRadio; |
104 | QComboBox *mByPosCountCombo; | 106 | QComboBox *mByPosCountCombo; |
105 | QComboBox *mByPosWeekdayCombo; | 107 | QComboBox *mByPosWeekdayCombo; |
106 | }; | 108 | }; |
107 | 109 | ||
108 | class RecurYearly : public RecurBase | 110 | class RecurYearly : public RecurBase |
109 | { | 111 | { |
110 | public: | 112 | public: |
111 | RecurYearly( QWidget *parent = 0, const char *name = 0 ); | 113 | RecurYearly( QWidget *parent = 0, const char *name = 0 ); |
112 | 114 | ||
113 | void setByDay( int doy ); | 115 | void setByDay( int doy ); |
114 | void setByMonth( int month, int day ); | 116 | void setByMonth( int month, int day ); |
115 | 117 | ||
116 | bool byMonth(); | 118 | bool byMonth(); |
117 | bool byDay(); | 119 | bool byDay(); |
118 | 120 | ||
119 | int month(); | 121 | int month(); |
120 | int day(); | 122 | int day(); |
121 | 123 | ||
122 | private: | 124 | private: |
123 | int mDay; | 125 | int mDay; |
124 | QRadioButton *mByMonthRadio; | 126 | QRadioButton *mByMonthRadio; |
125 | QComboBox *mByMonthCombo; | 127 | Q3ComboBox *mByMonthCombo; |
126 | QLabel* mByDayLabel; | 128 | QLabel* mByDayLabel; |
127 | QLabel* mDayOfLabel; | 129 | QLabel* mDayOfLabel; |
128 | QRadioButton *mByDayRadio; | 130 | QRadioButton *mByDayRadio; |
129 | }; | 131 | }; |
130 | 132 | ||
131 | class RecurrenceChooser : public QWidget | 133 | class RecurrenceChooser : public QWidget |
132 | { | 134 | { |
133 | Q_OBJECT | 135 | Q_OBJECT |
134 | public: | 136 | public: |
135 | RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); | 137 | RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); |
136 | 138 | ||
137 | enum { Daily, Weekly, Monthly, Yearly }; | 139 | enum { Daily, Weekly, Monthly, Yearly }; |
@@ -171,25 +173,25 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase | |||
171 | void setDefaults( const QDateTime &from ); | 173 | void setDefaults( const QDateTime &from ); |
172 | 174 | ||
173 | void setDates( const DateList & ); | 175 | void setDates( const DateList & ); |
174 | DateList dates(); | 176 | DateList dates(); |
175 | 177 | ||
176 | protected slots: | 178 | protected slots: |
177 | void addException(); | 179 | void addException(); |
178 | void changeException(); | 180 | void changeException(); |
179 | void deleteException(); | 181 | void deleteException(); |
180 | 182 | ||
181 | private: | 183 | private: |
182 | KDateEdit *mExceptionDateEdit; | 184 | KDateEdit *mExceptionDateEdit; |
183 | QListBox *mExceptionList; | 185 | Q3ListBox *mExceptionList; |
184 | DateList mExceptionDates; | 186 | DateList mExceptionDates; |
185 | }; | 187 | }; |
186 | 188 | ||
187 | class ExceptionsDialog : public KDialogBase, public ExceptionsBase | 189 | class ExceptionsDialog : public KDialogBase, public ExceptionsBase |
188 | { | 190 | { |
189 | public: | 191 | public: |
190 | ExceptionsDialog( QWidget *parent, const char *name = 0 ); | 192 | ExceptionsDialog( QWidget *parent, const char *name = 0 ); |
191 | 193 | ||
192 | void setDefaults( const QDateTime &from ); | 194 | void setDefaults( const QDateTime &from ); |
193 | 195 | ||
194 | void setDates( const DateList & ); | 196 | void setDates( const DateList & ); |
195 | DateList dates(); | 197 | DateList dates(); |
@@ -226,26 +228,26 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase | |||
226 | int duration(); | 228 | int duration(); |
227 | 229 | ||
228 | void setEndDate( const QDate & ); | 230 | void setEndDate( const QDate & ); |
229 | QDate endDate(); | 231 | QDate endDate(); |
230 | 232 | ||
231 | void setDateTimes( const QDateTime &start, | 233 | void setDateTimes( const QDateTime &start, |
232 | const QDateTime &end = QDateTime() ); | 234 | const QDateTime &end = QDateTime() ); |
233 | 235 | ||
234 | protected slots: | 236 | protected slots: |
235 | void showCurrentRange(); | 237 | void showCurrentRange(); |
236 | 238 | ||
237 | private: | 239 | private: |
238 | QButtonGroup *mRangeButtonGroup; | 240 | Q3ButtonGroup *mRangeButtonGroup; |
239 | QGroupBox *mRangeGroupBox; | 241 | Q3GroupBox *mRangeGroupBox; |
240 | QLabel *mStartDateLabel; | 242 | QLabel *mStartDateLabel; |
241 | QRadioButton *mNoEndDateButton; | 243 | QRadioButton *mNoEndDateButton; |
242 | QRadioButton *mEndDurationButton; | 244 | QRadioButton *mEndDurationButton; |
243 | QSpinBox *mEndDurationEdit; | 245 | QSpinBox *mEndDurationEdit; |
244 | QRadioButton *mEndDateButton; | 246 | QRadioButton *mEndDateButton; |
245 | KDateEdit *mEndDateEdit; | 247 | KDateEdit *mEndDateEdit; |
246 | }; | 248 | }; |
247 | 249 | ||
248 | class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase | 250 | class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase |
249 | { | 251 | { |
250 | public: | 252 | public: |
251 | RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 ); | 253 | RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 ); |
@@ -291,29 +293,29 @@ class KOEditorRecurrence : public QWidget | |||
291 | 293 | ||
292 | signals: | 294 | signals: |
293 | void dateTimesChanged( QDateTime start, QDateTime end ); | 295 | void dateTimesChanged( QDateTime start, QDateTime end ); |
294 | 296 | ||
295 | protected slots: | 297 | protected slots: |
296 | void showCurrentRule( int ); | 298 | void showCurrentRule( int ); |
297 | void showExceptionsDialog(); | 299 | void showExceptionsDialog(); |
298 | void showRecurrenceRangeDialog(); | 300 | void showRecurrenceRangeDialog(); |
299 | 301 | ||
300 | private: | 302 | private: |
301 | QCheckBox *mEnabledCheck; | 303 | QCheckBox *mEnabledCheck; |
302 | 304 | ||
303 | QGroupBox *mTimeGroupBox; | 305 | Q3GroupBox *mTimeGroupBox; |
304 | QLabel *mDateTimeLabel; | 306 | QLabel *mDateTimeLabel; |
305 | 307 | ||
306 | QGroupBox *mRuleBox; | 308 | Q3GroupBox *mRuleBox; |
307 | QWidgetStack *mRuleStack; | 309 | Q3WidgetStack *mRuleStack; |
308 | RecurrenceChooser *mRecurrenceChooser; | 310 | RecurrenceChooser *mRecurrenceChooser; |
309 | 311 | ||
310 | RecurDaily *mDaily; | 312 | RecurDaily *mDaily; |
311 | RecurWeekly *mWeekly; | 313 | RecurWeekly *mWeekly; |
312 | RecurMonthly *mMonthly; | 314 | RecurMonthly *mMonthly; |
313 | RecurYearly *mYearly; | 315 | RecurYearly *mYearly; |
314 | 316 | ||
315 | RecurrenceRangeBase *mRecurrenceRange; | 317 | RecurrenceRangeBase *mRecurrenceRange; |
316 | RecurrenceRangeWidget *mRecurrenceRangeWidget; | 318 | RecurrenceRangeWidget *mRecurrenceRangeWidget; |
317 | RecurrenceRangeDialog *mRecurrenceRangeDialog; | 319 | RecurrenceRangeDialog *mRecurrenceRangeDialog; |
318 | QPushButton *mRecurrenceRangeButton; | 320 | QPushButton *mRecurrenceRangeButton; |
319 | 321 | ||