korganizer
koeditorgeneralevent.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _KOEDITORGENERALEVENT_H
00025 #define _KOEDITORGENERALEVENT_H
00026
00027 #include "koeditorgeneral.h"
00028 #include <qdatetime.h>
00029
00030 class QLabel;
00031 class KDateEdit;
00032 class KTimeEdit;
00033 class QCheckBox;
00034 class QComboBox;
00035 class QBoxLayout;
00036
00037 namespace KCal {
00038 class Event;
00039 }
00040 using namespace KCal;
00041
00042 class KOEditorGeneralEvent : public KOEditorGeneral
00043 {
00044 Q_OBJECT
00045 public:
00046 KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
00047 virtual ~KOEditorGeneralEvent();
00048
00049 void initTime(QWidget *,QBoxLayout *);
00050 void initClass(QWidget *,QBoxLayout *);
00051 void initInvitationBar( QWidget* parent, QBoxLayout *layout );
00052
00053 void finishSetup();
00054
00056 void setDefaults( const QDateTime &from, const QDateTime &to, bool allDay );
00061 void readEvent( Event *event, Calendar *calendar, bool tmpl = false );
00063 void writeEvent( Event * );
00064
00066 bool validateInput();
00067
00068 void updateRecurrenceSummary( const QString &summary );
00069
00070 public slots:
00071 void setDateTimes( const QDateTime &start, const QDateTime &end );
00072 void setDuration();
00073
00074 protected slots:
00075 void timeStuffDisable( bool disable );
00076 void associateTime( bool time );
00077
00078 void startTimeChanged( QTime );
00079 void startDateChanged( const QDate& );
00080 void endTimeChanged( QTime );
00081 void endDateChanged( const QDate& );
00082
00083 void emitDateTimeStr();
00084
00085 signals:
00086 void allDayChanged(bool);
00087 void dateTimeStrChanged( const QString & );
00088 void dateTimesChanged( const QDateTime &start, const QDateTime &end );
00089 void editRecurrence();
00090 void acceptInvitation();
00091 void declineInvitation();
00092
00093 private:
00094 QLabel *mStartDateLabel;
00095 QLabel *mEndDateLabel;
00096 KDateEdit *mStartDateEdit;
00097 KDateEdit *mEndDateEdit;
00098 KTimeEdit *mStartTimeEdit;
00099 KTimeEdit *mEndTimeEdit;
00100 QLabel *mDurationLabel;
00101 QCheckBox *mAlldayEventCheckbox;
00102 QComboBox *mFreeTimeCombo;
00103 QLabel *mRecurrenceSummary;
00104 QFrame *mInvitationBar;
00105
00106
00107 QDateTime mCurrStartDateTime;
00108 QDateTime mCurrEndDateTime;
00109 };
00110
00111 #endif
|