14 #include "uibasemod.h" 31 #define USE_DISPLAY_TIMER 1 41 virtual ~uiObjectBody();
45 void display(
bool yn,
bool shrink=
false,
46 bool maximized=
false);
48 bool uihasFocus()
const;
50 bool isDisplayed()
const {
return display_; }
52 Color uibackgroundColor()
const;
53 void uisetBackgroundColor(
const Color&);
54 void uisetBackgroundPixmap(
const uiPixmap&);
55 void uisetTextColor(
const Color&);
56 void uisetSensitive(
bool yn=
true);
57 bool uisensitive()
const;
58 bool uivisible()
const;
60 int prefHNrPics()
const;
61 void setPrefWidth(
int);
62 float prefWidthInCharSet()
const {
return pref_char_width; }
63 void setPrefWidthInChar(
float);
64 void setMinimumWidth(
int);
65 void setMaximumWidth(
int);
67 int prefVNrPics()
const;
68 void setPrefHeight(
int);
69 float prefHeightInCharSet()
const {
return pref_char_height; }
70 void setPrefHeightInChar(
float);
71 void setMinimumHeight(
int);
72 void setMaximumHeight(
int);
74 void setStretch(
int,
int);
75 virtual int stretch(
bool,
bool retUndef=
false)
const;
77 virtual int nrTxtLines()
const {
return -1; }
80 int margin=-1,
bool reciprocal=
true);
83 { attach(t,other->mainObject(),m,r ); }
85 void uisetFont(
const uiFont&);
86 const uiFont* uifont()
const;
88 virtual uiSize actualsize(
bool include_border=
true)
const;
97 virtual void reDraw(
bool);
101 const i_LayoutItem* layoutItem() {
return layoutItem_; }
104 virtual void finalise();
105 virtual bool finalised()
const {
return finalised_; }
107 virtual void fontchanged();
109 int fontHeight()
const;
110 int fontWidth(
bool max=
false)
const;
111 int fontWidthFor(
const uiString&)
const;
117 {
return hor ? hszpol: vszpol ; }
119 void setShrinkAllowed(
bool yn) { allowshrnk = yn; }
120 bool shrinkAllowed() {
return allowshrnk; }
122 bool isHidden() {
return is_hidden; }
123 bool itemInited()
const;
126 {
if ( pb ) parent_ = pb; }
135 virtual i_LayoutItem* mkLayoutItem_(
i_LayoutMngr& mngr);
137 virtual void finalise_() {}
141 void loitemDeleted() { layoutItem_ = 0; }
145 i_LayoutItem* layoutItem_;
154 bool display_maximized;
160 float pref_char_width;
162 float pref_char_height;
164 int pref_height_hint;
174 void gtFntWdtHgt() const;
177 #ifdef USE_DISPLAY_TIMER 227 template <
class C,
class T>
234 : uiObjectBody( parnt, nm )
235 , T( parnt && parnt->pbody() ?
236 parnt->pbody()->managewidg() : 0 )
239 this->setObjectName( nm );
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
C & handle_
Definition: i_uiobjqtbody.h:109
#define mQtclass(cls)
Definition: commondefs.h:232
Wrapper around QLayoutItem class. Stores some dGB specific layout info.
Definition: i_layoutitem.h:166
virtual uiObject & uiObjHandle()
Definition: i_uiobjqtbody.h:51
virtual bool closeOK()
hook. Accepts/denies closing of window.
Definition: uiobj.h:168
bool isHidden(const char *)
The base class for most UI elements.
Definition: uiobj.h:35
virtual uiSize minimumsize() const
Definition: i_layoutitem.h:176
Definition: uistring.h:88
Definition: uiparent.h:24
Default (Template) implementation of uiObjectBody.
Definition: uiobjbody.h:228
virtual const QWidget * qwidget_() const
Definition: i_uiobjqtbody.h:27
SzPolicy
How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1...
Definition: uiobj.h:55
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
#define mFDQtclass(cls)
Definition: commondefs.h:231
uiObjBodyImpl(C &hndle, uiParent *parnt, const char *nm)
Definition: uiobjbody.h:232
Off-screen pixel-based paint device.
Definition: uipixmap.h:33
#define mDeprecated
Definition: plfdefs.h:213
Definition: uiparentbody.h:21
constraintType
Definition: uilayout.h:17
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
#define mClass(module)
Definition: commondefs.h:161
Timer class.
Definition: timer.h:24
CallBacker object with a name. Use if you want your object to be able to send and receive CallBack's...
Definition: namedobj.h:50
dGB's layout manager
Definition: i_layout.h:68