15 #include "uibasemod.h" 22 class uiPushButtonBody;
23 class uiRadioButtonBody;
39 virtual ~uiButton() {}
41 virtual void setText(
const uiString&);
42 const uiString& text()
const {
return text_; }
43 void setIcon(
const char* icon_identifier);
44 void setPixmap(
const uiPixmap& pm ) { setPM(pm); }
45 void setIconScale(
float val);
46 virtual void updateIconSize() {}
48 virtual void click() = 0;
53 mQtclass(QAbstractButton*) qButton();
54 const
mQtclass(QAbstractButton*) qButton() const;
58 static uiButton* getStd(uiParent*,
OD::StdActionType,const CallBack&,
59 bool immediate,const
uiString& nonstd_text);
62 static
bool haveCommonPBIcons() {
return havecommonpbics_; }
63 static void setHaveCommonPBIcons(
bool yn=
true )
64 { havecommonpbics_ = yn; }
70 static bool havecommonpbics_;
72 virtual void translateText();
73 virtual void setPM(
const uiPixmap&);
96 void setDefault(
bool yn=
true);
104 void translateText();
106 void updateIconSize();
121 bool isChecked()
const;
122 virtual void setChecked(
bool yn=
true);
142 bool isChecked()
const;
143 void setChecked(
bool yn=
true);
144 void setTriState(
bool yn=
true);
175 virtual void notifyHandler(
notifyTp) = 0;
#define mExpClass(module)
Definition: commondefs.h:160
#define mQtclass(cls)
Definition: commondefs.h:229
uiCheckBoxBody * cbbody_
Definition: uibutton.h:152
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
Definition: i_qbutton.h:26
Definition: callback.h:254
CheckState
State of check objects.
Definition: oduicommon.h:53
void pressed()
Definition: i_qbutton.h:56
StdActionType
Definition: oduicommon.h:61
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
void toggled(bool)
Definition: i_qbutton.h:54
void clicked()
Definition: i_qbutton.h:55
OpendTect.
Definition: commontypes.h:29
CallBacks object-oriented (object + method).
Definition: callback.h:57
Definition: uibutton.h:134
void released()
Definition: i_qbutton.h:57