-rw-r--r-- | korganizer/journalentry.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index f1a1fef..85ad5df 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h | |||
@@ -1,75 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 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 | 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 | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 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 | 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. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef JOURNALENTRY_H | 23 | #ifndef JOURNALENTRY_H |
24 | #define JOURNALENTRY_H | 24 | #define JOURNALENTRY_H |
25 | // | 25 | // |
26 | // Widget showing one Journal entry | 26 | // Widget showing one Journal entry |
27 | 27 | ||
28 | #include <qframe.h> | 28 | #include <qframe.h> |
29 | 29 | ||
30 | #include <libkcal/calendar.h> | 30 | #include <libkcal/calendar.h> |
31 | 31 | ||
32 | class QLabel; | 32 | class QLabel; |
33 | class KTextEdit; | 33 | class KTextEdit; |
34 | 34 | ||
35 | using namespace KCal; | 35 | using namespace KCal; |
36 | 36 | ||
37 | class JournalEntry : public QFrame { | 37 | class JournalEntry : public QFrame { |
38 | Q_OBJECT | 38 | Q_OBJECT |
39 | public: | 39 | public: |
40 | JournalEntry(Calendar *,QWidget *parent); | 40 | JournalEntry(Calendar *,QWidget *parent); |
41 | virtual ~JournalEntry(); | 41 | virtual ~JournalEntry(); |
42 | 42 | ||
43 | void setJournal(Journal *); | 43 | void setJournal(Journal *); |
44 | Journal *journal() const; | 44 | Journal *journal() const; |
45 | 45 | ||
46 | void setDate(const QDate &); | 46 | void setDate(const QDate &); |
47 | 47 | ||
48 | void clear(); | 48 | void clear(); |
49 | 49 | ||
50 | void flushEntry(); | 50 | void flushEntry(); |
51 | void setShowOnly() {showOnlyMode = true;} | ||
51 | 52 | ||
52 | protected slots: | 53 | protected slots: |
53 | void slotSaveTemplate(); | 54 | void slotSaveTemplate(); |
54 | void slotLoadTemplate(); | 55 | void slotLoadTemplate(); |
55 | void setDirty(); | 56 | void setDirty(); |
57 | void toggleShowJournal(); | ||
56 | signals: | 58 | signals: |
57 | void deleteJournal(Journal *); | 59 | void deleteJournal(Journal *); |
60 | void newJournal(); | ||
61 | void showJournalOnly( Journal * ); | ||
58 | 62 | ||
59 | protected: | 63 | protected: |
60 | bool eventFilter( QObject *o, QEvent *e ); | 64 | bool eventFilter( QObject *o, QEvent *e ); |
61 | 65 | ||
62 | void writeJournal(); | 66 | void writeJournal(); |
63 | 67 | ||
64 | private: | 68 | private: |
69 | bool showOnlyMode; | ||
65 | Calendar *mCalendar; | 70 | Calendar *mCalendar; |
66 | Journal *mJournal; | 71 | Journal *mJournal; |
67 | QDate mDate; | 72 | QDate mDate; |
68 | void keyPressEvent ( QKeyEvent * ) ; | 73 | void keyPressEvent ( QKeyEvent * ) ; |
69 | QLabel *mTitleLabel; | 74 | QLabel *mTitleLabel; |
70 | KTextEdit *mEditor; | 75 | KTextEdit *mEditor; |
71 | 76 | ||
72 | bool mDirty; | 77 | bool mDirty; |
73 | }; | 78 | }; |
74 | 79 | ||
75 | #endif | 80 | #endif |