korganizer
koeditorgeneral.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KOEDITORGENERAL_H
00024 #define KOEDITORGENERAL_H
00025
00026 #include <libkcal/alarm.h>
00027 #include <qlineedit.h>
00028
00029 class QWidget;
00030 class QBoxLayout;
00031 class QLineEdit;
00032 class QLabel;
00033 class QCheckBox;
00034 class QWidgetStack;
00035 class QSpinBox;
00036 class QPushButton;
00037 class QComboBox;
00038 class KTextEdit;
00039 class KSqueezedTextLabel;
00040
00041 namespace KCal {
00042 class Incidence;
00043 }
00044 using namespace KCal;
00045
00046 class FocusLineEdit : public QLineEdit
00047 {
00048 Q_OBJECT
00049 public:
00050 FocusLineEdit( QWidget *parent );
00051
00052 signals:
00053 void focusReceivedSignal();
00054
00055 protected:
00056 void focusInEvent ( QFocusEvent *e );
00057
00058 private:
00059 bool mSkipFirst;
00060 };
00061
00062 class KOEditorGeneral : public QObject
00063 {
00064 Q_OBJECT
00065 public:
00066 KOEditorGeneral (QObject* parent=0,const char* name=0);
00067 virtual ~KOEditorGeneral();
00068
00069 void initHeader(QWidget *,QBoxLayout *);
00070 void initDescription(QWidget *,QBoxLayout *);
00071 void initSecrecy(QWidget *,QBoxLayout *);
00072 void initCategories(QWidget *,QBoxLayout *);
00073 void initAlarm(QWidget *,QBoxLayout *);
00074
00076 void setDefaults(bool allDay);
00078 void readIncidence(Incidence *);
00080 void writeIncidence(Incidence *);
00081
00083 bool validateInput() { return true; }
00084
00085 void enableAlarm( bool enable );
00086
00087 void setSummary( const QString & );
00088 void setDescription( const QString & );
00089
00090 QObject *typeAheadReceiver() const;
00091
00092 public slots:
00093 void setCategories(const QString &);
00094
00095 protected slots:
00096 void editAlarms();
00097 void updateAlarmWidgets();
00098 void updateDefaultAlarmTime();
00099
00100 signals:
00101 void openCategoryDialog();
00102 void focusReceivedSignal();
00103
00104 protected:
00105 Alarm *alarmFromSimplePage() const;
00106
00107 QLineEdit *mSummaryEdit;
00108 QLineEdit *mLocationEdit;
00109 QLabel *mAlarmBell;
00110 QWidgetStack *mAlarmStack;
00111 QLabel *mAlarmInfoLabel;
00112 QCheckBox *mAlarmButton;
00113 QSpinBox *mAlarmTimeEdit;
00114 QComboBox *mAlarmIncrCombo;
00115 QPushButton *mAlarmEditButton;
00116 KTextEdit *mDescriptionEdit;
00117 QLabel *mOwnerLabel;
00118 QComboBox *mSecrecyCombo;
00119 QPushButton *mCategoriesButton;
00120 KSqueezedTextLabel *mCategoriesLabel;
00121
00122 enum AlarmStackPages { SimpleAlarmPage, AdvancedAlarmLabel };
00123
00124 private:
00125 QString mCategories;
00126 KCal::Alarm::List mAlarmList;
00127 };
00128
00129 #endif
|