author | zautrix <zautrix> | 2005-02-01 19:32:20 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-01 19:32:20 (UTC) |
commit | 0eca34f0a8a02787dccad1b37e0c2e01af734e56 (patch) (unidiff) | |
tree | 721cf4dfd0b29695a8b648e7eb6666ee4020c19b /korganizer/koagendaview.h | |
parent | 81991bbbc7f815c82b37db654528ee3b224435dc (diff) | |
download | kdepimpi-0eca34f0a8a02787dccad1b37e0c2e01af734e56.zip kdepimpi-0eca34f0a8a02787dccad1b37e0c2e01af734e56.tar.gz kdepimpi-0eca34f0a8a02787dccad1b37e0c2e01af734e56.tar.bz2 |
very good fix
-rw-r--r-- | korganizer/koagendaview.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index cbe86b6..e9e85cc 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -22,32 +22,57 @@ | |||
22 | */ | 22 | */ |
23 | #ifndef KOAGENDAVIEW_H | 23 | #ifndef KOAGENDAVIEW_H |
24 | #define KOAGENDAVIEW_H | 24 | #define KOAGENDAVIEW_H |
25 | 25 | ||
26 | #include <qscrollview.h> | 26 | #include <qscrollview.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qpushbutton.h> | ||
28 | #include <qlayout.h> | 29 | #include <qlayout.h> |
29 | #ifndef DESKTOP_VERSION | 30 | #ifndef DESKTOP_VERSION |
30 | #include <qksplitter.h> | 31 | #include <qksplitter.h> |
31 | #else | 32 | #else |
32 | #include <qsplitter.h> | 33 | #include <qsplitter.h> |
33 | #endif | 34 | #endif |
34 | #include <qmemarray.h> | 35 | #include <qmemarray.h> |
35 | 36 | ||
36 | #include "koeventview.h" | 37 | #include "koeventview.h" |
37 | 38 | ||
38 | |||
39 | class QHBox; | 39 | class QHBox; |
40 | class QFrame; | 40 | class QFrame; |
41 | class QLabel; | 41 | class QLabel; |
42 | class QPushButton; | 42 | class QPushButton; |
43 | class CalendarView; | 43 | class CalendarView; |
44 | class KOAgenda; | 44 | class KOAgenda; |
45 | class KOAgendaItem; | 45 | class KOAgendaItem; |
46 | class KConfig; | 46 | class KConfig; |
47 | class KDGanttMinimizeSplitter; | 47 | class KDGanttMinimizeSplitter; |
48 | |||
49 | class KOAgendaButton : public QPushButton | ||
50 | { | ||
51 | Q_OBJECT | ||
52 | public: | ||
53 | KOAgendaButton( QWidget *parent=0, const char *name=0 ) : | ||
54 | QPushButton( parent, name ) | ||
55 | { | ||
56 | mNum = -3; | ||
57 | setFlat( true ); | ||
58 | setFocusPolicy(NoFocus); | ||
59 | setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); | ||
60 | connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); | ||
61 | }; | ||
62 | |||
63 | QSize sizeHint () const { return QSize( 5,5) ;} | ||
64 | void setNum( int n) { mNum = n; } | ||
65 | private slots: | ||
66 | void bClicked() {emit numClicked( mNum);} | ||
67 | signals: | ||
68 | void numClicked( int ); | ||
69 | private: | ||
70 | int mNum; | ||
71 | }; | ||
72 | |||
48 | class TimeLabels : public QScrollView { | 73 | class TimeLabels : public QScrollView { |
49 | Q_OBJECT | 74 | Q_OBJECT |
50 | public: | 75 | public: |
51 | TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); | 76 | TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); |
52 | 77 | ||
53 | void setCellHeight(int height); | 78 | void setCellHeight(int height); |
@@ -187,13 +212,13 @@ class KOAgendaView : public KOEventView { | |||
187 | void toggleExpand(); | 212 | void toggleExpand(); |
188 | void todoMoved( Todo *, int ); | 213 | void todoMoved( Todo *, int ); |
189 | void incidenceChanged(Incidence * , int ); | 214 | void incidenceChanged(Incidence * , int ); |
190 | // void cloneIncidenceSignal(Incidence *); | 215 | // void cloneIncidenceSignal(Incidence *); |
191 | 216 | ||
192 | protected: | 217 | protected: |
193 | QPushButton* getNewDaylabel(); | 218 | KOAgendaButton* getNewDaylabel(); |
194 | bool mBlockUpdating; | 219 | bool mBlockUpdating; |
195 | int mUpcomingWidth; | 220 | int mUpcomingWidth; |
196 | /** Fill agenda beginning with date startDate */ | 221 | /** Fill agenda beginning with date startDate */ |
197 | void fillAgenda(const QDate &startDate); | 222 | void fillAgenda(const QDate &startDate); |
198 | void resizeEvent( QResizeEvent* e ); | 223 | void resizeEvent( QResizeEvent* e ); |
199 | /** Fill agenda using the current set value for the start date */ | 224 | /** Fill agenda using the current set value for the start date */ |
@@ -205,13 +230,13 @@ class KOAgendaView : public KOEventView { | |||
205 | /** | 230 | /** |
206 | Set the masks on the agenda widgets indicating, which days are holidays. | 231 | Set the masks on the agenda widgets indicating, which days are holidays. |
207 | */ | 232 | */ |
208 | void setHolidayMasks(); | 233 | void setHolidayMasks(); |
209 | 234 | ||
210 | protected slots: | 235 | protected slots: |
211 | void slotDaylabelClicked(); | 236 | void slotDaylabelClicked( int ); |
212 | /** Update event belonging to agenda item */ | 237 | /** Update event belonging to agenda item */ |
213 | void updateEventDates(KOAgendaItem *item, int mode = -1); | 238 | void updateEventDates(KOAgendaItem *item, int mode = -1); |
214 | //void updateMovedTodo(); | 239 | //void updateMovedTodo(); |
215 | 240 | ||
216 | void updateEventIndicatorTop(int newY); | 241 | void updateEventIndicatorTop(int newY); |
217 | void updateEventIndicatorBottom(int newY); | 242 | void updateEventIndicatorBottom(int newY); |
@@ -251,13 +276,13 @@ class KOAgendaView : public KOEventView { | |||
251 | QMemArray<int> mMaxY; | 276 | QMemArray<int> mMaxY; |
252 | 277 | ||
253 | QMemArray<bool> mHolidayMask; | 278 | QMemArray<bool> mHolidayMask; |
254 | 279 | ||
255 | QPixmap mExpandedPixmap; | 280 | QPixmap mExpandedPixmap; |
256 | QPixmap mNotExpandedPixmap; | 281 | QPixmap mNotExpandedPixmap; |
257 | QPtrList<QPushButton> mDayLabelsList; | 282 | QPtrList<KOAgendaButton> mDayLabelsList; |
258 | QDateTime mTimeSpanBegin; | 283 | QDateTime mTimeSpanBegin; |
259 | QDateTime mTimeSpanEnd; | 284 | QDateTime mTimeSpanEnd; |
260 | bool mTimeSpanInAllDay; | 285 | bool mTimeSpanInAllDay; |
261 | void keyPressEvent ( QKeyEvent * e ); | 286 | void keyPressEvent ( QKeyEvent * e ); |
262 | }; | 287 | }; |
263 | 288 | ||