-rw-r--r-- | korganizer/koagendaview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 4a058ce..ba9bc93 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -123,168 +123,169 @@ class EventIndicator : public QFrame { | |||
123 | void enableColumn(int column, bool enable); | 123 | void enableColumn(int column, bool enable); |
124 | 124 | ||
125 | protected: | 125 | protected: |
126 | void drawContents(QPainter *); | 126 | void drawContents(QPainter *); |
127 | 127 | ||
128 | private: | 128 | private: |
129 | int mXOffset; | 129 | int mXOffset; |
130 | KDGanttMinimizeSplitter* mPaintWidget; | 130 | KDGanttMinimizeSplitter* mPaintWidget; |
131 | int mColumns; | 131 | int mColumns; |
132 | QHBox *mTopBox; | 132 | QHBox *mTopBox; |
133 | QBoxLayout *mTopLayout; | 133 | QBoxLayout *mTopLayout; |
134 | Location mLocation; | 134 | Location mLocation; |
135 | QPixmap mPixmap; | 135 | QPixmap mPixmap; |
136 | QMemArray<bool> mEnabled; | 136 | QMemArray<bool> mEnabled; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | /** | 139 | /** |
140 | KOAgendaView is the agenda-like view used to display events in an one or | 140 | KOAgendaView is the agenda-like view used to display events in an one or |
141 | multi-day view. | 141 | multi-day view. |
142 | */ | 142 | */ |
143 | class KOAgendaView : public KOEventView { | 143 | class KOAgendaView : public KOEventView { |
144 | Q_OBJECT | 144 | Q_OBJECT |
145 | public: | 145 | public: |
146 | KOAgendaView(Calendar *cal,QWidget *parent = 0,const char *name = 0 ); | 146 | KOAgendaView(Calendar *cal,QWidget *parent = 0,const char *name = 0 ); |
147 | virtual ~KOAgendaView(); | 147 | virtual ~KOAgendaView(); |
148 | void setStartHour( int ); | 148 | void setStartHour( int ); |
149 | void toggleAllDay(); | 149 | void toggleAllDay(); |
150 | 150 | ||
151 | 151 | ||
152 | /** Returns maximum number of days supported by the koagendaview */ | 152 | /** Returns maximum number of days supported by the koagendaview */ |
153 | virtual int maxDatesHint(); | 153 | virtual int maxDatesHint(); |
154 | 154 | ||
155 | /** Returns number of currently shown dates. */ | 155 | /** Returns number of currently shown dates. */ |
156 | virtual int currentDateCount(); | 156 | virtual int currentDateCount(); |
157 | 157 | ||
158 | /** returns the currently selected events */ | 158 | /** returns the currently selected events */ |
159 | virtual QPtrList<Incidence> selectedIncidences(); | 159 | virtual QPtrList<Incidence> selectedIncidences(); |
160 | 160 | ||
161 | /** returns the currently selected events */ | 161 | /** returns the currently selected events */ |
162 | virtual DateList selectedDates(); | 162 | virtual DateList selectedDates(); |
163 | 163 | ||
164 | /** Remove all events from view */ | 164 | /** Remove all events from view */ |
165 | void clearView(); | 165 | void clearView(); |
166 | KOAgenda *agenda() { return mAgenda;} | 166 | KOAgenda *agenda() { return mAgenda;} |
167 | virtual void printPreview(CalPrinter *calPrinter, | 167 | virtual void printPreview(CalPrinter *calPrinter, |
168 | const QDate &, const QDate &); | 168 | const QDate &, const QDate &); |
169 | 169 | ||
170 | /** start-datetime of selection */ | 170 | /** start-datetime of selection */ |
171 | QDateTime selectionStart() {return mTimeSpanBegin;} | 171 | QDateTime selectionStart() {return mTimeSpanBegin;} |
172 | /** end-datetime of selection */ | 172 | /** end-datetime of selection */ |
173 | QDateTime selectionEnd() {return mTimeSpanEnd;} | 173 | QDateTime selectionEnd() {return mTimeSpanEnd;} |
174 | /** returns true if selection is for whole day */ | 174 | /** returns true if selection is for whole day */ |
175 | bool selectedIsAllDay() {return mTimeSpanInAllDay;} | 175 | bool selectedIsAllDay() {return mTimeSpanInAllDay;} |
176 | /** make selected start/end invalid */ | 176 | /** make selected start/end invalid */ |
177 | void deleteSelectedDateTime(); | 177 | void deleteSelectedDateTime(); |
178 | void repaintAgenda(); | 178 | void repaintAgenda(); |
179 | public slots: | 179 | public slots: |
180 | virtual void updateView(); | 180 | virtual void updateView(); |
181 | virtual void updateConfig(); | 181 | virtual void updateConfig(); |
182 | virtual void showDates(const QDate &start, const QDate &end); | 182 | virtual void showDates(const QDate &start, const QDate &end); |
183 | virtual void showEvents(QPtrList<Event> eventList); | 183 | virtual void showEvents(QPtrList<Event> eventList); |
184 | 184 | ||
185 | void updateTodo( Todo *, int ); | 185 | void updateTodo( Todo *, int ); |
186 | void changeEventDisplay(Event *, int); | 186 | void changeEventDisplay(Event *, int); |
187 | 187 | ||
188 | void clearSelection(); | 188 | void clearSelection(); |
189 | 189 | ||
190 | void newTodo(int gx,int gy); | 190 | void newTodo(int gx,int gy); |
191 | void newEvent(int gx,int gy); | 191 | void newEvent(int gx,int gy); |
192 | void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd); | 192 | void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd); |
193 | void newEventAllDay(int gx, int gy); | 193 | void newEventAllDay(int gx, int gy); |
194 | void newTodoAllDay(int gx, int gy); | 194 | void newTodoAllDay(int gx, int gy); |
195 | 195 | ||
196 | void startDrag(Event *); | 196 | void startDrag(Event *); |
197 | 197 | ||
198 | void readSettings(); | 198 | void readSettings(); |
199 | void readSettings(KConfig *); | 199 | void readSettings(KConfig *); |
200 | void writeSettings(KConfig *); | 200 | void writeSettings(KConfig *); |
201 | 201 | ||
202 | void setContentsPos(int y); | 202 | void setContentsPos(int y); |
203 | 203 | ||
204 | void setExpandedButton( bool expanded ); | 204 | void setExpandedButton( bool expanded ); |
205 | void scrollOneHourUp(); | 205 | void scrollOneHourUp(); |
206 | void scrollOneHourDown(); | 206 | void scrollOneHourDown(); |
207 | void addToCalSlot(Incidence *, Incidence *); | 207 | void addToCalSlot(Incidence *, Incidence *); |
208 | 208 | ||
209 | signals: | 209 | signals: |
210 | void showDateView( int, QDate ); | 210 | void showDateView( int, QDate ); |
211 | void newTodoSignal( QDateTime ,bool ); | 211 | void newTodoSignal( QDateTime ,bool ); |
212 | void toggleExpand(); | 212 | void toggleExpand(); |
213 | void selectWeekNum( int ); | 213 | void selectWeekNum( int ); |
214 | void todoMoved( Todo *, int ); | 214 | void todoMoved( Todo *, int ); |
215 | void incidenceChanged(Incidence * , int ); | 215 | void incidenceChanged(Incidence * , int ); |
216 | // void cloneIncidenceSignal(Incidence *); | 216 | // void cloneIncidenceSignal(Incidence *); |
217 | 217 | ||
218 | protected: | 218 | protected: |
219 | QLabel * mDummyAllDayRightL; | ||
219 | KOAgendaButton* getNewDaylabel(); | 220 | KOAgendaButton* getNewDaylabel(); |
220 | bool mBlockUpdating; | 221 | bool mBlockUpdating; |
221 | int mUpcomingWidth; | 222 | int mUpcomingWidth; |
222 | /** Fill agenda beginning with date startDate */ | 223 | /** Fill agenda beginning with date startDate */ |
223 | void fillAgenda(const QDate &startDate); | 224 | void fillAgenda(const QDate &startDate); |
224 | void resizeEvent( QResizeEvent* e ); | 225 | void resizeEvent( QResizeEvent* e ); |
225 | /** Fill agenda using the current set value for the start date */ | 226 | /** Fill agenda using the current set value for the start date */ |
226 | void fillAgenda(); | 227 | void fillAgenda(); |
227 | 228 | ||
228 | /** Create labels for the selected dates. */ | 229 | /** Create labels for the selected dates. */ |
229 | void createDayLabels(); | 230 | void createDayLabels(); |
230 | 231 | ||
231 | /** | 232 | /** |
232 | Set the masks on the agenda widgets indicating, which days are holidays. | 233 | Set the masks on the agenda widgets indicating, which days are holidays. |
233 | */ | 234 | */ |
234 | void setHolidayMasks(); | 235 | void setHolidayMasks(); |
235 | 236 | ||
236 | protected slots: | 237 | protected slots: |
237 | void slotDaylabelClicked( int ); | 238 | void slotDaylabelClicked( int ); |
238 | /** Update event belonging to agenda item */ | 239 | /** Update event belonging to agenda item */ |
239 | void updateEventDates(KOAgendaItem *item, int mode = -1); | 240 | void updateEventDates(KOAgendaItem *item, int mode = -1); |
240 | //void updateMovedTodo(); | 241 | //void updateMovedTodo(); |
241 | 242 | ||
242 | void updateEventIndicatorTop(int newY); | 243 | void updateEventIndicatorTop(int newY); |
243 | void updateEventIndicatorBottom(int newY); | 244 | void updateEventIndicatorBottom(int newY); |
244 | 245 | ||
245 | /** Updates data for selected timespan */ | 246 | /** Updates data for selected timespan */ |
246 | void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd); | 247 | void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd); |
247 | /** Updates data for selected timespan for all day event*/ | 248 | /** Updates data for selected timespan for all day event*/ |
248 | void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd); | 249 | void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd); |
249 | 250 | ||
250 | private: | 251 | private: |
251 | // view widgets | 252 | // view widgets |
252 | QFrame *mDayLabels; | 253 | QFrame *mDayLabels; |
253 | QHBox *mDayLabelsFrame; | 254 | QHBox *mDayLabelsFrame; |
254 | QBoxLayout *mLayoutDayLabels; | 255 | QBoxLayout *mLayoutDayLabels; |
255 | QFrame *mAllDayFrame; | 256 | QFrame *mAllDayFrame; |
256 | KOAgenda *mAllDayAgenda; | 257 | KOAgenda *mAllDayAgenda; |
257 | KOAgenda *mAgenda; | 258 | KOAgenda *mAgenda; |
258 | TimeLabels *mTimeLabels; | 259 | TimeLabels *mTimeLabels; |
259 | QWidget *mDummyAllDayLeft; | 260 | QWidget *mDummyAllDayLeft; |
260 | 261 | ||
261 | KDGanttMinimizeSplitter* mSplitterAgenda; | 262 | KDGanttMinimizeSplitter* mSplitterAgenda; |
262 | QPushButton *mExpandButton; | 263 | QPushButton *mExpandButton; |
263 | 264 | ||
264 | DateList mSelectedDates; // List of dates to be displayed | 265 | DateList mSelectedDates; // List of dates to be displayed |
265 | int mViewType; | 266 | int mViewType; |
266 | 267 | ||
267 | bool mWeekStartsMonday; | 268 | bool mWeekStartsMonday; |
268 | int mStartHour; | 269 | int mStartHour; |
269 | 270 | ||
270 | KOEventPopupMenu *mAgendaPopup; | 271 | KOEventPopupMenu *mAgendaPopup; |
271 | KOEventPopupMenu *mAllDayAgendaPopup; | 272 | KOEventPopupMenu *mAllDayAgendaPopup; |
272 | 273 | ||
273 | EventIndicator *mEventIndicatorTop; | 274 | EventIndicator *mEventIndicatorTop; |
274 | EventIndicator *mEventIndicatorBottom; | 275 | EventIndicator *mEventIndicatorBottom; |
275 | 276 | ||
276 | QMemArray<int> mMinY; | 277 | QMemArray<int> mMinY; |
277 | QMemArray<int> mMaxY; | 278 | QMemArray<int> mMaxY; |
278 | 279 | ||
279 | QMemArray<bool> mHolidayMask; | 280 | QMemArray<bool> mHolidayMask; |
280 | 281 | ||
281 | QPixmap mExpandedPixmap; | 282 | QPixmap mExpandedPixmap; |
282 | QPixmap mNotExpandedPixmap; | 283 | QPixmap mNotExpandedPixmap; |
283 | QPtrList<KOAgendaButton> mDayLabelsList; | 284 | QPtrList<KOAgendaButton> mDayLabelsList; |
284 | QDateTime mTimeSpanBegin; | 285 | QDateTime mTimeSpanBegin; |
285 | QDateTime mTimeSpanEnd; | 286 | QDateTime mTimeSpanEnd; |
286 | bool mTimeSpanInAllDay; | 287 | bool mTimeSpanInAllDay; |
287 | void keyPressEvent ( QKeyEvent * e ); | 288 | void keyPressEvent ( QKeyEvent * e ); |
288 | }; | 289 | }; |
289 | 290 | ||
290 | #endif // KOAGENDAVIEW_H | 291 | #endif // KOAGENDAVIEW_H |