summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
Unidiff
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index a92421b..89912e0 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -6,48 +6,49 @@
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
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 <qtimer.h>
30#include <qintdict.h> 31#include <qintdict.h>
31#include <qpushbutton.h> 32#include <qpushbutton.h>
32#include <qvaluelist.h> 33#include <qvaluelist.h>
33#include <qptrvector.h> 34#include <qptrvector.h>
34 35
35#include <libkcal/calendar.h> 36#include <libkcal/calendar.h>
36#include <libkcal/event.h> 37#include <libkcal/event.h>
37 38
38#include "koeventview.h" 39#include "koeventview.h"
39#include "navigatorbar.h" 40#include "navigatorbar.h"
40 41
41#ifdef DESKTOP_VERSION 42#ifdef DESKTOP_VERSION
42class QToolTipGroup; 43class QToolTipGroup;
43#endif 44#endif
44 45
45class KNOWhatsThis; 46class KNOWhatsThis;
46class KOWeekButton : public QPushButton 47class KOWeekButton : public QPushButton
47{ 48{
48 Q_OBJECT 49 Q_OBJECT
49 public: 50 public:
50 KOWeekButton( QWidget *parent=0, const char *name=0 ) : 51 KOWeekButton( QWidget *parent=0, const char *name=0 ) :
51 QPushButton( parent, name) 52 QPushButton( parent, name)
52 { 53 {
53 connect( this, SIGNAL( clicked() ), 54 connect( this, SIGNAL( clicked() ),
@@ -230,62 +231,64 @@ class KOMonthView: public KOEventView
230 virtual void printPreview(CalPrinter *calPrinter, 231 virtual void printPreview(CalPrinter *calPrinter,
231 const QDate &, const QDate &); 232 const QDate &, const QDate &);
232 bool isMonthView() { return !mShowWeekView; } 233 bool isMonthView() { return !mShowWeekView; }
233 bool isUpdatePossible() { return updatePossible; } 234 bool isUpdatePossible() { return updatePossible; }
234 235
235 MonthViewCell * selectedCell(); 236 MonthViewCell * selectedCell();
236 bool skipResize; 237 bool skipResize;
237 NavigatorBar* navigatorBar() { return mNavigatorBar ;} 238 NavigatorBar* navigatorBar() { return mNavigatorBar ;}
238 public slots: 239 public slots:
239 virtual void updateView(); 240 virtual void updateView();
240 virtual void updateConfig(); 241 virtual void updateConfig();
241 virtual void showDates(const QDate &start, const QDate &end); 242 virtual void showDates(const QDate &start, const QDate &end);
242 virtual void showEvents(QPtrList<Event> eventList); 243 virtual void showEvents(QPtrList<Event> eventList);
243 244
244 void changeEventDisplay(Event *, int); 245 void changeEventDisplay(Event *, int);
245 246
246 void clearSelection(); 247 void clearSelection();
247 248
248 void showContextMenu( Incidence * ); 249 void showContextMenu( Incidence * );
249 250
250 void setSelectedCell( MonthViewCell * ); 251 void setSelectedCell( MonthViewCell * );
251 void switchView(); 252 void switchView();
252 253
253 protected slots: 254 protected slots:
255 void slotComputeLayout();
254 void selectInternalWeekNum ( int ); 256 void selectInternalWeekNum ( int );
255 void processSelectionChange(); 257 void processSelectionChange();
256 signals: 258 signals:
257 void nextMonth(); 259 void nextMonth();
258 void prevMonth(); 260 void prevMonth();
259 void selectWeekNum ( int ); 261 void selectWeekNum ( int );
260 void selectMonth (); 262 void selectMonth ();
261 void showDaySignal( QDate ); 263 void showDaySignal( QDate );
262 protected: 264 protected:
263 void resizeEvent(QResizeEvent *); 265 void resizeEvent(QResizeEvent *);
264 void viewChanged(); 266 void viewChanged();
265 void updateDayLabels(); 267 void updateDayLabels();
266 268
267 private: 269 private:
270 QTimer* mComputeLayoutTimer;
268 NavigatorBar* mNavigatorBar; 271 NavigatorBar* mNavigatorBar;
269 int currentWeek(); 272 int currentWeek();
270 bool clPending; 273 bool clPending;
271 QWidgetStack * mWidStack; 274 QWidgetStack * mWidStack;
272 QWidget* mMonthView; 275 QWidget* mMonthView;
273 QWidget* mWeekView; 276 QWidget* mWeekView;
274 bool mShowWeekView; 277 bool mShowWeekView;
275 bool updatePossible; 278 bool updatePossible;
276 int mDaysPerWeek; 279 int mDaysPerWeek;
277 int mNumWeeks; 280 int mNumWeeks;
278 int mNumCells; 281 int mNumCells;
279 bool mWeekStartsMonday; 282 bool mWeekStartsMonday;
280 bool mShowSatSunComp; 283 bool mShowSatSunComp;
281 void computeLayout(); 284 void computeLayout();
282 void computeLayoutWeek(); 285 void computeLayoutWeek();
283 286
284 QPtrVector<MonthViewCell> mCells; 287 QPtrVector<MonthViewCell> mCells;
285 QPtrVector<QLabel> mDayLabels; 288 QPtrVector<QLabel> mDayLabels;
286 QPtrVector<KOWeekButton> mWeekLabels; 289 QPtrVector<KOWeekButton> mWeekLabels;
287 QPtrVector<MonthViewCell> mCellsW; 290 QPtrVector<MonthViewCell> mCellsW;
288 QPtrVector<QLabel> mDayLabelsW; 291 QPtrVector<QLabel> mDayLabelsW;
289 QPtrVector<KOWeekButton> mWeekLabelsW; 292 QPtrVector<KOWeekButton> mWeekLabelsW;
290 293
291 bool mShortDayLabelsM; 294 bool mShortDayLabelsM;