summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorrecurrence.h
Unidiff
Diffstat (limited to 'korganizer/koeditorrecurrence.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorrecurrence.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 4f0f0b2..2b59085 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -16,204 +16,207 @@
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 <qframe.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 <qgroupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <qmultilineedit.h>
34#include <qlistview.h> 34#include <qlistview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36 36
37#include <kdialogbase.h> 37#include <kdialogbase.h>
38 38
39#include <libkcal/event.h> 39#include <libkcal/event.h>
40 40
41#include "ktimeedit.h" 41#include "ktimeedit.h"
42 42
43class QWidgetStack; 43class QWidgetStack;
44class QSpinBox; 44class QSpinBox;
45 45
46class KDateEdit; 46class KDateEdit;
47 47
48using namespace KCal; 48using namespace KCal;
49 49
50class RecurBase : public QWidget 50class RecurBase : public QWidget
51{ 51{
52 public: 52 public:
53 RecurBase( QWidget *parent = 0, const char *name = 0 ); 53 RecurBase( QWidget *parent = 0, const char *name = 0 );
54 54
55 void setFrequency( int ); 55 void setFrequency( int );
56 int frequency(); 56 int frequency();
57 57
58 QWidget *frequencyEdit(); 58 QWidget *frequencyEdit();
59 59
60 private: 60 private:
61 QSpinBox *mFrequencyEdit; 61 QSpinBox *mFrequencyEdit;
62}; 62};
63 63
64class RecurDaily : public RecurBase 64class RecurDaily : public RecurBase
65{ 65{
66 public: 66 public:
67 RecurDaily( QWidget *parent = 0, const char *name = 0 ); 67 RecurDaily( QWidget *parent = 0, const char *name = 0 );
68}; 68};
69 69
70class RecurWeekly : public RecurBase 70class RecurWeekly : public RecurBase
71{ 71{
72 public: 72 public:
73 RecurWeekly( QWidget *parent = 0, const char *name = 0 ); 73 RecurWeekly( QWidget *parent = 0, const char *name = 0 );
74 74
75 void setDays( const QBitArray & ); 75 void setDays( const QBitArray & );
76 QBitArray days(); 76 QBitArray days();
77 77
78 private: 78 private:
79 QCheckBox *mDayBoxes[7]; 79 QCheckBox *mDayBoxes[7];
80}; 80};
81 81
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(); 112 void setByDay( int doy );
113 void setByMonth( int month ); 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 120
120 private: 121 private:
122 int mDay;
121 QRadioButton *mByMonthRadio; 123 QRadioButton *mByMonthRadio;
122 QComboBox *mByMonthCombo; 124 QComboBox *mByMonthCombo;
123 125 QLabel* mByDayLabel;
126 QLabel* mDayOfLabel;
124 QRadioButton *mByDayRadio; 127 QRadioButton *mByDayRadio;
125}; 128};
126 129
127class RecurrenceChooser : public QWidget 130class RecurrenceChooser : public QWidget
128{ 131{
129 Q_OBJECT 132 Q_OBJECT
130 public: 133 public:
131 RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); 134 RecurrenceChooser( QWidget *parent = 0, const char *name = 0 );
132 135
133 enum { Daily, Weekly, Monthly, Yearly }; 136 enum { Daily, Weekly, Monthly, Yearly };
134 137
135 void setType( int ); 138 void setType( int );
136 int type(); 139 int type();
137 140
138 signals: 141 signals:
139 void chosen( int ); 142 void chosen( int );
140 143
141 protected slots: 144 protected slots:
142 void emitChoice(); 145 void emitChoice();
143 146
144 private: 147 private:
145 QComboBox *mTypeCombo; 148 QComboBox *mTypeCombo;
146 149
147 QRadioButton *mDailyButton; 150 QRadioButton *mDailyButton;
148 QRadioButton *mWeeklyButton; 151 QRadioButton *mWeeklyButton;
149 QRadioButton *mMonthlyButton; 152 QRadioButton *mMonthlyButton;
150 QRadioButton *mYearlyButton; 153 QRadioButton *mYearlyButton;
151}; 154};
152 155
153class ExceptionsBase 156class ExceptionsBase
154{ 157{
155 public: 158 public:
156 virtual void setDefaults( const QDateTime &from ) = 0; 159 virtual void setDefaults( const QDateTime &from ) = 0;
157 virtual void setDates( const DateList & ) = 0; 160 virtual void setDates( const DateList & ) = 0;
158 virtual DateList dates() = 0; 161 virtual DateList dates() = 0;
159}; 162};
160 163
161class ExceptionsWidget : public QWidget, public ExceptionsBase 164class ExceptionsWidget : public QWidget, public ExceptionsBase
162{ 165{
163 Q_OBJECT 166 Q_OBJECT
164 public: 167 public:
165 ExceptionsWidget( QWidget *parent = 0, const char *name = 0 ); 168 ExceptionsWidget( QWidget *parent = 0, const char *name = 0 );
166 169
167 void setDefaults( const QDateTime &from ); 170 void setDefaults( const QDateTime &from );
168 171
169 void setDates( const DateList & ); 172 void setDates( const DateList & );
170 DateList dates(); 173 DateList dates();
171 174
172 protected slots: 175 protected slots:
173 void addException(); 176 void addException();
174 void changeException(); 177 void changeException();
175 void deleteException(); 178 void deleteException();
176 179
177 private: 180 private:
178 KDateEdit *mExceptionDateEdit; 181 KDateEdit *mExceptionDateEdit;
179 QListBox *mExceptionList; 182 QListBox *mExceptionList;
180 DateList mExceptionDates; 183 DateList mExceptionDates;
181}; 184};
182 185
183class ExceptionsDialog : public KDialogBase, public ExceptionsBase 186class ExceptionsDialog : public KDialogBase, public ExceptionsBase
184{ 187{
185 public: 188 public:
186 ExceptionsDialog( QWidget *parent, const char *name = 0 ); 189 ExceptionsDialog( QWidget *parent, const char *name = 0 );
187 190
188 void setDefaults( const QDateTime &from ); 191 void setDefaults( const QDateTime &from );
189 192
190 void setDates( const DateList & ); 193 void setDates( const DateList & );
191 DateList dates(); 194 DateList dates();
192 195
193 private: 196 private:
194 ExceptionsWidget *mExceptions; 197 ExceptionsWidget *mExceptions;
195}; 198};
196 199
197class RecurrenceRangeBase 200class RecurrenceRangeBase
198{ 201{
199 public: 202 public:
200 virtual void setDefaults( const QDateTime &from ) = 0; 203 virtual void setDefaults( const QDateTime &from ) = 0;
201 204
202 virtual void setDuration( int ) = 0; 205 virtual void setDuration( int ) = 0;
203 virtual int duration() = 0; 206 virtual int duration() = 0;
204 207
205 virtual void setEndDate( const QDate & ) = 0; 208 virtual void setEndDate( const QDate & ) = 0;
206 virtual QDate endDate() = 0; 209 virtual QDate endDate() = 0;
207 210
208 virtual void setDateTimes( const QDateTime &start, 211 virtual void setDateTimes( const QDateTime &start,
209 const QDateTime &end = QDateTime() ) = 0; 212 const QDateTime &end = QDateTime() ) = 0;
210}; 213};
211 214
212class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase 215class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
213{ 216{
214 Q_OBJECT 217 Q_OBJECT
215 public: 218 public:
216 RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 ); 219 RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 );
217 220
218 void setDefaults( const QDateTime &from ); 221 void setDefaults( const QDateTime &from );
219 222