author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/koviewmanager.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
-rw-r--r-- | korganizer/koviewmanager.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h new file mode 100644 index 0000000..f814c36 --- a/dev/null +++ b/korganizer/koviewmanager.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | This file is part of KOrganizer. | ||
3 | Copyright (c) 2001 | ||
4 | Cornelius Schumacher <schumacher@kde.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | |||
20 | As a special exception, permission is given to link this program | ||
21 | with any edition of Qt, and distribute the resulting executable, | ||
22 | without including the source code for Qt in the source distribution. | ||
23 | */ | ||
24 | #ifndef KOVIEWMANAGER_H | ||
25 | #define KOVIEWMANAGER_H | ||
26 | |||
27 | #include <qobject.h> | ||
28 | |||
29 | #include <korganizer/baseview.h> | ||
30 | |||
31 | class CalendarView; | ||
32 | |||
33 | class KOListView; | ||
34 | class KOAgendaView; | ||
35 | class KOMonthView; | ||
36 | class KOTimeSpanView; | ||
37 | class KOTodoView; | ||
38 | class KOWhatsNextView; | ||
39 | class KOJournalView; | ||
40 | |||
41 | using namespace KCal; | ||
42 | |||
43 | /** | ||
44 | This class manages the views of the calendar. It owns the objects and handles | ||
45 | creation and selection. | ||
46 | */ | ||
47 | class KOViewManager : public QObject | ||
48 | { | ||
49 | Q_OBJECT | ||
50 | public: | ||
51 | KOViewManager( CalendarView * ); | ||
52 | virtual ~KOViewManager(); | ||
53 | |||
54 | /** changes the view to be the currently selected view */ | ||
55 | void showView(KOrg::BaseView *, bool fullScreen = false ); | ||
56 | |||
57 | void readSettings(KConfig *config); | ||
58 | void writeSettings(KConfig *config); | ||
59 | bool showsNextDays(); | ||
60 | /** Read which view was shown last from config file */ | ||
61 | void readCurrentView(KConfig *); | ||
62 | /** Write which view is currently shown to config file */ | ||
63 | void writeCurrentView(KConfig *); | ||
64 | |||
65 | KOrg::BaseView *currentView(); | ||
66 | |||
67 | void setDocumentId( const QString & ); | ||
68 | |||
69 | void updateView(); | ||
70 | void updateView( const QDate &start, const QDate &end ); | ||
71 | |||
72 | void raiseCurrentView( bool fullScreen = false ); | ||
73 | |||
74 | void addView(KOrg::BaseView *); | ||
75 | |||
76 | Incidence *currentSelection(); | ||
77 | QDate currentSelectionDate(); | ||
78 | |||
79 | KOAgendaView *agendaView() const { return mAgendaView; } | ||
80 | |||
81 | public slots: | ||
82 | void showWhatsNextView(); | ||
83 | void showListView(); | ||
84 | void showAgendaView( bool fullScreen = false ); | ||
85 | void showDayView(); | ||
86 | void showWorkWeekView(); | ||
87 | void showWeekView(); | ||
88 | void showNextXView(); | ||
89 | void showMonthView(); | ||
90 | void showTodoView(); | ||
91 | void showJournalView(); | ||
92 | void showTimeSpanView(); | ||
93 | |||
94 | private: | ||
95 | CalendarView *mMainView; | ||
96 | |||
97 | int mCurrentAgendaView; | ||
98 | KOAgendaView *mAgendaView; | ||
99 | KOListView *mListView; | ||
100 | KOMonthView *mMonthView; | ||
101 | KOTodoView *mTodoView; | ||
102 | KOWhatsNextView *mWhatsNextView; | ||
103 | KOJournalView *mJournalView; | ||
104 | KOTimeSpanView *mTimeSpanView; | ||
105 | |||
106 | KOrg::BaseView *mCurrentView; // currently active event view | ||
107 | |||
108 | int mAgendaViewMode; | ||
109 | bool mFlagShowNextxDays; | ||
110 | |||
111 | }; | ||
112 | |||
113 | #endif | ||