summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorrecurrence.h
Unidiff
Diffstat (limited to 'korganizer/koeditorrecurrence.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorrecurrence.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index a15afcb..f398f62 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -82,243 +82,243 @@ class RecurWeekly : public RecurBase
82class RecurMonthly : public RecurBase 82class RecurMonthly : public RecurBase
83{ 83{
84 public: 84 public:
85 RecurMonthly( QWidget *parent = 0, const char *name = 0 ); 85 RecurMonthly( QWidget *parent = 0, const char *name = 0 );
86 86
87 void setByDay( int day ); 87 void setByDay( int day );
88 void setByPos( int count, int weekday ); 88 void setByPos( int count, int weekday );
89 89
90 bool byDay(); 90 bool byDay();
91 bool byPos(); 91 bool byPos();
92 92
93 int day(); 93 int day();
94 94
95 int count(); 95 int count();
96 int weekday(); 96 int weekday();
97 97
98 private: 98 private:
99 QRadioButton *mByDayRadio; 99 QRadioButton *mByDayRadio;
100 QComboBox *mByDayCombo; 100 QComboBox *mByDayCombo;
101 101
102 QRadioButton *mByPosRadio; 102 QRadioButton *mByPosRadio;
103 QComboBox *mByPosCountCombo; 103 QComboBox *mByPosCountCombo;
104 QComboBox *mByPosWeekdayCombo; 104 QComboBox *mByPosWeekdayCombo;
105}; 105};
106 106
107class RecurYearly : public RecurBase 107class RecurYearly : public RecurBase
108{ 108{
109 public: 109 public:
110 RecurYearly( QWidget *parent = 0, const char *name = 0 ); 110 RecurYearly( QWidget *parent = 0, const char *name = 0 );
111 111
112 void setByDay( int doy ); 112 void setByDay( int doy );
113 void setByMonth( int month, int day ); 113 void setByMonth( int month, int day );
114 114
115 bool byMonth(); 115 bool byMonth();
116 bool byDay(); 116 bool byDay();
117 117
118 int month(); 118 int month();
119 int day(); 119 int day();
120 120
121 private: 121 private:
122 int mDay; 122 int mDay;
123 QRadioButton *mByMonthRadio; 123 QRadioButton *mByMonthRadio;
124 QComboBox *mByMonthCombo; 124 QComboBox *mByMonthCombo;
125 QLabel* mByDayLabel; 125 QLabel* mByDayLabel;
126 QLabel* mDayOfLabel; 126 QLabel* mDayOfLabel;
127 QRadioButton *mByDayRadio; 127 QRadioButton *mByDayRadio;
128}; 128};
129 129
130class RecurrenceChooser : public QWidget 130class RecurrenceChooser : public QWidget
131{ 131{
132 Q_OBJECT 132 Q_OBJECT
133 public: 133 public:
134 RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); 134 RecurrenceChooser( QWidget *parent = 0, const char *name = 0 );
135 135
136 enum { Daily, Weekly, Monthly, Yearly }; 136 enum { Daily, Weekly, Monthly, Yearly };
137 137
138 void setType( int ); 138 void setType( int );
139 int type(); 139 int type();
140 140
141 signals: 141 signals:
142 void chosen( int ); 142 void chosen( int );
143 143
144 protected slots: 144 protected slots:
145 void emitChoice(); 145 void emitChoice();
146 146
147 private: 147 private:
148 QComboBox *mTypeCombo; 148 QComboBox *mTypeCombo;
149 149
150 QRadioButton *mDailyButton; 150 QRadioButton *mDailyButton;
151 QRadioButton *mWeeklyButton; 151 QRadioButton *mWeeklyButton;
152 QRadioButton *mMonthlyButton; 152 QRadioButton *mMonthlyButton;
153 QRadioButton *mYearlyButton; 153 QRadioButton *mYearlyButton;
154}; 154};
155 155
156class ExceptionsBase 156class ExceptionsBase
157{ 157{
158 public: 158 public:
159 virtual void setDefaults( const QDateTime &from ) = 0; 159 virtual void setDefaults( const QDateTime &from ) = 0;
160 virtual void setDates( const DateList & ) = 0; 160 virtual void setDates( const DateList & ) = 0;
161 virtual DateList dates() = 0; 161 virtual DateList dates() = 0;
162}; 162};
163 163
164class ExceptionsWidget : public QWidget, public ExceptionsBase 164class ExceptionsWidget : public QWidget, public ExceptionsBase
165{ 165{
166 Q_OBJECT 166 Q_OBJECT
167 public: 167 public:
168 ExceptionsWidget( QWidget *parent = 0, const char *name = 0 ); 168 ExceptionsWidget( QWidget *parent = 0, const char *name = 0 );
169 169
170 void setDefaults( const QDateTime &from ); 170 void setDefaults( const QDateTime &from );
171 171
172 void setDates( const DateList & ); 172 void setDates( const DateList & );
173 DateList dates(); 173 DateList dates();
174 174
175 protected slots: 175 protected slots:
176 void addException(); 176 void addException();
177 void changeException(); 177 void changeException();
178 void deleteException(); 178 void deleteException();
179 179
180 private: 180 private:
181 KDateEdit *mExceptionDateEdit; 181 KDateEdit *mExceptionDateEdit;
182 QListBox *mExceptionList; 182 QListBox *mExceptionList;
183 DateList mExceptionDates; 183 DateList mExceptionDates;
184}; 184};
185 185
186class ExceptionsDialog : public KDialogBase, public ExceptionsBase 186class ExceptionsDialog : public KDialogBase, public ExceptionsBase
187{ 187{
188 public: 188 public:
189 ExceptionsDialog( QWidget *parent, const char *name = 0 ); 189 ExceptionsDialog( QWidget *parent, const char *name = 0 );
190 190
191 void setDefaults( const QDateTime &from ); 191 void setDefaults( const QDateTime &from );
192 192
193 void setDates( const DateList & ); 193 void setDates( const DateList & );
194 DateList dates(); 194 DateList dates();
195 195
196 private: 196 private:
197 ExceptionsWidget *mExceptions; 197 ExceptionsWidget *mExceptions;
198}; 198};
199 199
200class RecurrenceRangeBase 200class RecurrenceRangeBase
201{ 201{
202 public: 202 public:
203 virtual void setDefaults( const QDateTime &from ) = 0; 203 virtual void setDefaults( const QDateTime &from ) = 0;
204 204
205 virtual void setDuration( int ) = 0; 205 virtual void setDuration( int ) = 0;
206 virtual int duration() = 0; 206 virtual int duration() = 0;
207 207
208 virtual void setEndDate( const QDate & ) = 0; 208 virtual void setEndDate( const QDate & ) = 0;
209 virtual QDate endDate() = 0; 209 virtual QDate endDate() = 0;
210 210
211 virtual void setDateTimes( const QDateTime &start, 211 virtual void setDateTimes( const QDateTime &start,
212 const QDateTime &end = QDateTime() ) = 0; 212 const QDateTime &end = QDateTime() ) = 0;
213}; 213};
214 214
215class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase 215class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
216{ 216{
217 Q_OBJECT 217 Q_OBJECT
218 public: 218 public:
219 RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 ); 219 RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 );
220 220
221 void setDefaults( const QDateTime &from ); 221 void setDefaults( const QDateTime &from );
222 222
223 void setDuration( int ); 223 void setDuration( int );
224 int duration(); 224 int duration();
225 225
226 void setEndDate( const QDate & ); 226 void setEndDate( const QDate & );
227 QDate endDate(); 227 QDate endDate();
228 228
229 void setDateTimes( const QDateTime &start, 229 void setDateTimes( const QDateTime &start,
230 const QDateTime &end = QDateTime() ); 230 const QDateTime &end = QDateTime() );
231 231
232 protected slots: 232 protected slots:
233 void showCurrentRange(); 233 void showCurrentRange();
234 234
235 private: 235 private:
236 QGroupBox *mRangeGroupBox; 236 QGroupBox *mRangeGroupBox;
237 QLabel *mStartDateLabel; 237 QLabel *mStartDateLabel;
238 QRadioButton *mNoEndDateButton; 238 QRadioButton *mNoEndDateButton;
239 QRadioButton *mEndDurationButton; 239 QRadioButton *mEndDurationButton;
240 QSpinBox *mEndDurationEdit; 240 QSpinBox *mEndDurationEdit;
241 QRadioButton *mEndDateButton; 241 QRadioButton *mEndDateButton;
242 KDateEdit *mEndDateEdit; 242 KDateEdit *mEndDateEdit;
243}; 243};
244 244
245class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase 245class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase
246{ 246{
247 public: 247 public:
248 RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 ); 248 RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 );
249 249
250 void setDefaults( const QDateTime &from ); 250 void setDefaults( const QDateTime &from );
251 251
252 void setDuration( int ); 252 void setDuration( int );
253 int duration(); 253 int duration();
254 254
255 void setEndDate( const QDate & ); 255 void setEndDate( const QDate & );
256 QDate endDate(); 256 QDate endDate();
257 257
258 void setDateTimes( const QDateTime &start, 258 void setDateTimes( const QDateTime &start,
259 const QDateTime &end = QDateTime() ); 259 const QDateTime &end = QDateTime() );
260 260
261 private: 261 private:
262 RecurrenceRangeWidget *mRecurrenceRangeWidget; 262 RecurrenceRangeWidget *mRecurrenceRangeWidget;
263}; 263};
264 264
265class KOEditorRecurrence : public QWidget 265class KOEditorRecurrence : public QWidget
266{ 266{
267 Q_OBJECT 267 Q_OBJECT
268 public: 268 public:
269 KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 ); 269 KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 );
270 virtual ~KOEditorRecurrence(); 270 virtual ~KOEditorRecurrence();
271 271
272 enum { Daily, Weekly, Monthly, Yearly }; 272 enum { Daily, Weekly, Monthly, Yearly };
273 273
274 /** Set widgets to default values */
275 void setDefaults( QDateTime from, QDateTime to, bool allday );
276 /** Read event object and setup widgets accordingly */ 274 /** Read event object and setup widgets accordingly */
277 void readEvent( Incidence * ); 275 void readEvent( Incidence * );
278 /** Write event settings to event object */ 276 /** Write event settings to event object */
279 void writeEvent( Incidence * ); 277 void writeEvent( Incidence * );
280 278
281 /** Check if the input is valid. */ 279 /** Check if the input is valid. */
282 bool validateInput(); 280 bool validateInput();
283 281
284 public slots: 282 public slots:
283 void setDefaultsDates( QDateTime from, QDateTime to );
284 void setDefaults( QDateTime from, QDateTime to );
285 void setEnabled( bool ); 285 void setEnabled( bool );
286 void setDateTimes( QDateTime start, QDateTime end ); 286 void setDateTimes( QDateTime start, QDateTime end );
287 void setDateTimeStr( const QString & ); 287 void setDateTimeStr( const QString & );
288 288
289 signals: 289 signals:
290 void dateTimesChanged( QDateTime start, QDateTime end ); 290 void dateTimesChanged( QDateTime start, QDateTime end );
291 291
292 protected slots: 292 protected slots:
293 void showCurrentRule( int ); 293 void showCurrentRule( int );
294 void showExceptionsDialog(); 294 void showExceptionsDialog();
295 void showRecurrenceRangeDialog(); 295 void showRecurrenceRangeDialog();
296 296
297 private: 297 private:
298 QCheckBox *mEnabledCheck; 298 QCheckBox *mEnabledCheck;
299 299
300 QGroupBox *mTimeGroupBox; 300 QGroupBox *mTimeGroupBox;
301 QLabel *mDateTimeLabel; 301 QLabel *mDateTimeLabel;
302 302
303 QGroupBox *mRuleBox; 303 QGroupBox *mRuleBox;
304 QWidgetStack *mRuleStack; 304 QWidgetStack *mRuleStack;
305 RecurrenceChooser *mRecurrenceChooser; 305 RecurrenceChooser *mRecurrenceChooser;
306 306
307 RecurDaily *mDaily; 307 RecurDaily *mDaily;
308 RecurWeekly *mWeekly; 308 RecurWeekly *mWeekly;
309 RecurMonthly *mMonthly; 309 RecurMonthly *mMonthly;
310 RecurYearly *mYearly; 310 RecurYearly *mYearly;
311 311
312 RecurrenceRangeBase *mRecurrenceRange; 312 RecurrenceRangeBase *mRecurrenceRange;
313 RecurrenceRangeWidget *mRecurrenceRangeWidget; 313 RecurrenceRangeWidget *mRecurrenceRangeWidget;
314 RecurrenceRangeDialog *mRecurrenceRangeDialog; 314 RecurrenceRangeDialog *mRecurrenceRangeDialog;
315 QPushButton *mRecurrenceRangeButton; 315 QPushButton *mRecurrenceRangeButton;
316 316
317 ExceptionsBase *mExceptions; 317 ExceptionsBase *mExceptions;
318 ExceptionsDialog *mExceptionsDialog; 318 ExceptionsDialog *mExceptionsDialog;
319 ExceptionsWidget *mExceptionsWidget; 319 ExceptionsWidget *mExceptionsWidget;
320 QPushButton *mExceptionsButton; 320 QPushButton *mExceptionsButton;
321 321
322}; 322};
323 323
324#endif 324#endif