summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.h
authorzautrix <zautrix>2005-02-23 21:53:18 (UTC)
committer zautrix <zautrix>2005-02-23 21:53:18 (UTC)
commit4a9bf75c2ef12a40be3aea1d147f3703aee48638 (patch) (unidiff)
tree62b2e4d0b63487ff2818c18f8bc1a3233df46e76 /korganizer/koagendaitem.h
parent31f24d21cd23bb7e4033e7ffa000e6c979133ce7 (diff)
downloadkdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.zip
kdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.tar.gz
kdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.tar.bz2
morelayout fixes
Diffstat (limited to 'korganizer/koagendaitem.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 5b8f420..b4dba79 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -62,96 +62,97 @@ class KOAgendaItem : public QWidget
62 void setCellX(int XLeft, int XRight); 62 void setCellX(int XLeft, int XRight);
63 void setCellXWidth(int xwidth); 63 void setCellXWidth(int xwidth);
64 void setSubCell(int subCell); 64 void setSubCell(int subCell);
65 void setSubCells(int subCells); 65 void setSubCells(int subCells);
66 66
67 /** Start movement */ 67 /** Start movement */
68 void startMove(); 68 void startMove();
69 /** Reset to original values */ 69 /** Reset to original values */
70 void resetMove(); 70 void resetMove();
71 71
72 void moveRelative(int dx,int dy); 72 void moveRelative(int dx,int dy);
73 void expandTop(int dy); 73 void expandTop(int dy);
74 void expandBottom(int dy); 74 void expandBottom(int dy);
75 void expandLeft(int dx); 75 void expandLeft(int dx);
76 void expandRight(int dx); 76 void expandRight(int dx);
77 int mLastMoveXPos; 77 int mLastMoveXPos;
78 78
79 void setMultiItem(KOAgendaItem *first,KOAgendaItem *next, 79 void setMultiItem(KOAgendaItem *first,KOAgendaItem *next,
80 KOAgendaItem *last); 80 KOAgendaItem *last);
81 KOAgendaItem *firstMultiItem() { return mFirstMultiItem; } 81 KOAgendaItem *firstMultiItem() { return mFirstMultiItem; }
82 KOAgendaItem *nextMultiItem() { return mNextMultiItem; } 82 KOAgendaItem *nextMultiItem() { return mNextMultiItem; }
83 KOAgendaItem *lastMultiItem() { return mLastMultiItem; } 83 KOAgendaItem *lastMultiItem() { return mLastMultiItem; }
84 84
85 Incidence *incidence() const { return mIncidence; } 85 Incidence *incidence() const { return mIncidence; }
86 QDate itemDate() { return mDate; } 86 QDate itemDate() { return mDate; }
87 87
88 /** Update the date of this item's occurence (not in the event) */ 88 /** Update the date of this item's occurence (not in the event) */
89 void setItemDate(QDate qd); 89 void setItemDate(QDate qd);
90 90
91 void setText ( const QString & text ) { mDisplayedText = text; } 91 void setText ( const QString & text ) { mDisplayedText = text; }
92 QString text () { return mDisplayedText; } 92 QString text () { return mDisplayedText; }
93 93
94 virtual bool eventFilter ( QObject *, QEvent * ); 94 virtual bool eventFilter ( QObject *, QEvent * );
95 95
96 static QToolTipGroup *toolTipGroup(); 96 static QToolTipGroup *toolTipGroup();
97 97
98 QPtrList<KOAgendaItem> conflictItems(); 98 QPtrList<KOAgendaItem> conflictItems();
99 void setConflictItems(QPtrList<KOAgendaItem>); 99 void setConflictItems(QPtrList<KOAgendaItem>);
100 void addConflictItem(KOAgendaItem *ci); 100 void addConflictItem(KOAgendaItem *ci);
101 void paintMe( bool, QPainter* painter = 0 ); 101 void paintMe( bool, QPainter* painter = 0 );
102 void repaintMe(); 102 void repaintMe();
103 static void resizePixmap( int, int ); 103 static void resizePixmap( int, int );
104 static QPixmap * paintPix(); 104 static QPixmap * paintPix();
105 static QPixmap * paintPixSel(); 105 static QPixmap * paintPixSel();
106 static QPixmap * paintPixAllday(); 106 static QPixmap * paintPixAllday();
107 void updateItem(); 107 void updateItem();
108 void computeText(); 108 void computeText();
109 void recreateIncidence(); 109 void recreateIncidence();
110 bool checkLayout();
110 public slots: 111 public slots:
111 bool updateIcons( QPainter *, bool ); 112 bool updateIcons( QPainter *, bool );
112 void select(bool=true); 113 void select(bool=true);
113 114
114 protected: 115 protected:
115 void dragEnterEvent(QDragEnterEvent *e); 116 void dragEnterEvent(QDragEnterEvent *e);
116 void dropEvent(QDropEvent *e); 117 void dropEvent(QDropEvent *e);
117 void paintEvent ( QPaintEvent * ); 118 void paintEvent ( QPaintEvent * );
118 void resizeEvent ( QResizeEvent *ev ); 119 void resizeEvent ( QResizeEvent *ev );
119 120
120 private: 121 private:
121 bool mAllDay; 122 bool mAllDay;
122 int mCellX; 123 int mCellX;
123 int mCellXWidth; 124 int mCellXWidth;
124 int mCellYTop,mCellYBottom; 125 int mCellYTop,mCellYBottom;
125 int mSubCell; // subcell number of this item 126 int mSubCell; // subcell number of this item
126 int mSubCells; // Total number of subcells in cell of this item 127 int mSubCells; // Total number of subcells in cell of this item
127 int xPaintCoord; 128 int xPaintCoord;
128 int yPaintCoord; 129 int yPaintCoord;
129 int wPaintCoord; 130 int wPaintCoord;
130 int hPaintCoord; 131 int hPaintCoord;
131 // Variables to remember start position 132 // Variables to remember start position
132 int mStartCellX; 133 int mStartCellX;
133 int mStartCellXWidth; 134 int mStartCellXWidth;
134 int mStartCellYTop,mStartCellYBottom; 135 int mStartCellYTop,mStartCellYBottom;
135 int mLastMovePos; 136 int mLastMovePos;
136 137
137 // Multi item pointers 138 // Multi item pointers
138 KOAgendaItem *mFirstMultiItem; 139 KOAgendaItem *mFirstMultiItem;
139 KOAgendaItem *mNextMultiItem; 140 KOAgendaItem *mNextMultiItem;
140 KOAgendaItem *mLastMultiItem; 141 KOAgendaItem *mLastMultiItem;
141 142
142 int mFontPixelSize; 143 int mFontPixelSize;
143 Incidence *mIncidence; // corresponding event or todo 144 Incidence *mIncidence; // corresponding event or todo
144 QDate mDate; //date this events occurs (for recurrence) 145 QDate mDate; //date this events occurs (for recurrence)
145 //void showIcon( QLabel*, int ); 146 //void showIcon( QLabel*, int );
146 //QLabel *mTodoIconLabel; 147 //QLabel *mTodoIconLabel;
147 //QLabel *mItemLabel; 148 //QLabel *mItemLabel;
148 //QWidget *mIconBox; 149 //QWidget *mIconBox;
149 //QLabel *mIconAlarm,*mIconRecur,*mIconReadonly; 150 //QLabel *mIconAlarm,*mIconRecur,*mIconReadonly;
150 //QLabel *mIconReply,*mIconGroup,*mIconOrganizer; 151 //QLabel *mIconReply,*mIconGroup,*mIconOrganizer;
151 //QLabel *mIconMoreInfo; 152 //QLabel *mIconMoreInfo;
152 static QToolTipGroup *mToolTipGroup; 153 static QToolTipGroup *mToolTipGroup;
153 154
154 QColor mBackgroundColor; 155 QColor mBackgroundColor;
155 QColorGroup mColorGroup; 156 QColorGroup mColorGroup;
156 QString mDisplayedText; 157 QString mDisplayedText;
157 bool mSelected; 158 bool mSelected;