OpendTect-6_4  6.4
i_uiobjqtbody.h
Go to the documentation of this file.
1 // No multiple inclusion protection
2 /*+
3 ________________________________________________________________________
4 
5  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
6  Author: A.H. Lammertink
7  Date: 21/06/2001
8  RCS: $Id$
9 ________________________________________________________________________
10 
11 -*/
12 
13 #ifndef mHANDLE_OBJ
14 # define mHANDLE_OBJ C
15 #endif
16 
17 #ifndef mQWIDGET_BODY
18 # define mQWIDGET_BODY T
19 #endif
20 
21 #ifndef mQWIDGET_BASE
22 # define mQWIDGET_BASE mQWIDGET_BODY
23 #endif
24 
25 
26 public:
27 
28  virtual const QWidget* qwidget_() const { return this; }
29 
30 #ifndef UIBASEBODY_ONLY
31  virtual void setFont( const QFont& )
33  {
34  if ( !uifont() ) { pErrMsg("no uifont!"); return; }
35  mQWIDGET_BASE::setFont( uifont()->qFont() );
36  }
37 
38  virtual void fontChange( const QFont& oldFont )
39  {
40  uiBody::fontchanged();
41  }
42 
44  virtual void closeEvent( QCloseEvent *e )
45  {
46  if ( uiCloseOK() )
48  }
49 
50 protected:
51 
52  virtual uiObject& uiObjHandle() { return handle_; }
53 
54 #endif
55 
56 #ifdef UIPARENT_BODY_CENTR_WIDGET
57 
58 public:
59 
60  uiGroup* uiCentralWidg() { return centralwidget_; }
61 
62 
63  virtual void addChild( uiBaseObject& child )
64  {
65  if ( !initing_ && centralwidget_ )
66  centralwidget_->addChild( child );
67  else
68  uiParentBody::addChild( child );
69  }
70 
71  virtual void manageChld_( uiBaseObject& o, uiObjectBody& b )
72  {
73  if ( !initing_ && centralwidget_ )
74  centralwidget_->manageChld( o, b );
75 
76  }
77 
78  virtual void attachChild ( constraintType tp,
79  uiObject* child,
80  uiObject* other, int margin,
81  bool reciprocal )
82  {
83  if ( !child || initing_ ) return;
84 
85  centralwidget_->attachChild( tp, child, other,
86  margin, reciprocal);
87  }
88 protected:
89 
90  bool initing_;
91 
92  uiGroup* centralwidget_;
93 
94 protected:
95 
96  virtual const QWidget* managewidg_() const
97  {
98  if ( !initing_ )
99  return centralwidget_->pbody()->managewidg();
100  return qwidget_();
101  }
102 #endif
103 
104 protected:
105 
106  mHANDLE_OBJ& handle() { return handle_; }
107 
108 protected:
109 
111 
112 
113 #undef mHANDLE_OBJ
114 #undef mQWIDGET_BASE
115 #undef mQWIDGET_BODY
116 #undef mTHIS_QWIDGET
117 #ifdef UIBASEBODY_ONLY
118 # undef UIBASEBODY_ONLY
119 #endif
120 #ifdef UIPARENT_BODY_CENTR_WIDGET
121 # undef UIPARENT_BODY_CENTR_WIDGET
122 #endif
Definition: uigroup.h:54
C & handle_
Definition: i_uiobjqtbody.h:110
virtual void addChild(uiBaseObject &child)
Definition: uiparentbody.h:35
virtual uiObject & uiObjHandle()
Definition: i_uiobjqtbody.h:52
#define mHANDLE_OBJ
Definition: uiobjbody.h:15
virtual void fontChange(const QFont &oldFont)
Definition: i_uiobjqtbody.h:38
The base class for most UI elements.
Definition: uiobj.h:38
virtual const QWidget * qwidget_() const
Definition: i_uiobjqtbody.h:28
uiParentBody * pbody()
C & handle()
Definition: i_uiobjqtbody.h:106
void addChild(uiBaseObject &)
virtual void setFont(const QFont &)
override Qt
Definition: i_uiobjqtbody.h:32
virtual void closeEvent(QCloseEvent *e)
override Qt
Definition: i_uiobjqtbody.h:44
constraintType
Definition: uilayout.h:19
#define pErrMsg(msg)
Definition: errmsg.h:60

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019