summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweeklst.h
authorumopapisdn <umopapisdn>2003-05-05 21:44:39 (UTC)
committer umopapisdn <umopapisdn>2003-05-05 21:44:39 (UTC)
commit3b193b852133a82b5c1708b68a7e460c63629768 (patch) (unidiff)
tree8cd0ff3adc14f0b937d24ab99fca327fb3f16875 /core/pim/datebook/datebookweeklst.h
parent12a700f8903eedeba03d3aba7990b9d660410045 (diff)
downloadopie-3b193b852133a82b5c1708b68a7e460c63629768.zip
opie-3b193b852133a82b5c1708b68a7e460c63629768.tar.gz
opie-3b193b852133a82b5c1708b68a7e460c63629768.tar.bz2
UI and code cleanup. Both UI and code is now more consistent. Also removed menus in favor of toolbuttons. (why were they even available as menus in the first place?)
Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h
index 17dc01f..f858c4f 100644
--- a/core/pim/datebook/datebookweeklst.h
+++ b/core/pim/datebook/datebookweeklst.h
@@ -6,56 +6,59 @@
6#include <qpe/event.h> 6#include <qpe/event.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qscrollview.h> 8#include <qscrollview.h>
9 9
10#include "datebookweeklstheader.h" 10#include "datebookweeklstheader.h"
11#include "datebookweeklstdayhdr.h" 11#include "datebookweeklstdayhdr.h"
12 12
13#include <opie/oclickablelabel.h> 13#include <opie/oclickablelabel.h>
14 14
15class QDateTime; 15class QDateTime;
16class DateBookDB; 16class DateBookDB;
17 17
18class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase 18class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase
19{ 19{
20 Q_OBJECT 20 Q_OBJECT
21public: 21public:
22 DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, 22 DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0,
23 WFlags fl = 0 ); 23 WFlags fl = 0 );
24 ~DateBookWeekLstHeader(); 24 ~DateBookWeekLstHeader();
25 void setDate(const QDate &d); 25 void setDate(const QDate &d);
26 26
27public slots: 27public slots:
28 void nextWeek(); 28 void nextWeek();
29 void prevWeek(); 29 void prevWeek();
30 void nextMonth();
31 void prevMonth();
30 void pickDate(); 32 void pickDate();
31 void setDate(int y, int m, int d); 33 void setDate(int y, int m, int d);
32signals: 34signals:
33 void dateChanged(int y, int w); 35 void dateChanged(int y, int w);
34 void setDbl(bool on); 36 void setDbl(bool on);
35private: 37private:
36 QDate date; 38 QDate date;
37 bool onMonday; 39 //bool onMonday;
40 bool bStartOnMonday;
38}; 41};
39 42
40class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase 43class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase
41{ 44{
42 Q_OBJECT 45 Q_OBJECT
43public: 46public:
44 DateBookWeekLstDayHdr(const QDate &d, bool onM, 47 DateBookWeekLstDayHdr(const QDate &d, bool onM,
45 QWidget* parent = 0, const char* name = 0, 48 QWidget* parent = 0, const char* name = 0,
46 WFlags fl = 0 ); 49 WFlags fl = 0 );
47public slots: 50public slots:
48 void showDay(); 51 void showDay();
49 void newEvent(); 52 void newEvent();
50signals: 53signals:
51 void showDate(int y, int m, int d); 54 void showDate(int y, int m, int d);
52 void addEvent(const QDateTime &start, const QDateTime &stop, 55 void addEvent(const QDateTime &start, const QDateTime &stop,
53 const QString &str, const QString &location); 56 const QString &str, const QString &location);
54private: 57private:
55 QDate date; 58 QDate date;
56}; 59};
57 60
58class DateBookWeekLstEvent: public OClickableLabel 61class DateBookWeekLstEvent: public OClickableLabel
59{ 62{
60 Q_OBJECT 63 Q_OBJECT
61public: 64public:
@@ -63,49 +66,49 @@ public:
63 QWidget* parent = 0, const char* name = 0, 66 QWidget* parent = 0, const char* name = 0,
64 WFlags fl = 0); 67 WFlags fl = 0);
65signals: 68signals:
66 void editEvent(const Event &e); 69 void editEvent(const Event &e);
67private slots: 70private slots:
68 void editMe(); 71 void editMe();
69private: 72private:
70 const EffectiveEvent event; 73 const EffectiveEvent event;
71}; 74};
72 75
73class DateBookWeekLstView: public QWidget 76class DateBookWeekLstView: public QWidget
74{ 77{
75 Q_OBJECT 78 Q_OBJECT
76public: 79public:
77 DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, 80 DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM,
78 QWidget* parent = 0, const char* name = 0, 81 QWidget* parent = 0, const char* name = 0,
79 WFlags fl = 0 ); 82 WFlags fl = 0 );
80 ~DateBookWeekLstView(); 83 ~DateBookWeekLstView();
81signals: 84signals:
82 void editEvent(const Event &e); 85 void editEvent(const Event &e);
83 void showDate(int y, int m, int d); 86 void showDate(int y, int m, int d);
84 void addEvent(const QDateTime &start, const QDateTime &stop, 87 void addEvent(const QDateTime &start, const QDateTime &stop,
85 const QString &str, const QString &location); 88 const QString &str, const QString &location);
86private: 89private:
87 bool onMonday; 90 bool bStartOnMonday;
88protected slots: 91protected slots:
89 void keyPressEvent(QKeyEvent *); 92 void keyPressEvent(QKeyEvent *);
90}; 93};
91 94
92class DateBookWeekLstDblView: public QWidget { 95class DateBookWeekLstDblView: public QWidget {
93 Q_OBJECT 96 Q_OBJECT
94public: 97public:
95 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, 98 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
96 QValueList<EffectiveEvent> &ev2, 99 QValueList<EffectiveEvent> &ev2,
97 QDate &d, bool onM, 100 QDate &d, bool onM,
98 QWidget* parent = 0, const char* name = 0, 101 QWidget* parent = 0, const char* name = 0,
99 WFlags fl = 0 ); 102 WFlags fl = 0 );
100signals: 103signals:
101 void editEvent(const Event &e); 104 void editEvent(const Event &e);
102 void showDate(int y, int m, int d); 105 void showDate(int y, int m, int d);
103 void addEvent(const QDateTime &start, const QDateTime &stop, 106 void addEvent(const QDateTime &start, const QDateTime &stop,
104 const QString &str, const QString &location); 107 const QString &str, const QString &location);
105}; 108};
106 109
107class DateBookWeekLst : public QWidget 110class DateBookWeekLst : public QWidget
108{ 111{
109 Q_OBJECT 112 Q_OBJECT
110 113
111public: 114public:
@@ -115,37 +118,37 @@ public:
115 ~DateBookWeekLst(); 118 ~DateBookWeekLst();
116 void setDate( int y, int w ); 119 void setDate( int y, int w );
117 void setDate(const QDate &d ); 120 void setDate(const QDate &d );
118 int week() const { return _week; }; 121 int week() const { return _week; };
119 QDate date() const; 122 QDate date() const;
120 123
121public slots: 124public slots:
122 void redraw(); 125 void redraw();
123 void dateChanged(int y, int w); 126 void dateChanged(int y, int w);
124 127
125protected slots: 128protected slots:
126 void keyPressEvent(QKeyEvent *); 129 void keyPressEvent(QKeyEvent *);
127 void setDbl(bool on); 130 void setDbl(bool on);
128 131
129signals: 132signals:
130 void showDate(int y, int m, int d); 133 void showDate(int y, int m, int d);
131 void addEvent(const QDateTime &start, const QDateTime &stop, 134 void addEvent(const QDateTime &start, const QDateTime &stop,
132 const QString &str, const QString &location); 135 const QString &str, const QString &location);
133 void editEvent(const Event &e); 136 void editEvent(const Event &e);
134 137
135private: 138private:
136 DateBookDB *db; 139 DateBookDB *db;
137 int startTime; 140 int startTime;
138 bool ampm; 141 bool ampm;
139 bool onMonday; 142 bool bStartOnMonday;
140 bool dbl; 143 bool dbl;
141 int year, _week; 144 int year, _week;
142 DateBookWeekLstHeader *header; 145 DateBookWeekLstHeader *header;
143 QWidget *view; 146 QWidget *view;
144 QVBoxLayout *layout; 147 QVBoxLayout *layout;
145 QScrollView *scroll; 148 QScrollView *scroll;
146 149
147 void getEvents(); 150 void getEvents();
148}; 151};
149 152
150#endif 153#endif
151 154