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