25 #ifndef KOAGENDAVIEW_H 26 #define KOAGENDAVIEW_H 28 #include <tqscrollview.h> 33 #include "calprinter.h" 34 #include "calendarview.h" 36 #include "agendaview.h" 48 class IncidenceChangerBase;
51 class EventIndicator :
public TQFrame
56 enum Location { Top, Bottom };
57 EventIndicator( Location loc = Top, TQWidget *parent = 0,
58 const char *name = 0 );
59 virtual ~EventIndicator();
61 void changeColumns(
int columns );
63 void enableColumn(
int column,
bool enable );
66 void drawContents( TQPainter * );
72 TQMemArray<bool> mEnabled;
75 class KOAlternateLabel :
public TQLabel
80 KOAlternateLabel(
const TQString &shortlabel,
const TQString &longlabel,
81 const TQString &extensivelabel = TQString(),
82 TQWidget *parent = 0,
const char *name = 0 );
85 virtual TQSize minimumSizeHint()
const;
87 enum TextType { Short = 0, Long = 1, Extensive = 2 };
88 TextType largestFittingTextType()
const;
89 void setFixedType( TextType type );
94 void useExtensiveText();
95 void useDefaultText();
98 virtual void resizeEvent( TQResizeEvent * );
99 virtual void squeezeTextToLabel();
101 TQString mShortText, mLongText, mExtensiveText;
115 TQWidget *parent = 0,
116 const char *name = 0,
117 bool isSideBySide =
false );
121 virtual int maxDatesHint();
124 virtual int currentDateCount();
127 virtual Incidence::List selectedIncidences();
130 virtual DateList selectedIncidenceDates();
133 virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt,
bool &allDay);
138 KOrg::CalPrinterBase::PrintType printType();
147 void deleteSelectedDateTime();
149 bool selectedIsSingleCell();
151 void setTypeAheadReceiver( TQObject * );
153 KOAgenda* agenda()
const {
return mAgenda; }
154 TQSplitter* splitter()
const {
return mSplitterAgenda; }
155 TQFrame *dayLabels()
const {
return mDayLabels; }
158 void calendarIncidenceAdded(
Incidence *incidence );
159 void calendarIncidenceChanged(
Incidence *incidence );
160 void calendarIncidenceDeleted(
Incidence *incidence );
163 virtual void updateView();
164 virtual void updateConfig();
165 virtual void showDates(
const TQDate &start,
const TQDate &end );
166 virtual void showIncidences(
const Incidence::List &incidenceList,
const TQDate &date );
168 void insertIncidence(
Incidence *incidence,
const TQDate &curDate );
169 void changeIncidenceDisplayAdded(
Incidence *incidence );
170 void changeIncidenceDisplay(
Incidence *incidence,
int mode );
172 void clearSelection();
177 void readSettings( TDEConfig * );
178 void writeSettings( TDEConfig * );
180 void setContentsPos(
int y );
182 void setExpandedButton(
bool expanded );
184 void finishTypeAhead();
187 void slotTodoDropped(
Todo *,
const TQPoint &,
bool );
189 void enableAgendaUpdate(
bool enable );
190 void setIncidenceChanger( KOrg::IncidenceChangerBase *changer );
192 void zoomInHorizontally(
const TQDate& date=TQDate() );
193 void zoomOutHorizontally(
const TQDate& date=TQDate() );
195 void zoomInVertically( );
196 void zoomOutVertically( );
198 void zoomView(
const int delta,
const TQPoint &pos,
200 const Qt::Orientation orient=Qt::Horizontal );
202 void clearTimeSpanSelection();
204 void resourcesChanged();
208 void zoomViewHorizontally(
const TQDate &,
int count );
210 void timeSpanSelectionChanged();
214 void fillAgenda(
const TQDate &startDate );
219 void connectAgenda( KOAgenda*agenda, TQPopupMenu*popup, KOAgenda* otherAgenda );
222 void createDayLabels(
bool force );
227 void setHolidayMasks();
234 void updateEventIndicators();
236 void updateTimeBarWidth();
238 virtual void resizeEvent( TQResizeEvent *resizeEvent );
242 void updateEventDates( KOAgendaItem *item );
246 void updateEventIndicatorTop(
int newY );
247 void updateEventIndicatorBottom(
int newY );
250 void newTimeSpanSelected(
const TQPoint &start,
const TQPoint &end );
252 void newTimeSpanSelectedAllDay(
const TQPoint &start,
const TQPoint &end );
254 void updateDayLabelSizes();
257 bool filterByResource(
Incidence *incidence );
258 void displayIncidence(
Incidence *incidence );
263 TQHBox *mDayLabelsFrame;
264 TQBoxLayout *mLayoutDayLabels;
265 TQPtrList<KOAlternateLabel> mDateDayLabels;
266 TQFrame *mAllDayFrame;
267 KOAgenda *mAllDayAgenda;
269 TimeLabels *mTimeLabels;
270 TQWidget *mDummyAllDayLeft;
271 TQSplitter *mSplitterAgenda;
272 TQPushButton *mExpandButton;
274 DateList mSelectedDates;
275 DateList mSaveSelectedDates;
278 KOEventPopupMenu *mAgendaPopup;
279 KOEventPopupMenu *mAllDayAgendaPopup;
281 EventIndicator *mEventIndicatorTop;
282 EventIndicator *mEventIndicatorBottom;
284 TQMemArray<int> mMinY;
285 TQMemArray<int> mMaxY;
287 TQMemArray<bool> mHolidayMask;
289 TQPixmap mExpandedPixmap;
290 TQPixmap mNotExpandedPixmap;
292 TQDateTime mTimeSpanBegin;
293 TQDateTime mTimeSpanEnd;
294 bool mTimeSpanInAllDay;
295 bool mAllowAgendaUpdate;
300 bool mPendingChanges;
308 bool mAreDatesInitialized;
TQDateTime selectionEnd()
end-datetime of selection
KOAgendaView is the agenda-like view used to display events in a single one or multi-day view...
Base class for single/multi agenda views.
This is the main calendar widget.
bool selectedIsAllDay()
returns true if selection is for whole day
TQDateTime selectionStart()
start-datetime of selection