Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

opimrecurrencewidget.h

Go to the documentation of this file.
00001 /*
00002  * GPL and based on the widget from TT
00003  */
00004 
00005 #ifndef OPIE_PIM_RECURRENCE_WIDGET_H
00006 #define OPIE_PIM_RECURRENCE_WIDGET_H
00007 
00008 #include <opie2/opimrecurrence.h>
00009 
00010 #include <qpe/datebookmonth.h>
00011 
00012 #include <qlist.h>
00013 #include <qtoolbutton.h>
00014 #include <qcheckbox.h>
00015 #include <qdatetime.h>
00016 #include <qbuttongroup.h>
00017 
00018 #include "opimrecurrencebase.h"
00019 
00030 class OPimRecurrenceWidget : public OPimRecurrenceBase {
00031     Q_OBJECT
00032 public:
00033     OPimRecurrenceWidget( bool startOnMonday,
00034                        const QDate& start, QWidget* parent = 0,
00035                        const char* name = 0,  bool modal = TRUE,
00036                        WFlags fl = 0 );
00037     OPimRecurrenceWidget( bool startOnMonday,
00038                           const Opie::OPimRecurrence& rp, const QDate& start,
00039                        QWidget* parent = 0, const char* name =0,
00040                        bool modal = TRUE, WFlags = 0 );
00041     ~OPimRecurrenceWidget();
00042     Opie::OPimRecurrence recurrence()const;
00043     QDate endDate()const;
00044 
00045 public slots:
00046     void slotSetRType( int );
00050     void endDateChanged( int, int, int );
00054     void slotNoEnd( bool unused );
00055     void setStartDate( const QDate& );
00056     void setRecurrence( const Opie::OPimRecurrence& recur, const QDate& start );
00057     void setRecurrence( const Opie::OPimRecurrence& recur );
00058 
00059 private slots:
00060     void setupRepeatLabel( const QString& );
00061     void setupRepeatLabel( int );
00062     void slotWeekLabel();
00063     void slotMonthLabel( int );
00064     void slotChangeStartOfWeek( bool onMonday );
00065 
00066 private:
00067     void setupNone();
00068     void setupDaily();
00069     void setupWeekly();
00070     void setupMonthly();
00071     void setupYearly();
00072 
00073     enum repeatButtons { None, Day, Week, Month, Year };
00074     void init();
00075     void hideExtras();
00076     void showRepeatStuff();
00077 
00078     QList<QToolButton> listRTypeButtons;
00079     QList<QToolButton> listExtra;
00080     QDate start;    // only used in one spot...
00081     QDate end;
00082     repeatButtons currInterval;
00083     bool startWeekOnMonday : 1;
00084     DateBookMonth *repeatPicker;
00085 
00086     class Private;
00087     Private *d;
00088 
00089 };
00090 
00091 #endif

Generated on Sat Nov 5 16:16:23 2005 for OPIE by  doxygen 1.4.2