summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.h
Unidiff
Diffstat (limited to 'korganizer/komonthview.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 65b5e77..159af16 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -35,24 +35,25 @@
35 35
36#include <libkcal/calendar.h> 36#include <libkcal/calendar.h>
37#include <libkcal/event.h> 37#include <libkcal/event.h>
38 38
39#include "koeventview.h" 39#include "koeventview.h"
40#include "navigatorbar.h" 40#include "navigatorbar.h"
41 41
42#ifdef DESKTOP_VERSION 42#ifdef DESKTOP_VERSION
43class QToolTipGroup; 43class QToolTipGroup;
44#endif 44#endif
45 45
46class KNOWhatsThis; 46class KNOWhatsThis;
47class MonthViewCell;
47class KOWeekButton : public QPushButton 48class KOWeekButton : public QPushButton
48{ 49{
49 Q_OBJECT 50 Q_OBJECT
50 public: 51 public:
51 KOWeekButton( QWidget *parent=0, const char *name=0 ) : 52 KOWeekButton( QWidget *parent=0, const char *name=0 ) :
52 QPushButton( parent, name) 53 QPushButton( parent, name)
53 { 54 {
54 connect( this, SIGNAL( clicked() ), 55 connect( this, SIGNAL( clicked() ),
55 SLOT( bottonClicked() )); 56 SLOT( bottonClicked() ));
56 mNumber = -1; 57 mNumber = -1;
57 } 58 }
58 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} 59 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
@@ -76,24 +77,25 @@ class KNoScrollListBox: public QListBox
76 Q_OBJECT 77 Q_OBJECT
77 public: 78 public:
78 KNoScrollListBox(QWidget *parent=0, const char *name=0); 79 KNoScrollListBox(QWidget *parent=0, const char *name=0);
79 ~KNoScrollListBox(); 80 ~KNoScrollListBox();
80 QString getWhatsThisText(QPoint p) ; 81 QString getWhatsThisText(QPoint p) ;
81 82
82 signals: 83 signals:
83 void shiftDown(); 84 void shiftDown();
84 void shiftUp(); 85 void shiftUp();
85 void rightClick(); 86 void rightClick();
86 void nextCell(); 87 void nextCell();
87 void prevCell(); 88 void prevCell();
89 void highligtIncidence( Incidence * , MonthViewCell*, int );
88 90
89 protected slots: 91 protected slots:
90 void oneDown(); 92 void oneDown();
91 void keyPressEvent(QKeyEvent *); 93 void keyPressEvent(QKeyEvent *);
92 void keyReleaseEvent(QKeyEvent *); 94 void keyReleaseEvent(QKeyEvent *);
93 void mousePressEvent(QMouseEvent *); 95 void mousePressEvent(QMouseEvent *);
94 void focusInEvent ( QFocusEvent * ); 96 void focusInEvent ( QFocusEvent * );
95 void focusOutEvent ( QFocusEvent * ); 97 void focusOutEvent ( QFocusEvent * );
96 98
97 private: 99 private:
98 bool resetOnFocusIn; 100 bool resetOnFocusIn;
99 KNOWhatsThis * mWT; 101 KNOWhatsThis * mWT;
@@ -101,49 +103,51 @@ class KNoScrollListBox: public QListBox
101 103
102 104
103class MonthViewItem: public QListBoxItem 105class MonthViewItem: public QListBoxItem
104{ 106{
105 public: 107 public:
106 MonthViewItem( Incidence *, QDate qd, const QString & title ); 108 MonthViewItem( Incidence *, QDate qd, const QString & title );
107 void recycle( Incidence *incidence, QDate qd, const QString & s); 109 void recycle( Incidence *incidence, QDate qd, const QString & s);
108 void setRecur(bool on) { mRecur = on; } 110 void setRecur(bool on) { mRecur = on; }
109 void setAlarm(bool on) { mAlarm = on; } 111 void setAlarm(bool on) { mAlarm = on; }
110 void setReply(bool on) { mReply = on; } 112 void setReply(bool on) { mReply = on; }
111 void setMoreInfo(bool on) { mInfo = on; } 113 void setMoreInfo(bool on) { mInfo = on; }
112 void setMultiDay(int type) { mMultiday = type; } 114 void setMultiDay(int type) { mMultiday = type; }
115 int multiDay() { return mMultiday; }
113 void setMultiDayPos(int type) { mdayPos = type; } 116 void setMultiDayPos(int type) { mdayPos = type; }
114 int gettMultiDayPos() { return mdayPos; } 117 int gettMultiDayPos() { return mdayPos; }
115 void setBlockRepaint(bool on) { mblockRepaint = on; } 118 void setBlockRepaint(bool on) { mblockRepaint = on; }
116 119 bool setHighlighted( Incidence * );
117 120
118 void setPalette(const QPalette &p) { mPalette = p; } 121 void setPalette(const QPalette &p) { mPalette = p; }
119 QPalette palette() const { return mPalette; } 122 QPalette palette() const { return mPalette; }
120 123 bool setHighlightedFalse();
121 Incidence *incidence() const { return mIncidence; } 124 Incidence *incidence() const { return mIncidence; }
122 QDate incidenceDate() { return mDate; } 125 QDate incidenceDate() { return mDate; }
123 126
124 protected: 127 protected:
125 virtual void paint(QPainter *); 128 virtual void paint(QPainter *);
126 virtual int height(const QListBox *) const; 129 virtual int height(const QListBox *) const;
127 virtual int width(const QListBox *) const; 130 virtual int width(const QListBox *) const;
128 131
129 private: 132 private:
130 int mdayPos; 133 int mdayPos;
131 bool isWeekItem; 134 bool isWeekItem;
132 bool mblockRepaint; 135 bool mblockRepaint;
133 int mMultiday; 136 int mMultiday;
134 bool mRecur; 137 bool mRecur;
135 bool mAlarm; 138 bool mAlarm;
136 bool mReply; 139 bool mReply;
137 bool mInfo; 140 bool mInfo;
141 bool mDisplayHightlighted;
138 142
139 QPalette mPalette; 143 QPalette mPalette;
140 QDate mDate; 144 QDate mDate;
141 145
142 Incidence *mIncidence; 146 Incidence *mIncidence;
143}; 147};
144 148
145 149
146class KOMonthView; 150class KOMonthView;
147 151
148class MonthViewCell : public KNoScrollListBox 152class MonthViewCell : public KNoScrollListBox
149{ 153{
@@ -166,42 +170,42 @@ class MonthViewCell : public KNoScrollListBox
166 void finishUpdateCell(); 170 void finishUpdateCell();
167 void repaintfinishUpdateCell(); 171 void repaintfinishUpdateCell();
168 int insertEvent(Event *); 172 int insertEvent(Event *);
169 void insertTodo(Todo *); 173 void insertTodo(Todo *);
170 174
171 void updateConfig( bool bigFont = false ); 175 void updateConfig( bool bigFont = false );
172 176
173 void enableScrollBars( bool ); 177 void enableScrollBars( bool );
174 178
175 Incidence *selectedIncidence(); 179 Incidence *selectedIncidence();
176 QDate selectedIncidenceDate(); 180 QDate selectedIncidenceDate();
177 QPushButton * dateLabel() { return mLabel; } 181 QPushButton * dateLabel() { return mLabel; }
178 182 void deHightLight();
183 bool doHightLight( Incidence *);
179 void deselect(); 184 void deselect();
180 void select(); 185 void select();
181#ifdef DESKTOP_VERSION 186#ifdef DESKTOP_VERSION
182 static QToolTipGroup *toolTipGroup(); 187 static QToolTipGroup *toolTipGroup();
183#endif 188#endif
184 signals: 189 signals:
185 void defaultAction( Incidence * ); 190 void defaultAction( Incidence * );
186 void newEventSignal( QDateTime ); 191 void newEventSignal( QDateTime );
187 void showDaySignal( QDate ); 192 void showDaySignal( QDate );
188 193
189 protected: 194 protected:
190 QStringList mToolTip; 195 QStringList mToolTip;
191 void resizeEvent( QResizeEvent * ); 196 void resizeEvent( QResizeEvent * );
192 197
193public slots: 198public slots:
194 void showDay(); 199 void showDay();
195
196 protected slots: 200 protected slots:
197 void defaultAction( QListBoxItem * ); 201 void defaultAction( QListBoxItem * );
198 void contextMenu( QListBoxItem * ); 202 void contextMenu( QListBoxItem * );
199 void selection( QListBoxItem * ); 203 void selection( QListBoxItem * );
200 void cellClicked( QListBoxItem * ); 204 void cellClicked( QListBoxItem * );
201 void newEvent(); 205 void newEvent();
202 206
203 private: 207 private:
204 int mdayCount; 208 int mdayCount;
205 QPtrList <MonthViewItem> mAvailItemList; 209 QPtrList <MonthViewItem> mAvailItemList;
206 KOMonthView *mMonthView; 210 KOMonthView *mMonthView;
207 int currentPalette; 211 int currentPalette;
@@ -249,24 +253,25 @@ class KOMonthView: public KOEventView
249 virtual DateList selectedDates(); 253 virtual DateList selectedDates();
250 254
251 virtual void printPreview(CalPrinter *calPrinter, 255 virtual void printPreview(CalPrinter *calPrinter,
252 const QDate &, const QDate &); 256 const QDate &, const QDate &);
253 bool isMonthView() { return !mShowWeekView; } 257 bool isMonthView() { return !mShowWeekView; }
254 bool isUpdatePossible() { return updatePossible; } 258 bool isUpdatePossible() { return updatePossible; }
255 259
256 MonthViewCell * selectedCell(); 260 MonthViewCell * selectedCell();
257 bool skipResize; 261 bool skipResize;
258 NavigatorBar* navigatorBar() { return mNavigatorBar ;} 262 NavigatorBar* navigatorBar() { return mNavigatorBar ;}
259 void clearList(); 263 void clearList();
260 public slots: 264 public slots:
265 void incidenceHighlighted( Incidence *, MonthViewCell*, int );
261 void nextCell(); 266 void nextCell();
262 void prevCell(); 267 void prevCell();
263 virtual void updateView(); 268 virtual void updateView();
264 virtual void updateConfig(); 269 virtual void updateConfig();
265 virtual void showDates(const QDate &start, const QDate &end); 270 virtual void showDates(const QDate &start, const QDate &end);
266 virtual void showEvents(QPtrList<Event> eventList); 271 virtual void showEvents(QPtrList<Event> eventList);
267 272
268 void changeEventDisplay(Event *, int); 273 void changeEventDisplay(Event *, int);
269 274
270 void clearSelection(); 275 void clearSelection();
271 276
272 void showContextMenu( Incidence * ); 277 void showContextMenu( Incidence * );