summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
Unidiff
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 9dbe319..a29a1a8 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -133,49 +133,48 @@ class MonthViewCell : public QWidget
133 void setDate( const QDate & ); 133 void setDate( const QDate & );
134 QDate date() const; 134 QDate date() const;
135 135
136 void setPrimary( bool ); 136 void setPrimary( bool );
137 bool isPrimary() const; 137 bool isPrimary() const;
138 138
139 void setHoliday( bool ); 139 void setHoliday( bool );
140 void setHoliday( const QString & ); 140 void setHoliday( const QString & );
141 141
142 void updateCell(); 142 void updateCell();
143 void startUpdateCell(); 143 void startUpdateCell();
144 void finishUpdateCell(); 144 void finishUpdateCell();
145 void insertEvent(Event *); 145 void insertEvent(Event *);
146 void insertTodo(Todo *); 146 void insertTodo(Todo *);
147 147
148 void updateConfig( bool bigFont = false ); 148 void updateConfig( bool bigFont = false );
149 149
150 void enableScrollBars( bool ); 150 void enableScrollBars( bool );
151 151
152 Incidence *selectedIncidence(); 152 Incidence *selectedIncidence();
153 QDate selectedIncidenceDate(); 153 QDate selectedIncidenceDate();
154 154
155 void deselect(); 155 void deselect();
156 void select(); 156 void select();
157 void clear();
158 157
159#ifdef DESKTOP_VERSION 158#ifdef DESKTOP_VERSION
160 static QToolTipGroup *toolTipGroup(); 159 static QToolTipGroup *toolTipGroup();
161#endif 160#endif
162 signals: 161 signals:
163 void defaultAction( Incidence * ); 162 void defaultAction( Incidence * );
164 void newEventSignal( QDateTime ); 163 void newEventSignal( QDateTime );
165 void showDaySignal( QDate ); 164 void showDaySignal( QDate );
166 165
167 protected: 166 protected:
168 QString mToolTip; 167 QString mToolTip;
169 void resizeEvent( QResizeEvent * ); 168 void resizeEvent( QResizeEvent * );
170 169
171 protected slots: 170 protected slots:
172 void defaultAction( QListBoxItem * ); 171 void defaultAction( QListBoxItem * );
173 void contextMenu( QListBoxItem * ); 172 void contextMenu( QListBoxItem * );
174 void selection( QListBoxItem * ); 173 void selection( QListBoxItem * );
175 void cellClicked( QListBoxItem * ); 174 void cellClicked( QListBoxItem * );
176 void newEvent(); 175 void newEvent();
177 void showDay(); 176 void showDay();
178 177
179 private: 178 private:
180 KOMonthView *mMonthView; 179 KOMonthView *mMonthView;
181 180
@@ -205,93 +204,92 @@ class MonthViewCell : public QWidget
205 204
206class KOMonthView: public KOEventView 205class KOMonthView: public KOEventView
207{ 206{
208 Q_OBJECT 207 Q_OBJECT
209 public: 208 public:
210 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); 209 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
211 ~KOMonthView(); 210 ~KOMonthView();
212 211
213 /** Returns maximum number of days supported by the komonthview */ 212 /** Returns maximum number of days supported by the komonthview */
214 virtual int maxDatesHint(); 213 virtual int maxDatesHint();
215 214
216 /** Returns number of currently shown dates. */ 215 /** Returns number of currently shown dates. */
217 virtual int currentDateCount(); 216 virtual int currentDateCount();
218 217
219 /** returns the currently selected events */ 218 /** returns the currently selected events */
220 virtual QPtrList<Incidence> selectedIncidences(); 219 virtual QPtrList<Incidence> selectedIncidences();
221 220
222 /** returns dates of the currently selected events */ 221 /** returns dates of the currently selected events */
223 virtual DateList selectedDates(); 222 virtual DateList selectedDates();
224 223
225 virtual void printPreview(CalPrinter *calPrinter, 224 virtual void printPreview(CalPrinter *calPrinter,
226 const QDate &, const QDate &); 225 const QDate &, const QDate &);
227 bool isMonthView() { return true; } 226 bool isMonthView() { return true; }
228 bool isUpdatePossible() { return updatePossible; } 227 bool isUpdatePossible() { return updatePossible; }
229 void setIgnoreResizeEvent( int c ) { ignoreResizeEvent = c ;}
230 228
231 MonthViewCell * selectedCell(); 229 MonthViewCell * selectedCell();
230 bool skipResize;
232 public slots: 231 public slots:
233 virtual void updateView(); 232 virtual void updateView();
234 virtual void updateConfig(); 233 virtual void updateConfig();
235 virtual void showDates(const QDate &start, const QDate &end); 234 virtual void showDates(const QDate &start, const QDate &end);
236 virtual void showEvents(QPtrList<Event> eventList); 235 virtual void showEvents(QPtrList<Event> eventList);
237 236
238 void changeEventDisplay(Event *, int); 237 void changeEventDisplay(Event *, int);
239 238
240 void clearSelection(); 239 void clearSelection();
241 240
242 void showContextMenu( Incidence * ); 241 void showContextMenu( Incidence * );
243 242
244 void setSelectedCell( MonthViewCell * ); 243 void setSelectedCell( MonthViewCell * );
245 244
246 protected slots: 245 protected slots:
247 void selectInternalWeekNum ( int ); 246 void selectInternalWeekNum ( int );
248 void switchView(); 247 void switchView();
249 void processSelectionChange(); 248 void processSelectionChange();
250 signals: 249 signals:
251 void nextMonth(); 250 void nextMonth();
252 void prevMonth(); 251 void prevMonth();
253 void showNavigator( bool ); 252 void showNavigator( bool );
254 void selectWeekNum ( int ); 253 void selectWeekNum ( int );
255 void showDaySignal( QDate ); 254 void showDaySignal( QDate );
256 protected: 255 protected:
257 void resizeEvent(QResizeEvent *); 256 void resizeEvent(QResizeEvent *);
258 void viewChanged(); 257 void viewChanged();
259 void updateDayLabels(); 258 void updateDayLabels();
260 259
261 private: 260 private:
262 int ignoreResizeEvent;
263 int currentWeek(); 261 int currentWeek();
264 bool clPending; 262 bool clPending;
265 QWidgetStack * mWidStack; 263 QWidgetStack * mWidStack;
266 QWidget* mMonthView; 264 QWidget* mMonthView;
267 QWidget* mWeekView; 265 QWidget* mWeekView;
268 bool mShowWeekView; 266 bool mShowWeekView;
269 bool updatePossible; 267 bool updatePossible;
270 int mDaysPerWeek; 268 int mDaysPerWeek;
271 int mNumWeeks; 269 int mNumWeeks;
272 int mNumCells; 270 int mNumCells;
273 bool mWeekStartsMonday; 271 bool mWeekStartsMonday;
272 bool mShowSatSunComp;
274 void computeLayout(); 273 void computeLayout();
275 void computeLayoutWeek(); 274 void computeLayoutWeek();
276 275
277 QPtrVector<MonthViewCell> mCells; 276 QPtrVector<MonthViewCell> mCells;
278 QPtrVector<QLabel> mDayLabels; 277 QPtrVector<QLabel> mDayLabels;
279 QPtrVector<KOWeekButton> mWeekLabels; 278 QPtrVector<KOWeekButton> mWeekLabels;
280 QPtrVector<MonthViewCell> mCellsW; 279 QPtrVector<MonthViewCell> mCellsW;
281 QPtrVector<QLabel> mDayLabelsW; 280 QPtrVector<QLabel> mDayLabelsW;
282 QPtrVector<KOWeekButton> mWeekLabelsW; 281 QPtrVector<KOWeekButton> mWeekLabelsW;
283 282
284 bool mShortDayLabelsM; 283 bool mShortDayLabels;
285 bool mShortDayLabelsW;
286 int mWidthLongDayLabel; 284 int mWidthLongDayLabel;
287 285
288 QDate mStartDate; 286 QDate mStartDate;
289 287
290 MonthViewCell *mSelectedCell; 288 MonthViewCell *mSelectedCell;
291 289
292 KOEventPopupMenu *mContextMenu; 290 KOEventPopupMenu *mContextMenu;
293 void keyPressEvent ( QKeyEvent * ) ; 291 void keyPressEvent ( QKeyEvent * ) ;
294 292
295}; 293};
296 294
297#endif 295#endif