kalarm
specialactions.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SPECIALACTIONS_H
00022 #define SPECIALACTIONS_H
00023
00024 #include <kdialogbase.h>
00025 #include <qgroupbox.h>
00026 #include <qpushbutton.h>
00027
00028 class KLineEdit;
00029
00030
00031 class SpecialActionsButton : public QPushButton
00032 {
00033 Q_OBJECT
00034 public:
00035 SpecialActionsButton(const QString& caption, QWidget* parent = 0, const char* name = 0);
00036 void setActions(const QString& pre, const QString& post);
00037 const QString& preAction() const { return mPreAction; }
00038 const QString& postAction() const { return mPostAction; }
00039 virtual void setReadOnly(bool ro) { mReadOnly = ro; }
00040 virtual bool isReadOnly() const { return mReadOnly; }
00041
00042 signals:
00043 void selected();
00044
00045 protected slots:
00046 void slotButtonPressed();
00047
00048 private:
00049 QString mPreAction;
00050 QString mPostAction;
00051 bool mReadOnly;
00052 };
00053
00054
00055
00056 class SpecialActions : public QGroupBox
00057 {
00058 Q_OBJECT
00059 public:
00060 SpecialActions(QWidget* parent = 0, const char* name = 0);
00061 SpecialActions(const QString& frameLabel, QWidget* parent = 0, const char* name = 0);
00062 void setActions(const QString& pre, const QString& post);
00063 QString preAction() const;
00064 QString postAction() const;
00065 void setReadOnly(bool);
00066 bool isReadOnly() const { return mReadOnly; }
00067
00068 private:
00069 void init(const QString& frameLabel);
00070 KLineEdit* mPreAction;
00071 KLineEdit* mPostAction;
00072 bool mReadOnly;
00073 };
00074
00075
00076
00077 class SpecialActionsDlg : public KDialogBase
00078 {
00079 Q_OBJECT
00080 public:
00081 SpecialActionsDlg(const QString& preAction, const QString& postAction,
00082 const QString& caption, QWidget* parent = 0, const char* name = 0);
00083 QString preAction() const { return mActions->preAction(); }
00084 QString postAction() const { return mActions->postAction(); }
00085 void setReadOnly(bool ro) { mActions->setReadOnly(ro); }
00086 bool isReadOnly() const { return mActions->isReadOnly(); }
00087
00088 protected:
00089 virtual void resizeEvent(QResizeEvent*);
00090
00091 protected slots:
00092 virtual void slotOk();
00093
00094 private:
00095 SpecialActions* mActions;
00096 };
00097
00098 #endif // SPECIALACTIONS_H
|