author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koagenda.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/koagenda.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 380ce62..0708341 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -22,29 +22,38 @@ | |||
22 | */ | 22 | */ |
23 | #ifndef KOAGENDA_H | 23 | #ifndef KOAGENDA_H |
24 | #define KOAGENDA_H | 24 | #define KOAGENDA_H |
25 | 25 | ||
26 | #include <qscrollview.h> | 26 | #include <q3scrollview.h> |
27 | #include <qtimer.h> | 27 | #include <qtimer.h> |
28 | #include <qmemarray.h> | 28 | #include <q3memarray.h> |
29 | #include <qpainter.h> | 29 | #include <qpainter.h> |
30 | #include <qpixmap.h> | 30 | #include <qpixmap.h> |
31 | #include <qguardedptr.h> | 31 | #include <qpointer.h> |
32 | //Added by qt3to4: | ||
33 | #include <QResizeEvent> | ||
34 | #include <Q3Frame> | ||
35 | #include <QLabel> | ||
36 | #include <QMouseEvent> | ||
37 | #include <Q3PtrList> | ||
38 | #include <Q3PopupMenu> | ||
39 | #include <QKeyEvent> | ||
40 | #include <QEvent> | ||
32 | 41 | ||
33 | #include "koagendaitem.h" | 42 | #include "koagendaitem.h" |
34 | #include "koeventview.h" | 43 | #include "koeventview.h" |
35 | 44 | ||
36 | class QPopupMenu; | 45 | class Q3PopupMenu; |
37 | class QTime; | 46 | class QTime; |
38 | class KConfig; | 47 | class KConfig; |
39 | class QFrame; | 48 | class Q3Frame; |
40 | class KOAgenda; | 49 | class KOAgenda; |
41 | class KCal::Event; | 50 | class KCal::Event; |
42 | class KCal::Todo; | 51 | class KCal::Todo; |
43 | 52 | ||
44 | using namespace KCal; | 53 | using namespace KCal; |
45 | 54 | ||
46 | class MarcusBains : public QFrame { | 55 | class MarcusBains : public Q3Frame { |
47 | Q_OBJECT | 56 | Q_OBJECT |
48 | public: | 57 | public: |
49 | MarcusBains(KOAgenda *agenda=0,const char *name=0); | 58 | MarcusBains(KOAgenda *agenda=0,const char *name=0); |
50 | virtual ~MarcusBains(); | 59 | virtual ~MarcusBains(); |
@@ -62,19 +71,19 @@ class MarcusBains : public QFrame { | |||
62 | int oldToday; | 71 | int oldToday; |
63 | }; | 72 | }; |
64 | 73 | ||
65 | 74 | ||
66 | class KOAgenda : public QScrollView | 75 | class KOAgenda : public Q3ScrollView |
67 | { | 76 | { |
68 | Q_OBJECT | 77 | Q_OBJECT |
69 | public: | 78 | public: |
70 | enum MouseActionType { NOP, MOVE, SELECT, | 79 | enum MouseActionType { NOP, MOVE, SELECT, |
71 | RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT }; | 80 | RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT }; |
72 | 81 | ||
73 | KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0, | 82 | KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0, |
74 | const char * name=0, WFlags f=0 ); | 83 | const char * name=0, Qt::WFlags f=0 ); |
75 | KOAgenda ( int columns, QWidget * parent=0, | 84 | KOAgenda ( int columns, QWidget * parent=0, |
76 | const char * name=0, WFlags f=0 ); | 85 | const char * name=0, Qt::WFlags f=0 ); |
77 | virtual ~KOAgenda(); | 86 | virtual ~KOAgenda(); |
78 | bool mInvalidPixmap; | 87 | bool mInvalidPixmap; |
79 | 88 | ||
80 | Incidence *selectedIncidence() const; | 89 | Incidence *selectedIncidence() const; |
@@ -116,9 +125,9 @@ class KOAgenda : public QScrollView | |||
116 | void updateConfig(); | 125 | void updateConfig(); |
117 | 126 | ||
118 | void checkScrollBoundaries(); | 127 | void checkScrollBoundaries(); |
119 | 128 | ||
120 | void setHolidayMask(QMemArray<bool> *); | 129 | void setHolidayMask(Q3MemArray<bool> *); |
121 | void setDateList(const DateList &selectedDates); | 130 | void setDateList(const DateList &selectedDates); |
122 | DateList dateList() const; | 131 | DateList dateList() const; |
123 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); | 132 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); |
124 | void finishUpdate(); | 133 | void finishUpdate(); |
@@ -276,12 +285,12 @@ class KOAgenda : public QScrollView | |||
276 | // The KOAgendaItem, which has been right-clicked last | 285 | // The KOAgendaItem, which has been right-clicked last |
277 | KOAgendaItem *mClickedItem; | 286 | KOAgendaItem *mClickedItem; |
278 | 287 | ||
279 | // The KOAgendaItem, which is being moved/resized | 288 | // The KOAgendaItem, which is being moved/resized |
280 | QGuardedPtr<KOAgendaItem> mActionItem; | 289 | QPointer<KOAgendaItem> mActionItem; |
281 | 290 | ||
282 | // Currently selected item | 291 | // Currently selected item |
283 | QGuardedPtr<KOAgendaItem> mSelectedItem; | 292 | QPointer<KOAgendaItem> mSelectedItem; |
284 | 293 | ||
285 | // The Marcus Bains Line widget. | 294 | // The Marcus Bains Line widget. |
286 | MarcusBains *mMarcusBains; | 295 | MarcusBains *mMarcusBains; |
287 | void computeSizes(); | 296 | void computeSizes(); |
@@ -290,18 +299,18 @@ class KOAgenda : public QScrollView | |||
290 | 299 | ||
291 | bool mItemMoved; | 300 | bool mItemMoved; |
292 | 301 | ||
293 | // List of all Items contained in agenda | 302 | // List of all Items contained in agenda |
294 | QPtrList<KOAgendaItem> mItems; | 303 | Q3PtrList<KOAgendaItem> mItems; |
295 | QPtrList<KOAgendaItem> mUnusedItems; | 304 | Q3PtrList<KOAgendaItem> mUnusedItems; |
296 | KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); | 305 | KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); |
297 | QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems | 306 | Q3PopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems |
298 | QPopupMenu *mNewItemPopup; | 307 | Q3PopupMenu *mNewItemPopup; |
299 | 308 | ||
300 | int mOldLowerScrollValue; | 309 | int mOldLowerScrollValue; |
301 | int mOldUpperScrollValue; | 310 | int mOldUpperScrollValue; |
302 | KOAgendaItem * getItemForTodo ( Todo * todo ); | 311 | KOAgendaItem * getItemForTodo ( Todo * todo ); |
303 | QMemArray<bool> *mHolidayMask; | 312 | Q3MemArray<bool> *mHolidayMask; |
304 | int mCurPixWid; | 313 | int mCurPixWid; |
305 | int mCurPixHei; | 314 | int mCurPixHei; |
306 | }; | 315 | }; |
307 | 316 | ||