summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.h
Unidiff
Diffstat (limited to 'korganizer/koagendaview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 0079253..221b0ea 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -18,105 +18,110 @@
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 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 <qlayout.h> 28#include <qlayout.h>
29#ifndef DESKTOP_VERSION 29#ifndef DESKTOP_VERSION
30#include <qksplitter.h> 30#include <qksplitter.h>
31#else 31#else
32#include <qsplitter.h> 32#include <qsplitter.h>
33#endif 33#endif
34#include <qmemarray.h> 34#include <qmemarray.h>
35 35
36#include "koeventview.h" 36#include "koeventview.h"
37 37
38 38
39class QHBox; 39class QHBox;
40class QFrame; 40class QFrame;
41class QLabel; 41class QLabel;
42class QPushButton; 42class QPushButton;
43class CalendarView; 43class CalendarView;
44class KOAgenda; 44class KOAgenda;
45class KOAgendaItem; 45class KOAgendaItem;
46class KConfig; 46class KConfig;
47class KDGanttMinimizeSplitter; 47class KDGanttMinimizeSplitter;
48class TimeLabels : public QScrollView { 48class TimeLabels : public QScrollView {
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); 51 TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0);
52 52
53 void setCellHeight(int height); 53 void setCellHeight(int height);
54 54
55 /** Calculates the minimum width */ 55 /** Calculates the minimum width */
56 virtual int minimumWidth() const; 56 virtual int minimumWidth() const;
57 57
58 /** updates widget's internal state */ 58 /** updates widget's internal state */
59 void updateConfig(); 59 void updateConfig();
60 60
61 /** */ 61 /** */
62 void setAgenda(KOAgenda* agenda); 62 void setAgenda(KOAgenda* agenda);
63 63
64 /** */ 64 /** */
65 virtual void paintEvent(QPaintEvent* e); 65 virtual void paintEvent(QPaintEvent* e);
66 void contentsMousePressEvent ( QMouseEvent * ) ;
67 void contentsMouseReleaseEvent ( QMouseEvent * );
68 void contentsMouseMoveEvent ( QMouseEvent * );
66 69
67 public slots: 70 public slots:
68 /** update time label positions */ 71 /** update time label positions */
69 void positionChanged(); 72 void positionChanged();
70 73 signals:
74 void scaleChanged();
71 protected: 75 protected:
72 void drawContents(QPainter *p,int cx, int cy, int cw, int ch); 76 void drawContents(QPainter *p,int cx, int cy, int cw, int ch);
73 77
74 private: 78 private:
79 int mMouseDownY;
75 int mRows; 80 int mRows;
76 int mCellHeight; 81 int mCellHeight;
77 82
78 /** */ 83 /** */
79 KOAgenda* mAgenda; 84 KOAgenda* mAgenda;
80}; 85};
81 86
82class EventIndicator : public QFrame { 87class EventIndicator : public QFrame {
83 Q_OBJECT 88 Q_OBJECT
84 public: 89 public:
85 enum Location { Top, Bottom }; 90 enum Location { Top, Bottom };
86 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0); 91 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0);
87 virtual ~EventIndicator(); 92 virtual ~EventIndicator();
88 93
89 void changeColumns(int columns); 94 void changeColumns(int columns);
90 void setPaintWidget( KDGanttMinimizeSplitter* ); 95 void setPaintWidget( KDGanttMinimizeSplitter* );
91 void setXOffset( int ); 96 void setXOffset( int );
92 void enableColumn(int column, bool enable); 97 void enableColumn(int column, bool enable);
93 98
94 protected: 99 protected:
95 void drawContents(QPainter *); 100 void drawContents(QPainter *);
96 101
97 private: 102 private:
98 int mXOffset; 103 int mXOffset;
99 KDGanttMinimizeSplitter* mPaintWidget; 104 KDGanttMinimizeSplitter* mPaintWidget;
100 int mColumns; 105 int mColumns;
101 QHBox *mTopBox; 106 QHBox *mTopBox;
102 QBoxLayout *mTopLayout; 107 QBoxLayout *mTopLayout;
103 Location mLocation; 108 Location mLocation;
104 QPixmap mPixmap; 109 QPixmap mPixmap;
105 QMemArray<bool> mEnabled; 110 QMemArray<bool> mEnabled;
106}; 111};
107 112
108/** 113/**
109 KOAgendaView is the agenda-like view used to display events in an one or 114 KOAgendaView is the agenda-like view used to display events in an one or
110 multi-day view. 115 multi-day view.
111*/ 116*/
112class KOAgendaView : public KOEventView { 117class KOAgendaView : public KOEventView {
113 Q_OBJECT 118 Q_OBJECT
114 public: 119 public:
115 KOAgendaView(Calendar *cal,QWidget *parent = 0,const char *name = 0 ); 120 KOAgendaView(Calendar *cal,QWidget *parent = 0,const char *name = 0 );
116 virtual ~KOAgendaView(); 121 virtual ~KOAgendaView();
117 void setStartHour( int ); 122 void setStartHour( int );
118 void toggleAllDay(); 123 void toggleAllDay();
119 124
120 125
121 /** Returns maximum number of days supported by the koagendaview */ 126 /** Returns maximum number of days supported by the koagendaview */
122 virtual int maxDatesHint(); 127 virtual int maxDatesHint();