summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneralevent.cpp
Unidiff
Diffstat (limited to 'korganizer/koeditorgeneralevent.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index d4aa78c..3b2a276 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -121,48 +121,51 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
121 mNoTimeButton = new QCheckBox(i18n("All day event"),duration); 121 mNoTimeButton = new QCheckBox(i18n("All day event"),duration);
122 flagsBox->addWidget(mNoTimeButton); 122 flagsBox->addWidget(mNoTimeButton);
123 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); 123 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool)));
124 mDurationLabel = new QLabel( duration ); 124 mDurationLabel = new QLabel( duration );
125 // if ( KOPrefs::instance()->mCompactDialogs ) { 125 // if ( KOPrefs::instance()->mCompactDialogs ) {
126 //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 ); 126 //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 );
127 //} else { 127 //} else {
128 flagsBox->addWidget( mDurationLabel ); 128 flagsBox->addWidget( mDurationLabel );
129 //} 129 //}
130 flagsBox->setStretchFactor(mDurationLabel, 10 ); 130 flagsBox->setStretchFactor(mDurationLabel, 10 );
131 mDurationLabel->setAlignment( AlignRight | AlignVCenter); 131 mDurationLabel->setAlignment( AlignRight | AlignVCenter);
132 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); 132 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 );
133 133
134 // time widgets are checked if they contain a valid time 134 // time widgets are checked if they contain a valid time
135 connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), 135 connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)),
136 this, SLOT(startTimeChanged(QTime))); 136 this, SLOT(startTimeChanged(QTime)));
137 connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), 137 connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)),
138 this, SLOT(endTimeChanged(QTime))); 138 this, SLOT(endTimeChanged(QTime)));
139 139
140 // date widgets are checked if they contain a valid date 140 // date widgets are checked if they contain a valid date
141 connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), 141 connect(mStartDateEdit, SIGNAL(dateChanged(QDate)),
142 this, SLOT(startDateChanged(QDate))); 142 this, SLOT(startDateChanged(QDate)));
143 connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), 143 connect(mEndDateEdit, SIGNAL(dateChanged(QDate)),
144 this, SLOT(endDateChanged(QDate))); 144 this, SLOT(endDateChanged(QDate)));
145 connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime)));
146 connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),mEndTimeEdit,SLOT(setTime(QTime)));
147
145} 148}
146 149
147void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) 150void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout)
148{ 151{
149 QBoxLayout *classLayout = new QHBoxLayout(topLayout); 152 QBoxLayout *classLayout = new QHBoxLayout(topLayout);
150 153
151 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); 154 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent);
152 classLayout->addWidget(freeTimeLabel); 155 classLayout->addWidget(freeTimeLabel);
153 156
154 mFreeTimeCombo = new QComboBox(false, parent); 157 mFreeTimeCombo = new QComboBox(false, parent);
155 mFreeTimeCombo->insertItem(i18n("Busy")); 158 mFreeTimeCombo->insertItem(i18n("Busy"));
156 mFreeTimeCombo->insertItem(i18n("Free")); 159 mFreeTimeCombo->insertItem(i18n("Free"));
157 classLayout->addWidget(mFreeTimeCombo); 160 classLayout->addWidget(mFreeTimeCombo);
158} 161}
159 162
160void KOEditorGeneralEvent::timeStuffDisable(bool disable) 163void KOEditorGeneralEvent::timeStuffDisable(bool disable)
161{ 164{
162 mStartTimeEdit->setEnabled( !disable ); 165 mStartTimeEdit->setEnabled( !disable );
163 mEndTimeEdit->setEnabled( !disable ); 166 mEndTimeEdit->setEnabled( !disable );
164 167
165 setDuration(); 168 setDuration();
166 emitDateTimeStr(); 169 emitDateTimeStr();
167} 170}
168 171