korganizer
koviewmanager.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KOVIEWMANAGER_H
00026 #define KOVIEWMANAGER_H
00027
00028 #include <qobject.h>
00029 class QWidget;
00030 class QTabWidget;
00031
00032 class CalendarView;
00033
00034 class KOListView;
00035 class KOAgendaView;
00036 class KOMonthView;
00037 class KOTodoView;
00038 class KOWhatsNextView;
00039 class KOJournalView;
00040 class KOTimelineView;
00041
00042 namespace KOrg {
00043 class BaseView;
00044 class MultiAgendaView;
00045 }
00046 using namespace KCal;
00047
00052 class KOViewManager : public QObject
00053 {
00054 Q_OBJECT
00055 public:
00056
00057 enum AgendaMode {
00058 AGENDA_NONE,
00059 AGENDA_DAY,
00060 AGENDA_WORK_WEEK,
00061 AGENDA_WEEK,
00062 AGENDA_NEXTX
00063 };
00064
00065 KOViewManager( CalendarView * );
00066 virtual ~KOViewManager();
00067
00069 void showView( KOrg::BaseView * );
00070
00071 void readSettings( KConfig *config );
00072 void writeSettings( KConfig *config );
00073
00075 void readCurrentView( KConfig * );
00077 void writeCurrentView( KConfig * );
00078
00079 KOrg::BaseView *currentView();
00080
00081 void setDocumentId( const QString & );
00082
00083 void updateView();
00084 void updateView( const QDate &start, const QDate &end );
00085
00086 void goMenu( bool enable );
00087 void raiseCurrentView();
00088
00089 void connectView( KOrg::BaseView * );
00090 void addView( KOrg::BaseView * );
00091
00092 Incidence *currentSelection();
00093 QDate currentSelectionDate();
00094
00095 KOAgendaView *agendaView() const { return mAgendaView; }
00096 KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
00097 KOTodoView *todoView() const { return mTodoView; }
00098 KOMonthView *monthView() const { return mMonthView; }
00099
00100 void updateMultiCalendarDisplay();
00101
00102
00107 AgendaMode agendaMode() { return mAgendaMode; }
00108
00109 public slots:
00110 void showWhatsNextView();
00111 void showListView();
00112 void showAgendaView();
00113 void showDayView();
00114 void showWorkWeekView();
00115 void showWeekView();
00116 void showNextXView();
00117 void showMonthView();
00118 void showTodoView();
00119 void showTimelineView();
00120 void showJournalView();
00121
00122 void showEventView();
00123
00124 void connectTodoView( KOTodoView *todoView );
00125
00126 void zoomInHorizontally();
00127 void zoomOutHorizontally();
00128 void zoomInVertically();
00129 void zoomOutVertically();
00130
00131 void resourcesChanged();
00132
00133 private slots:
00134 void currentAgendaViewTabChanged( QWidget* );
00135 private:
00136 QWidget* widgetForView( KOrg::BaseView* ) const;
00137 CalendarView *mMainView;
00138
00139 KOAgendaView *mAgendaView;
00140 MultiAgendaView *mAgendaSideBySideView;
00141 KOListView *mListView;
00142 KOMonthView *mMonthView;
00143 KOTodoView *mTodoView;
00144 KOWhatsNextView *mWhatsNextView;
00145 KOJournalView *mJournalView;
00146 KOTimelineView *mTimelineView;
00147
00148 KOrg::BaseView *mCurrentView;
00149
00150 KOrg::BaseView *mLastEventView;
00151 QTabWidget *mAgendaViewTabs;
00152
00153 AgendaMode mAgendaMode;
00154
00155 };
00156
00157 #endif
|