summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.h
Unidiff
Diffstat (limited to 'korganizer/koagendaview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index ba9bc93..4a058ce 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -123,169 +123,168 @@ 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*/
143class KOAgendaView : public KOEventView { 143class 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;
220 KOAgendaButton* getNewDaylabel(); 219 KOAgendaButton* getNewDaylabel();
221 bool mBlockUpdating; 220 bool mBlockUpdating;
222 int mUpcomingWidth; 221 int mUpcomingWidth;
223 /** Fill agenda beginning with date startDate */ 222 /** Fill agenda beginning with date startDate */
224 void fillAgenda(const QDate &startDate); 223 void fillAgenda(const QDate &startDate);
225 void resizeEvent( QResizeEvent* e ); 224 void resizeEvent( QResizeEvent* e );
226 /** Fill agenda using the current set value for the start date */ 225 /** Fill agenda using the current set value for the start date */
227 void fillAgenda(); 226 void fillAgenda();
228 227
229 /** Create labels for the selected dates. */ 228 /** Create labels for the selected dates. */
230 void createDayLabels(); 229 void createDayLabels();
231 230
232 /** 231 /**
233 Set the masks on the agenda widgets indicating, which days are holidays. 232 Set the masks on the agenda widgets indicating, which days are holidays.
234 */ 233 */
235 void setHolidayMasks(); 234 void setHolidayMasks();
236 235
237 protected slots: 236 protected slots:
238 void slotDaylabelClicked( int ); 237 void slotDaylabelClicked( int );
239 /** Update event belonging to agenda item */ 238 /** Update event belonging to agenda item */
240 void updateEventDates(KOAgendaItem *item, int mode = -1); 239 void updateEventDates(KOAgendaItem *item, int mode = -1);
241 //void updateMovedTodo(); 240 //void updateMovedTodo();
242 241
243 void updateEventIndicatorTop(int newY); 242 void updateEventIndicatorTop(int newY);
244 void updateEventIndicatorBottom(int newY); 243 void updateEventIndicatorBottom(int newY);
245 244
246 /** Updates data for selected timespan */ 245 /** Updates data for selected timespan */
247 void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd); 246 void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd);
248 /** Updates data for selected timespan for all day event*/ 247 /** Updates data for selected timespan for all day event*/
249 void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd); 248 void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd);
250 249
251 private: 250 private:
252 // view widgets 251 // view widgets
253 QFrame *mDayLabels; 252 QFrame *mDayLabels;
254 QHBox *mDayLabelsFrame; 253 QHBox *mDayLabelsFrame;
255 QBoxLayout *mLayoutDayLabels; 254 QBoxLayout *mLayoutDayLabels;
256 QFrame *mAllDayFrame; 255 QFrame *mAllDayFrame;
257 KOAgenda *mAllDayAgenda; 256 KOAgenda *mAllDayAgenda;
258 KOAgenda *mAgenda; 257 KOAgenda *mAgenda;
259 TimeLabels *mTimeLabels; 258 TimeLabels *mTimeLabels;
260 QWidget *mDummyAllDayLeft; 259 QWidget *mDummyAllDayLeft;
261 260
262 KDGanttMinimizeSplitter* mSplitterAgenda; 261 KDGanttMinimizeSplitter* mSplitterAgenda;
263 QPushButton *mExpandButton; 262 QPushButton *mExpandButton;
264 263
265 DateList mSelectedDates; // List of dates to be displayed 264 DateList mSelectedDates; // List of dates to be displayed
266 int mViewType; 265 int mViewType;
267 266
268 bool mWeekStartsMonday; 267 bool mWeekStartsMonday;
269 int mStartHour; 268 int mStartHour;
270 269
271 KOEventPopupMenu *mAgendaPopup; 270 KOEventPopupMenu *mAgendaPopup;
272 KOEventPopupMenu *mAllDayAgendaPopup; 271 KOEventPopupMenu *mAllDayAgendaPopup;
273 272
274 EventIndicator *mEventIndicatorTop; 273 EventIndicator *mEventIndicatorTop;
275 EventIndicator *mEventIndicatorBottom; 274 EventIndicator *mEventIndicatorBottom;
276 275
277 QMemArray<int> mMinY; 276 QMemArray<int> mMinY;
278 QMemArray<int> mMaxY; 277 QMemArray<int> mMaxY;
279 278
280 QMemArray<bool> mHolidayMask; 279 QMemArray<bool> mHolidayMask;
281 280
282 QPixmap mExpandedPixmap; 281 QPixmap mExpandedPixmap;
283 QPixmap mNotExpandedPixmap; 282 QPixmap mNotExpandedPixmap;
284 QPtrList<KOAgendaButton> mDayLabelsList; 283 QPtrList<KOAgendaButton> mDayLabelsList;
285 QDateTime mTimeSpanBegin; 284 QDateTime mTimeSpanBegin;
286 QDateTime mTimeSpanEnd; 285 QDateTime mTimeSpanEnd;
287 bool mTimeSpanInAllDay; 286 bool mTimeSpanInAllDay;
288 void keyPressEvent ( QKeyEvent * e ); 287 void keyPressEvent ( QKeyEvent * e );
289}; 288};
290 289
291#endif // KOAGENDAVIEW_H 290#endif // KOAGENDAVIEW_H