Diffstat (limited to 'korganizer/koeditorrecurrence.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorrecurrence.cpp | 94 |
1 files changed, 51 insertions, 43 deletions
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index e0380c4..e0ae3a0 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp | |||
@@ -24,10 +24,10 @@ | |||
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 <qlistbox.h> | 32 | #include <q3listbox.h> |
33 | #include <qspinbox.h> | 33 | #include <qspinbox.h> |
@@ -35,2 +35,10 @@ | |||
35 | #include <qapplication.h> | 35 | #include <qapplication.h> |
36 | #include <QDesktopWidget> | ||
37 | //Added by qt3to4: | ||
38 | #include <Q3HBoxLayout> | ||
39 | #include <QLabel> | ||
40 | #include <Q3GridLayout> | ||
41 | #include <Q3PtrList> | ||
42 | #include <Q3Frame> | ||
43 | #include <Q3VBoxLayout> | ||
36 | 44 | ||
@@ -83,3 +91,3 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) : | |||
83 | { | 91 | { |
84 | QBoxLayout *topLayout = new QHBoxLayout( this ); | 92 | Q3BoxLayout *topLayout = new Q3HBoxLayout( this ); |
85 | topLayout->setSpacing( KDialog::spacingHint() ); | 93 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -102,3 +110,3 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : | |||
102 | { | 110 | { |
103 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 111 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
104 | topLayout->setSpacing( KDialog::spacingHint() ); | 112 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -108,3 +116,3 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : | |||
108 | 116 | ||
109 | QBoxLayout *weeksLayout = new QHBoxLayout( topLayout ); | 117 | Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout ); |
110 | 118 | ||
@@ -118,4 +126,4 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : | |||
118 | 126 | ||
119 | QHBox *dayBox = new QHBox( this ); | 127 | Q3HBox *dayBox = new Q3HBox( this ); |
120 | topLayout->addWidget( dayBox, 1, AlignVCenter ); | 128 | topLayout->addWidget( dayBox, 1, Qt::AlignVCenter ); |
121 | // TODO: Respect start of week setting | 129 | // TODO: Respect start of week setting |
@@ -158,3 +166,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : | |||
158 | { | 166 | { |
159 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 167 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
160 | topLayout->setSpacing( KDialog::spacingHint() ); | 168 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -163,3 +171,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : | |||
163 | 171 | ||
164 | QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); | 172 | Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); |
165 | 173 | ||
@@ -174,7 +182,7 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : | |||
174 | 182 | ||
175 | QButtonGroup *buttonGroup = new QButtonGroup( this ); | 183 | Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this ); |
176 | buttonGroup->setFrameStyle( QFrame::NoFrame ); | 184 | buttonGroup->setFrameStyle( Q3Frame::NoFrame ); |
177 | topLayout->addWidget( buttonGroup, 1, AlignVCenter ); | 185 | topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter ); |
178 | 186 | ||
179 | QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 ); | 187 | Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 3, 2 ); |
180 | buttonLayout->setSpacing( KDialog::spacingHint() ); | 188 | buttonLayout->setSpacing( KDialog::spacingHint() ); |
@@ -191,3 +199,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : | |||
191 | 199 | ||
192 | mByDayCombo = new QComboBox( buttonGroup ); | 200 | mByDayCombo = new Q3ComboBox( buttonGroup ); |
193 | mByDayCombo->setSizeLimit( 7 ); | 201 | mByDayCombo->setSizeLimit( 7 ); |
@@ -295,3 +303,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : | |||
295 | { | 303 | { |
296 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 304 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
297 | topLayout->setSpacing( KDialog::spacingHint() ); | 305 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -300,3 +308,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : | |||
300 | 308 | ||
301 | QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); | 309 | Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); |
302 | 310 | ||
@@ -311,7 +319,7 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : | |||
311 | 319 | ||
312 | QButtonGroup *buttonGroup = new QButtonGroup( this ); | 320 | Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this ); |
313 | buttonGroup->setFrameStyle( QFrame::NoFrame ); | 321 | buttonGroup->setFrameStyle( Q3Frame::NoFrame ); |
314 | topLayout->addWidget( buttonGroup, 1, AlignVCenter ); | 322 | topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter ); |
315 | 323 | ||
316 | QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 2, 3 ); | 324 | Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 2, 3 ); |
317 | 325 | ||
@@ -322,3 +330,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : | |||
322 | buttonLayout->addWidget( mByDayLabel, 0, 1 ); | 330 | buttonLayout->addWidget( mByDayLabel, 0, 1 ); |
323 | mByMonthCombo = new QComboBox( buttonGroup ); | 331 | mByMonthCombo = new Q3ComboBox( buttonGroup ); |
324 | mByMonthCombo->insertItem( i18n("January") ); | 332 | mByMonthCombo->insertItem( i18n("January") ); |
@@ -385,5 +393,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : | |||
385 | { | 393 | { |
386 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 394 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
387 | 395 | ||
388 | QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"), | 396 | Q3GroupBox *groupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Exceptions"), |
389 | this ); | 397 | this ); |
@@ -393,3 +401,3 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : | |||
393 | 401 | ||
394 | QGridLayout *boxLayout = new QGridLayout( box ); | 402 | Q3GridLayout *boxLayout = new Q3GridLayout( box ); |
395 | 403 | ||
@@ -405,3 +413,3 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : | |||
405 | 413 | ||
406 | mExceptionList = new QListBox( box ); | 414 | mExceptionList = new Q3ListBox( box ); |
407 | boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); | 415 | boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); |
@@ -508,5 +516,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, | |||
508 | { | 516 | { |
509 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 517 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
510 | 518 | ||
511 | mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), | 519 | mRangeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Range"), |
512 | this ); | 520 | this ); |
@@ -515,3 +523,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, | |||
515 | QWidget *rangeBox = new QWidget( mRangeGroupBox ); | 523 | QWidget *rangeBox = new QWidget( mRangeGroupBox ); |
516 | QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); | 524 | Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox ); |
517 | rangeLayout->setSpacing( KDialog::spacingHint() ); | 525 | rangeLayout->setSpacing( KDialog::spacingHint() ); |
@@ -522,3 +530,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, | |||
522 | 530 | ||
523 | mRangeButtonGroup = new QButtonGroup; | 531 | mRangeButtonGroup = new Q3ButtonGroup; |
524 | 532 | ||
@@ -528,3 +536,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, | |||
528 | 536 | ||
529 | QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); | 537 | Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout ); |
530 | durationLayout->setSpacing( KDialog::spacingHint() ); | 538 | durationLayout->setSpacing( KDialog::spacingHint() ); |
@@ -541,3 +549,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, | |||
541 | 549 | ||
542 | QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); | 550 | Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout ); |
543 | endDateLayout->setSpacing( KDialog::spacingHint() ); | 551 | endDateLayout->setSpacing( KDialog::spacingHint() ); |
@@ -668,3 +676,3 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : | |||
668 | { | 676 | { |
669 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 677 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
670 | 678 | ||
@@ -727,3 +735,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : | |||
727 | { | 735 | { |
728 | QGridLayout *topLayout = new QGridLayout( this, 2,2 ); | 736 | Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 ); |
729 | topLayout->setSpacing( KDialog::spacingHint() ); | 737 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -737,3 +745,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : | |||
737 | 745 | ||
738 | mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), | 746 | mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"), |
739 | this ); | 747 | this ); |
@@ -754,3 +762,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : | |||
754 | //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); | 762 | //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); |
755 | mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); | 763 | mRuleBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Rule"), this ); |
756 | topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); | 764 | topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); |
@@ -761,3 +769,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : | |||
761 | 769 | ||
762 | mRuleStack = new QWidgetStack( mRuleBox ); | 770 | mRuleStack = new Q3WidgetStack( mRuleBox ); |
763 | 771 | ||
@@ -898,4 +906,4 @@ void KOEditorRecurrence::readEvent(Incidence *event) | |||
898 | QBitArray rDays( 7 ); | 906 | QBitArray rDays( 7 ); |
899 | QPtrList<Recurrence::rMonthPos> rmp; | 907 | Q3PtrList<Recurrence::rMonthPos> rmp; |
900 | QPtrList<int> rmd; | 908 | Q3PtrList<int> rmd; |
901 | int day = 0; | 909 | int day = 0; |
@@ -970,3 +978,3 @@ void KOEditorRecurrence::readEvent(Incidence *event) | |||
970 | //qDebug("2day = %d ",day ); | 978 | //qDebug("2day = %d ",day ); |
971 | QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); | 979 | Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); |
972 | int month; | 980 | int month; |