-rw-r--r-- | korganizer/kofilterview.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d434c52..060108f 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -19,16 +19,18 @@ As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef KOFILTERVIEW_H #define KOFILTERVIEW_H #include <qstring.h> +#include <qcheckbox.h> +#include <qpushbutton.h> #include <kconfig.h> #include "kofilterview_base.h" #include <libkcal/calfilter.h> using namespace KCal; class KOFilterView : public KOFilterView_base @@ -73,11 +75,59 @@ class KOCalEditView : public QWidget void calendarEnabled ( int cal, bool enable ); void calendarReadonly ( int cal, bool readonly ); void setCalendarDefault ( int cal ); void removeCalendar ( int cal ); private: }; +class KOCalButton : public QPushButton +{ + Q_OBJECT + public: + KOCalButton( QWidget *parent=0, const char *name=0 ) : + QPushButton( parent, name) + { + connect( this, SIGNAL( clicked() ), + SLOT( bottonClicked() )); + mNumber = -1; + } + void setNum ( int num ) {mNumber = num; } + signals: + void selectNum ( int ); +private: + int mNumber; + void keyPressEvent ( QKeyEvent * e ) + { + e->ignore(); + } + +private slots : + void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } +}; +class KOCalCheckButton : public QCheckBox +{ + Q_OBJECT + public: + KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : + QCheckBox( parent, name) + { + connect( this, SIGNAL( toggled ( bool ) ), + SLOT( bottonClicked( bool ) )); + mNumber = -1; + } + void setNum ( int num ) {mNumber = num; } + signals: + void selectNum ( int, bool ); +private: + int mNumber; + void keyPressEvent ( QKeyEvent * e ) + { + e->ignore(); + } + +private slots : + void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } +}; #endif // KOFILTERVIEW_H |