korganizer
multiagendaview.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KORG_MULTIAGENDAVIEW_H_H
00020 #define KORG_MULTIAGENDAVIEW_H_H
00021
00022 #include "agendaview.h"
00023
00024 class QScrollView;
00025 class QHBox;
00026 class QSplitter;
00027 class KOAgendaView;
00028 class TimeLabels;
00029 class QScrollBar;
00030
00031 namespace KCal {
00032 class ResourceCalendar;
00033 }
00034
00035 namespace KOrg {
00036
00040 class MultiAgendaView : public AgendaView
00041 {
00042 Q_OBJECT
00043 public:
00044 explicit MultiAgendaView( Calendar* cal, QWidget *parent = 0, const char *name = 0 );
00045 ~MultiAgendaView();
00046
00047 Incidence::List selectedIncidences();
00048 DateList selectedDates();
00049 int currentDateCount();
00050 int maxDatesHint();
00051
00052 bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay);
00053
00054 void setTypeAheadReceiver( QObject *o );
00055
00056 public slots:
00057 void showDates( const QDate &start, const QDate &end );
00058 void showIncidences( const Incidence::List &incidenceList, const QDate &date );
00059 void updateView();
00060 void changeIncidenceDisplay( Incidence *incidence, int mode );
00061 void updateConfig();
00062
00063 void setIncidenceChanger( IncidenceChangerBase *changer );
00064
00065 void finishTypeAhead();
00066
00067 void show();
00068
00069 void resourcesChanged();
00070
00071 protected:
00072 void resizeEvent( QResizeEvent *ev );
00073 bool eventFilter( QObject *obj, QEvent *event );
00074
00075 private:
00076 void addView( const QString &label, KCal::ResourceCalendar *res, const QString &subRes = QString::null );
00077 void deleteViews();
00078 void recreateViews();
00079 void setupViews();
00080 void resizeScrollView( const QSize &size );
00081 void installSplitterEventFilter( QSplitter *splitter );
00082
00083 private slots:
00084 void slotSelectionChanged();
00085 void slotClearTimeSpanSelection();
00086 void resizeSplitters();
00087 void zoomView( const int delta, const QPoint &pos, const Qt::Orientation ori );
00088 void slotResizeScrollView();
00089
00090 private:
00091 QValueList<KOAgendaView*> mAgendaViews;
00092 QValueList<QWidget*> mAgendaWidgets;
00093 QHBox *mTopBox;
00094 QScrollView *mScrollView;
00095 TimeLabels *mTimeLabels;
00096 QSplitter *mLeftSplitter, *mRightSplitter;
00097 QSplitter *mLastMovedSplitter;
00098 QScrollBar *mScrollBar;
00099 QWidget *mLeftBottomSpacer, *mRightBottomSpacer;
00100 QDate mStartDate, mEndDate;
00101 bool mUpdateOnShow;
00102 bool mPendingChanges;
00103 };
00104
00105 }
00106
00107 #endif
|