16 #include "uibasemod.h" 33 #define USE_DISPLAY_TIMER 1 40 uiObjectBody(
uiParent*,
const char* nm);
43 virtual ~uiObjectBody();
47 void display(
bool yn,
bool shrink=
false,
48 bool maximized=
false);
50 bool uihasFocus()
const;
52 bool isDisplayed()
const {
return display_; }
54 Color uibackgroundColor()
const;
55 void uisetBackgroundColor(
const Color&);
56 void uisetBackgroundPixmap(
const uiPixmap&);
57 void uisetTextColor(
const Color&);
58 void uisetSensitive(
bool yn=
true);
59 bool uisensitive()
const;
60 bool uivisible()
const;
62 int prefHNrPics()
const;
63 void setPrefWidth(
int);
64 float prefWidthInCharSet()
const {
return pref_char_width; }
65 void setPrefWidthInChar(
float);
66 void setMinimumWidth(
int);
67 void setMaximumWidth(
int);
69 int prefVNrPics()
const;
70 void setPrefHeight(
int);
71 float prefHeightInCharSet()
const {
return pref_char_height; }
72 void setPrefHeightInChar(
float);
73 void setMinimumHeight(
int);
74 void setMaximumHeight(
int);
76 void setStretch(
int,
int);
77 virtual int stretch(
bool,
bool retUndef=
false)
const;
79 virtual int nrTxtLines()
const {
return -1; }
82 int margin=-1,
bool reciprocal=
true);
85 { attach(t,other->mainObject(),m,r ); }
87 void uisetFont(
const uiFont&);
88 const uiFont* uifont()
const;
90 virtual uiSize actualsize(
bool include_border=
true)
const;
99 virtual void reDraw(
bool);
103 const i_LayoutItem* layoutItem() {
return layoutItem_; }
106 virtual void finalise();
107 virtual bool finalised()
const {
return finalised_; }
109 virtual void fontchanged();
111 int fontHeight()
const;
112 int fontWidth(
bool max=
false)
const;
113 int fontWidthFor(
const uiString&)
const;
114 int fontWidthFor(
const char*)
const;
119 {
return hor ? hszpol: vszpol ; }
121 void setShrinkAllowed(
bool yn) { allowshrnk = yn; }
122 bool shrinkAllowed() {
return allowshrnk; }
124 bool isHidden() {
return is_hidden; }
125 bool itemInited()
const;
128 {
if ( pb ) parent_ = pb; }
137 virtual i_LayoutItem* mkLayoutItem_(
i_LayoutMngr& mngr);
139 virtual void finalise_() {}
143 void loitemDeleted() { layoutItem_ = 0; }
147 i_LayoutItem* layoutItem_;
156 bool display_maximized;
162 float pref_char_width;
164 float pref_char_height;
166 int pref_height_hint;
176 void gtFntWdtHgt() const;
179 #ifdef USE_DISPLAY_TIMER 229 template <
class C,
class T>
236 : uiObjectBody( parnt, nm )
237 , T( parnt && parnt->pbody() ?
238 parnt->pbody()->managewidg() : 0 )
241 this->setObjectName( nm );
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
C & handle_
Definition: i_uiobjqtbody.h:110
#define mQtclass(cls)
Definition: commondefs.h:229
Wrapper around QLayoutItem class. Stores some dGB specific layout info.
Definition: i_layoutitem.h:168
virtual uiObject & uiObjHandle()
Definition: i_uiobjqtbody.h:52
virtual bool closeOK()
hook. Accepts/denies closing of window.
Definition: uiobj.h:173
bool isHidden(const char *)
The base class for most UI elements.
Definition: uiobj.h:38
virtual uiSize minimumsize() const
Definition: i_layoutitem.h:178
Definition: uistring.h:89
Definition: uiparent.h:26
Default (Template) implementation of uiObjectBody.
Definition: uiobjbody.h:230
virtual const QWidget * qwidget_() const
Definition: i_uiobjqtbody.h:28
SzPolicy
How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1...
Definition: uiobj.h:58
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
#define mFDQtclass(cls)
Definition: commondefs.h:228
uiObjBodyImpl(C &hndle, uiParent *parnt, const char *nm)
Definition: uiobjbody.h:234
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
Definition: uiparentbody.h:23
Object with a name.
Definition: namedobj.h:35
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
#define mClass(module)
Definition: commondefs.h:164
Timer class.
Definition: timer.h:25
dGB's layout manager
Definition: i_layout.h:70