-rw-r--r-- | korganizer/koagendaitem.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 27ee720..17cf975 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h | |||
@@ -10,51 +10,58 @@ | |||
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 | #ifndef KOAGENDAITEM_H | 19 | #ifndef KOAGENDAITEM_H |
20 | #define KOAGENDAITEM_H | 20 | #define KOAGENDAITEM_H |
21 | 21 | ||
22 | #include <qframe.h> | 22 | #include <q3frame.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qpixmap.h> | 24 | #include <qpixmap.h> |
25 | #include <qdatetime.h> | 25 | #include <qdatetime.h> |
26 | #include <qpalette.h> | 26 | #include <qpalette.h> |
27 | //Added by qt3to4: | ||
28 | #include <QDropEvent> | ||
29 | #include <QPaintEvent> | ||
30 | #include <QResizeEvent> | ||
31 | #include <Q3PtrList> | ||
32 | #include <QEvent> | ||
33 | #include <QDragEnterEvent> | ||
27 | 34 | ||
28 | #include <libkcal/incidence.h> | 35 | #include <libkcal/incidence.h> |
29 | 36 | ||
30 | class KOAgendaItemWhatsThis; | 37 | class KOAgendaItemWhatsThis; |
31 | class QToolTipGroup; | 38 | class QToolTipGroup; |
32 | class QDragEnterEvent; | 39 | class QDragEnterEvent; |
33 | class QDropEvent; | 40 | class QDropEvent; |
34 | 41 | ||
35 | using namespace KCal; | 42 | using namespace KCal; |
36 | 43 | ||
37 | /* | 44 | /* |
38 | The KOAgendaItem has to make sure that it receives all mouse events, which are | 45 | The KOAgendaItem has to make sure that it receives all mouse events, which are |
39 | to be used for dragging and resizing. That means it has to be installed as | 46 | to be used for dragging and resizing. That means it has to be installed as |
40 | eventfiler for its children, if it has children, and it has to pass mouse | 47 | eventfiler for its children, if it has children, and it has to pass mouse |
41 | events from the cildren to itself. See eventFilter(). | 48 | events from the cildren to itself. See eventFilter(). |
42 | */ | 49 | */ |
43 | class KOAgendaItem : public QWidget | 50 | class KOAgendaItem : public QWidget |
44 | { | 51 | { |
45 | Q_OBJECT | 52 | Q_OBJECT |
46 | public: | 53 | public: |
47 | KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, | 54 | KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, |
48 | WFlags f=0 ); | 55 | Qt::WFlags f=0 ); |
49 | ~KOAgendaItem(); | 56 | ~KOAgendaItem(); |
50 | QString getWhatsThisText(); | 57 | QString getWhatsThisText(); |
51 | void init ( Incidence *incidence, QDate qd ); | 58 | void init ( Incidence *incidence, QDate qd ); |
52 | int cellX() { return mCellX; } | 59 | int cellX() { return mCellX; } |
53 | int cellXWidth() { return mCellXWidth; } | 60 | int cellXWidth() { return mCellXWidth; } |
54 | int cellYTop() { return mCellYTop; } | 61 | int cellYTop() { return mCellYTop; } |
55 | int cellYBottom() { return mCellYBottom; } | 62 | int cellYBottom() { return mCellYBottom; } |
56 | int cellHeight(); | 63 | int cellHeight(); |
57 | int cellWidth(); | 64 | int cellWidth(); |
58 | int subCell() { return mSubCell; } | 65 | int subCell() { return mSubCell; } |
59 | int subCells() { return mSubCells; } | 66 | int subCells() { return mSubCells; } |
60 | 67 | ||
@@ -87,26 +94,26 @@ class KOAgendaItem : public QWidget | |||
87 | QDate itemDate() { return mDate; } | 94 | QDate itemDate() { return mDate; } |
88 | 95 | ||
89 | /** Update the date of this item's occurence (not in the event) */ | 96 | /** Update the date of this item's occurence (not in the event) */ |
90 | void setItemDate(QDate qd); | 97 | void setItemDate(QDate qd); |
91 | 98 | ||
92 | void setText ( const QString & text ) { mDisplayedText = text; } | 99 | void setText ( const QString & text ) { mDisplayedText = text; } |
93 | QString text () { return mDisplayedText; } | 100 | QString text () { return mDisplayedText; } |
94 | 101 | ||
95 | virtual bool eventFilter ( QObject *, QEvent * ); | 102 | virtual bool eventFilter ( QObject *, QEvent * ); |
96 | 103 | ||
97 | static QToolTipGroup *toolTipGroup(); | 104 | static QToolTipGroup *toolTipGroup(); |
98 | 105 | ||
99 | QPtrList<KOAgendaItem> conflictItems(); | 106 | Q3PtrList<KOAgendaItem> conflictItems(); |
100 | void setConflictItems(QPtrList<KOAgendaItem>); | 107 | void setConflictItems(Q3PtrList<KOAgendaItem>); |
101 | void addConflictItem(KOAgendaItem *ci); | 108 | void addConflictItem(KOAgendaItem *ci); |
102 | void paintMe( bool, QPainter* painter = 0 ); | 109 | void paintMe( bool, QPainter* painter = 0 ); |
103 | void repaintMe(); | 110 | void repaintMe(); |
104 | static QPixmap * paintPix(); | 111 | static QPixmap * paintPix(); |
105 | static QPixmap * paintPixAllday(); | 112 | static QPixmap * paintPixAllday(); |
106 | void updateItem(); | 113 | void updateItem(); |
107 | void computeText(); | 114 | void computeText(); |
108 | void recreateIncidence(); | 115 | void recreateIncidence(); |
109 | bool checkLayout(); | 116 | bool checkLayout(); |
110 | void initColor (); | 117 | void initColor (); |
111 | bool isAllDay() { return mAllDay; } | 118 | bool isAllDay() { return mAllDay; } |
112 | int resizeMe( int grid, int wid, int hei, bool invalidWidth = false ); | 119 | int resizeMe( int grid, int wid, int hei, bool invalidWidth = false ); |
@@ -152,16 +159,16 @@ class KOAgendaItem : public QWidget | |||
152 | //QLabel *mTodoIconLabel; | 159 | //QLabel *mTodoIconLabel; |
153 | //QLabel *mItemLabel; | 160 | //QLabel *mItemLabel; |
154 | //QWidget *mIconBox; | 161 | //QWidget *mIconBox; |
155 | //QLabel *mIconAlarm,*mIconRecur,*mIconReadonly; | 162 | //QLabel *mIconAlarm,*mIconRecur,*mIconReadonly; |
156 | //QLabel *mIconReply,*mIconGroup,*mIconOrganizer; | 163 | //QLabel *mIconReply,*mIconGroup,*mIconOrganizer; |
157 | //QLabel *mIconMoreInfo; | 164 | //QLabel *mIconMoreInfo; |
158 | static QToolTipGroup *mToolTipGroup; | 165 | static QToolTipGroup *mToolTipGroup; |
159 | 166 | ||
160 | QColor mBackgroundColor; | 167 | QColor mBackgroundColor; |
161 | QColorGroup mColorGroup; | 168 | QColorGroup mColorGroup; |
162 | QString mDisplayedText; | 169 | QString mDisplayedText; |
163 | bool mSelected; | 170 | bool mSelected; |
164 | QPtrList<KOAgendaItem> mConflictItems; | 171 | Q3PtrList<KOAgendaItem> mConflictItems; |
165 | }; | 172 | }; |
166 | 173 | ||
167 | #endif // KOAGENDAITEM_H | 174 | #endif // KOAGENDAITEM_H |