Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QDockWindow Class Reference

The QDockWindow class provides a widget that can be docked inside a QMainWindow or floated as a top-level window on the desktop. More...

#include <QDockWindow>

Inherits QFrame.

List of all members.

Public Types

Writable Properties

Read-Only Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

The QDockWindow class provides a widget that can be docked inside a QMainWindow or floated as a top-level window on the desktop.

QDockWindow provides the concept of dock windows, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the dock window area around the center widget in a QMainWindow.

### mainwindow diagram showing the various areas of the mainwindow should go here - see below

Dock windows can be moved inside their current area, moved into new areas and floated (e.g. undocked) by the end-user. The QDockWindow API allows the programmer to restrict the dock windows ability to move, float and close, as well as the areas in which they can be placed.

Appearance

A QDockWindow consists of a title bar and the content area. The titlebar displays the dock windows window title, a float button and a close button. Depending on the state of the QDockWindow, the float and close buttons may be either disabled or not shown at all.

The visual appearance of the title bar and buttons is style dependent.

### screenshot of QDockWindow in a few styles should go here

Behavior

See also QMainWindow.


Member Type Documentation

enum QDockWindow::DockWindowFeature
typedef QDockWindow::DockWindowFeatures

QDockWindow::DockWindowClosableThe dock window can be closed.
QDockWindow::DockWindowMovableThe dock window can be moved between docks by the user.
QDockWindow::DockWindowFloatableThe dock window can be detached from the main window, and floated as an independent window.
QDockWindow::AllDockWindowFeaturesThe dock window can be closed, moved, and floated.
QDockWindow::NoDockWindowFeaturesThe dock window cannot be closed, moved, or floated.

The DockWindowFeatures typedef can store a combination of DockWindowFeature values.


Property Documentation

allowedAreas : Qt::DockWindowAreas

This property holds areas where the dock window may be placed.

The default is Qt::AllDockWindowAreas.

Access functions:

See also QDockWindow::area.

area : Qt::DockWindowArea

This property holds area where the dock window is current placed.

The default is Qt::DockWindowAreaLeft.

Access functions:

See also QDockWindow::allowedAreas.

features : DockWindowFeatures

This property holds whether the dock window is movable, closable, and floatable.

Access functions:

See also DockWindowFeature, setFeature(), and hasFeature().


Member Function Documentation

QDockWindow::QDockWindow ( QMainWindow * parent, Qt::WFlags flags = 0 )

Constructs a QDockWindow with parent parent and widget flags flags. The dock window will be placed in the left dock window area.

QDockWindow::QDockWindow ( QMainWindow * parent, Qt::DockWindowArea area, Qt::WFlags flags = 0 )

Constructs a QDockWindow with parent parent, placed in area and with widget flags flags.

QDockWindow::~QDockWindow ()

Destroys the dock window.

bool QDockWindow::hasFeature ( DockWindowFeature feature ) const

bool QDockWindow::isDockable ( Qt::DockWindowArea area )

Returns true if this dock window can be placed in the given area; otherwise returns false.

QMainWindow * QDockWindow::mainWindow () const

Returns the main window for this dock window.

See also setParent().

void QDockWindow::setFeature ( DockWindowFeature features, bool on = true )

void QDockWindow::setParent ( QMainWindow * parent )

Sets the main window for this dock window to parent.

See also mainWindow().

void QDockWindow::setWidget ( QWidget * widget )

Sets the widget for the dock window to widget.

See also widget().

QWidget * QDockWindow::widget () const

Returns the widget for the dock window. This function returns zero if the widget has not been set.

See also setWidget().


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1