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
00052 void finishSetup();
00053
00055 void setDefaults( const QDateTime &from, const QDateTime &to, bool allDay );
00060 void readEvent( Event *, bool tmpl = false );
00062 void writeEvent( Event * );
00063
00065 bool validateInput();
00066
00067 public slots:
00068 void setDateTimes( const QDateTime &start, const QDateTime &end );
00069 void setDuration();
00070
00071 protected slots:
00072 void timeStuffDisable( bool disable );
00073 void associateTime( bool time );
00074
00075 void startTimeChanged( QTime );
00076 void startDateChanged( const QDate& );
00077 void endTimeChanged( QTime );
00078 void endDateChanged( const QDate& );
00079
00080 void emitDateTimeStr();
00081
00082 signals:
00083 void allDayChanged(bool);
00084 void dateTimeStrChanged( const QString & );
00085 void dateTimesChanged( const QDateTime &start, const QDateTime &end );
00086
00087 private:
00088 QLabel *mStartDateLabel;
00089 QLabel *mEndDateLabel;
00090 KDateEdit *mStartDateEdit;
00091 KDateEdit *mEndDateEdit;
00092 KTimeEdit *mStartTimeEdit;
00093 KTimeEdit *mEndTimeEdit;
00094 QLabel *mDurationLabel;
00095 QCheckBox *mTimeAssociateButton;
00096 QComboBox *mFreeTimeCombo;
00097
00098
00099 QDateTime mCurrStartDateTime;
00100 QDateTime mCurrEndDateTime;
00101 };
00102
00103 #endif
|