00001
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 TQPushButton
00032 {
00033 Q_OBJECT
00034
00035 public:
00036 SpecialActionsButton(const TQString& caption, TQWidget* parent = 0, const char* name = 0);
00037 void setActions(const TQString& pre, const TQString& post);
00038 const TQString& preAction() const { return mPreAction; }
00039 const TQString& postAction() const { return mPostAction; }
00040 virtual void setReadOnly(bool ro) { mReadOnly = ro; }
00041 virtual bool isReadOnly() const { return mReadOnly; }
00042
00043 signals:
00044 void selected();
00045
00046 protected slots:
00047 void slotButtonPressed();
00048
00049 private:
00050 TQString mPreAction;
00051 TQString mPostAction;
00052 bool mReadOnly;
00053 };
00054
00055
00056
00057 class SpecialActions : public TQWidget
00058 {
00059 Q_OBJECT
00060
00061 public:
00062 SpecialActions(TQWidget* parent = 0, const char* name = 0);
00063 void setActions(const TQString& pre, const TQString& post);
00064 TQString preAction() const;
00065 TQString postAction() const;
00066 void setReadOnly(bool);
00067 bool isReadOnly() const { return mReadOnly; }
00068
00069 private:
00070 KLineEdit* mPreAction;
00071 KLineEdit* mPostAction;
00072 bool mReadOnly;
00073 };
00074
00075
00076
00077 class SpecialActionsDlg : public KDialogBase
00078 {
00079 Q_OBJECT
00080
00081 public:
00082 SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
00083 const TQString& caption, TQWidget* parent = 0, const char* name = 0);
00084 TQString preAction() const { return mActions->preAction(); }
00085 TQString postAction() const { return mActions->postAction(); }
00086 void setReadOnly(bool ro) { mActions->setReadOnly(ro); }
00087 bool isReadOnly() const { return mActions->isReadOnly(); }
00088
00089 protected:
00090 virtual void resizeEvent(TQResizeEvent*);
00091
00092 protected slots:
00093 virtual void slotOk();
00094
00095 private:
00096 SpecialActions* mActions;
00097 };
00098
00099 #endif // SPECIALACTIONS_H