author | zautrix <zautrix> | 2005-06-25 16:06:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-25 16:06:31 (UTC) |
commit | 3867528ada39bb50a18802c499fbc3f6fae26e8c (patch) (side-by-side diff) | |
tree | 6b619b3bc6dea00e52648b4a394a61ab4ee8a072 /korganizer/koeditorrecurrence.h | |
parent | 49d8fe456ce284a512227a7ca9d4d49688a39cd2 (diff) | |
download | kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.zip kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.gz kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.bz2 |
fixxxxx
Diffstat (limited to 'korganizer/koeditorrecurrence.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorrecurrence.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index a15afcb..f398f62 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h @@ -82,243 +82,243 @@ class RecurWeekly : public RecurBase class RecurMonthly : public RecurBase { public: RecurMonthly( QWidget *parent = 0, const char *name = 0 ); void setByDay( int day ); void setByPos( int count, int weekday ); bool byDay(); bool byPos(); int day(); int count(); int weekday(); private: QRadioButton *mByDayRadio; QComboBox *mByDayCombo; QRadioButton *mByPosRadio; QComboBox *mByPosCountCombo; QComboBox *mByPosWeekdayCombo; }; class RecurYearly : public RecurBase { public: RecurYearly( QWidget *parent = 0, const char *name = 0 ); void setByDay( int doy ); void setByMonth( int month, int day ); bool byMonth(); bool byDay(); int month(); int day(); private: int mDay; QRadioButton *mByMonthRadio; QComboBox *mByMonthCombo; QLabel* mByDayLabel; QLabel* mDayOfLabel; QRadioButton *mByDayRadio; }; class RecurrenceChooser : public QWidget { Q_OBJECT public: RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); enum { Daily, Weekly, Monthly, Yearly }; void setType( int ); int type(); signals: void chosen( int ); protected slots: void emitChoice(); private: QComboBox *mTypeCombo; QRadioButton *mDailyButton; QRadioButton *mWeeklyButton; QRadioButton *mMonthlyButton; QRadioButton *mYearlyButton; }; class ExceptionsBase { public: virtual void setDefaults( const QDateTime &from ) = 0; virtual void setDates( const DateList & ) = 0; virtual DateList dates() = 0; }; class ExceptionsWidget : public QWidget, public ExceptionsBase { Q_OBJECT public: ExceptionsWidget( QWidget *parent = 0, const char *name = 0 ); void setDefaults( const QDateTime &from ); void setDates( const DateList & ); DateList dates(); protected slots: void addException(); void changeException(); void deleteException(); private: KDateEdit *mExceptionDateEdit; QListBox *mExceptionList; DateList mExceptionDates; }; class ExceptionsDialog : public KDialogBase, public ExceptionsBase { public: ExceptionsDialog( QWidget *parent, const char *name = 0 ); void setDefaults( const QDateTime &from ); void setDates( const DateList & ); DateList dates(); private: ExceptionsWidget *mExceptions; }; class RecurrenceRangeBase { public: virtual void setDefaults( const QDateTime &from ) = 0; virtual void setDuration( int ) = 0; virtual int duration() = 0; 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 ); 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: QGroupBox *mRangeGroupBox; QLabel *mStartDateLabel; QRadioButton *mNoEndDateButton; QRadioButton *mEndDurationButton; QSpinBox *mEndDurationEdit; QRadioButton *mEndDateButton; KDateEdit *mEndDateEdit; }; class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase { public: RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 ); 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() ); private: RecurrenceRangeWidget *mRecurrenceRangeWidget; }; class KOEditorRecurrence : public QWidget { Q_OBJECT public: KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 ); virtual ~KOEditorRecurrence(); enum { Daily, Weekly, Monthly, Yearly }; - /** Set widgets to default values */ - void setDefaults( QDateTime from, QDateTime to, bool allday ); /** Read event object and setup widgets accordingly */ void readEvent( Incidence * ); /** Write event settings to event object */ void writeEvent( Incidence * ); /** Check if the input is valid. */ bool validateInput(); public slots: + void setDefaultsDates( QDateTime from, QDateTime to ); + void setDefaults( QDateTime from, QDateTime to ); void setEnabled( bool ); void setDateTimes( QDateTime start, QDateTime end ); void setDateTimeStr( const QString & ); signals: void dateTimesChanged( QDateTime start, QDateTime end ); protected slots: void showCurrentRule( int ); void showExceptionsDialog(); void showRecurrenceRangeDialog(); private: QCheckBox *mEnabledCheck; QGroupBox *mTimeGroupBox; QLabel *mDateTimeLabel; QGroupBox *mRuleBox; QWidgetStack *mRuleStack; RecurrenceChooser *mRecurrenceChooser; RecurDaily *mDaily; RecurWeekly *mWeekly; RecurMonthly *mMonthly; RecurYearly *mYearly; RecurrenceRangeBase *mRecurrenceRange; RecurrenceRangeWidget *mRecurrenceRangeWidget; RecurrenceRangeDialog *mRecurrenceRangeDialog; QPushButton *mRecurrenceRangeButton; ExceptionsBase *mExceptions; ExceptionsDialog *mExceptionsDialog; ExceptionsWidget *mExceptionsWidget; QPushButton *mExceptionsButton; }; #endif |