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/koincidenceeditor.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
Diffstat (limited to 'korganizer/koincidenceeditor.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koincidenceeditor.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h new file mode 100644 index 0000000..bfd6cc6 --- a/dev/null +++ b/korganizer/koincidenceeditor.h | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | This file is part of KOrganizer. | ||
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | As a special exception, permission is given to link this program | ||
20 | with any edition of Qt, and distribute the resulting executable, | ||
21 | without including the source code for Qt in the source distribution. | ||
22 | */ | ||
23 | #ifndef KOINCIDENCEEDITOR_H | ||
24 | #define KOINCIDENCEEDITOR_H | ||
25 | |||
26 | #include <kdialogbase.h> | ||
27 | |||
28 | #include <libkcal/calendar.h> | ||
29 | |||
30 | #include "koeditordetails.h" | ||
31 | #include "savetemplatedialog.h" | ||
32 | |||
33 | class QDateTime; | ||
34 | namespace KPIM { class CategorySelectDialog; } | ||
35 | |||
36 | using namespace KCal; | ||
37 | |||
38 | /** | ||
39 | This is the base class for the calendar component editors. | ||
40 | */ | ||
41 | class KOIncidenceEditor : public KDialogBase | ||
42 | { | ||
43 | Q_OBJECT | ||
44 | public: | ||
45 | /** | ||
46 | Construct new IncidenceEditor. | ||
47 | */ | ||
48 | KOIncidenceEditor( const QString &caption, Calendar *calendar, | ||
49 | QWidget *parent ); | ||
50 | virtual ~KOIncidenceEditor(); | ||
51 | |||
52 | /** Initialize editor. This function creates the tab widgets. */ | ||
53 | virtual void init() = 0; | ||
54 | void accept(); | ||
55 | virtual void setCategories( QString )= 0; | ||
56 | |||
57 | virtual void reload() = 0; | ||
58 | |||
59 | public slots: | ||
60 | void updateCategoryConfig(); | ||
61 | |||
62 | signals: | ||
63 | void editCategories(); | ||
64 | void showAgendaView( bool ); | ||
65 | void dialogClose( Incidence * ); | ||
66 | void jumpToTime( const QDate & ); | ||
67 | |||
68 | protected slots: | ||
69 | void slotApply(); | ||
70 | void slotOk(); | ||
71 | void slotCancel(); | ||
72 | void slotShowIncidence(); | ||
73 | |||
74 | virtual void slotLoadTemplate(); | ||
75 | virtual void slotSaveTemplate(); | ||
76 | |||
77 | virtual void saveTemplate( const QString & ) = 0; | ||
78 | |||
79 | protected: | ||
80 | void setupAttendeesTab(); | ||
81 | |||
82 | void createSaveTemplateDialog( SaveTemplateDialog::IncidenceType ); | ||
83 | |||
84 | QString loadTemplate( Calendar *cal, const QString &type, | ||
85 | const QStringList &templates ); | ||
86 | void saveAsTemplate( Incidence *, const QString &name ); | ||
87 | |||
88 | /** | ||
89 | Process user input and create or update event. Returns false if input is invalid. | ||
90 | */ | ||
91 | virtual bool processInput( bool emitTime ) { return false; } | ||
92 | |||
93 | Calendar *mCalendar; | ||
94 | |||
95 | //KPIM::CategorySelectDialog *mCategoryDialog; | ||
96 | |||
97 | KOEditorDetails *mDetails; | ||
98 | |||
99 | private: | ||
100 | SaveTemplateDialog *mSaveTemplateDialog; | ||
101 | }; | ||
102 | |||
103 | #endif | ||
104 | |||
105 | |||