Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://rtm-cs.sinp.msu.ru/manual/qt/qgmanager.html
Äàòà èçìåíåíèÿ: Sun Jul 12 02:58:59 1998
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 20:17:12 2012
Êîäèðîâêà:
Qt Toolkit - QGManager Class Qt logo

QGManager Class Reference


The QGManager class provides one-dimensional geometry management. More...

#include <qgmanager.h>

Inherits QObject.

List of all member functions.

Public Members

Protected Members


Detailed Description

The QGManager class provides one-dimensional geometry management.

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.


Member Function Documentation

QGManager::QGManager ( QWidget * parent, const char * name=0 )

Creates a new QGManager which manages parent's children.

QGManager::~QGManager ()

Destroys the QGManager, deleting all add()ed chains.

bool QGManager::activate ()

Starts geometry management.

bool QGManager::add ( QChain * destination, QChain * source, int stretch = 0 )

Adds the chain source to the chain destination.

bool QGManager::addBranch ( QChain * destination, QChain * branch, int fromIndex, int toIndex )

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.

bool QGManager::addSpacing ( QChain * d, int minSize, int stretch = 0, int maxSize = unlimited )

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.

bool QGManager::addWidget ( QChain * d, QWidget * w, int stretch = 0 )

Adds the widget w to the chain d.

bool QGManager::eventFilter ( QObject * o, QEvent * e ) [virtual protected]

Grabs all resize events for my parent, and does child widget resizing.

Reimplemented from QObject.

void QGManager::freeze ( int w = 0, int h = 0 )

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.

QWidget * QGManager::mainWidget ()

Returns the main widget of the manager.

QChain * QGManager::newParChain ( Direction d )

Creates a new QChain which is parallel.

QChain * QGManager::newSerChain ( Direction d )

Creates a new QChain which is serial.

void QGManager::remove ( QWidget * w )

Removes the widget w from geometry management. Will not remove spacing around the widget. This function is called automatically if the widget is deleted.

void QGManager::setBorder ( int b )

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.

void QGManager::setMenuBar ( QWidget * w )

Makes the geometry manager take account of the menu bar w. All child widgets are placed below the bottom edge of the menu bar.

void QGManager::setName ( QChain * chain, const char * name )

Sets the name of chain to name. The name is used for debugging purposes.

void QGManager::setStretch ( QChain * c, int s )

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().

void QGManager::unFreeze ()

Undoes the effect of a previous freeze(). The main widget will now again be resizable.

QChain * QGManager::xChain ()

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.

QChain * QGManager::yChain ()

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 TechTrademarks
Qt version 1.40