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