summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.h
Unidiff
Diffstat (limited to 'korganizer/kodaymatrix.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index ac2f59c..2dd112a 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -10,48 +10,49 @@
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 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef _KODAYMAT_H 23#ifndef _KODAYMAT_H
24#define _KODAYMAT_H 24#define _KODAYMAT_H
25 25
26#include <libkcal/calendar.h> 26#include <libkcal/calendar.h>
27 27
28#include <qstring.h> 28#include <qstring.h>
29#include <qframe.h> 29#include <qframe.h>
30#include <qcolor.h> 30#include <qcolor.h>
31#include <qpen.h> 31#include <qpen.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qtooltip.h> 33#include <qtooltip.h>
34#include <qpixmap.h>
34 35
35#include <qmap.h> 36#include <qmap.h>
36 37
37class QDragEnterEvent; 38class QDragEnterEvent;
38class QDragMoveEvent; 39class QDragMoveEvent;
39class QDragLeaveEvent; 40class QDragLeaveEvent;
40class QDropEvent; 41class QDropEvent;
41 42
42class KODayMatrix; 43class KODayMatrix;
43 44
44using namespace KCal; 45using namespace KCal;
45 46
46 47
47/** 48/**
48 * small helper class to dynamically show tooltips inside the day matrix. 49 * small helper class to dynamically show tooltips inside the day matrix.
49 * This class asks the day matrix object for a appropriate label which 50 * This class asks the day matrix object for a appropriate label which
50 * is in our special case the name of the holiday or null if this day is no holiday. 51 * is in our special case the name of the holiday or null if this day is no holiday.
51 */ 52 */
52class DynamicTip : public QToolTip 53class DynamicTip : public QToolTip
53{ 54{
54public: 55public:
55 56
56 /** 57 /**
57 * Constructor that expects a KODayMatrix object as parent. 58 * Constructor that expects a KODayMatrix object as parent.
@@ -200,48 +201,49 @@ signals:
200 */ 201 */
201 void eventDropped(Event *event); 202 void eventDropped(Event *event);
202 203
203protected: 204protected:
204 205
205 void paintEvent(QPaintEvent *ev); 206 void paintEvent(QPaintEvent *ev);
206 207
207 void mousePressEvent (QMouseEvent* e); 208 void mousePressEvent (QMouseEvent* e);
208 209
209 void mouseReleaseEvent (QMouseEvent* e); 210 void mouseReleaseEvent (QMouseEvent* e);
210 211
211 void mouseMoveEvent (QMouseEvent* e); 212 void mouseMoveEvent (QMouseEvent* e);
212 213
213 void dragEnterEvent(QDragEnterEvent *); 214 void dragEnterEvent(QDragEnterEvent *);
214 215
215 void dragMoveEvent(QDragMoveEvent *); 216 void dragMoveEvent(QDragMoveEvent *);
216 217
217 void dragLeaveEvent(QDragLeaveEvent *); 218 void dragLeaveEvent(QDragLeaveEvent *);
218 219
219 void dropEvent(QDropEvent *); 220 void dropEvent(QDropEvent *);
220 221
221 void resizeEvent(QResizeEvent *); 222 void resizeEvent(QResizeEvent *);
222 223
223private: 224private:
225 QPixmap myPix;
224 QTimer* mUpdateTimer; 226 QTimer* mUpdateTimer;
225 QTimer* mRepaintTimer; 227 QTimer* mRepaintTimer;
226 bool mDayChanged; 228 bool mDayChanged;
227 bool mPendingUpdateBeforeRepaint; 229 bool mPendingUpdateBeforeRepaint;
228 230
229 /** returns the index of the day located at the matrix's widget (x,y) position. 231 /** returns the index of the day located at the matrix's widget (x,y) position.
230 * 232 *
231 * @param x horizontal coordinate 233 * @param x horizontal coordinate
232 * @param y vertical coordinate 234 * @param y vertical coordinate
233 */ 235 */
234 int getDayIndexFrom(int x, int y); 236 int getDayIndexFrom(int x, int y);
235 237
236 /** calculates a "shaded" color from the supplied color object. 238 /** calculates a "shaded" color from the supplied color object.
237 * (Copied from Cornelius's kdpdatebutton.cpp) 239 * (Copied from Cornelius's kdpdatebutton.cpp)
238 * 240 *
239 * @param color source based on which a shaded color should be calculated. 241 * @param color source based on which a shaded color should be calculated.
240 */ 242 */
241 QColor getShadedColor(QColor color); 243 QColor getShadedColor(QColor color);
242 244
243 /** number of days to be displayed. For now there is no support for any other number then 42. 245 /** number of days to be displayed. For now there is no support for any other number then 42.
244 so change it at your own risk :o) */ 246 so change it at your own risk :o) */
245 static const int NUMDAYS; 247 static const int NUMDAYS;
246 248
247 /** calendar instance to be queried for holidays, events, ... */ 249 /** calendar instance to be queried for holidays, events, ... */