-rw-r--r-- | korganizer/journalentry.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 5269af7..2814c61 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -28,6 +28,6 @@ | |||
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qvbox.h> | 29 | #include <q3vbox.h> |
30 | #include <qfile.h> | 30 | #include <qfile.h> |
31 | #include <qdir.h> | 31 | #include <qdir.h> |
32 | #include <qtextstream.h> | 32 | #include <q3textstream.h> |
33 | #include <qtextcodec.h> | 33 | #include <qtextcodec.h> |
@@ -36,2 +36,9 @@ | |||
36 | #include <qapplication.h> | 36 | #include <qapplication.h> |
37 | #include <QDesktopWidget> | ||
38 | //Added by qt3to4: | ||
39 | #include <QResizeEvent> | ||
40 | #include <Q3Frame> | ||
41 | #include <QKeyEvent> | ||
42 | #include <QEvent> | ||
43 | #include <Q3VBoxLayout> | ||
37 | 44 | ||
@@ -59,3 +66,3 @@ | |||
59 | JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | 66 | JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : |
60 | QFrame(parent) | 67 | Q3Frame(parent) |
61 | { | 68 | { |
@@ -72,3 +79,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
72 | visibleMode = true; | 79 | visibleMode = true; |
73 | QHBox * vb = new QHBox ( this ); | 80 | Q3HBox * vb = new Q3HBox ( this ); |
74 | QPixmap iconp; | 81 | QPixmap iconp; |
@@ -131,3 +138,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
131 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); | 138 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); |
132 | QBoxLayout *topLayout = new QVBoxLayout(this); | 139 | Q3BoxLayout *topLayout = new Q3VBoxLayout(this); |
133 | topLayout->addWidget(vb); | 140 | topLayout->addWidget(vb); |
@@ -137,3 +144,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
137 | mTitle->installEventFilter(this); | 144 | mTitle->installEventFilter(this); |
138 | setFocusPolicy (QWidget::NoFocus); | 145 | setFocusPolicy (Qt::NoFocus); |
139 | 146 | ||
@@ -170,3 +177,3 @@ void JournalEntry::resizeEvent(QResizeEvent* e ) | |||
170 | #endif | 177 | #endif |
171 | QFrame::resizeEvent( e ); | 178 | Q3Frame::resizeEvent( e ); |
172 | } | 179 | } |
@@ -188,3 +195,3 @@ void JournalEntry::slotSaveTemplate() | |||
188 | QFile fileIn( fileName ); | 195 | QFile fileIn( fileName ); |
189 | if (!fileIn.open( IO_WriteOnly ) ) { | 196 | if (!fileIn.open( QIODevice::WriteOnly ) ) { |
190 | KMessageBox::error( this, i18n("Error saving template file\n '%1'.") | 197 | KMessageBox::error( this, i18n("Error saving template file\n '%1'.") |
@@ -194,3 +201,3 @@ void JournalEntry::slotSaveTemplate() | |||
194 | // QString text; | 201 | // QString text; |
195 | QTextStream tsIn( &fileIn ); | 202 | Q3TextStream tsIn( &fileIn ); |
196 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | 203 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); |
@@ -210,3 +217,3 @@ void JournalEntry::slotLoadTemplate() | |||
210 | QFile fileIn( fileName ); | 217 | QFile fileIn( fileName ); |
211 | if (!fileIn.open( IO_ReadOnly ) ) { | 218 | if (!fileIn.open( QIODevice::ReadOnly ) ) { |
212 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") | 219 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") |
@@ -215,3 +222,3 @@ void JournalEntry::slotLoadTemplate() | |||
215 | } | 222 | } |
216 | QTextStream tsIn( &fileIn ); | 223 | Q3TextStream tsIn( &fileIn ); |
217 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | 224 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); |
@@ -318,7 +325,7 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e ) | |||
318 | if ( isVisible() ) { | 325 | if ( isVisible() ) { |
319 | mEditor->setFocusPolicy (QWidget::StrongFocus); | 326 | mEditor->setFocusPolicy (Qt::StrongFocus); |
320 | mTitle->setFocusPolicy (QWidget::StrongFocus); | 327 | mTitle->setFocusPolicy (Qt::StrongFocus); |
321 | } else { | 328 | } else { |
322 | mEditor->setFocusPolicy (QWidget::NoFocus); | 329 | mEditor->setFocusPolicy (Qt::NoFocus); |
323 | mTitle->setFocusPolicy (QWidget::NoFocus); | 330 | mTitle->setFocusPolicy (Qt::NoFocus); |
324 | } | 331 | } |
@@ -337,3 +344,3 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e ) | |||
337 | 344 | ||
338 | return QFrame::eventFilter( o, e ); // standard event processing | 345 | return Q3Frame::eventFilter( o, e ); // standard event processing |
339 | } | 346 | } |