Diffstat (limited to 'korganizer/datenavigatorcontainer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigatorcontainer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index d2f397d..ac9745d 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h | |||
@@ -1,106 +1,108 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | 3 | ||
4 | Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org> |
5 | Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> | 5 | Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> |
6 | 6 | ||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | 10 | (at your option) any later version. |
11 | 11 | ||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | 18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | 20 | ||
21 | As a special exception, permission is given to link this program | 21 | As a special exception, permission is given to link this program |
22 | with any edition of Qt, and distribute the resulting executable, | 22 | with any edition of Qt, and distribute the resulting executable, |
23 | without including the source code for Qt in the source distribution. | 23 | without including the source code for Qt in the source distribution. |
24 | */ | 24 | */ |
25 | #ifndef DATENAVIGATORCONTAINER_H | 25 | #ifndef DATENAVIGATORCONTAINER_H |
26 | #define DATENAVIGATORCONTAINER_H | 26 | #define DATENAVIGATORCONTAINER_H |
27 | 27 | ||
28 | class KDateNavigator; | 28 | class KDateNavigator; |
29 | 29 | ||
30 | #include <qwidget.h> | 30 | #include <qwidget.h> |
31 | #include <qtimer.h> | 31 | #include <qtimer.h> |
32 | #include <libkcal/calendar.h> | 32 | #include <libkcal/calendar.h> |
33 | using namespace KCal; | 33 | using namespace KCal; |
34 | 34 | ||
35 | class DateNavigatorContainer: public QWidget | 35 | class DateNavigatorContainer: public QWidget |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | public: | 38 | public: |
39 | DateNavigatorContainer( QWidget *parent = 0, const char *name = 0 ); | 39 | DateNavigatorContainer( QWidget *parent = 0, const char *name = 0 ); |
40 | ~DateNavigatorContainer(); | 40 | ~DateNavigatorContainer(); |
41 | 41 | ||
42 | /** | 42 | /** |
43 | Associate date navigator with a calendar. It is used by KODayMatrix. | 43 | Associate date navigator with a calendar. It is used by KODayMatrix. |
44 | */ | 44 | */ |
45 | void setCalendar( Calendar * ); | 45 | void setCalendar( Calendar * ); |
46 | 46 | ||
47 | QSize minimumSizeHint() const; | 47 | QSize minimumSizeHint() const; |
48 | QSize sizeHint() const; | 48 | QSize sizeHint() const; |
49 | KDateNavigator * navigatorView() { return mNavigatorView;} | 49 | KDateNavigator * navigatorView() { return mNavigatorView;} |
50 | QDate lastAvailableDate() const ; | 50 | QDate lastAvailableDate() const ; |
51 | QDate firstAvailableDate() const ; | 51 | QDate firstAvailableDate() const ; |
52 | 52 | ||
53 | public slots: | 53 | public slots: |
54 | void selectDates( const KCal::DateList & ); | 54 | void selectDates( const KCal::DateList & ); |
55 | void updateView(); | 55 | void updateView(); |
56 | void updateConfig(); | 56 | void updateConfig(); |
57 | void updateDayMatrix(); | 57 | void updateDayMatrix(); |
58 | void updateDayMatrixDates(); | 58 | void updateDayMatrixDates(); |
59 | void checkUpdateDayMatrixDates(); | 59 | void checkUpdateDayMatrixDates(); |
60 | void updateToday(); | 60 | void updateToday(); |
61 | void slotMonthSelected( int month ); | 61 | void slotMonthSelected( int month ); |
62 | void slotgoNextMonth(); | 62 | void slotgoNextMonth(); |
63 | void slotgoPrevMonth(); | 63 | void slotgoPrevMonth(); |
64 | void slotgoNextYear(); | 64 | void slotgoNextYear(); |
65 | void slotgoPrevYear(); | 65 | void slotgoPrevYear(); |
66 | void setResizeEnabled(); | ||
66 | 67 | ||
67 | signals: | 68 | signals: |
68 | void datesSelected( const KCal::DateList & ); | 69 | void datesSelected( const KCal::DateList & ); |
69 | void incidenceDropped( Incidence *, const QDate & ); | 70 | void incidenceDropped( Incidence *, const QDate & ); |
70 | void incidenceDroppedMove( Incidence *, const QDate & ); | 71 | void incidenceDroppedMove( Incidence *, const QDate & ); |
71 | void weekClicked( const QDate &); | 72 | void weekClicked( const QDate &); |
72 | 73 | ||
73 | void goPrevious(); | 74 | void goPrevious(); |
74 | void goNext(); | 75 | void goNext(); |
75 | 76 | ||
76 | void goNextMonth(); | 77 | void goNextMonth(); |
77 | void goPrevMonth(); | 78 | void goPrevMonth(); |
78 | void goNextYear(); | 79 | void goNextYear(); |
79 | void goPrevYear(); | 80 | void goPrevYear(); |
80 | 81 | ||
81 | void monthSelected( int month ); | 82 | void monthSelected( int month ); |
82 | 83 | ||
83 | protected: | 84 | protected: |
84 | void computeMonthSelected( int month , bool forceEmit ); | 85 | void computeMonthSelected( int month , bool forceEmit ); |
85 | void jumpMonth( int month ); | 86 | void jumpMonth( int month ); |
86 | void resizeEvent( QResizeEvent * ); | 87 | void resizeEvent( QResizeEvent * ); |
87 | 88 | ||
88 | void setBaseDates(); | 89 | void setBaseDates(); |
89 | void connectNavigatorView( KDateNavigator *v ); | 90 | void connectNavigatorView( KDateNavigator *v ); |
90 | 91 | ||
91 | private: | 92 | private: |
93 | bool mResizeEnabled; | ||
92 | QTimer* mUpdateTimer; | 94 | QTimer* mUpdateTimer; |
93 | int mLastDisplayedDN; | 95 | int mLastDisplayedDN; |
94 | QDate mFirstSelectedDate; | 96 | QDate mFirstSelectedDate; |
95 | int mSelectedDateCount; | 97 | int mSelectedDateCount; |
96 | KDateNavigator *mNavigatorView; | 98 | KDateNavigator *mNavigatorView; |
97 | 99 | ||
98 | KCal::Calendar *mCalendar; | 100 | KCal::Calendar *mCalendar; |
99 | 101 | ||
100 | QPtrList<KDateNavigator> mExtraViews; | 102 | QPtrList<KDateNavigator> mExtraViews; |
101 | 103 | ||
102 | int mHorizontalCount; | 104 | int mHorizontalCount; |
103 | int mVerticalCount; | 105 | int mVerticalCount; |
104 | }; | 106 | }; |
105 | 107 | ||
106 | #endif | 108 | #endif |