summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
Unidiff
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 700f098..51eb9e6 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -45,46 +45,48 @@ class KNOWhatsThis;
45class KOWeekButton : public QPushButton 45class KOWeekButton : public QPushButton
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 public: 48 public:
49 KOWeekButton( QWidget *parent=0, const char *name=0 ) : 49 KOWeekButton( QWidget *parent=0, const char *name=0 ) :
50 QPushButton( parent, name) 50 QPushButton( parent, name)
51 { 51 {
52 connect( this, SIGNAL( clicked() ), 52 connect( this, SIGNAL( clicked() ),
53 SLOT( bottonClicked() )); 53 SLOT( bottonClicked() ));
54 mNumber = -1; 54 mNumber = -1;
55 } 55 }
56 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} 56 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
57 int getWeekNum() { return mNumber;}
57 signals: 58 signals:
58 void selectWeekNum ( int ); 59 void selectWeekNum ( int );
59private: 60private:
60 int mNumber; 61 int mNumber;
61private slots : 62private slots :
62 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } 63 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
63}; 64};
64 65
65class KNoScrollListBox: public QListBox 66class KNoScrollListBox: public QListBox
66{ 67{
67 Q_OBJECT 68 Q_OBJECT
68 public: 69 public:
69 KNoScrollListBox(QWidget *parent=0, const char *name=0); 70 KNoScrollListBox(QWidget *parent=0, const char *name=0);
70 ~KNoScrollListBox(); 71 ~KNoScrollListBox();
71 QString getWhatsThisText(QPoint p) ; 72 QString getWhatsThisText(QPoint p) ;
72 73
73 signals: 74 signals:
74 void shiftDown(); 75 void shiftDown();
75 void shiftUp(); 76 void shiftUp();
76 void rightClick(); 77 void rightClick();
77 78
78 protected slots: 79 protected slots:
80 void oneDown();
79 void keyPressEvent(QKeyEvent *); 81 void keyPressEvent(QKeyEvent *);
80 void keyReleaseEvent(QKeyEvent *); 82 void keyReleaseEvent(QKeyEvent *);
81 void mousePressEvent(QMouseEvent *); 83 void mousePressEvent(QMouseEvent *);
82 84
83 private: 85 private:
84 KNOWhatsThis * mWT; 86 KNOWhatsThis * mWT;
85}; 87};
86 88
87 89
88class MonthViewItem: public QListBoxItem 90class MonthViewItem: public QListBoxItem
89{ 91{
90 public: 92 public:
@@ -232,40 +234,40 @@ class KOMonthView: public KOEventView
232 virtual void showDates(const QDate &start, const QDate &end); 234 virtual void showDates(const QDate &start, const QDate &end);
233 virtual void showEvents(QPtrList<Event> eventList); 235 virtual void showEvents(QPtrList<Event> eventList);
234 236
235 void changeEventDisplay(Event *, int); 237 void changeEventDisplay(Event *, int);
236 238
237 void clearSelection(); 239 void clearSelection();
238 240
239 void showContextMenu( Incidence * ); 241 void showContextMenu( Incidence * );
240 242
241 void setSelectedCell( MonthViewCell * ); 243 void setSelectedCell( MonthViewCell * );
242 244
243 protected slots: 245 protected slots:
244 void selectDateWeekNum ( int );
245 void selectInternalWeekNum ( int ); 246 void selectInternalWeekNum ( int );
246 void switchView(); 247 void switchView();
247 void processSelectionChange(); 248 void processSelectionChange();
248 signals: 249 signals:
249 void nextMonth(); 250 void nextMonth();
250 void prevMonth(); 251 void prevMonth();
251 void showNavigator( bool ); 252 void showNavigator( bool );
252 void selectWeekNum ( int ); 253 void selectWeekNum ( int );
253 void showDaySignal( QDate ); 254 void showDaySignal( QDate );
254 protected: 255 protected:
255 void resizeEvent(QResizeEvent *); 256 void resizeEvent(QResizeEvent *);
256 void viewChanged(); 257 void viewChanged();
257 void updateDayLabels(); 258 void updateDayLabels();
258 259
259 private: 260 private:
261 int currentWeek();
260 bool clPending; 262 bool clPending;
261 QWidgetStack * mWidStack; 263 QWidgetStack * mWidStack;
262 QWidget* mMonthView; 264 QWidget* mMonthView;
263 QWidget* mWeekView; 265 QWidget* mWeekView;
264 bool mShowWeekView; 266 bool mShowWeekView;
265 bool updatePossible; 267 bool updatePossible;
266 int mDaysPerWeek; 268 int mDaysPerWeek;
267 int mNumWeeks; 269 int mNumWeeks;
268 int mNumCells; 270 int mNumCells;
269 bool mWeekStartsMonday; 271 bool mWeekStartsMonday;
270 bool mShowSatSunComp; 272 bool mShowSatSunComp;
271 void computeLayout(); 273 void computeLayout();