-rw-r--r-- | korganizer/journalentry.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index fb19fb1..ed04b7c 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h | |||
@@ -10,76 +10,77 @@ | |||
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 | class QComboBox; | ||
34 | class KLineEdit; | 35 | class KLineEdit; |
35 | class KOLocationBox; | 36 | class KOLocationBox; |
36 | 37 | ||
37 | using namespace KCal; | 38 | using namespace KCal; |
38 | 39 | ||
39 | class JournalEntry : public QFrame { | 40 | class JournalEntry : public QFrame { |
40 | Q_OBJECT | 41 | Q_OBJECT |
41 | public: | 42 | public: |
42 | JournalEntry(Calendar *,QWidget *parent); | 43 | JournalEntry(Calendar *,QWidget *parent); |
43 | virtual ~JournalEntry(); | 44 | virtual ~JournalEntry(); |
44 | 45 | ||
45 | void setJournal(Journal *); | 46 | void setJournal(Journal *, bool saveJournal = true ); |
46 | Journal *journal() const; | 47 | Journal *journal() const; |
47 | 48 | ||
48 | void setDate(const QDate &); | 49 | void setDate(const QDate &); |
49 | 50 | ||
50 | void clear(); | 51 | void clear(); |
51 | 52 | ||
52 | void flushEntry(); | 53 | void flushEntry(); |
53 | void setShowOnly(); | 54 | void setShowOnly(); |
54 | QSize sizeHint() const; | 55 | QSize sizeHint() const; |
55 | void setVisibleMode( bool b ) { visibleMode = b;} | 56 | void setVisibleMode( bool b ) { visibleMode = b;} |
56 | 57 | void fillCalendar( int id = 0 ); | |
57 | protected slots: | 58 | protected slots: |
58 | void slotSaveTemplate(); | 59 | void slotSaveTemplate(); |
59 | void slotLoadTemplate(); | 60 | void slotLoadTemplate(); |
60 | void toggleShowJournal(); | 61 | void toggleShowJournal(); |
61 | void setVisibleOn(); | 62 | void setVisibleOn(); |
62 | signals: | 63 | signals: |
63 | void deleteJournal(Journal *); | 64 | void deleteJournal(Journal *); |
64 | void newJournal(); | 65 | void newJournal(); |
65 | void showJournalOnly( Journal * ); | 66 | void showJournalOnly( Journal * ); |
66 | 67 | ||
67 | protected: | 68 | protected: |
68 | bool eventFilter( QObject *o, QEvent *e ); | 69 | bool eventFilter( QObject *o, QEvent *e ); |
69 | 70 | ||
70 | void writeJournal(); | 71 | void writeJournal(); |
71 | 72 | ||
72 | private: | 73 | private: |
73 | bool visibleMode; | 74 | bool visibleMode; |
74 | bool showOnlyMode; | 75 | bool showOnlyMode; |
75 | Calendar *mCalendar; | 76 | Calendar *mCalendar; |
76 | Journal *mJournal; | 77 | Journal *mJournal; |
77 | QDate mDate; | 78 | QDate mDate; |
78 | void keyPressEvent ( QKeyEvent * ) ; | 79 | void keyPressEvent ( QKeyEvent * ) ; |
79 | QLabel *mTitleLabel; | 80 | QComboBox *mCalendarBox; |
80 | KOLocationBox * mTitle; | 81 | KOLocationBox * mTitle; |
81 | KTextEdit *mEditor; | 82 | KTextEdit *mEditor; |
82 | int heiHint; | 83 | int heiHint; |
83 | }; | 84 | }; |
84 | 85 | ||
85 | #endif | 86 | #endif |