summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.h
Unidiff
Diffstat (limited to 'korganizer/kofilterview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 0dd423a..f1bbab4 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -21,45 +21,51 @@
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 <qapplication.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qradiobutton.h> 30#include <qradiobutton.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qlabel.h> 32#include <qlabel.h>
32#include <qdialog.h> 33#include <qdialog.h>
33#include <qscrollview.h> 34#include <q3scrollview.h>
34#include <qpushbutton.h> 35#include <qpushbutton.h>
36//Added by qt3to4:
37#include <Q3GridLayout>
38#include <Q3PtrList>
39#include <QKeyEvent>
40#include <Q3VBoxLayout>
35#include <kconfig.h> 41#include <kconfig.h>
36#include "kofilterview_base.h" 42#include "kofilterview_base.h"
37 43
38#include <libkcal/calfilter.h> 44#include <libkcal/calfilter.h>
39 45
40#include <kurlrequester.h> 46#include <kurlrequester.h>
41#include <klineedit.h> 47#include <klineedit.h>
42#include <kglobal.h> 48#include <kglobal.h>
43#include <kmessagebox.h> 49#include <kmessagebox.h>
44 50
45class QGridLayout; 51class Q3GridLayout;
46 52
47using namespace KCal; 53using namespace KCal;
48 54
49class KONewCalPrefs : public QDialog 55class KONewCalPrefs : public QDialog
50{ 56{
51 Q_OBJECT 57 Q_OBJECT
52 public: 58 public:
53 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) : 59 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
54 QDialog( parent, name, true ) 60 QDialog( parent, name, true )
55 { 61 {
56 setCaption( i18n("Add new Calendar") ); 62 setCaption( i18n("Add new Calendar") );
57 QVBoxLayout* lay = new QVBoxLayout( this ); 63 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
58 lay->setSpacing( 3 ); 64 lay->setSpacing( 3 );
59 lay->setMargin( 3 ); 65 lay->setMargin( 3 );
60 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 66 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
61 lay->addWidget( lab ); 67 lay->addWidget( lab );
62 nameE = new KLineEdit( this ); 68 nameE = new KLineEdit( this );
63 lay->addWidget( nameE ); 69 lay->addWidget( nameE );
64 lab = new QLabel( i18n("<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)"), this ); 70 lab = new QLabel( i18n("<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)"), this );
65 lay->addWidget( lab ); 71 lay->addWidget( lab );
@@ -105,17 +111,17 @@ class KOCalButton : public QPushButton
105 Q_OBJECT 111 Q_OBJECT
106 public: 112 public:
107 KOCalButton( QWidget *parent=0, const char *name=0 ) : 113 KOCalButton( QWidget *parent=0, const char *name=0 ) :
108 QPushButton( parent, name) 114 QPushButton( parent, name)
109 { 115 {
110 connect( this, SIGNAL( clicked() ), 116 connect( this, SIGNAL( clicked() ),
111 SLOT( bottonClicked() )); 117 SLOT( bottonClicked() ));
112 mNumber = -1; 118 mNumber = -1;
113 setFocusPolicy(NoFocus); 119 setFocusPolicy(Qt::NoFocus);
114 } 120 }
115 void setNum ( int num ) {mNumber = num; } 121 void setNum ( int num ) {mNumber = num; }
116 signals: 122 signals:
117 void selectNum ( int ); 123 void selectNum ( int );
118private: 124private:
119 int mNumber; 125 int mNumber;
120 void keyPressEvent ( QKeyEvent * e ) 126 void keyPressEvent ( QKeyEvent * e )
121 { 127 {
@@ -130,17 +136,17 @@ class KOCalCheckButton : public QCheckBox
130 Q_OBJECT 136 Q_OBJECT
131 public: 137 public:
132 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : 138 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
133 QCheckBox( parent, name) 139 QCheckBox( parent, name)
134 { 140 {
135 connect( this, SIGNAL( toggled ( bool ) ), 141 connect( this, SIGNAL( toggled ( bool ) ),
136 SLOT( bottonClicked( bool ) )); 142 SLOT( bottonClicked( bool ) ));
137 mNumber = -1; 143 mNumber = -1;
138 setFocusPolicy(NoFocus); 144 setFocusPolicy(Qt::NoFocus);
139 //setMaximumWidth( 10 ); 145 //setMaximumWidth( 10 );
140 146
141 } 147 }
142 void setNum ( int num ) {mNumber = num; } 148 void setNum ( int num ) {mNumber = num; }
143 signals: 149 signals:
144 void selectNum ( int, bool ); 150 void selectNum ( int, bool );
145private: 151private:
146 int mNumber; 152 int mNumber;
@@ -158,17 +164,17 @@ class KOCalRadioButton : public QRadioButton
158 Q_OBJECT 164 Q_OBJECT
159 public: 165 public:
160 KOCalRadioButton( QWidget *parent=0, const char *name=0 ) : 166 KOCalRadioButton( QWidget *parent=0, const char *name=0 ) :
161 QRadioButton( parent, name) 167 QRadioButton( parent, name)
162 { 168 {
163 connect( this, SIGNAL( toggled ( bool ) ), 169 connect( this, SIGNAL( toggled ( bool ) ),
164 SLOT( bottonClicked( bool ) )); 170 SLOT( bottonClicked( bool ) ));
165 mNumber = -1; 171 mNumber = -1;
166 setFocusPolicy(NoFocus); 172 setFocusPolicy(Qt::NoFocus);
167 //setMaximumWidth( 10 ); 173 //setMaximumWidth( 10 );
168 174
169 } 175 }
170 int num() { return mNumber;} 176 int num() { return mNumber;}
171 void setNum ( int num ) {mNumber = num; } 177 void setNum ( int num ) {mNumber = num; }
172 signals: 178 signals:
173 void selectNum ( int ); 179 void selectNum ( int );
174private: 180private:
@@ -183,36 +189,36 @@ private slots :
183}; 189};
184 190
185 191
186 192
187class KOFilterView : public KOFilterView_base 193class KOFilterView : public KOFilterView_base
188{ 194{
189 Q_OBJECT 195 Q_OBJECT
190 public: 196 public:
191 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 197 KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, Qt::WFlags fl=0);
192 ~KOFilterView(); 198 ~KOFilterView();
193 199
194 void updateFilters(); 200 void updateFilters();
195 201
196 bool filtersEnabled(); 202 bool filtersEnabled();
197 void setFiltersEnabled(bool); 203 void setFiltersEnabled(bool);
198 CalFilter *selectedFilter(); 204 CalFilter *selectedFilter();
199 void setSelectedFilter(QString); 205 void setSelectedFilter(QString);
200 void setSelectedFilter( int ); 206 void setSelectedFilter( int );
201 207
202 signals: 208 signals:
203 void filterChanged(); 209 void filterChanged();
204 void editFilters(); 210 void editFilters();
205 211
206 private: 212 private:
207 QPtrList<CalFilter> *mFilters; 213 Q3PtrList<CalFilter> *mFilters;
208}; 214};
209 215
210class KOCalEditView : public QScrollView 216class KOCalEditView : public Q3ScrollView
211{ 217{
212 Q_OBJECT 218 Q_OBJECT
213 public: 219 public:
214 KOCalEditView( QWidget* parent=0,const char* name=0); 220 KOCalEditView( QWidget* parent=0,const char* name=0);
215 ~KOCalEditView(); 221 ~KOCalEditView();
216 int addCalendar( QString calName, QString fileName, bool ask = true ); 222 int addCalendar( QString calName, QString fileName, bool ask = true );
217 int getBirtdayID(); 223 int getBirtdayID();
218 public slots: 224 public slots:
@@ -239,19 +245,19 @@ class KOCalEditView : public QScrollView
239 void removeCalendar ( int cal ); 245 void removeCalendar ( int cal );
240 void calendarAdded( int ); 246 void calendarAdded( int );
241 void needsUpdate(); 247 void needsUpdate();
242 void checkCalendar(); 248 void checkCalendar();
243 void requestCalendarInfo( int id ); 249 void requestCalendarInfo( int id );
244 250
245 private: 251 private:
246 QWidget *mw; 252 QWidget *mw;
247 void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); 253 void toggleList ( Q3PtrList<KOCalCheckButton> , bool b = true );
248 QPtrList<KOCalRadioButton> mStdandardB; 254 Q3PtrList<KOCalRadioButton> mStdandardB;
249 QPtrList<KOCalCheckButton> mEnabledB; 255 Q3PtrList<KOCalCheckButton> mEnabledB;
250 QPtrList<KOCalCheckButton> mAlarmB; 256 Q3PtrList<KOCalCheckButton> mAlarmB;
251 QPtrList<KOCalCheckButton> mROB; 257 Q3PtrList<KOCalCheckButton> mROB;
252 QGridLayout* mainLayout; 258 Q3GridLayout* mainLayout;
253}; 259};
254 260
255 261
256 262
257#endif // KOFILTERVIEW_H 263#endif // KOFILTERVIEW_H