The QGManager class provides one-dimensional geometry management. More...
#include <qgmanager.h>
Inherits QObject.
This class is intended for those who write geometry managers and graphical designers. It is not for the faint of heart. The QHBoxLayout, QVBoxLayout and QGridLayout classes are available for normal application programming.
Each dimension (horizontal and vertical) is handled independently. Widgets are organized in chains, which can be parallel or serial.
In a serial chain, elements are added one after another. Available space is divided among the elements according to stretch and max-/minsize.
In parallel chains, elements are added on top of each other. All elements are given the full length of the chain, and are placed at the same position.
See also: QHBoxLayout, QVBoxLayout and QGridLayout.
Creates a new QGManager which manages parent's children.
Destroys the QGManager, deleting all add()ed chains.
Starts geometry management.
Adds the chain source to the chain destination.
Adds branch to destination as a branch going from fromIndex to toIndex. A branch is a chain that is anchored at two locations in a serial chain. The branch does not influence the main chain; if the branch's minimum size is greater than the minimum distance between the anchors, things will look ugly.
The branch goes from the beginning of the item at fromIndex to the end of the item at toIndex. Note: remember to count spacing when calculating indices.
Adds the spacing w to the chain d. If d is a serial chain, this means screen space between widgets. If d is parallel, this influences the maximum and minimum size.
Adds the widget w to the chain d.
[virtual protected]
Grabs all resize events for my parent, and does child widget resizing.
Reimplemented from QObject.
Fixes the size of the main widget and distributes the available space to the child widgets. The size is adjusted to a valid value. Thus freeze(0,0) (the default) will fix the widget to its minimum size.
Returns the main widget of the manager.
Creates a new QChain which is parallel.
Creates a new QChain which is serial.
Removes the widget w from geometry management. Will not remove spacing around the widget. This function is called automatically if the widget is deleted.
Sets the border around the edge of the widget. b is the number of pixels between the edge of the widget and the area controlled by the manager.
Makes the geometry manager take account of the menu bar w. All child widgets are placed below the bottom edge of the menu bar.
Sets the name of chain to name. The name is used for debugging purposes.
Sets the stretch factor on c to s. This stretch factor is overridden by add(), so there's no point in calling this function before you add() the chain.
See also: add().
Undoes the effect of a previous freeze(). The main widget will now again be resizable.
Returns the main horizontal chain of the manager. All horizontal chains should be inserted into this chain or one of its descendants, otherwise they will be ignored.
Returns the main vertical chain of the manager. All vertical chains should be inserted into this chain or one of its descendants, otherwise they will be ignored.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright © 1998 Troll Tech | Trademarks | Qt version 1.42
|