-rw-r--r-- | korganizer/calendarview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 706d05d..799c297 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -45,192 +45,193 @@ | |||
45 | #include <korganizer/calendarviewbase.h> | 45 | #include <korganizer/calendarviewbase.h> |
46 | 46 | ||
47 | #include <ksyncmanager.h> | 47 | #include <ksyncmanager.h> |
48 | //#include <koprefs.h> | 48 | //#include <koprefs.h> |
49 | 49 | ||
50 | class QWidgetStack; | 50 | class QWidgetStack; |
51 | class QSplitter; | 51 | class QSplitter; |
52 | class KopiCalendarFile; | 52 | class KopiCalendarFile; |
53 | class CalPrinter; | 53 | class CalPrinter; |
54 | class KOFilterView; | 54 | class KOFilterView; |
55 | class KOCalEditView; | 55 | class KOCalEditView; |
56 | class KOViewManager; | 56 | class KOViewManager; |
57 | class KODialogManager; | 57 | class KODialogManager; |
58 | class KOTodoView; | 58 | class KOTodoView; |
59 | class KDateNavigator; | 59 | class KDateNavigator; |
60 | class DateNavigatorContainer; | 60 | class DateNavigatorContainer; |
61 | class DateNavigator; | 61 | class DateNavigator; |
62 | class KOIncidenceEditor; | 62 | class KOIncidenceEditor; |
63 | class KDatePicker; | 63 | class KDatePicker; |
64 | class ResourceView; | 64 | class ResourceView; |
65 | class KOEventEditor; | 65 | class KOEventEditor; |
66 | class KOTodoEditor ; | 66 | class KOTodoEditor ; |
67 | class KOEventViewerDialog; | 67 | class KOEventViewerDialog; |
68 | class KOBeamPrefs; | 68 | class KOBeamPrefs; |
69 | class KSyncProfile; | 69 | class KSyncProfile; |
70 | class AlarmDialog; | 70 | class AlarmDialog; |
71 | class KCal::Attendee; | 71 | class KCal::Attendee; |
72 | 72 | ||
73 | namespace KCal { class FileStorage; } | 73 | namespace KCal { class FileStorage; } |
74 | 74 | ||
75 | using namespace KCal; | 75 | using namespace KCal; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | This is the main calendar widget. It provides the different vies on t he | 78 | This is the main calendar widget. It provides the different vies on t he |
79 | calendar data as well as the date navigator. It also handles synchronisation | 79 | calendar data as well as the date navigator. It also handles synchronisation |
80 | of the different views and controls the different dialogs like preferences, | 80 | of the different views and controls the different dialogs like preferences, |
81 | event editor, search dialog etc. | 81 | event editor, search dialog etc. |
82 | 82 | ||
83 | @short main calendar view widget | 83 | @short main calendar view widget |
84 | @author Cornelius Schumacher | 84 | @author Cornelius Schumacher |
85 | */ | 85 | */ |
86 | 86 | ||
87 | #include <qtextbrowser.h> | 87 | #include <qtextbrowser.h> |
88 | #include <qtextcodec.h> | 88 | #include <qtextcodec.h> |
89 | 89 | ||
90 | class MissedAlarmTextBrowser : public QTextBrowser { | 90 | class MissedAlarmTextBrowser : public QTextBrowser { |
91 | Q_OBJECT | 91 | Q_OBJECT |
92 | public: | 92 | public: |
93 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); | 93 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); |
94 | ~MissedAlarmTextBrowser(); | 94 | ~MissedAlarmTextBrowser(); |
95 | void setSource(const QString & n); | 95 | void setSource(const QString & n); |
96 | 96 | ||
97 | private: | 97 | private: |
98 | Incidence * getNextInc(QDateTime start ); | 98 | Incidence * getNextInc(QDateTime start ); |
99 | QPtrList<Incidence> mAlarms; | 99 | QPtrList<Incidence> mAlarms; |
100 | signals: | 100 | signals: |
101 | void showIncidence( QString uid); | 101 | void showIncidence( QString uid); |
102 | }; | 102 | }; |
103 | 103 | ||
104 | 104 | ||
105 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface | 105 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface |
106 | { | 106 | { |
107 | Q_OBJECT | 107 | Q_OBJECT |
108 | public: | 108 | public: |
109 | /** | 109 | /** |
110 | Constructs a new calendar view widget. | 110 | Constructs a new calendar view widget. |
111 | 111 | ||
112 | @param calendar calendar document | 112 | @param calendar calendar document |
113 | @param parent parent window | 113 | @param parent parent window |
114 | @param name Qt internal widget object name | 114 | @param name Qt internal widget object name |
115 | */ | 115 | */ |
116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
117 | const char *name = 0 ); | 117 | const char *name = 0 ); |
118 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 118 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
119 | const char *name = 0 ); | 119 | const char *name = 0 ); |
120 | virtual ~CalendarView(); | 120 | virtual ~CalendarView(); |
121 | 121 | ||
122 | Calendar *calendar() { return mCalendar; } | 122 | Calendar *calendar() { return mCalendar; } |
123 | 123 | ||
124 | KOViewManager *viewManager(); | 124 | KOViewManager *viewManager(); |
125 | KODialogManager *dialogManager(); | 125 | KODialogManager *dialogManager(); |
126 | 126 | ||
127 | QDate startDate(); | 127 | QDate startDate(); |
128 | QDate endDate(); | 128 | QDate endDate(); |
129 | 129 | ||
130 | QWidgetStack *viewStack(); | 130 | QWidgetStack *viewStack(); |
131 | QWidget *leftFrame(); | 131 | QWidget *leftFrame(); |
132 | 132 | ||
133 | DateNavigator *dateNavigator(); | 133 | DateNavigator *dateNavigator(); |
134 | KDateNavigator *dateNavigatorWidget(); | 134 | KDateNavigator *dateNavigatorWidget(); |
135 | 135 | ||
136 | void addView(KOrg::BaseView *); | 136 | void addView(KOrg::BaseView *); |
137 | void showView(KOrg::BaseView *); | 137 | void showView(KOrg::BaseView *); |
138 | KOEventViewerDialog* getEventViewerDialog(); | 138 | KOEventViewerDialog* getEventViewerDialog(); |
139 | Incidence *currentSelection(); | 139 | Incidence *currentSelection(); |
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | ||
141 | 142 | ||
142 | signals: | 143 | signals: |
143 | void save (); | 144 | void save (); |
144 | void saveStopTimer (); | 145 | void saveStopTimer (); |
145 | void tempDisableBR(bool); | 146 | void tempDisableBR(bool); |
146 | /** This todo has been modified */ | 147 | /** This todo has been modified */ |
147 | void todoModified(Todo *, int); | 148 | void todoModified(Todo *, int); |
148 | 149 | ||
149 | /** when change is made to options dialog, the topwidget will catch this | 150 | /** when change is made to options dialog, the topwidget will catch this |
150 | * and emit this signal which notifies all widgets which have registered | 151 | * and emit this signal which notifies all widgets which have registered |
151 | * for notification to update their settings. */ | 152 | * for notification to update their settings. */ |
152 | void configChanged(); | 153 | void configChanged(); |
153 | /** emitted when the topwidget is closing down, so that any attached | 154 | /** emitted when the topwidget is closing down, so that any attached |
154 | child windows can also close. */ | 155 | child windows can also close. */ |
155 | void closingDown(); | 156 | void closingDown(); |
156 | /** emitted right before we die */ | 157 | /** emitted right before we die */ |
157 | void closed(QWidget *); | 158 | void closed(QWidget *); |
158 | 159 | ||
159 | /** Emitted when state of modified flag changes */ | 160 | /** Emitted when state of modified flag changes */ |
160 | void modifiedChanged(bool); | 161 | void modifiedChanged(bool); |
161 | void signalmodified(); | 162 | void signalmodified(); |
162 | 163 | ||
163 | /** Emitted when state of read-only flag changes */ | 164 | /** Emitted when state of read-only flag changes */ |
164 | void readOnlyChanged(bool); | 165 | void readOnlyChanged(bool); |
165 | 166 | ||
166 | /** Emitted when the unit of navigation changes */ | 167 | /** Emitted when the unit of navigation changes */ |
167 | void changeNavStringPrev(const QString &); | 168 | void changeNavStringPrev(const QString &); |
168 | void changeNavStringNext(const QString &); | 169 | void changeNavStringNext(const QString &); |
169 | 170 | ||
170 | /** Emitted when state of events selection has changed and user is organizer*/ | 171 | /** Emitted when state of events selection has changed and user is organizer*/ |
171 | void organizerEventsSelected(bool); | 172 | void organizerEventsSelected(bool); |
172 | /** Emitted when state of events selection has changed and user is attendee*/ | 173 | /** Emitted when state of events selection has changed and user is attendee*/ |
173 | void groupEventsSelected(bool); | 174 | void groupEventsSelected(bool); |
174 | /** | 175 | /** |
175 | Emitted when an incidence gets selected. If the selection is cleared the | 176 | Emitted when an incidence gets selected. If the selection is cleared the |
176 | signal is emitted with 0 as argument. | 177 | signal is emitted with 0 as argument. |
177 | */ | 178 | */ |
178 | void incidenceSelected( Incidence * ); | 179 | void incidenceSelected( Incidence * ); |
179 | /** Emitted, when a todoitem is selected or deselected. */ | 180 | /** Emitted, when a todoitem is selected or deselected. */ |
180 | void todoSelected( bool ); | 181 | void todoSelected( bool ); |
181 | 182 | ||
182 | /** | 183 | /** |
183 | Emitted, when clipboard content changes. Parameter indicates if paste | 184 | Emitted, when clipboard content changes. Parameter indicates if paste |
184 | is possible or not. | 185 | is possible or not. |
185 | */ | 186 | */ |
186 | void pasteEnabled(bool); | 187 | void pasteEnabled(bool); |
187 | 188 | ||
188 | /** Emitted, when the number of incoming messages has changed. */ | 189 | /** Emitted, when the number of incoming messages has changed. */ |
189 | void numIncomingChanged(int); | 190 | void numIncomingChanged(int); |
190 | 191 | ||
191 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
192 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
193 | 194 | ||
194 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
195 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
196 | 197 | ||
197 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
198 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
199 | void filtersUpdated(); | 200 | void filtersUpdated(); |
200 | 201 | ||
201 | 202 | ||
202 | public slots: | 203 | public slots: |
203 | void nextConflict( bool all, bool allday ); | 204 | void nextConflict( bool all, bool allday ); |
204 | void conflictAll(); | 205 | void conflictAll(); |
205 | void conflictAllday(); | 206 | void conflictAllday(); |
206 | void conflictNotAll(); | 207 | void conflictNotAll(); |
207 | void setCalReadOnly( int id, bool readO ); | 208 | void setCalReadOnly( int id, bool readO ); |
208 | void checkAlarms(); | 209 | void checkAlarms(); |
209 | void checkFiles(); | 210 | void checkFiles(); |
210 | void slotprintSelInc(); | 211 | void slotprintSelInc(); |
211 | void showNextAlarms(); | 212 | void showNextAlarms(); |
212 | void showOpenError(); | 213 | void showOpenError(); |
213 | void watchSavedFile(); | 214 | void watchSavedFile(); |
214 | void recheckTimerAlarm(); | 215 | void recheckTimerAlarm(); |
215 | void checkNextTimerAlarm(); | 216 | void checkNextTimerAlarm(); |
216 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
217 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
218 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
219 | 220 | ||
220 | /** options dialog made a changed to the configuration. we catch this | 221 | /** options dialog made a changed to the configuration. we catch this |
221 | * and notify all widgets which need to update their configuration. */ | 222 | * and notify all widgets which need to update their configuration. */ |
222 | void updateConfig(); | 223 | void updateConfig(); |
223 | 224 | ||
224 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
225 | const QStringList& anniversaryList, const QStringList& realNameList, | 226 | const QStringList& anniversaryList, const QStringList& realNameList, |
226 | const QStringList& emailList, const QStringList& assembledNameList, | 227 | const QStringList& emailList, const QStringList& assembledNameList, |
227 | const QStringList& uidList); | 228 | const QStringList& uidList); |
228 | 229 | ||
229 | /** | 230 | /** |
230 | Load calendar from file \a filename. If \a merge is true, load | 231 | Load calendar from file \a filename. If \a merge is true, load |
231 | calendar into existing one, if it is false, clear calendar, before | 232 | calendar into existing one, if it is false, clear calendar, before |
232 | loading. Return true, if calendar could be successfully loaded. | 233 | loading. Return true, if calendar could be successfully loaded. |
233 | */ | 234 | */ |
234 | bool openCalendar(QString filename, bool merge=false); | 235 | bool openCalendar(QString filename, bool merge=false); |
235 | bool loadCalendars(); | 236 | bool loadCalendars(); |
236 | bool saveCalendars(); | 237 | bool saveCalendars(); |