|
| | 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) |
| |
| | NamedCallBacker (const char *nm=0) |
| |
| | NamedCallBacker (const NamedCallBacker &) |
| |
| bool | operator== (const NamedCallBacker &oth) const |
| |
| bool | operator== (const NamedObject &oth) const |
| |
| virtual Notifier< NamedCallBacker > & | objectToBeDeleted () const |
| |
| | CallBacker () |
| |
| | CallBacker (const CallBacker &) |
| |
| virtual | ~CallBacker () |
| |
| bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
| |
| bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
| |
| void | detachCB (const NotifierAccess &, const CallBack &) const |
| |
| void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
| |
| bool | isNotifierAttached (const NotifierAccess *) const |
| | Only for debugging purposes, don't use. More...
|
| |
| virtual bool | isCapsule () const |
| |
| void | stopReceivingNotifications () const |
| |
| | NamedObject (const char *nm=0) |
| |
| | NamedObject (const NamedObject &oth) |
| |
| virtual | ~NamedObject () |
| |
| NamedObject & | operator= (const NamedObject &) |
| |
| bool | operator== (const NamedObject &oth) const |
| |
| virtual const OD::String & | name () const |
| |
| virtual BufferString | getName () const |
| |
| virtual void | setName (const char *nm) |
| |
| bool | getNameFromPar (const IOPar &) |
| |
| void | putNameInPar (IOPar &) const |
| |
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).