30#include <tqptrvector.h>
32#include "koeventview.h"
34class KNoScrollListBox;
37class KOMonthCellToolTip :
public TQToolTip
40 KOMonthCellToolTip (TQWidget* parent,
Calendar *calendar,
const TQDate &date, KNoScrollListBox* lv,
MonthViewCell* cl);
43 void maybeTip(
const TQPoint & pos);
48 KNoScrollListBox* eventlist;
53class KNoScrollListBox:
public TQListBox
58 KNoScrollListBox(TQWidget *parent=0,
const char *name=0);
59 ~KNoScrollListBox() {}
61 void setBackground(
bool primary,
bool workday );
69 void keyPressEvent(TQKeyEvent *);
70 void keyReleaseEvent(TQKeyEvent *);
71 void mousePressEvent(TQMouseEvent *);
72 void resizeEvent(TQResizeEvent *);
73 void contentsMouseDoubleClickEvent( TQMouseEvent * e );
80class MonthViewItem:
public TQListBoxItem
83 MonthViewItem(
Incidence *,
const TQDateTime &qd,
const TQString & title );
85 void setEvent(
bool on) { mEvent = on; }
86 void setTodo(
bool on) { mTodo = on; }
87 void setTodoDone(
bool on) { mTodoDone = on; }
88 void setRecur(
bool on) { mRecur = on; }
89 void setAlarm(
bool on) { mAlarm = on; }
90 void setReply(
bool on) { mReply = on; }
92 void setPalette(
const TQPalette &p) { mPalette = p; }
93 TQPalette palette()
const {
return mPalette; }
95 Incidence *incidence()
const {
return mIncidence; }
96 TQDateTime incidenceDateTime() {
return mDateTime; }
98 void setResourceColor( TQColor& color ) { mResourceColor = color; }
99 TQColor &resourceColor() {
return mResourceColor; }
101 virtual void paint(TQPainter *);
102 virtual int height(
const TQListBox *)
const;
103 virtual int width(
const TQListBox *)
const;
105 TQColor mResourceColor;
114 TQPixmap mEventPixmap;
115 TQPixmap mBirthdayPixmap;
116 TQPixmap mAnniversaryPixmap;
117 TQPixmap mTodoPixmap;
118 TQPixmap mTodoDonePixmap;
119 TQPixmap mAlarmPixmap;
120 TQPixmap mRecurPixmap;
121 TQPixmap mReplyPixmap;
124 TQDateTime mDateTime;
127 TQColor catColor()
const;
142 class CreateItemVisitor;
145 TQString holidayString( ) {
return mHolidayString; }
148 void setDate(
const TQDate & );
194 void enableScrollBars(
bool );
197 TQDate selectedIncidenceDate();
209 const TQDate &
date );
215 void setFrameWidth();
216 void resizeEvent( TQResizeEvent * );
219 void defaultAction( TQListBoxItem * );
220 void contextMenu( TQListBoxItem * );
228 TQString mHolidayString;
231 KNoScrollListBox *mItemList;
237 TQPalette mHolidayPalette;
238 TQPalette mStandardPalette;
239 TQPalette mTodayPalette;
273 virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt,
bool &allDay);
276 virtual void updateView();
277 virtual void updateConfig();
278 virtual void showDates(
const TQDate &start,
const TQDate &end);
279 virtual void showIncidences(
const Incidence::List &incidenceList,
const TQDate &date );
281 void changeIncidenceDisplay(
Incidence *,
int);
282 void changeIncidenceDisplayAdded(
Incidence *, MonthViewCell::CreateItemVisitor&);
284 void clearSelection();
287 void showGeneralContextMenu();
292 void processSelectionChange();
295 void resizeEvent(TQResizeEvent *);
298 void updateDayLabels();
301 void showLabel(
bool show );
303 class GetDateVisitor;
309 TQPtrVector<MonthViewCell> mCells;
310 TQMap<TQDate,MonthViewCell *> mDateToCell;
311 TQPtrVector<TQLabel> mDayLabels;
313 bool mShortDayLabels;
314 int mWidthLongDayLabel;
317 TQDate mSelectedDate;
321 KOEventPopupMenu *mEventContextMenu;
KOEventView is the abstract base class from which all other calendar views for event data are derived...
The class KOMonthView represents the monthly view in KOrganizer.
virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay)
Set the default start/end date/time for new events.
virtual DateList selectedIncidenceDates()
Returns dates of the currently selected events.
virtual TQDateTime selectionEnd()
Returns the end of the selection, or an invalid TQDateTime if there is no selection or the view doesn...
virtual int currentDateCount()
Returns number of currently shown dates.
virtual Incidence::List selectedIncidences()
Returns the currently selected events.
virtual int maxDatesHint()
Returns maximum number of days supported by the komonthview.
virtual TQDateTime selectionStart()
Returns the start of the selection, or an invalid TQDateTime if there is no selection or the view doe...
This class represents one day in KOrganizer's month view.
void setPrimary(bool primary)
Set this cell as primary if primary is true.
void removeIncidence(Incidence *)
Removes an incidence from the cell.
void setHolidayString(const TQString &name)
Sets the holiday name to this cell.
KOMonthView * monthView()
void addIncidence(Incidence *incidence, MonthViewCell::CreateItemVisitor &v, int multiDay=0)
Adds an incidence to the cell.
void setHoliday(bool)
Make this cell show as a holiday.
void newEventSignal(ResourceCalendar *res, const TQString &subResource, const TQDate &date)
Notify the view manager that we want to create a new event, so an editor will pop up.
void setDate(const TQDate &)
Sets the date of the cell.