15 #include "uibasemod.h" 31 class uiObjEventFilter;
40 friend class uiObjectBody;
41 friend class i_LayoutItem;
45 uiObject(uiParent*,
const char* nm,uiObjectBody&);
60 SmallMax, MedMax, WideMax };
64 SzPolicy szPol(
bool hor=
true)
const;
66 virtual int width()
const;
67 virtual int height()
const;
69 virtual void setName(
const char*);
73 static void updateToolTips();
77 void display(
bool yn,
bool shrink=
false,
bool maximized=
false);
79 bool hasFocus()
const;
82 virtual void setCursor(
const MouseCursor&);
83 bool isCursorInside()
const;
85 virtual void setStyleSheet(
const char*);
86 virtual Color backgroundColor()
const;
87 Color roBackgroundColor()
const;
88 virtual void setBackgroundColor(
const Color&);
89 virtual void setBackgroundPixmap(
const uiPixmap&);
90 virtual void setTextColor(
const Color&);
91 void setSensitive(
bool yn=
true);
92 bool sensitive()
const;
94 bool isDisplayed()
const;
96 int prefHNrPics()
const;
97 virtual void setPrefWidth(
int);
98 void setPrefWidthInChar(
int);
99 void setPrefWidthInChar(
float);
100 void setMinimumWidth(
int);
101 void setMaximumWidth(
int);
102 int prefVNrPics()
const;
103 virtual void setPrefHeight(
int);
104 void setPrefHeightInChar(
int);
105 void setPrefHeightInChar(
float);
106 void setMinimumHeight(
int);
107 void setMaximumHeight(
int);
112 void setStretch(
int hor,
int ver);
123 bool reciprocal=
true);
125 bool reciprocal=
true);
130 const uiFont* font()
const;
136 void reDraw(
bool deep);
138 uiSize actualsize(
bool include_border=
true)
const;
142 {
return const_cast<uiObject*
>(
this)->parent(); }
143 void reParent(uiParent*);
145 uiMainWin* mainwin();
147 mQtclass(QWidget*) getWidget() {
return qwidget(); }
150 {
return const_cast<uiObject*
>(
this)->qwidget(); }
152 virtual bool handleLongTabletPress();
168 static int baseFldSize();
169 static int iconSize();
176 void triggerSetGeometry(
const i_LayoutItem*,
uiRect&);
190 #define mTemplTypeDef(fromclass,templ_arg,toclass) \ 191 typedef fromclass<templ_arg> toclass; 192 #define mTemplTypeDefT(fromclass,templ_arg,toclass) \ 193 mTemplTypeDef(fromclass,templ_arg,toclass) 196 #define mUsrEvGuiThread mQtclass(QEvent)::Type( mQtclass(QEvent)::User + 0 ) 197 #define mUsrEvPopUpReady mQtclass(QEvent)::Type( mQtclass(QEvent)::User + 1 ) 198 #define mUsrEvLongTabletPress mQtclass(QEvent)::Type(mQtclass(QEvent)::User+2) #define mExpClass(module)
Definition: commondefs.h:160
User interface main window.
Definition: uimainwin.h:36
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
uiParent * parent()
Definition: uiobj.h:140
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
#define mQtclass(cls)
Definition: commondefs.h:229
FixedString Undef()
Definition: keystrs.h:142
void shallowRedraw(CallBacker *=0)
Definition: uiobj.h:134
virtual bool closeOK()
hook. Accepts/denies closing of window.
Definition: uiobj.h:173
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
uiParent * parent_
Definition: uiobj.h:186
CNotifier< uiObject, uiRect & > setGeometry
triggered when getting a new geometry A reference to the new geometry is passed which can be manipula...
Definition: uiobj.h:166
SzPolicy
How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1...
Definition: uiobj.h:58
void trigger(T &t)
Definition: callback.h:258
virtual const ObjectSet< uiBaseObject > * childList() const
Definition: uiobj.h:154
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
uiString tooltip_
Definition: uiobj.h:180
Notifier< uiObject > closed
Triggered when object closes.
Definition: uiobj.h:156
void deepRedraw(CallBacker *=0)
Definition: uiobj.h:135
mQtclass(QWidget *) getWidget()
Definition: uiobj.h:147
const uiParent * parent() const
Definition: uiobj.h:141
virtual void setFont(const QFont &)
override Qt
Definition: i_uiobjqtbody.h:32
mFDQtclass(QWidget) mFDQtclass(QString) class MouseCursor
Definition: uibody.h:18
constraintType
Definition: uilayout.h:19
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
uiObjEventFilter * uiobjeventfilter_
Definition: uiobj.h:182
const mQtclass(QWidget *) qwidget() const
Definition: uiobj.h:149