-rw-r--r-- | libopie/orecurrancewidget.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/libopie/orecurrancewidget.h b/libopie/orecurrancewidget.h new file mode 100644 index 0000000..f2d7f87 --- a/dev/null +++ b/libopie/orecurrancewidget.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * GPL and based on the widget from TT | ||
3 | */ | ||
4 | |||
5 | #ifndef OPIE_RECURRANCE_WIDGET_H | ||
6 | #define OPIE_RECURRANCE_WIDGET_H | ||
7 | |||
8 | #include <qlist.h> | ||
9 | #include <qtoolbutton.h> | ||
10 | #include <qcheckbox.h> | ||
11 | #include <qdatetime.h> | ||
12 | #include <qbuttongroup.h> | ||
13 | |||
14 | #include <qpe/datebookmonth.h> | ||
15 | |||
16 | #include "orecurrancebase.h" | ||
17 | #include <opie/orecur.h> | ||
18 | |||
19 | class ORecurranceWidget : public ORecurranceBase { | ||
20 | Q_OBJECT | ||
21 | public: | ||
22 | ORecurranceWidget( bool startOnMonday, | ||
23 | const QDate& start, QWidget* parent = 0, | ||
24 | const char* name = 0, bool modal = TRUE, | ||
25 | WFlags fl = 0 ); | ||
26 | ORecurranceWidget( bool startOnMonday, | ||
27 | const ORecur& rp, const QDate& start, | ||
28 | QWidget* parent = 0, const char* name =0, | ||
29 | bool modal = TRUE, WFlags = 0 ); | ||
30 | ~ORecurranceWidget(); | ||
31 | ORecur recurrance()const; | ||
32 | QDate endDate()const; | ||
33 | |||
34 | public slots: | ||
35 | void slotSetRType( int ); | ||
36 | void endDateChanged( int, int, int ); | ||
37 | void slotNoEnd( bool unused ); | ||
38 | |||
39 | private slots: | ||
40 | void setupRepeatLabel( const QString& ); | ||
41 | void setupRepeatLabel( int ); | ||
42 | void slotWeekLabel(); | ||
43 | void slotMonthLabel( int ); | ||
44 | void slotChangeStartOfWeek( bool onMonday ); | ||
45 | |||
46 | private: | ||
47 | void setupNone(); | ||
48 | void setupDaily(); | ||
49 | void setupWeekly(); | ||
50 | void setupMonthly(); | ||
51 | void setupYearly(); | ||
52 | |||
53 | enum repeatButtons { None, Day, Week, Month, Year }; | ||
54 | void init(); | ||
55 | void hideExtras(); | ||
56 | void showRepeatStuff(); | ||
57 | |||
58 | QList<QToolButton> listRTypeButtons; | ||
59 | QList<QToolButton> listExtra; | ||
60 | QDate start; // only used in one spot... | ||
61 | QDate end; | ||
62 | repeatButtons currInterval; | ||
63 | bool startWeekOnMonday : 1; | ||
64 | DateBookMonth *repeatPicker; | ||
65 | |||
66 | }; | ||
67 | |||
68 | #endif | ||