author | zautrix <zautrix> | 2005-07-29 20:08:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-29 20:08:52 (UTC) |
commit | e287df45507793e2e5ad16085a858153f3798941 (patch) (side-by-side diff) | |
tree | f91ff66a8ac59254b9a0158e55d6254ca2928d75 /korganizer | |
parent | 48a8fa71f1985fea9df4981808796ef65f0f974a (diff) | |
download | kdepimpi-e287df45507793e2e5ad16085a858153f3798941.zip kdepimpi-e287df45507793e2e5ad16085a858153f3798941.tar.gz kdepimpi-e287df45507793e2e5ad16085a858153f3798941.tar.bz2 |
fixx
-rw-r--r-- | korganizer/koeditorrecurrence.cpp | 12 | ||||
-rw-r--r-- | korganizer/koeditorrecurrence.h | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index 89504db..0e74a99 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -509,63 +509,67 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), this ); topLayout->addWidget( mRangeGroupBox ); QWidget *rangeBox = new QWidget( mRangeGroupBox ); QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); rangeLayout->setSpacing( KDialog::spacingHint() ); rangeLayout->setMargin( KDialog::marginHintSmall() ); mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox ); rangeLayout->addWidget( mStartDateLabel ); - QButtonGroup *rangeButtonGroup = new QButtonGroup; + mRangeButtonGroup = new QButtonGroup; mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox ); - rangeButtonGroup->insert( mNoEndDateButton ); + mRangeButtonGroup->insert( mNoEndDateButton ); rangeLayout->addWidget( mNoEndDateButton ); QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); durationLayout->setSpacing( KDialog::spacingHint() ); mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox ); - rangeButtonGroup->insert( mEndDurationButton ); + mRangeButtonGroup->insert( mEndDurationButton ); durationLayout->addWidget( mEndDurationButton ); mEndDurationEdit = new QSpinBox( 1, 9999, 1, rangeBox ); durationLayout->addWidget( mEndDurationEdit ); QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox ); durationLayout ->addWidget( endDurationLabel ); QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); endDateLayout->setSpacing( KDialog::spacingHint() ); mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox ); - rangeButtonGroup->insert( mEndDateButton ); + mRangeButtonGroup->insert( mEndDateButton ); endDateLayout->addWidget( mEndDateButton ); mEndDateEdit = new KDateEdit( rangeBox ); endDateLayout->addWidget( mEndDateEdit ); //endDateLayout->addStretch( 1 ); connect( mNoEndDateButton, SIGNAL( toggled( bool ) ), SLOT( showCurrentRange() ) ); connect( mEndDurationButton, SIGNAL( toggled( bool ) ), SLOT( showCurrentRange() ) ); connect( mEndDateButton, SIGNAL( toggled( bool ) ), SLOT( showCurrentRange() ) ); } +RecurrenceRangeWidget::~RecurrenceRangeWidget() +{ + delete mRangeButtonGroup; +} void RecurrenceRangeWidget::setDefaults( const QDateTime &from ) { mNoEndDateButton->setChecked( true ); setDateTimes( from ); mEndDateEdit->setDate( from.date() ); } void RecurrenceRangeWidget::setDuration( int duration ) { if ( duration == -1 ) { mNoEndDateButton->setChecked( true ); diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index f398f62..75e0c73 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h @@ -24,24 +24,25 @@ #define _KOEDITORRECURRENCE_H #include <qframe.h> #include <qlabel.h> #include <qcheckbox.h> #include <qpushbutton.h> #include <qgroupbox.h> #include <qlineedit.h> #include <qcombobox.h> #include <qmultilineedit.h> #include <qlistview.h> #include <qradiobutton.h> +#include <qbuttongroup.h> #include <kdialogbase.h> #include <libkcal/event.h> #include "ktimeedit.h" class QWidgetStack; class QSpinBox; class KDateEdit; @@ -208,40 +209,42 @@ class RecurrenceRangeBase virtual void setEndDate( const QDate & ) = 0; virtual QDate endDate() = 0; virtual void setDateTimes( const QDateTime &start, const QDateTime &end = QDateTime() ) = 0; }; class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase { Q_OBJECT public: RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 ); + ~RecurrenceRangeWidget(); void setDefaults( const QDateTime &from ); void setDuration( int ); int duration(); void setEndDate( const QDate & ); QDate endDate(); void setDateTimes( const QDateTime &start, const QDateTime &end = QDateTime() ); protected slots: void showCurrentRange(); private: + QButtonGroup *mRangeButtonGroup; QGroupBox *mRangeGroupBox; QLabel *mStartDateLabel; QRadioButton *mNoEndDateButton; QRadioButton *mEndDurationButton; QSpinBox *mEndDurationEdit; QRadioButton *mEndDateButton; KDateEdit *mEndDateEdit; }; class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase { public: |