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 AGENDA_OTHER
00064 };
00065
00066 KOViewManager( CalendarView * );
00067 virtual ~KOViewManager();
00068
00070 void showView( KOrg::BaseView * );
00071
00072 void readSettings( KConfig *config );
00073 void writeSettings( KConfig *config );
00074
00076 void readCurrentView( KConfig * );
00078 void writeCurrentView( KConfig * );
00079
00080 KOrg::BaseView *currentView();
00081
00082 void setDocumentId( const QString & );
00083
00084 void updateView();
00085 void updateView( const QDate &start, const QDate &end );
00086
00087 void goMenu( bool enable );
00088 void raiseCurrentView();
00089
00090 void connectView( KOrg::BaseView * );
00091 void addView( KOrg::BaseView * );
00092
00093 Incidence *currentSelection();
00094 QDate currentSelectionDate();
00095
00096 KOAgendaView *agendaView() const { return mAgendaView; }
00097 KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
00098 KOTodoView *todoView() const { return mTodoView; }
00099 KOMonthView *monthView() const { return mMonthView; }
00100
00101 void updateMultiCalendarDisplay();
00102
00103
00104
00105
00106
00107
00108
00109
00110 bool agendaIsSelected() const;
00111
00116 AgendaMode agendaMode() const { return mAgendaMode; }
00117
00118 public slots:
00119 void showWhatsNextView();
00120 void showListView();
00121 void showAgendaView();
00122 void showDayView();
00123 void showWorkWeekView();
00124 void showWeekView();
00125 void showNextXView();
00126 void showMonthView();
00127 void showTodoView();
00128 void showTimelineView();
00129 void showJournalView();
00130
00131 void showEventView();
00132
00133 void connectTodoView( KOTodoView *todoView );
00134
00135 void zoomInHorizontally();
00136 void zoomOutHorizontally();
00137 void zoomInVertically();
00138 void zoomOutVertically();
00139
00140 void resourcesChanged();
00141
00142 private slots:
00143 void currentAgendaViewTabChanged( QWidget* );
00144 private:
00145 QWidget* widgetForView( KOrg::BaseView* ) const;
00146 CalendarView *mMainView;
00147
00148 KOAgendaView *mAgendaView;
00149 MultiAgendaView *mAgendaSideBySideView;
00150 KOListView *mListView;
00151 KOMonthView *mMonthView;
00152 KOTodoView *mTodoView;
00153 KOWhatsNextView *mWhatsNextView;
00154 KOJournalView *mJournalView;
00155 KOTimelineView *mTimelineView;
00156
00157 KOrg::BaseView *mCurrentView;
00158
00159 KOrg::BaseView *mLastEventView;
00160 QTabWidget *mAgendaViewTabs;
00161
00162 AgendaMode mAgendaMode;
00163
00164 };
00165
00166 #endif
|