-rw-r--r-- | korganizer/journalentry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index d1d7946..7af5cf4 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -1,90 +1,90 @@ | |||
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 | 23 | ||
24 | // | 24 | // |
25 | // Journal Entry | 25 | // Journal Entry |
26 | 26 | ||
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | 29 | ||
30 | #include <kdebug.h> | 30 | #include <kdebug.h> |
31 | #include <kglobal.h> | 31 | #include <kglobal.h> |
32 | #include <klocale.h> | 32 | #include <klocale.h> |
33 | #include <ktextedit.h> | 33 | #include <ktextedit.h> |
34 | #include "koprefs.h" | 34 | #include "koprefs.h" |
35 | 35 | ||
36 | #include <libkcal/journal.h> | 36 | #include <libkcal/journal.h> |
37 | #include <libkcal/calendarresources.h> | 37 | #include <libkcal/calendarresources.h> |
38 | #include <libkcal/resourcecalendar.h> | 38 | #include <libkcal/resourcecalendar.h> |
39 | #include <kresources/resourceselectdialog.h> | 39 | #include <kresources/resourceselectdialog.h> |
40 | 40 | ||
41 | #include "journalentry.h" | 41 | #include "journalentry.h" |
42 | #include "journalentry.moc" | 42 | //#include "journalentry.moc" |
43 | #ifndef DESKTOP_VERSION | 43 | #ifndef DESKTOP_VERSION |
44 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
45 | #endif | 45 | #endif |
46 | JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | 46 | JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : |
47 | QFrame(parent) | 47 | QFrame(parent) |
48 | { | 48 | { |
49 | mCalendar = calendar; | 49 | mCalendar = calendar; |
50 | mJournal = 0; | 50 | mJournal = 0; |
51 | mDirty = false; | 51 | mDirty = false; |
52 | 52 | ||
53 | mTitleLabel = new QLabel(i18n("Title"),this); | 53 | mTitleLabel = new QLabel(i18n("Title"),this); |
54 | mTitleLabel->setMargin(2); | 54 | mTitleLabel->setMargin(2); |
55 | mTitleLabel->setAlignment(AlignCenter); | 55 | mTitleLabel->setAlignment(AlignCenter); |
56 | 56 | ||
57 | mEditor = new KTextEdit(this); | 57 | mEditor = new KTextEdit(this); |
58 | connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty())); | 58 | connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty())); |
59 | #ifndef DESKTOP_VERSION | 59 | #ifndef DESKTOP_VERSION |
60 | QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); | 60 | QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); |
61 | #endif | 61 | #endif |
62 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); | 62 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); |
63 | QBoxLayout *topLayout = new QVBoxLayout(this); | 63 | QBoxLayout *topLayout = new QVBoxLayout(this); |
64 | topLayout->addWidget(mTitleLabel); | 64 | topLayout->addWidget(mTitleLabel); |
65 | topLayout->addWidget(mEditor); | 65 | topLayout->addWidget(mEditor); |
66 | mEditor->installEventFilter(this); | 66 | mEditor->installEventFilter(this); |
67 | } | 67 | } |
68 | 68 | ||
69 | JournalEntry::~JournalEntry() | 69 | JournalEntry::~JournalEntry() |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
73 | void JournalEntry::setDate(const QDate &date) | 73 | void JournalEntry::setDate(const QDate &date) |
74 | { | 74 | { |
75 | writeJournal(); | 75 | writeJournal(); |
76 | 76 | ||
77 | mTitleLabel->setText(KGlobal::locale()->formatDate(date)); | 77 | mTitleLabel->setText(KGlobal::locale()->formatDate(date)); |
78 | 78 | ||
79 | 79 | ||
80 | mDate = date; | 80 | mDate = date; |
81 | } | 81 | } |
82 | 82 | ||
83 | void JournalEntry::setJournal(Journal *journal) | 83 | void JournalEntry::setJournal(Journal *journal) |
84 | { | 84 | { |
85 | writeJournal(); | 85 | writeJournal(); |
86 | 86 | ||
87 | mJournal = journal; | 87 | mJournal = journal; |
88 | 88 | ||
89 | mEditor->setText(mJournal->description()); | 89 | mEditor->setText(mJournal->description()); |
90 | 90 | ||