Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index d32d5a5..baee9fc 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -21,16 +21,23 @@ | |||
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 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qfiledialog.h> | 25 | #include <q3filedialog.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qvbox.h> | 27 | #include <q3vbox.h> |
28 | #include <qbuttongroup.h> | 28 | #include <q3buttongroup.h> |
29 | #include <qvgroupbox.h> | 29 | #include <q3vgroupbox.h> |
30 | #include <qwidgetstack.h> | 30 | #include <q3widgetstack.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | #include <QDesktopWidget> | ||
34 | //Added by qt3to4: | ||
35 | #include <Q3HBoxLayout> | ||
36 | #include <Q3GridLayout> | ||
37 | #include <Q3Frame> | ||
38 | #include <QLabel> | ||
39 | #include <Q3VBoxLayout> | ||
33 | 40 | ||
34 | #include <kglobal.h> | 41 | #include <kglobal.h> |
35 | #include <klocale.h> | 42 | #include <klocale.h> |
36 | #include <kiconloader.h> | 43 | #include <kiconloader.h> |
@@ -81,20 +88,20 @@ void KOEditorGeneralTodo::finishSetup() | |||
81 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 88 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
82 | mSummaryEdit->setFocus(); | 89 | mSummaryEdit->setFocus(); |
83 | } | 90 | } |
84 | 91 | ||
85 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | 92 | void KOEditorGeneralTodo::initTime(QWidget *parent,Q3BoxLayout *topLayout) |
86 | { | 93 | { |
87 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); | 94 | Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout); |
88 | 95 | ||
89 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, | 96 | Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal, |
90 | i18n("Date && Time"),parent); | 97 | i18n("Date && Time"),parent); |
91 | timeLayout->addWidget(timeGroupBox); | 98 | timeLayout->addWidget(timeGroupBox); |
92 | timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); | 99 | timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); |
93 | timeGroupBox->layout()->setMargin( KDialog::marginHint() ); | 100 | timeGroupBox->layout()->setMargin( KDialog::marginHint() ); |
94 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); | 101 | Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox); |
95 | 102 | ||
96 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); | 103 | Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,3,3); |
97 | layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); | 104 | layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); |
98 | layoutTimeBox->setColStretch( 1, 1 ); | 105 | layoutTimeBox->setColStretch( 1, 1 ); |
99 | 106 | ||
100 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | 107 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); |
@@ -132,9 +139,9 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | |||
132 | //layoutTimeBox->setColStretch(3,1); | 139 | //layoutTimeBox->setColStretch(3,1); |
133 | } | 140 | } |
134 | 141 | ||
135 | 142 | ||
136 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 143 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout) |
137 | { | 144 | { |
138 | mCompletedCombo = new QComboBox(parent); | 145 | mCompletedCombo = new QComboBox(parent); |
139 | // xgettext:no-c-format | 146 | // xgettext:no-c-format |
140 | mCompletedCombo->insertItem(i18n(" 0 %")); | 147 | mCompletedCombo->insertItem(i18n(" 0 %")); |
@@ -172,12 +179,12 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | |||
172 | topLayout->setSpacing( 0 ); | 179 | topLayout->setSpacing( 0 ); |
173 | } | 180 | } |
174 | } | 181 | } |
175 | 182 | ||
176 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) | 183 | void KOEditorGeneralTodo::initPriority(QWidget *parent, Q3BoxLayout *topLayout) |
177 | { | 184 | { |
178 | 185 | ||
179 | QHBox* h = new QHBox ( parent ); | 186 | Q3HBox* h = new Q3HBox ( parent ); |
180 | topLayout->addWidget( h ); | 187 | topLayout->addWidget( h ); |
181 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); | 188 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); |
182 | // topLayout->addWidget(priorityLabel); | 189 | // topLayout->addWidget(priorityLabel); |
183 | mPriorityCombo = new QComboBox( h ); | 190 | mPriorityCombo = new QComboBox( h ); |
@@ -188,11 +195,11 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) | |||
188 | mPriorityCombo->insertItem(i18n("5 (low)")); | 195 | mPriorityCombo->insertItem(i18n("5 (low)")); |
189 | //topLayout->addWidget(mPriorityCombo); | 196 | //topLayout->addWidget(mPriorityCombo); |
190 | } | 197 | } |
191 | 198 | ||
192 | void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) | 199 | void KOEditorGeneralTodo::initStatus(QWidget *parent,Q3BoxLayout *topLayout) |
193 | { | 200 | { |
194 | QBoxLayout *statusLayout = new QHBoxLayout(topLayout); | 201 | Q3BoxLayout *statusLayout = new Q3HBoxLayout(topLayout); |
195 | 202 | ||
196 | initCompletion( parent, statusLayout ); | 203 | initCompletion( parent, statusLayout ); |
197 | 204 | ||
198 | statusLayout->addStretch( 1 ); | 205 | statusLayout->addStretch( 1 ); |
@@ -395,9 +402,9 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable ) | |||
395 | } | 402 | } |
396 | void KOEditorGeneralTodo::startDateChanged(QDate newdate) | 403 | void KOEditorGeneralTodo::startDateChanged(QDate newdate) |
397 | { | 404 | { |
398 | if ( mDueCheck->isChecked() ) | 405 | if ( mDueCheck->isChecked() ) |
399 | emit dateTimesChanged(newdate,mDueDateEdit->date()); | 406 | emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date()); |
400 | } | 407 | } |
401 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) | 408 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) |
402 | { | 409 | { |
403 | if(mStartCheck->isChecked()) { | 410 | if(mStartCheck->isChecked()) { |