summaryrefslogtreecommitdiff
path: root/core/pim/datebook/repeatentry.h
Unidiff
Diffstat (limited to 'core/pim/datebook/repeatentry.h') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/repeatentry.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/core/pim/datebook/repeatentry.h b/core/pim/datebook/repeatentry.h
new file mode 100644
index 0000000..949fecd
--- a/dev/null
+++ b/core/pim/datebook/repeatentry.h
@@ -0,0 +1,98 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef REPEATENTRY_H
22#define REPEATENTRY_H
23
24#include "repeatentrybase.h"
25
26#include <qpe/event.h>
27
28#include <qcheckbox.h>
29#include <qbuttongroup.h>
30#include <qdatetime.h>
31#include <qlist.h>
32#include <qtoolbutton.h>
33
34class DateBookMonth;
35
36class RepeatEntry : public RepeatEntryBase
37{
38 Q_OBJECT
39public:
40 RepeatEntry( bool startOnMonday,
41 const QDate &start, QWidget *parent = 0, const char *name = 0,
42 bool modal = TRUE, WFlags fl = 0 );
43 RepeatEntry( bool startOnMonday,
44 const Event::RepeatPattern &rp, const QDate &start,
45 QWidget *parent = 0, const char *name = 0, bool modal = TRUE,
46 WFlags fl = 0 );
47 ~RepeatEntry();
48
49 Event::RepeatPattern repeatPattern();
50 QDate endDate() { return end; };
51
52public slots:
53 void slotSetRType( int );
54 void endDateChanged( int, int, int );
55 void slotNoEnd( bool unused );
56
57private slots:
58 void setupRepeatLabel( const QString& );
59 void setupRepeatLabel( int );
60 void slotWeekLabel();
61 void slotMonthLabel( int );
62 void slotChangeStartOfWeek( bool onMonday );
63
64private:
65 void setupNone();
66 void setupDaily();
67 void setupWeekly();
68 void setupMonthly();
69 void setupYearly();
70
71 enum repeatButtons { NONE, DAY, WEEK, MONTH, YEAR };
72 void init();
73 inline void hideExtras();
74 void showRepeatStuff();
75
76 QList<QToolButton> listRTypeButtons;
77 QList<QToolButton> listExtra;
78 QDate start; // only used in one spot...
79 QDate end;
80 repeatButtons currInterval;
81 bool startWeekOnMonday;
82 DateBookMonth *repeatPicker;
83};
84
85inline void RepeatEntry::hideExtras()
86{
87 // hide the extra buttons...
88 fraExtra->hide();
89 chkNoEnd->hide();
90 QListIterator<QToolButton> it( listExtra );
91 for ( ; *it; ++it ) {
92 (*it)->hide();
93 (*it)->setOn( FALSE );
94 }
95
96}
97
98#endif