|
| i_LayoutMngr (mQtclass(QWidget *) prnt, const char *name, uiObjectBody &mngbdy) |
|
virtual | ~i_LayoutMngr () |
|
virtual void | addItem (mQtclass(QLayoutItem *)) |
|
void | addItem (i_LayoutItem *) |
|
virtual | mQtclass (QSize) sizeHint() const |
|
virtual | mQtclass (QSize) minimumSize() const |
|
virtual | mQtclass (QLayoutItem *) itemAt(int idx) const |
|
virtual | mQtclass (QLayoutItem *) takeAt(int idx) |
|
virtual int | count () const |
|
virtual void | invalidate () |
|
virtual void | updatedAlignment (LayoutMode) |
|
virtual void | initChildLayout (LayoutMode) |
|
bool | attach (constraintType, mQtclass(QWidget &), mQtclass(QWidget *), int, bool reciprocal=true) |
|
const uiRect & | curpos (LayoutMode) const |
|
uiRect & | curpos (LayoutMode) |
|
uiRect | winpos (LayoutMode) const |
|
void | forceChildrenRedraw (uiObjectBody *, bool deep) |
|
void | childrenClear (uiObject *) |
|
bool | isChild (uiObject *) |
|
int | childStretch (bool hor) const |
|
int | borderSpace () const |
|
int | horSpacing () const |
|
int | verSpacing () const |
|
void | setHSpacing (int s) |
|
void | setVSpacing (int s) |
|
void | setBorderSpace (int s) |
|
void | setIsMain (bool yn) |
|
void | layoutChildren (LayoutMode, bool finalLoop=false) |
|
| NamedObject (const char *nm=0) |
|
| NamedObject (const NamedObject *linkedto) |
|
| NamedObject (const NamedObject &) |
|
virtual | ~NamedObject () |
|
void | setLinkedTo (NamedObject *) |
|
bool | operator== (const NamedObject &oth) const |
|
virtual const OD::String & | name () const |
|
virtual const OD::String & | annotName () const |
|
virtual void | setName (const char *) |
|
void | setCleanName (const char *) |
| cleans string first More...
|
|
void | deleteNotify (const CallBack &) |
|
| CallBacker () |
|
| CallBacker (const CallBacker &) |
|
virtual | ~CallBacker () |
|
bool | attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false) |
|
bool | attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) |
|
void | detachCB (NotifierAccess &, const CallBack &) |
|
void | detachCB (NotifierAccess *notif, const CallBack &cb) |
|
bool | isNotifierAttached (NotifierAccess *) const |
| Only for debugging purposes, don't use. More...
|
|
dGB's layout manager
This is our own layout manager for Qt. It manages widgets, etc. using constraints like "rightOf" etc.
Because the i_LayoutMngr is a QLayout, it can be used by QWidgets to automatically add new children to the manager when they are constructed with a QWidget (with layout) as parent.
The actual adding to a manager is is done using QEvents. Whenever a QObject inserts a new child, it posts a ChildInserted event to itself. However, a QLayout constructor installs an event filter on its parent, and it registers itself to the parent as its layouter (setWidgetLayout), so future calls to the parent's sizeHint(), etc. are redirected to this new layoutmanager.
If setAutoAdd() is called on a layoutmanager, and the layout manager is "topLevel", i.e. THE manager for a certain widget, then whenever a new widget is constructed with the manager's parent widget as parent, the new widget is automatically added (by Qt) to the manager by the manager's eventfilter, using 'addItem( new QWidgetItem( w ) )'. Unfortunately, Qt does not call addItem before the main application loop is running. This results to the problem that no attachments can be used until the main loop is running when we let Qt handle the addItem() calls. Therefore, we explicitily call addItem() on the correct layout manager at construction uiObjects. AutoAdd is also enabled in case someone wants to eses native Qt methods. (Multiple insertion is protected. Manager checks if widget already present).