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, 1 insertions, 0 deletions
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index e9e85cc..4a058ce 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -117,173 +117,174 @@ class EventIndicator : public QFrame {
117 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0); 117 EventIndicator(Location loc=Top,QWidget *parent=0,const char *name=0);
118 virtual ~EventIndicator(); 118 virtual ~EventIndicator();
119 119
120 void changeColumns(int columns); 120 void changeColumns(int columns);
121 void setPaintWidget( KDGanttMinimizeSplitter* ); 121 void setPaintWidget( KDGanttMinimizeSplitter* );
122 void setXOffset( int ); 122 void setXOffset( int );
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 todoMoved( Todo *, int ); 214 void todoMoved( Todo *, int );
214 void incidenceChanged(Incidence * , int ); 215 void incidenceChanged(Incidence * , int );
215 // void cloneIncidenceSignal(Incidence *); 216 // void cloneIncidenceSignal(Incidence *);
216 217
217 protected: 218 protected:
218 KOAgendaButton* getNewDaylabel(); 219 KOAgendaButton* getNewDaylabel();
219 bool mBlockUpdating; 220 bool mBlockUpdating;
220 int mUpcomingWidth; 221 int mUpcomingWidth;
221 /** Fill agenda beginning with date startDate */ 222 /** Fill agenda beginning with date startDate */
222 void fillAgenda(const QDate &startDate); 223 void fillAgenda(const QDate &startDate);
223 void resizeEvent( QResizeEvent* e ); 224 void resizeEvent( QResizeEvent* e );
224 /** Fill agenda using the current set value for the start date */ 225 /** Fill agenda using the current set value for the start date */
225 void fillAgenda(); 226 void fillAgenda();
226 227
227 /** Create labels for the selected dates. */ 228 /** Create labels for the selected dates. */
228 void createDayLabels(); 229 void createDayLabels();
229 230
230 /** 231 /**
231 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.
232 */ 233 */
233 void setHolidayMasks(); 234 void setHolidayMasks();
234 235
235 protected slots: 236 protected slots:
236 void slotDaylabelClicked( int ); 237 void slotDaylabelClicked( int );
237 /** Update event belonging to agenda item */ 238 /** Update event belonging to agenda item */
238 void updateEventDates(KOAgendaItem *item, int mode = -1); 239 void updateEventDates(KOAgendaItem *item, int mode = -1);
239 //void updateMovedTodo(); 240 //void updateMovedTodo();
240 241
241 void updateEventIndicatorTop(int newY); 242 void updateEventIndicatorTop(int newY);
242 void updateEventIndicatorBottom(int newY); 243 void updateEventIndicatorBottom(int newY);
243 244
244 /** Updates data for selected timespan */ 245 /** Updates data for selected timespan */
245 void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd); 246 void newTimeSpanSelected(int gxStart, int gyStart, int gxEnd, int gyEnd);
246 /** Updates data for selected timespan for all day event*/ 247 /** Updates data for selected timespan for all day event*/
247 void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd); 248 void newTimeSpanSelectedAllDay(int gxStart, int gyStart, int gxEnd, int gyEnd);
248 249
249 private: 250 private:
250 // view widgets 251 // view widgets
251 QFrame *mDayLabels; 252 QFrame *mDayLabels;
252 QHBox *mDayLabelsFrame; 253 QHBox *mDayLabelsFrame;
253 QBoxLayout *mLayoutDayLabels; 254 QBoxLayout *mLayoutDayLabels;
254 QFrame *mAllDayFrame; 255 QFrame *mAllDayFrame;
255 KOAgenda *mAllDayAgenda; 256 KOAgenda *mAllDayAgenda;
256 KOAgenda *mAgenda; 257 KOAgenda *mAgenda;
257 TimeLabels *mTimeLabels; 258 TimeLabels *mTimeLabels;
258 QWidget *mDummyAllDayLeft; 259 QWidget *mDummyAllDayLeft;
259 260
260 KDGanttMinimizeSplitter* mSplitterAgenda; 261 KDGanttMinimizeSplitter* mSplitterAgenda;
261 QPushButton *mExpandButton; 262 QPushButton *mExpandButton;
262 263
263 DateList mSelectedDates; // List of dates to be displayed 264 DateList mSelectedDates; // List of dates to be displayed
264 int mViewType; 265 int mViewType;
265 266
266 bool mWeekStartsMonday; 267 bool mWeekStartsMonday;
267 int mStartHour; 268 int mStartHour;
268 269
269 KOEventPopupMenu *mAgendaPopup; 270 KOEventPopupMenu *mAgendaPopup;
270 KOEventPopupMenu *mAllDayAgendaPopup; 271 KOEventPopupMenu *mAllDayAgendaPopup;
271 272
272 EventIndicator *mEventIndicatorTop; 273 EventIndicator *mEventIndicatorTop;
273 EventIndicator *mEventIndicatorBottom; 274 EventIndicator *mEventIndicatorBottom;
274 275
275 QMemArray<int> mMinY; 276 QMemArray<int> mMinY;
276 QMemArray<int> mMaxY; 277 QMemArray<int> mMaxY;
277 278
278 QMemArray<bool> mHolidayMask; 279 QMemArray<bool> mHolidayMask;
279 280
280 QPixmap mExpandedPixmap; 281 QPixmap mExpandedPixmap;
281 QPixmap mNotExpandedPixmap; 282 QPixmap mNotExpandedPixmap;
282 QPtrList<KOAgendaButton> mDayLabelsList; 283 QPtrList<KOAgendaButton> mDayLabelsList;
283 QDateTime mTimeSpanBegin; 284 QDateTime mTimeSpanBegin;
284 QDateTime mTimeSpanEnd; 285 QDateTime mTimeSpanEnd;
285 bool mTimeSpanInAllDay; 286 bool mTimeSpanInAllDay;
286 void keyPressEvent ( QKeyEvent * e ); 287 void keyPressEvent ( QKeyEvent * e );
287}; 288};
288 289
289#endif // KOAGENDAVIEW_H 290#endif // KOAGENDAVIEW_H