|
| i_LayoutMngr (QWidget *prnt, const char *name, uiObjectBody &mngbdy) |
|
virtual | ~i_LayoutMngr () |
|
void | addItem (i_LayoutItem *) |
|
void | addItem (QLayoutItem *) override |
|
bool | attach (constraintType, QWidget &, QWidget *, int, bool reciprocal=true) |
|
int | borderSpace () const |
|
void | childrenClear (uiObject *) |
|
int | childStretch (bool hor) const |
|
int | count () const override |
|
uiRect & | curpos (LayoutMode) |
|
const uiRect & | curpos (LayoutMode) const |
|
void | forceChildrenRedraw (uiObjectBody *, bool deep) |
|
int | horSpacing () const |
|
virtual void | initChildLayout (LayoutMode) |
|
void | invalidate () override |
|
bool | isChild (uiObject *) |
|
QLayoutItem * | itemAt (int idx) const override |
|
void | layoutChildren (LayoutMode, bool finalLoop=false) |
|
QSize | minimumSize () const override |
|
void | setBorderSpace (int s) |
|
void | setHSpacing (int s) |
|
void | setIsMain (bool yn) |
|
void | setVSpacing (int s) |
|
QSize | sizeHint () const override |
|
QLayoutItem * | takeAt (int idx) override |
|
virtual void | updatedAlignment (LayoutMode) |
|
int | verSpacing () const |
|
uiRect | winpos (LayoutMode) const |
|
| NamedCallBacker (const char *nm=0) |
|
| NamedCallBacker (const NamedCallBacker &) |
|
virtual Notifier< NamedCallBacker > & | objectToBeDeleted () const |
|
bool | operator== (const NamedCallBacker &oth) const |
|
bool | operator== (const NamedObject &oth) 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 | detachAllNotifiers () const |
| Call from the destructor of your inherited object. More...
|
|
void | detachCB (const NotifierAccess &, const CallBack &) const |
|
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
|
virtual bool | isCapsule () const |
|
bool | isNotifierAttached (const NotifierAccess *) const |
| Only for debugging purposes, don't use. More...
|
|
void | stopReceivingNotifications () const |
|
virtual CallBacker * | trueCaller () |
|
| NamedObject (const char *nm=nullptr) |
|
| NamedObject (const NamedObject &oth) |
|
virtual | ~NamedObject () |
|
virtual BufferString | getName () const |
|
bool | getNameFromPar (const IOPar &) |
|
const name_type & | name () const override |
|
NamedObject & | operator= (const NamedObject &) |
|
bool | operator== (const NamedObject &oth) const |
|
virtual void | setName (const char *nm) |
|
virtual | ~ObjectWithName () |
|
bool | hasName (const char *nm) const |
|
bool | hasName (const name_type &nm) const |
|
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).