author | zautrix <zautrix> | 2005-06-14 12:58:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-14 12:58:15 (UTC) |
commit | d38f601cfdb510fc39dd798af44a50c7958d7be8 (patch) (unidiff) | |
tree | d2a118c01faf4b69806de5d6b8b2bf6f6315ecb9 /korganizer/kofilterview.h | |
parent | bd2fd522c0ba5c5a7897df0941032a9af9842dfc (diff) | |
download | kdepimpi-d38f601cfdb510fc39dd798af44a50c7958d7be8.zip kdepimpi-d38f601cfdb510fc39dd798af44a50c7958d7be8.tar.gz kdepimpi-d38f601cfdb510fc39dd798af44a50c7958d7be8.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/kofilterview.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 1849e36..e2ebdd4 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -1,156 +1,156 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
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 KOFILTERVIEW_H | 23 | #ifndef KOFILTERVIEW_H |
24 | #define KOFILTERVIEW_H | 24 | #define KOFILTERVIEW_H |
25 | 25 | ||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qcheckbox.h> | 27 | #include <qcheckbox.h> |
28 | #include <qscrollview.h> | ||
28 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
29 | #include <kconfig.h> | 30 | #include <kconfig.h> |
30 | #include "kofilterview_base.h" | 31 | #include "kofilterview_base.h" |
31 | 32 | ||
32 | #include <libkcal/calfilter.h> | 33 | #include <libkcal/calfilter.h> |
33 | 34 | ||
34 | class QGridLayout; | 35 | class QGridLayout; |
35 | 36 | ||
36 | using namespace KCal; | 37 | using namespace KCal; |
37 | class KOCalButton : public QPushButton | 38 | class KOCalButton : public QPushButton |
38 | { | 39 | { |
39 | Q_OBJECT | 40 | Q_OBJECT |
40 | public: | 41 | public: |
41 | KOCalButton( QWidget *parent=0, const char *name=0 ) : | 42 | KOCalButton( QWidget *parent=0, const char *name=0 ) : |
42 | QPushButton( parent, name) | 43 | QPushButton( parent, name) |
43 | { | 44 | { |
44 | connect( this, SIGNAL( clicked() ), | 45 | connect( this, SIGNAL( clicked() ), |
45 | SLOT( bottonClicked() )); | 46 | SLOT( bottonClicked() )); |
46 | mNumber = -1; | 47 | mNumber = -1; |
47 | } | 48 | } |
48 | void setNum ( int num ) {mNumber = num; } | 49 | void setNum ( int num ) {mNumber = num; } |
49 | signals: | 50 | signals: |
50 | void selectNum ( int ); | 51 | void selectNum ( int ); |
51 | private: | 52 | private: |
52 | int mNumber; | 53 | int mNumber; |
53 | void keyPressEvent ( QKeyEvent * e ) | 54 | void keyPressEvent ( QKeyEvent * e ) |
54 | { | 55 | { |
55 | e->ignore(); | 56 | e->ignore(); |
56 | } | 57 | } |
57 | 58 | ||
58 | private slots : | 59 | private slots : |
59 | void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } | 60 | void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } |
60 | }; | 61 | }; |
61 | class KOCalCheckButton : public QCheckBox | 62 | class KOCalCheckButton : public QCheckBox |
62 | { | 63 | { |
63 | Q_OBJECT | 64 | Q_OBJECT |
64 | public: | 65 | public: |
65 | KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : | 66 | KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : |
66 | QCheckBox( parent, name) | 67 | QCheckBox( parent, name) |
67 | { | 68 | { |
68 | connect( this, SIGNAL( toggled ( bool ) ), | 69 | connect( this, SIGNAL( toggled ( bool ) ), |
69 | SLOT( bottonClicked( bool ) )); | 70 | SLOT( bottonClicked( bool ) )); |
70 | mNumber = -1; | 71 | mNumber = -1; |
71 | //setMaximumWidth( 10 ); | 72 | //setMaximumWidth( 10 ); |
72 | 73 | ||
73 | } | 74 | } |
74 | void setNum ( int num ) {mNumber = num; } | 75 | void setNum ( int num ) {mNumber = num; } |
75 | signals: | 76 | signals: |
76 | void selectNum ( int, bool ); | 77 | void selectNum ( int, bool ); |
77 | private: | 78 | private: |
78 | int mNumber; | 79 | int mNumber; |
79 | void keyPressEvent ( QKeyEvent * e ) | 80 | void keyPressEvent ( QKeyEvent * e ) |
80 | { | 81 | { |
81 | e->ignore(); | 82 | e->ignore(); |
82 | } | 83 | } |
83 | 84 | ||
84 | private slots : | 85 | private slots : |
85 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } | 86 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } |
86 | }; | 87 | }; |
87 | 88 | ||
88 | 89 | ||
89 | 90 | ||
90 | class KOFilterView : public KOFilterView_base | 91 | class KOFilterView : public KOFilterView_base |
91 | { | 92 | { |
92 | Q_OBJECT | 93 | Q_OBJECT |
93 | public: | 94 | public: |
94 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | 95 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); |
95 | ~KOFilterView(); | 96 | ~KOFilterView(); |
96 | 97 | ||
97 | void updateFilters(); | 98 | void updateFilters(); |
98 | 99 | ||
99 | bool filtersEnabled(); | 100 | bool filtersEnabled(); |
100 | void setFiltersEnabled(bool); | 101 | void setFiltersEnabled(bool); |
101 | CalFilter *selectedFilter(); | 102 | CalFilter *selectedFilter(); |
102 | void setSelectedFilter(QString); | 103 | void setSelectedFilter(QString); |
103 | void setSelectedFilter( int ); | 104 | void setSelectedFilter( int ); |
104 | 105 | ||
105 | signals: | 106 | signals: |
106 | void filterChanged(); | 107 | void filterChanged(); |
107 | void editFilters(); | 108 | void editFilters(); |
108 | 109 | ||
109 | private: | 110 | private: |
110 | QPtrList<CalFilter> *mFilters; | 111 | QPtrList<CalFilter> *mFilters; |
111 | }; | 112 | }; |
112 | 113 | ||
113 | class KOCalEditView : public QWidget | 114 | class KOCalEditView : public QScrollView |
114 | { | 115 | { |
115 | Q_OBJECT | 116 | Q_OBJECT |
116 | public: | 117 | public: |
117 | KOCalEditView( QWidget* parent=0,const char* name=0); | 118 | KOCalEditView( QWidget* parent=0,const char* name=0); |
118 | ~KOCalEditView(); | 119 | ~KOCalEditView(); |
119 | 120 | ||
120 | public slots: | 121 | public slots: |
121 | void addCal(); | 122 | void addCal(); |
122 | void enableAll(); | 123 | void enableAll(); |
123 | void enableAlarm(); | 124 | void enableAlarm(); |
124 | void disableRO(); | 125 | void disableRO(); |
125 | void deleteAll(); | 126 | void deleteAll(); |
126 | void selectStdCal(int,bool ); | 127 | void selectStdCal(int,bool ); |
127 | void selectCal(int,bool ); | 128 | void selectCal(int,bool ); |
128 | void selectCalAlarm(int,bool ); | 129 | void selectCalAlarm(int,bool ); |
129 | void selectReadOnly(int,bool ); | 130 | void selectReadOnly(int,bool ); |
130 | void setColor(const QColor &,int) ; | 131 | void setColor(const QColor &,int) ; |
131 | void deleteCal(int) ; | 132 | void deleteCal(int) ; |
132 | void infoCal(int) ; | 133 | void infoCal(int) ; |
133 | void readConfig(); | 134 | void readConfig(); |
134 | signals: | 135 | signals: |
135 | void alarmEnabled ( int cal, bool enable ); | 136 | void alarmEnabled ( int cal, bool enable ); |
136 | void calendarEnabled ( int cal, bool enable ); | 137 | void calendarEnabled ( int cal, bool enable ); |
137 | void calendarReadonly ( int cal, bool readonly ); | 138 | void calendarReadonly ( int cal, bool readonly ); |
138 | void setCalendarDefault ( int cal ); | 139 | void setCalendarDefault ( int cal ); |
139 | void removeCalendar ( int cal ); | 140 | void removeCalendar ( int cal ); |
140 | void calendarAdded( int ); | 141 | void calendarAdded( int ); |
141 | void needsUpdate(); | 142 | void needsUpdate(); |
142 | 143 | ||
143 | private: | 144 | private: |
144 | QVBoxLayout* ml; | ||
145 | QWidget *mw; | 145 | QWidget *mw; |
146 | void toggleList ( QPtrList<KOCalCheckButton> ); | 146 | void toggleList ( QPtrList<KOCalCheckButton> ); |
147 | QPtrList<KOCalCheckButton> mStdandardB; | 147 | QPtrList<KOCalCheckButton> mStdandardB; |
148 | QPtrList<KOCalCheckButton> mEnabledB; | 148 | QPtrList<KOCalCheckButton> mEnabledB; |
149 | QPtrList<KOCalCheckButton> mAlarmB; | 149 | QPtrList<KOCalCheckButton> mAlarmB; |
150 | QPtrList<KOCalCheckButton> mROB; | 150 | QPtrList<KOCalCheckButton> mROB; |
151 | QGridLayout* mainLayout; | 151 | QGridLayout* mainLayout; |
152 | }; | 152 | }; |
153 | 153 | ||
154 | 154 | ||
155 | 155 | ||
156 | #endif // KOFILTERVIEW_H | 156 | #endif // KOFILTERVIEW_H |