summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koagendaview.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/koagendaview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.h52
1 files changed, 31 insertions, 21 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 5e68146..3b871d9 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -20,27 +20,37 @@
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 <q3scrollview.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <Q3BoxLayout>
30#ifndef DESKTOP_VERSION 31#ifndef DESKTOP_VERSION
31#include <qksplitter.h> 32#include <qksplitter.h>
32#else 33#else
33#include <qsplitter.h> 34#include <qsplitter.h>
34#endif 35#endif
35#include <qmemarray.h> 36#include <q3memarray.h>
37//Added by qt3to4:
38#include <QPaintEvent>
39#include <QResizeEvent>
40#include <Q3Frame>
41#include <QPixmap>
42#include <QLabel>
43#include <QMouseEvent>
44#include <Q3PtrList>
45#include <QKeyEvent>
36 46
37#include "koeventview.h" 47#include "koeventview.h"
38 48
39class QHBox; 49class Q3HBox;
40class QFrame; 50class Q3Frame;
41class QLabel; 51class QLabel;
42class QPushButton; 52class QPushButton;
43class CalendarView; 53class CalendarView;
44class KOAgenda; 54class KOAgenda;
45class KOAgendaItem; 55class KOAgendaItem;
46class KConfig; 56class KConfig;
@@ -52,13 +62,13 @@ class KOAgendaButton : public QPushButton
52 public: 62 public:
53 KOAgendaButton( QWidget *parent=0, const char *name=0 ) : 63 KOAgendaButton( QWidget *parent=0, const char *name=0 ) :
54 QPushButton( parent, name ) 64 QPushButton( parent, name )
55 { 65 {
56 mNum = -3; 66 mNum = -3;
57 setFlat( true ); 67 setFlat( true );
58 setFocusPolicy(NoFocus); 68 setFocusPolicy(Qt::NoFocus);
59 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); 69 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
60 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); 70 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) );
61 }; 71 };
62 72
63 QSize sizeHint () const { return QSize( 5,5) ;} 73 QSize sizeHint () const { return QSize( 5,5) ;}
64 void setNum( int n) { mNum = n; } 74 void setNum( int n) { mNum = n; }
@@ -67,16 +77,16 @@ private slots:
67signals: 77signals:
68 void numClicked( int ); 78 void numClicked( int );
69private: 79private:
70 int mNum; 80 int mNum;
71}; 81};
72 82
73class TimeLabels : public QScrollView { 83class TimeLabels : public Q3ScrollView {
74 Q_OBJECT 84 Q_OBJECT
75 public: 85 public:
76 TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); 86 TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0);
77 87
78 void setCellHeight(int height); 88 void setCellHeight(int height);
79 89
80 /** Calculates the minimum width */ 90 /** Calculates the minimum width */
81 virtual int minimumWidth() const; 91 virtual int minimumWidth() const;
82 92
@@ -110,13 +120,13 @@ class TimeLabels : public QScrollView {
110 int mCellHeight; 120 int mCellHeight;
111 121
112 /** */ 122 /** */
113 KOAgenda* mAgenda; 123 KOAgenda* mAgenda;
114}; 124};
115 125
116class EventIndicator : public QFrame { 126class EventIndicator : public Q3Frame {
117 Q_OBJECT 127 Q_OBJECT
118 public: 128 public:
119 enum Location { Top, Bottom }; 129 enum Location { Top, Bottom };
120 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0); 130 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0);
121 virtual ~EventIndicator(); 131 virtual ~EventIndicator();
122 132
@@ -129,17 +139,17 @@ class EventIndicator : public QFrame {
129 void drawContents(QPainter *); 139 void drawContents(QPainter *);
130 140
131 private: 141 private:
132 int mXOffset; 142 int mXOffset;
133 KDGanttMinimizeSplitter* mPaintWidget; 143 KDGanttMinimizeSplitter* mPaintWidget;
134 int mColumns; 144 int mColumns;
135 QHBox *mTopBox; 145 Q3HBox *mTopBox;
136 QBoxLayout *mTopLayout; 146 Q3BoxLayout *mTopLayout;
137 Location mLocation; 147 Location mLocation;
138 QPixmap mPixmap; 148 QPixmap mPixmap;
139 QMemArray<bool> mEnabled; 149 Q3MemArray<bool> mEnabled;
140}; 150};
141 151
142/** 152/**
143 KOAgendaView is the agenda-like view used to display events in an one or 153 KOAgendaView is the agenda-like view used to display events in an one or
144 multi-day view. 154 multi-day view.
145*/ 155*/
@@ -156,13 +166,13 @@ class KOAgendaView : public KOEventView {
156 virtual int maxDatesHint(); 166 virtual int maxDatesHint();
157 167
158 /** Returns number of currently shown dates. */ 168 /** Returns number of currently shown dates. */
159 virtual int currentDateCount(); 169 virtual int currentDateCount();
160 170
161 /** returns the currently selected events */ 171 /** returns the currently selected events */
162 virtual QPtrList<Incidence> selectedIncidences(); 172 virtual Q3PtrList<Incidence> selectedIncidences();
163 173
164 /** returns the currently selected events */ 174 /** returns the currently selected events */
165 virtual DateList selectedDates(); 175 virtual DateList selectedDates();
166 176
167 /** Remove all events from view */ 177 /** Remove all events from view */
168 void clearView(); 178 void clearView();
@@ -182,13 +192,13 @@ class KOAgendaView : public KOEventView {
182 void repaintAgenda(); 192 void repaintAgenda();
183 public slots: 193 public slots:
184 void setInitStartHour(); 194 void setInitStartHour();
185 virtual void updateView(); 195 virtual void updateView();
186 virtual void updateConfig(); 196 virtual void updateConfig();
187 virtual void showDates(const QDate &start, const QDate &end); 197 virtual void showDates(const QDate &start, const QDate &end);
188 virtual void showEvents(QPtrList<Event> eventList); 198 virtual void showEvents(Q3PtrList<Event> eventList);
189 199
190 void updateTodo( Todo *, int ); 200 void updateTodo( Todo *, int );
191 void changeEventDisplay(Event *, int); 201 void changeEventDisplay(Event *, int);
192 202
193 void clearSelection(); 203 void clearSelection();
194 204
@@ -257,16 +267,16 @@ class KOAgendaView : public KOEventView {
257 267
258 private: 268 private:
259 bool flag_blockfillAgenda; 269 bool flag_blockfillAgenda;
260 QTimer* mIdleTimer; 270 QTimer* mIdleTimer;
261 QDateTime mIdleStart; 271 QDateTime mIdleStart;
262 // view widgets 272 // view widgets
263 QFrame *mDayLabels; 273 Q3Frame *mDayLabels;
264 QHBox *mDayLabelsFrame; 274 Q3HBox *mDayLabelsFrame;
265 QBoxLayout *mLayoutDayLabels; 275 Q3BoxLayout *mLayoutDayLabels;
266 QFrame *mAllDayFrame; 276 Q3Frame *mAllDayFrame;
267 KOAgenda *mAllDayAgenda; 277 KOAgenda *mAllDayAgenda;
268 KOAgenda *mAgenda; 278 KOAgenda *mAgenda;
269 TimeLabels *mTimeLabels; 279 TimeLabels *mTimeLabels;
270 QWidget *mDummyAllDayLeft; 280 QWidget *mDummyAllDayLeft;
271 281
272 KDGanttMinimizeSplitter* mSplitterAgenda; 282 KDGanttMinimizeSplitter* mSplitterAgenda;
@@ -281,18 +291,18 @@ class KOAgendaView : public KOEventView {
281 KOEventPopupMenu *mAllAgendaPopup; 291 KOEventPopupMenu *mAllAgendaPopup;
282 //KOEventPopupMenu *mAllDayAgendaPopup; 292 //KOEventPopupMenu *mAllDayAgendaPopup;
283 293
284 EventIndicator *mEventIndicatorTop; 294 EventIndicator *mEventIndicatorTop;
285 EventIndicator *mEventIndicatorBottom; 295 EventIndicator *mEventIndicatorBottom;
286 296
287 QMemArray<int> mMinY; 297 Q3MemArray<int> mMinY;
288 QMemArray<int> mMaxY; 298 Q3MemArray<int> mMaxY;
289 299
290 QMemArray<bool> mHolidayMask; 300 Q3MemArray<bool> mHolidayMask;
291 301
292 QPtrList<KOAgendaButton> mDayLabelsList; 302 Q3PtrList<KOAgendaButton> mDayLabelsList;
293 QDateTime mTimeSpanBegin; 303 QDateTime mTimeSpanBegin;
294 QDateTime mTimeSpanEnd; 304 QDateTime mTimeSpanEnd;
295 bool mTimeSpanInAllDay; 305 bool mTimeSpanInAllDay;
296 void keyPressEvent ( QKeyEvent * e ); 306 void keyPressEvent ( QKeyEvent * e );
297}; 307};
298 308