-rw-r--r-- | korganizer/komonthview.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index a29a1a8..bf861ef 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -15,48 +15,49 @@ | |||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _KOMONTHVIEW_H | 20 | #ifndef _KOMONTHVIEW_H |
21 | #define _KOMONTHVIEW_H | 21 | #define _KOMONTHVIEW_H |
22 | 22 | ||
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qframe.h> | 24 | #include <qframe.h> |
25 | #include <qdatetime.h> | 25 | #include <qdatetime.h> |
26 | #include <qlistbox.h> | 26 | #include <qlistbox.h> |
27 | #include <qpoint.h> | 27 | #include <qpoint.h> |
28 | #include <qwidgetstack.h> | 28 | #include <qwidgetstack.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qintdict.h> | 30 | #include <qintdict.h> |
31 | #include <qpushbutton.h> | 31 | #include <qpushbutton.h> |
32 | #include <qvaluelist.h> | 32 | #include <qvaluelist.h> |
33 | #include <qptrvector.h> | 33 | #include <qptrvector.h> |
34 | 34 | ||
35 | #include <libkcal/calendar.h> | 35 | #include <libkcal/calendar.h> |
36 | #include <libkcal/event.h> | 36 | #include <libkcal/event.h> |
37 | 37 | ||
38 | #include "koeventview.h" | 38 | #include "koeventview.h" |
39 | #include "navigatorbar.h" | ||
39 | 40 | ||
40 | #ifdef DESKTOP_VERSION | 41 | #ifdef DESKTOP_VERSION |
41 | class QToolTipGroup; | 42 | class QToolTipGroup; |
42 | #endif | 43 | #endif |
43 | 44 | ||
44 | class KNOWhatsThis; | 45 | class KNOWhatsThis; |
45 | class KOWeekButton : public QPushButton | 46 | class KOWeekButton : public QPushButton |
46 | { | 47 | { |
47 | Q_OBJECT | 48 | Q_OBJECT |
48 | public: | 49 | public: |
49 | KOWeekButton( QWidget *parent=0, const char *name=0 ) : | 50 | KOWeekButton( QWidget *parent=0, const char *name=0 ) : |
50 | QPushButton( parent, name) | 51 | QPushButton( parent, name) |
51 | { | 52 | { |
52 | connect( this, SIGNAL( clicked() ), | 53 | connect( this, SIGNAL( clicked() ), |
53 | SLOT( bottonClicked() )); | 54 | SLOT( bottonClicked() )); |
54 | mNumber = -1; | 55 | mNumber = -1; |
55 | } | 56 | } |
56 | void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} | 57 | void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} |
57 | int getWeekNum() { return mNumber;} | 58 | int getWeekNum() { return mNumber;} |
58 | signals: | 59 | signals: |
59 | void selectWeekNum ( int ); | 60 | void selectWeekNum ( int ); |
60 | private: | 61 | private: |
61 | int mNumber; | 62 | int mNumber; |
62 | private slots : | 63 | private slots : |
@@ -206,79 +207,80 @@ class KOMonthView: public KOEventView | |||
206 | { | 207 | { |
207 | Q_OBJECT | 208 | Q_OBJECT |
208 | public: | 209 | public: |
209 | KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); | 210 | KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); |
210 | ~KOMonthView(); | 211 | ~KOMonthView(); |
211 | 212 | ||
212 | /** Returns maximum number of days supported by the komonthview */ | 213 | /** Returns maximum number of days supported by the komonthview */ |
213 | virtual int maxDatesHint(); | 214 | virtual int maxDatesHint(); |
214 | 215 | ||
215 | /** Returns number of currently shown dates. */ | 216 | /** Returns number of currently shown dates. */ |
216 | virtual int currentDateCount(); | 217 | virtual int currentDateCount(); |
217 | 218 | ||
218 | /** returns the currently selected events */ | 219 | /** returns the currently selected events */ |
219 | virtual QPtrList<Incidence> selectedIncidences(); | 220 | virtual QPtrList<Incidence> selectedIncidences(); |
220 | 221 | ||
221 | /** returns dates of the currently selected events */ | 222 | /** returns dates of the currently selected events */ |
222 | virtual DateList selectedDates(); | 223 | virtual DateList selectedDates(); |
223 | 224 | ||
224 | virtual void printPreview(CalPrinter *calPrinter, | 225 | virtual void printPreview(CalPrinter *calPrinter, |
225 | const QDate &, const QDate &); | 226 | const QDate &, const QDate &); |
226 | bool isMonthView() { return true; } | 227 | bool isMonthView() { return true; } |
227 | bool isUpdatePossible() { return updatePossible; } | 228 | bool isUpdatePossible() { return updatePossible; } |
228 | 229 | ||
229 | MonthViewCell * selectedCell(); | 230 | MonthViewCell * selectedCell(); |
230 | bool skipResize; | 231 | bool skipResize; |
232 | NavigatorBar* navigatorBar() { return mNavigatorBar ;} | ||
231 | public slots: | 233 | public slots: |
232 | virtual void updateView(); | 234 | virtual void updateView(); |
233 | virtual void updateConfig(); | 235 | virtual void updateConfig(); |
234 | virtual void showDates(const QDate &start, const QDate &end); | 236 | virtual void showDates(const QDate &start, const QDate &end); |
235 | virtual void showEvents(QPtrList<Event> eventList); | 237 | virtual void showEvents(QPtrList<Event> eventList); |
236 | 238 | ||
237 | void changeEventDisplay(Event *, int); | 239 | void changeEventDisplay(Event *, int); |
238 | 240 | ||
239 | void clearSelection(); | 241 | void clearSelection(); |
240 | 242 | ||
241 | void showContextMenu( Incidence * ); | 243 | void showContextMenu( Incidence * ); |
242 | 244 | ||
243 | void setSelectedCell( MonthViewCell * ); | 245 | void setSelectedCell( MonthViewCell * ); |
244 | 246 | ||
245 | protected slots: | 247 | protected slots: |
246 | void selectInternalWeekNum ( int ); | 248 | void selectInternalWeekNum ( int ); |
247 | void switchView(); | 249 | void switchView(); |
248 | void processSelectionChange(); | 250 | void processSelectionChange(); |
249 | signals: | 251 | signals: |
250 | void nextMonth(); | 252 | void nextMonth(); |
251 | void prevMonth(); | 253 | void prevMonth(); |
252 | void showNavigator( bool ); | ||
253 | void selectWeekNum ( int ); | 254 | void selectWeekNum ( int ); |
254 | void showDaySignal( QDate ); | 255 | void showDaySignal( QDate ); |
255 | protected: | 256 | protected: |
256 | void resizeEvent(QResizeEvent *); | 257 | void resizeEvent(QResizeEvent *); |
257 | void viewChanged(); | 258 | void viewChanged(); |
258 | void updateDayLabels(); | 259 | void updateDayLabels(); |
259 | 260 | ||
260 | private: | 261 | private: |
262 | NavigatorBar* mNavigatorBar; | ||
261 | int currentWeek(); | 263 | int currentWeek(); |
262 | bool clPending; | 264 | bool clPending; |
263 | QWidgetStack * mWidStack; | 265 | QWidgetStack * mWidStack; |
264 | QWidget* mMonthView; | 266 | QWidget* mMonthView; |
265 | QWidget* mWeekView; | 267 | QWidget* mWeekView; |
266 | bool mShowWeekView; | 268 | bool mShowWeekView; |
267 | bool updatePossible; | 269 | bool updatePossible; |
268 | int mDaysPerWeek; | 270 | int mDaysPerWeek; |
269 | int mNumWeeks; | 271 | int mNumWeeks; |
270 | int mNumCells; | 272 | int mNumCells; |
271 | bool mWeekStartsMonday; | 273 | bool mWeekStartsMonday; |
272 | bool mShowSatSunComp; | 274 | bool mShowSatSunComp; |
273 | void computeLayout(); | 275 | void computeLayout(); |
274 | void computeLayoutWeek(); | 276 | void computeLayoutWeek(); |
275 | 277 | ||
276 | QPtrVector<MonthViewCell> mCells; | 278 | QPtrVector<MonthViewCell> mCells; |
277 | QPtrVector<QLabel> mDayLabels; | 279 | QPtrVector<QLabel> mDayLabels; |
278 | QPtrVector<KOWeekButton> mWeekLabels; | 280 | QPtrVector<KOWeekButton> mWeekLabels; |
279 | QPtrVector<MonthViewCell> mCellsW; | 281 | QPtrVector<MonthViewCell> mCellsW; |
280 | QPtrVector<QLabel> mDayLabelsW; | 282 | QPtrVector<QLabel> mDayLabelsW; |
281 | QPtrVector<KOWeekButton> mWeekLabelsW; | 283 | QPtrVector<KOWeekButton> mWeekLabelsW; |
282 | 284 | ||
283 | bool mShortDayLabels; | 285 | bool mShortDayLabels; |
284 | int mWidthLongDayLabel; | 286 | int mWidthLongDayLabel; |