koeditorrecurrence.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _KOEDITORRECURRENCE_H
00024 #define _KOEDITORRECURRENCE_H
00025
00026 #include <qframe.h>
00027 #include <qlabel.h>
00028 #include <qcheckbox.h>
00029 #include <qpushbutton.h>
00030 #include <qgroupbox.h>
00031 #include <qlineedit.h>
00032 #include <qcombobox.h>
00033 #include <qmultilineedit.h>
00034 #include <qlistview.h>
00035 #include <qradiobutton.h>
00036
00037 #include <libkcal/event.h>
00038
00039 #include "ktimeedit.h"
00040
00041 class QWidgetStack;
00042
00043 class KDateEdit;
00044
00045 using namespace KCal;
00046
00047 class KOEditorRecurrence : public QWidget
00048 {
00049 Q_OBJECT
00050 public:
00051 KOEditorRecurrence (int spacing=8,QWidget* parent=0,const char* name=0);
00052 virtual ~KOEditorRecurrence();
00053
00055 void setDefaults(QDateTime from,QDateTime to,bool allday);
00057 void readEvent(Event *);
00059 void writeEvent(Event *);
00060
00062 bool validateInput();
00063
00064 public slots:
00065 virtual void setEnabled(bool);
00066 void setDateTimes(QDateTime start,QDateTime end);
00067 void setDateTimeStr(const QString &);
00068
00069 signals:
00070 void dateTimesChanged(QDateTime start,QDateTime end);
00071
00072 protected slots:
00073 void showDaily(bool);
00074 void showWeekly(bool);
00075 void showMonthly(bool);
00076 void showYearly(bool);
00077 void disableRange(bool);
00078 void enableDurationRange(bool);
00079 void enableDateRange(bool);
00080 void addException();
00081 void changeException();
00082 void deleteException();
00083
00084 protected:
00085 void unsetAllCheckboxes();
00086 void checkDay(int day);
00087 void getCheckedDays(QBitArray &rDays);
00088 void setCheckedDays(QBitArray &rDays);
00089
00090 void initMain();
00091 void initDaily();
00092 void initWeekly();
00093 void initMonthly();
00094 void initYearly();
00095 void initExceptions();
00096
00097 void initLayout();
00098
00099 private:
00100
00101
00102
00103 QGroupBox* timeGroupBox;
00104 QLabel *dateTimeLabel;
00105
00106
00107 QGroupBox* ruleGroupBox;
00108 QFrame* ruleFrame;
00109 QWidgetStack* ruleStack;
00110 QButtonGroup* ruleButtonGroup;
00111 QRadioButton* dailyButton;
00112 QRadioButton* weeklyButton;
00113 QRadioButton* monthlyButton;
00114 QRadioButton* yearlyButton;
00115
00116 QFrame* ruleSepFrame;
00117
00118
00119 QFrame* dailyFrame;
00120 QLabel* everyNDays;
00121 QLineEdit* nDaysEntry;
00122 QLabel* nDaysLabel;
00123
00124
00125 QFrame* weeklyFrame;
00126 QLabel* everyNWeeks;
00127 QLineEdit* nWeeksEntry;
00128 QLabel* nWeeksLabel;
00129 QCheckBox* sundayBox;
00130 QCheckBox* mondayBox;
00131 QCheckBox* tuesdayBox;
00132 QCheckBox* wednesdayBox;
00133 QCheckBox* thursdayBox;
00134 QCheckBox* fridayBox;
00135 QCheckBox* saturdayBox;
00136
00137
00138 QFrame* monthlyFrame;
00139 QButtonGroup* monthlyButtonGroup;
00140 QRadioButton* onNthDay;
00141 QComboBox* nthDayEntry;
00142 QLabel* nthDayLabel;
00143 QRadioButton* onNthTypeOfDay;
00144 QComboBox* nthNumberEntry;
00145 QComboBox* nthTypeOfDayEntry;
00146 QLabel* monthCommonLabel;
00147 QLineEdit* nMonthsEntry;
00148 QLabel* nMonthsLabel;
00149
00150
00151 QFrame* yearlyFrame;
00152 QLabel *yearCommonLabel;
00153 QButtonGroup *yearlyButtonGroup;
00154 QRadioButton *yearMonthButton;
00155 QRadioButton *yearDayButton;
00156 QComboBox *yearMonthComboBox;
00157 QLineEdit *yearDayLineEdit;
00158 QLineEdit *nYearsEntry;
00159 QLabel *yearsLabel;
00160
00161
00162 QCheckBox* advancedRuleButton;
00163 QLineEdit* advancedRuleEdit;
00164
00165
00166 QGroupBox* rangeGroupBox;
00167 QButtonGroup* rangeButtonGroup;
00168 QLabel* startDateLabel;
00169
00170 QRadioButton* noEndDateButton;
00171 QRadioButton* endDurationButton;
00172 QLineEdit* endDurationEdit;
00173 QLabel* endDurationLabel;
00174 QRadioButton* endDateButton;
00175 KDateEdit* endDateEdit;
00176
00177
00178 QGroupBox* exceptionGroupBox;
00179 KDateEdit *exceptionDateEdit;
00180 QPushButton* addExceptionButton;
00181 QPushButton* changeExceptionButton;
00182 QPushButton* deleteExceptionButton;
00183 QPushButton* exceptionDateButton;
00184 QListBox *exceptionList;
00185 DateList mExceptionDates;
00186
00187
00188 QDateTime currStartDateTime;
00189 QDateTime currEndDateTime;
00190
00191 bool mEnabled;
00192
00193 int mSpacing;
00194 };
00195
00196 #endif
This file is part of the documentation for kdelibs Version 3.1.5.