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 class KURL;
00041 class KOEditorAttachments;
00042
00043 namespace KCal {
00044 class Incidence;
00045 class Calendar;
00046 }
00047 using namespace KCal;
00048
00049 class FocusLineEdit : public QLineEdit
00050 {
00051 Q_OBJECT
00052 public:
00053 FocusLineEdit( QWidget *parent );
00054
00055 signals:
00056 void focusReceivedSignal();
00057
00058 protected:
00059 void focusInEvent ( QFocusEvent *e );
00060
00061 private:
00062 bool mSkipFirst;
00063 };
00064
00065 class KOEditorGeneral : public QObject
00066 {
00067 Q_OBJECT
00068 public:
00069 KOEditorGeneral (QObject* parent=0,const char* name=0);
00070 virtual ~KOEditorGeneral();
00071
00072 void initHeader( QWidget *parent,QBoxLayout *topLayout );
00073 void initDescription(QWidget *,QBoxLayout *);
00074 void initSecrecy(QWidget *,QBoxLayout *);
00075 void initAlarm(QWidget *,QBoxLayout *);
00076 void initAttachments(QWidget *,QBoxLayout *);
00077
00079 void setDefaults(bool allDay);
00081 void readIncidence(Incidence *event, Calendar *calendar);
00083 void writeIncidence(Incidence *);
00084
00086 bool validateInput() { return true; }
00087
00088 void enableAlarm( bool enable );
00089
00090 void setSummary( const QString & );
00091 void setDescription( const QString & );
00092
00093 QObject *typeAheadReceiver() const;
00094
00095 public slots:
00096 void setCategories(const QStringList &categories);
00097 void selectCategories();
00098 void addAttachments( const QStringList &attachments,
00099 const QStringList& mimeTypes = QStringList(),
00100 bool inlineAttachment = false );
00101
00102
00103 protected slots:
00104 void editAlarms();
00105 void updateAlarmWidgets();
00106 void updateDefaultAlarmTime();
00107 void updateAttendeeSummary( int count );
00108
00109 signals:
00110 void openCategoryDialog();
00111 void updateCategoryConfig();
00112 void focusReceivedSignal();
00113 void openURL( const KURL & );
00114 protected:
00115 Alarm *alarmFromSimplePage() const;
00116
00117 QLineEdit *mSummaryEdit;
00118 QLineEdit *mLocationEdit;
00119 QLabel *mAttendeeSummaryLabel;
00120 QLabel *mAlarmBell;
00121 QWidgetStack *mAlarmStack;
00122 QLabel *mAlarmInfoLabel;
00123 QCheckBox *mAlarmButton;
00124 QSpinBox *mAlarmTimeEdit;
00125 QComboBox *mAlarmIncrCombo;
00126 QPushButton *mAlarmEditButton;
00127 KTextEdit *mDescriptionEdit;
00128 QLabel *mOwnerLabel;
00129 QComboBox *mSecrecyCombo;
00130 QPushButton *mCategoriesButton;
00131 KSqueezedTextLabel *mCategoriesLabel;
00132 KOEditorAttachments *mAttachments;
00133 QLabel *mResourceLabel;
00134
00135 enum AlarmStackPages { SimpleAlarmPage, AdvancedAlarmLabel };
00136
00137 private:
00138 QStringList mCategories;
00139 KCal::Alarm::List mAlarmList;
00140 };
00141
00142 #endif
|