summaryrefslogtreecommitdiff
path: root/libopie/orecurrancewidget.h
authorzecke <zecke>2002-10-20 12:15:51 (UTC)
committer zecke <zecke>2002-10-20 12:15:51 (UTC)
commit82689364fd558ccd28253961204e6b3eb9e32b03 (patch) (side-by-side diff)
treeaec5a649346194aa76aaadd9c7418b700ac4d3d3 /libopie/orecurrancewidget.h
parent7948b5910a098d05f4cc7d0fb14b0f216bf41358 (diff)
downloadopie-82689364fd558ccd28253961204e6b3eb9e32b03.zip
opie-82689364fd558ccd28253961204e6b3eb9e32b03.tar.gz
opie-82689364fd558ccd28253961204e6b3eb9e32b03.tar.bz2
Added ORecur which is a base class for Recurrance extracted from TT Event class
and a widget where you can set the Recurrance This will be used at least in Todolist and Datebook and in the common classes of OTodo and OEvent Fixed the SQL in multiple ways it's summary not description for example
Diffstat (limited to 'libopie/orecurrancewidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/orecurrancewidget.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/libopie/orecurrancewidget.h b/libopie/orecurrancewidget.h
new file mode 100644
index 0000000..f2d7f87
--- a/dev/null
+++ b/libopie/orecurrancewidget.h
@@ -0,0 +1,68 @@
+/*
+ * GPL and based on the widget from TT
+ */
+
+#ifndef OPIE_RECURRANCE_WIDGET_H
+#define OPIE_RECURRANCE_WIDGET_H
+
+#include <qlist.h>
+#include <qtoolbutton.h>
+#include <qcheckbox.h>
+#include <qdatetime.h>
+#include <qbuttongroup.h>
+
+#include <qpe/datebookmonth.h>
+
+#include "orecurrancebase.h"
+#include <opie/orecur.h>
+
+class ORecurranceWidget : public ORecurranceBase {
+ Q_OBJECT
+public:
+ ORecurranceWidget( bool startOnMonday,
+ const QDate& start, QWidget* parent = 0,
+ const char* name = 0, bool modal = TRUE,
+ WFlags fl = 0 );
+ ORecurranceWidget( bool startOnMonday,
+ const ORecur& rp, const QDate& start,
+ QWidget* parent = 0, const char* name =0,
+ bool modal = TRUE, WFlags = 0 );
+ ~ORecurranceWidget();
+ ORecur recurrance()const;
+ QDate endDate()const;
+
+public slots:
+ void slotSetRType( int );
+ void endDateChanged( int, int, int );
+ void slotNoEnd( bool unused );
+
+private slots:
+ void setupRepeatLabel( const QString& );
+ void setupRepeatLabel( int );
+ void slotWeekLabel();
+ void slotMonthLabel( int );
+ void slotChangeStartOfWeek( bool onMonday );
+
+private:
+ void setupNone();
+ void setupDaily();
+ void setupWeekly();
+ void setupMonthly();
+ void setupYearly();
+
+ enum repeatButtons { None, Day, Week, Month, Year };
+ void init();
+ void hideExtras();
+ void showRepeatStuff();
+
+ QList<QToolButton> listRTypeButtons;
+ QList<QToolButton> listExtra;
+ QDate start; // only used in one spot...
+ QDate end;
+ repeatButtons currInterval;
+ bool startWeekOnMonday : 1;
+ DateBookMonth *repeatPicker;
+
+};
+
+#endif