summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.h
Unidiff
Diffstat (limited to 'korganizer/kofilterview.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kofilterview.h118
1 files changed, 70 insertions, 48 deletions
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 060108f..aaf0eb6 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -22,73 +22,27 @@
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 <qpushbutton.h> 28#include <qpushbutton.h>
29#include <kconfig.h> 29#include <kconfig.h>
30#include "kofilterview_base.h" 30#include "kofilterview_base.h"
31 31
32#include <libkcal/calfilter.h> 32#include <libkcal/calfilter.h>
33 33
34using namespace KCal; 34class QGridLayout;
35
36class KOFilterView : public KOFilterView_base
37{
38 Q_OBJECT
39 public:
40 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
41 ~KOFilterView();
42
43 void updateFilters();
44
45 bool filtersEnabled();
46 void setFiltersEnabled(bool);
47 CalFilter *selectedFilter();
48 void setSelectedFilter(QString);
49 void setSelectedFilter( int );
50
51 signals:
52 void filterChanged();
53 void editFilters();
54
55 private:
56 QPtrList<CalFilter> *mFilters;
57};
58
59class KOCalEditView : public QWidget
60{
61 Q_OBJECT
62 public:
63 KOCalEditView( QWidget* parent=0,const char* name=0);
64 ~KOCalEditView();
65
66 void readConfig( KConfig *);
67 public slots:
68 void addCal();
69 void enableAll();
70 void enableAlarm();
71 void disableRO();
72 void deleteAll();
73 signals:
74 void alarmEnabled ( int cal, bool enable );
75 void calendarEnabled ( int cal, bool enable );
76 void calendarReadonly ( int cal, bool readonly );
77 void setCalendarDefault ( int cal );
78 void removeCalendar ( int cal );
79
80 private:
81};
82 35
36using namespace KCal;
83class KOCalButton : public QPushButton 37class KOCalButton : public QPushButton
84{ 38{
85 Q_OBJECT 39 Q_OBJECT
86 public: 40 public:
87 KOCalButton( QWidget *parent=0, const char *name=0 ) : 41 KOCalButton( QWidget *parent=0, const char *name=0 ) :
88 QPushButton( parent, name) 42 QPushButton( parent, name)
89 { 43 {
90 connect( this, SIGNAL( clicked() ), 44 connect( this, SIGNAL( clicked() ),
91 SLOT( bottonClicked() )); 45 SLOT( bottonClicked() ));
92 mNumber = -1; 46 mNumber = -1;
93 } 47 }
94 void setNum ( int num ) {mNumber = num; } 48 void setNum ( int num ) {mNumber = num; }
@@ -105,29 +59,97 @@ private slots :
105 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } 59 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
106}; 60};
107class KOCalCheckButton : public QCheckBox 61class KOCalCheckButton : public QCheckBox
108{ 62{
109 Q_OBJECT 63 Q_OBJECT
110 public: 64 public:
111 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : 65 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
112 QCheckBox( parent, name) 66 QCheckBox( parent, name)
113 { 67 {
114 connect( this, SIGNAL( toggled ( bool ) ), 68 connect( this, SIGNAL( toggled ( bool ) ),
115 SLOT( bottonClicked( bool ) )); 69 SLOT( bottonClicked( bool ) ));
116 mNumber = -1; 70 mNumber = -1;
71 //setMaximumWidth( 10 );
72
117 } 73 }
118 void setNum ( int num ) {mNumber = num; } 74 void setNum ( int num ) {mNumber = num; }
119 signals: 75 signals:
120 void selectNum ( int, bool ); 76 void selectNum ( int, bool );
121private: 77private:
122 int mNumber; 78 int mNumber;
123 void keyPressEvent ( QKeyEvent * e ) 79 void keyPressEvent ( QKeyEvent * e )
124 { 80 {
125 e->ignore(); 81 e->ignore();
126 } 82 }
127 83
128private slots : 84private slots :
129 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } 85 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
130}; 86};
131 87
132 88
89
90class KOFilterView : public KOFilterView_base
91{
92 Q_OBJECT
93 public:
94 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
95 ~KOFilterView();
96
97 void updateFilters();
98
99 bool filtersEnabled();
100 void setFiltersEnabled(bool);
101 CalFilter *selectedFilter();
102 void setSelectedFilter(QString);
103 void setSelectedFilter( int );
104
105 signals:
106 void filterChanged();
107 void editFilters();
108
109 private:
110 QPtrList<CalFilter> *mFilters;
111};
112
113class KOCalEditView : public QWidget
114{
115 Q_OBJECT
116 public:
117 KOCalEditView( QWidget* parent=0,const char* name=0);
118 ~KOCalEditView();
119
120 void readConfig();
121 public slots:
122 void addCal();
123 void enableAll();
124 void enableAlarm();
125 void disableRO();
126 void deleteAll();
127 void selectStdCal(int,bool );
128 void selectCal(int,bool );
129 void selectCalAlarm(int,bool );
130 void selectReadOnly(int,bool );
131 void setColor(const QColor &,int) ;
132 void deleteCal(int) ;
133 void infoCal(int) ;
134 signals:
135 void alarmEnabled ( int cal, bool enable );
136 void calendarEnabled ( int cal, bool enable );
137 void calendarReadonly ( int cal, bool readonly );
138 void setCalendarDefault ( int cal );
139 void removeCalendar ( int cal );
140 void calendarAdded( int );
141
142 private:
143 QVBoxLayout* ml;
144 QWidget *mw;
145 void toggleList ( QPtrList<KOCalCheckButton> );
146 QPtrList<KOCalCheckButton> mStdandardB;
147 QPtrList<KOCalCheckButton> mEnabledB;
148 QPtrList<KOCalCheckButton> mAlarmB;
149 QPtrList<KOCalCheckButton> mROB;
150 QGridLayout* mainLayout;
151};
152
153
154
133#endif // KOFILTERVIEW_H 155#endif // KOFILTERVIEW_H