-rw-r--r-- | korganizer/koagenda.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 111242f..12943d7 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -117,43 +117,45 @@ class KOAgenda : public QScrollView | |||
117 | 117 | ||
118 | void setHolidayMask(QMemArray<bool> *); | 118 | void setHolidayMask(QMemArray<bool> *); |
119 | void setDateList(const DateList &selectedDates); | 119 | void setDateList(const DateList &selectedDates); |
120 | DateList dateList() const; | 120 | DateList dateList() const; |
121 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); | 121 | void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); |
122 | void finishUpdate(); | 122 | void finishUpdate(); |
123 | void printSelection(); | 123 | void printSelection(); |
124 | void storePosition(); | 124 | void storePosition(); |
125 | void restorePosition(); | 125 | void restorePosition(); |
126 | 126 | ||
127 | 127 | ||
128 | public slots: | 128 | public slots: |
129 | void newItem( int ); | ||
129 | void moveChild( QWidget *, int, int ); | 130 | void moveChild( QWidget *, int, int ); |
130 | void scrollUp(); | 131 | void scrollUp(); |
131 | void scrollDown(); | 132 | void scrollDown(); |
132 | void updateTodo( Todo * t, int , bool ); | 133 | void updateTodo( Todo * t, int , bool ); |
133 | void popupAlarm(); | 134 | void popupAlarm(); |
134 | 135 | ||
135 | void checkScrollBoundaries(int); | 136 | void checkScrollBoundaries(int); |
136 | 137 | ||
137 | /** Deselect selected items. This function does not emit any signals. */ | 138 | /** Deselect selected items. This function does not emit any signals. */ |
138 | void deselectItem(); | 139 | void deselectItem(); |
139 | /** Select item. If the argument is 0, the currently selected item gets | 140 | /** Select item. If the argument is 0, the currently selected item gets |
140 | deselected. This function emits the itemSelected(bool) signal to inform | 141 | deselected. This function emits the itemSelected(bool) signal to inform |
141 | about selection/deseelction of events. */ | 142 | about selection/deseelction of events. */ |
142 | void selectItem(KOAgendaItem *); | 143 | void selectItem(KOAgendaItem *); |
143 | void finishResize(); | 144 | void finishResize(); |
144 | 145 | ||
145 | signals: | 146 | signals: |
146 | void newEventSignal(); | 147 | void newEventSignal(); |
147 | void newEventSignal(int gx,int gy); | 148 | void newEventSignal(int gx,int gy); |
149 | void newTodoSignal(int gx,int gy); | ||
148 | void newEventSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); | 150 | void newEventSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); |
149 | void newTimeSpanSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); | 151 | void newTimeSpanSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); |
150 | void newStartSelectSignal(); | 152 | void newStartSelectSignal(); |
151 | void showIncidenceSignal(Incidence *); | 153 | void showIncidenceSignal(Incidence *); |
152 | void editIncidenceSignal(Incidence *); | 154 | void editIncidenceSignal(Incidence *); |
153 | void deleteIncidenceSignal(Incidence *); | 155 | void deleteIncidenceSignal(Incidence *); |
154 | void showIncidencePopupSignal(Incidence *); | 156 | void showIncidencePopupSignal(Incidence *); |
155 | 157 | ||
156 | void itemModified(KOAgendaItem *item, int ); | 158 | void itemModified(KOAgendaItem *item, int ); |
157 | void incidenceSelected(Incidence *); | 159 | void incidenceSelected(Incidence *); |
158 | 160 | ||
159 | void lowerYChanged(int); | 161 | void lowerYChanged(int); |
@@ -171,25 +173,25 @@ class KOAgenda : public QScrollView | |||
171 | virtual void resizeEvent ( QResizeEvent * ); | 173 | virtual void resizeEvent ( QResizeEvent * ); |
172 | 174 | ||
173 | /** Handles mouse events. Called from eventFilter */ | 175 | /** Handles mouse events. Called from eventFilter */ |
174 | virtual bool eventFilter_mouse ( QObject *, QMouseEvent * ); | 176 | virtual bool eventFilter_mouse ( QObject *, QMouseEvent * ); |
175 | 177 | ||
176 | /** Start selecting time span. */ | 178 | /** Start selecting time span. */ |
177 | void startSelectAction(QPoint viewportPos); | 179 | void startSelectAction(QPoint viewportPos); |
178 | 180 | ||
179 | /** Select time span. */ | 181 | /** Select time span. */ |
180 | void performSelectAction(QPoint viewportPos); | 182 | void performSelectAction(QPoint viewportPos); |
181 | 183 | ||
182 | /** Emd selecting time span. */ | 184 | /** Emd selecting time span. */ |
183 | void endSelectAction(); | 185 | void endSelectAction( bool emitNewEvent = false ); |
184 | 186 | ||
185 | /** Start moving/resizing agenda item */ | 187 | /** Start moving/resizing agenda item */ |
186 | void startItemAction(QPoint viewportPos); | 188 | void startItemAction(QPoint viewportPos); |
187 | 189 | ||
188 | /** Move/resize agenda item */ | 190 | /** Move/resize agenda item */ |
189 | void performItemAction(QPoint viewportPos); | 191 | void performItemAction(QPoint viewportPos); |
190 | 192 | ||
191 | /** End moving/resizing agenda item */ | 193 | /** End moving/resizing agenda item */ |
192 | void endItemAction(); | 194 | void endItemAction(); |
193 | 195 | ||
194 | /** Set cursor, when no item action is in progress */ | 196 | /** Set cursor, when no item action is in progress */ |
195 | void setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos); | 197 | void setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos); |
@@ -198,24 +200,25 @@ class KOAgenda : public QScrollView | |||
198 | void placeSubCells(KOAgendaItem *placeItem); | 200 | void placeSubCells(KOAgendaItem *placeItem); |
199 | 201 | ||
200 | /** Process the keyevent, including the ignored keyevents of eventwidgets. | 202 | /** Process the keyevent, including the ignored keyevents of eventwidgets. |
201 | * Implements pgup/pgdn and cursor key navigation in the view. | 203 | * Implements pgup/pgdn and cursor key navigation in the view. |
202 | */ | 204 | */ |
203 | void keyPressEvent( QKeyEvent * ); | 205 | void keyPressEvent( QKeyEvent * ); |
204 | 206 | ||
205 | void calculateWorkingHours(); | 207 | void calculateWorkingHours(); |
206 | 208 | ||
207 | virtual void contentsMousePressEvent ( QMouseEvent * ); | 209 | virtual void contentsMousePressEvent ( QMouseEvent * ); |
208 | 210 | ||
209 | private: | 211 | private: |
212 | bool blockNewEvent; | ||
210 | void init(); | 213 | void init(); |
211 | void marcus_bains(); | 214 | void marcus_bains(); |
212 | bool mAllDayMode; | 215 | bool mAllDayMode; |
213 | bool blockResize; | 216 | bool blockResize; |
214 | QTimer mResizeTimer; | 217 | QTimer mResizeTimer; |
215 | double mContentPosition; | 218 | double mContentPosition; |
216 | 219 | ||
217 | // Width and height of agenda cells | 220 | // Width and height of agenda cells |
218 | int mGridSpacingX; | 221 | int mGridSpacingX; |
219 | int mGridSpacingY; | 222 | int mGridSpacingY; |
220 | 223 | ||
221 | // size of border, where mouse action will resize the KOAgendaItem | 224 | // size of border, where mouse action will resize the KOAgendaItem |
@@ -265,22 +268,23 @@ class KOAgenda : public QScrollView | |||
265 | MarcusBains *mMarcusBains; | 268 | MarcusBains *mMarcusBains; |
266 | void computeSizes(); | 269 | void computeSizes(); |
267 | 270 | ||
268 | MouseActionType mActionType; | 271 | MouseActionType mActionType; |
269 | 272 | ||
270 | bool mItemMoved; | 273 | bool mItemMoved; |
271 | 274 | ||
272 | // List of all Items contained in agenda | 275 | // List of all Items contained in agenda |
273 | QPtrList<KOAgendaItem> mItems; | 276 | QPtrList<KOAgendaItem> mItems; |
274 | QPtrList<KOAgendaItem> mUnusedItems; | 277 | QPtrList<KOAgendaItem> mUnusedItems; |
275 | KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); | 278 | KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); |
276 | QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems | 279 | QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems |
280 | QPopupMenu *mNewItemPopup; | ||
277 | 281 | ||
278 | int mOldLowerScrollValue; | 282 | int mOldLowerScrollValue; |
279 | int mOldUpperScrollValue; | 283 | int mOldUpperScrollValue; |
280 | KOAgendaItem * getItemForTodo ( Todo * todo ); | 284 | KOAgendaItem * getItemForTodo ( Todo * todo ); |
281 | QMemArray<bool> *mHolidayMask; | 285 | QMemArray<bool> *mHolidayMask; |
282 | int mCurPixWid; | 286 | int mCurPixWid; |
283 | int mCurPixHei; | 287 | int mCurPixHei; |
284 | }; | 288 | }; |
285 | 289 | ||
286 | #endif // KOAGENDA_H | 290 | #endif // KOAGENDA_H |