-rw-r--r-- | library/datebookmonth.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/datebookmonth.h b/library/datebookmonth.h index cb436a8..46b02c8 100644 --- a/library/datebookmonth.h +++ b/library/datebookmonth.h | |||
@@ -105,102 +105,104 @@ class DateBookMonthTable : public QTable | |||
105 | public: | 105 | public: |
106 | DateBookMonthTable( QWidget *parent = 0, const char *name = 0, | 106 | DateBookMonthTable( QWidget *parent = 0, const char *name = 0, |
107 | DateBookDB *newDb = 0 ); | 107 | DateBookDB *newDb = 0 ); |
108 | ~DateBookMonthTable(); | 108 | ~DateBookMonthTable(); |
109 | void setDate( int y, int m, int d ); | 109 | void setDate( int y, int m, int d ); |
110 | void redraw(); | 110 | void redraw(); |
111 | 111 | ||
112 | QSize minimumSizeHint() const { return sizeHint(); } | 112 | QSize minimumSizeHint() const { return sizeHint(); } |
113 | QSize minimumSize() const { return sizeHint(); } | 113 | QSize minimumSize() const { return sizeHint(); } |
114 | void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;} | 114 | void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;} |
115 | void setWeekStart( bool onMonday ); | 115 | void setWeekStart( bool onMonday ); |
116 | signals: | 116 | signals: |
117 | void dateClicked( int year, int month, int day ); | 117 | void dateClicked( int year, int month, int day ); |
118 | 118 | ||
119 | protected: | 119 | protected: |
120 | void viewportMouseReleaseEvent( QMouseEvent * ); | 120 | void viewportMouseReleaseEvent( QMouseEvent * ); |
121 | 121 | ||
122 | protected slots: | 122 | protected slots: |
123 | 123 | ||
124 | void keyPressEvent(QKeyEvent *e ) { | 124 | void keyPressEvent(QKeyEvent *e ) { |
125 | e->ignore(); | 125 | e->ignore(); |
126 | } | 126 | } |
127 | 127 | ||
128 | private slots: | 128 | private slots: |
129 | void dayClicked( int row, int col ); | 129 | void dayClicked( int row, int col ); |
130 | void dragDay( int row, int col ); | 130 | void dragDay( int row, int col ); |
131 | 131 | ||
132 | private: | 132 | private: |
133 | void setupTable(); | 133 | void setupTable(); |
134 | void setupLabels(); | 134 | void setupLabels(); |
135 | 135 | ||
136 | void findDay( int day, int &row, int &col ); | 136 | void findDay( int day, int &row, int &col ); |
137 | void getEvents(); | 137 | void getEvents(); |
138 | void changeDaySelection( int row, int col ); | 138 | void changeDaySelection( int row, int col ); |
139 | 139 | ||
140 | int year, month, day; | 140 | int year, month, day; |
141 | int selYear, selMonth, selDay; | 141 | int selYear, selMonth, selDay; |
142 | QValueList<Event> monthsEvents; // not used anymore... | 142 | QValueList<Event> monthsEvents; // not used anymore... |
143 | DateBookDB *db; | 143 | DateBookDB *db; |
144 | DateBookMonthTablePrivate *d; | 144 | DateBookMonthTablePrivate *d; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | class DateBookMonthPrivate; | 147 | class DateBookMonthPrivate; |
148 | class DateBookMonth : public QVBox | 148 | class DateBookMonth : public QVBox |
149 | { | 149 | { |
150 | Q_OBJECT | 150 | Q_OBJECT |
151 | 151 | ||
152 | public: | 152 | public: |
153 | /* ac = Auto Close */ | ||
153 | DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE, | 154 | DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE, |
154 | DateBookDB *data = 0 ); | 155 | DateBookDB *data = 0 ); |
155 | ~DateBookMonth(); | 156 | ~DateBookMonth(); |
156 | QDate selectedDate() const; | 157 | QDate selectedDate() const; |
157 | 158 | ||
158 | signals: | 159 | signals: |
160 | /* ### FIXME add a signal with QDate -zecke */ | ||
159 | void dateClicked( int year, int month, int day ); | 161 | void dateClicked( int year, int month, int day ); |
160 | 162 | ||
161 | public slots: | 163 | public slots: |
162 | void setDate( int y, int m ); | 164 | void setDate( int y, int m ); |
163 | void setDate( int y, int m, int d ); | 165 | void setDate( int y, int m, int d ); |
164 | void setDate( QDate ); | 166 | void setDate( QDate ); |
165 | void redraw(); | 167 | void redraw(); |
166 | void slotWeekChange( bool ); | 168 | void slotWeekChange( bool ); |
167 | 169 | ||
168 | protected slots: | 170 | protected slots: |
169 | virtual void keyPressEvent(QKeyEvent *e); | 171 | virtual void keyPressEvent(QKeyEvent *e); |
170 | 172 | ||
171 | private slots: | 173 | private slots: |
172 | void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); } | 174 | void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); } |
173 | void finalDate(int, int, int); | 175 | void finalDate(int, int, int); |
174 | 176 | ||
175 | private: | 177 | private: |
176 | DateBookMonthHeader *header; | 178 | DateBookMonthHeader *header; |
177 | DateBookMonthTable *table; | 179 | DateBookMonthTable *table; |
178 | int year, month, day; | 180 | int year, month, day; |
179 | bool autoClose; | 181 | bool autoClose; |
180 | class DateBookMonthPrivate *d; | 182 | class DateBookMonthPrivate *d; |
181 | }; | 183 | }; |
182 | 184 | ||
183 | class DateButton : public QPushButton | 185 | class DateButton : public QPushButton |
184 | { | 186 | { |
185 | Q_OBJECT | 187 | Q_OBJECT |
186 | 188 | ||
187 | public: | 189 | public: |
188 | DateButton( bool longDate, QWidget *parent, const char * name = 0 ); | 190 | DateButton( bool longDate, QWidget *parent, const char * name = 0 ); |
189 | QDate date() const { return currDate; } | 191 | QDate date() const { return currDate; } |
190 | 192 | ||
191 | bool customWhatsThis() const; | 193 | bool customWhatsThis() const; |
192 | 194 | ||
193 | signals: | 195 | signals: |
194 | void dateSelected( int year, int month, int day ); | 196 | void dateSelected( int year, int month, int day ); |
195 | 197 | ||
196 | public slots: | 198 | public slots: |
197 | void setDate( int y, int m, int d ); | 199 | void setDate( int y, int m, int d ); |
198 | void setDate( QDate ); | 200 | void setDate( QDate ); |
199 | void setWeekStartsMonday( int ); | 201 | void setWeekStartsMonday( int ); |
200 | void setDateFormat( DateFormat ); | 202 | void setDateFormat( DateFormat ); |
201 | 203 | ||
202 | private slots: | 204 | private slots: |
203 | void pickDate(); | 205 | void pickDate(); |
204 | void gotHide(); | 206 | void gotHide(); |
205 | 207 | ||
206 | private: | 208 | private: |