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 KOViewManager( CalendarView * );
00057 virtual ~KOViewManager();
00058
00060 void showView( KOrg::BaseView * );
00061
00062 void readSettings( KConfig *config );
00063 void writeSettings( KConfig *config );
00064
00066 void readCurrentView( KConfig * );
00068 void writeCurrentView( KConfig * );
00069
00070 KOrg::BaseView *currentView();
00071
00072 void setDocumentId( const QString & );
00073
00074 void updateView();
00075 void updateView( const QDate &start, const QDate &end );
00076
00077 void raiseCurrentView();
00078
00079 void connectView( KOrg::BaseView * );
00080 void addView( KOrg::BaseView * );
00081
00082 Incidence *currentSelection();
00083 QDate currentSelectionDate();
00084
00085 KOAgendaView *agendaView() const { return mAgendaView; }
00086 KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
00087 KOTodoView *todoView() const { return mTodoView; }
00088
00089 public slots:
00090 void showWhatsNextView();
00091 void showListView();
00092 void showAgendaView();
00093 void showDayView();
00094 void showWorkWeekView();
00095 void showWeekView();
00096 void showNextXView();
00097 void showMonthView();
00098 void showTodoView();
00099 void showTimelineView();
00100 void showJournalView();
00101
00102 void showEventView();
00103
00104 void connectTodoView( KOTodoView *todoView );
00105
00106 void zoomInHorizontally();
00107 void zoomOutHorizontally();
00108 void zoomInVertically();
00109 void zoomOutVertically();
00110 private slots:
00111 void currentAgendaViewTabChanged( QWidget* );
00112 private:
00113 QWidget* widgetForView( KOrg::BaseView* ) const;
00114 CalendarView *mMainView;
00115
00116 KOAgendaView *mAgendaView;
00117 MultiAgendaView *mAgendaSideBySideView;
00118 KOListView *mListView;
00119 KOMonthView *mMonthView;
00120 KOTodoView *mTodoView;
00121 KOWhatsNextView *mWhatsNextView;
00122 KOJournalView *mJournalView;
00123 KOTimelineView *mTimelineView;
00124
00125 KOrg::BaseView *mCurrentView;
00126
00127 KOrg::BaseView *mLastEventView;
00128 QTabWidget *mAgendaViewTabs;
00129 };
00130
00131 #endif
|