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 <tqwidget.h>
00026 #include <tqpushbutton.h>
00027
00028 class KLineEdit;
00029
00030
00031 class SpecialActionsButton : public QPushButton
00032 {
00033 Q_OBJECT
00034 public:
00035 SpecialActionsButton(const TQString& caption, TQWidget* parent = 0, const char* name = 0);
00036 void setActions(const TQString& pre, const TQString& post);
00037 const TQString& preAction() const { return mPreAction; }
00038 const TQString& 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 TQString mPreAction;
00050 TQString mPostAction;
00051 bool mReadOnly;
00052 };
00053
00054
00055
00056 class SpecialActions : public QWidget
00057 {
00058 Q_OBJECT
00059 public:
00060 SpecialActions(TQWidget* parent = 0, const char* name = 0);
00061 void setActions(const TQString& pre, const TQString& post);
00062 TQString preAction() const;
00063 TQString postAction() const;
00064 void setReadOnly(bool);
00065 bool isReadOnly() const { return mReadOnly; }
00066
00067 private:
00068 KLineEdit* mPreAction;
00069 KLineEdit* mPostAction;
00070 bool mReadOnly;
00071 };
00072
00073
00074
00075 class SpecialActionsDlg : public KDialogBase
00076 {
00077 Q_OBJECT
00078 public:
00079 SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
00080 const TQString& caption, TQWidget* parent = 0, const char* name = 0);
00081 TQString preAction() const { return mActions->preAction(); }
00082 TQString postAction() const { return mActions->postAction(); }
00083 void setReadOnly(bool ro) { mActions->setReadOnly(ro); }
00084 bool isReadOnly() const { return mActions->isReadOnly(); }
00085
00086 protected:
00087 virtual void resizeEvent(TQResizeEvent*);
00088
00089 protected slots:
00090 virtual void slotOk();
00091
00092 private:
00093 SpecialActions* mActions;
00094 };
00095
00096 #endif // SPECIALACTIONS_H
|