QDockArea Class ReferenceThe QDockArea class manages and lays out QDockWindows. More... #include <qdockarea.h> Inherits QWidget. Public Members
Public Slots
Properties
Related Functions
Detailed DescriptionThe QDockArea class manages and lays out QDockWindows.
A QDockArea is a container which manages a list of QDockWindows which it lays out within its area. In cooperation with the QDockWindows it is responsible for the docking and undocking of QDockWindows and moving them inside the dock area. QDockAreas also handle the wrapping of QDockWindows to fill the available space as compactly as possible. QDockAreas can contain QToolBars since QToolBar is a QDockWindow subclass. QMainWindow contains four QDockAreas which you can use for your QToolBars and QDockWindows, so in most situations you do not need to use the QDockArea class directly. Although QMainWindow contains support for its own dock areas it isn't convenient for adding new QDockAreas. If you need to create your own dock areas we suggest that you create a subclass of QWidget and add your QDockAreas to your subclass.
The QDockArea class maintains a position list of all its child
dock windows. Dock windows are added to a dock area from position
0 onwards. Dock windows are laid out sequentially in position
order from left to right, and in the case of multiple lines of
dock windows, from top to bottom. If a dock window is floated it
still retains its position since this is where the window will
return if the user double clicks its caption. A dock window's
position can be determined with hasDockWindow(). The position can
be changed with moveDockWindow().
To dock or undock a dock window use QDockWindow::dock() and
QDockWindow::undock() respectively. If you want to control which
dock windows can dock in a dock area use setAcceptDockWindow(). To
see if a dock area contains a particular dock window use
hasDockWindow(); to see how many dock windows a dock area
contains use count().
The streaming operators can write the positions of the dock
windows in the dock area to a QTextStream. The positions can be
read back later to restore the saved positions.
Save the positions to a QTextStream:
Restore the positions from a QTextStream:
See also Main Window and Related Classes.
A dock window has two kinds of handles, the dock window handle
used for dragging the dock window, and the splitter handle used to
resize the dock window in relation to other dock windows using a
splitter. (The splitter handle is only visible for docked
windows.)
This enum specifies where the dock window splitter handle is
placed in the dock area.
Does not affect any floating dock windows or dock windows in other
dock areas, even if they first appeared in this dock area.
Floating dock windows are effectively top level windows and are
not child windows of the dock area. When a floating dock window is
docked (dragged into a dock area) its parent becomes the dock
area.
Returns the number of dock windows in the dock area.
See the "count" property for details.
Returns where the dock window splitter handle is placed in the dock area.
See the "handlePosition" property for details.
See also setAcceptDockWindow().
Returns TRUE if the dock area is empty; otherwise returns FALSE.
See the "empty" property for details.
Moves the dock window w inside the dock area where p is the
new position (in global screen coordinates), r is the suggested
rectangle of the dock window and swap specifies whether or not
the orientation of the docked widget needs to be changed.
This function is used internally by QDockWindow. You shouldn't
need to call it yourself.
Returns the dock area's orientation.
See the "orientation" property for details.
You should never need to call this function yourself. Use
QDockWindow::dock() and QDockWindow::undock() instead.
See also isDockWindowAccepted().
This property holds the number of dock windows in the dock area.
Get this property's value with count().
This property holds whether the dock area is empty.
Get this property's value with isEmpty().
This property holds where the dock window splitter handle is placed in the dock area.
The default position is Normal.
Get this property's value with handlePosition().
This property holds the dock area's orientation.
There is no default value; the orientation is specified in the
constructor.
Get this property's value with orientation().
Writes the layout of the dock windows in dock area dockArea to
the text stream ts.
See also operator>>().
Reads the layout description of the dock windows in dock area dockArea from the text stream ts and restores it. The layout
description must have been previously written by the operator<<()
function.
See also operator<<().
This file is part of the Qt toolkit.
Copyright © 1995-2003
Trolltech. All Rights Reserved. |
Publicité
Best OfActualités les plus luesSemaine
Mois
Année
Le Qt Labs au hasardQuand il est juste de se tromperLes Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.
CommunautéRessources
Liens utilesContact
Qt dans le magazine |
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 3.2 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com