Eneboo - Documentación para desarrolladores
Tipos públicos | Slots públicos | Señales | Métodos públicos | Métodos protegidos | Propiedades | Amigas
Referencia de la Clase QDockWindow

The QDockWindow class provides a widget which can be docked inside a QDockArea or floated as a top level window on the desktop. Más...

#include <qdockwindow.h>

Diagrama de herencias de QDockWindow
QFrame QFrame QWidget QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QToolBar QToolBar QDesignerToolBar QDesignerToolBar

Lista de todos los miembros.

Tipos públicos

enum  Place { InDock, OutsideDock, InDock, OutsideDock }
enum  CloseMode {
  Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked,
  Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked
}
enum  Place { InDock, OutsideDock, InDock, OutsideDock }
enum  CloseMode {
  Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked,
  Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked
}

Slots públicos

virtual void undock (QWidget *w)
virtual void undock ()
virtual void dock ()
virtual void setOrientation (Orientation o)
void setCaption (const QString &s)
virtual void undock (QWidget *w)
virtual void undock ()
virtual void dock ()
virtual void setOrientation (Orientation o)
void setCaption (const QString &s)

Señales

void orientationChanged (Orientation o)
void placeChanged (QDockWindow::Place p)
void visibilityChanged (bool)
void orientationChanged (Orientation o)
void placeChanged (QDockWindow::Place p)
void visibilityChanged (bool)

Métodos públicos

 QDockWindow (Place p=InDock, QWidget *parent=0, const char *name=0, WFlags f=0)
 QDockWindow (QWidget *parent, const char *name=0, WFlags f=0)
 ~QDockWindow ()
virtual void setWidget (QWidget *w)
QWidgetwidget () const
Place place () const
QDockAreaarea () const
virtual void setCloseMode (int m)
bool isCloseEnabled () const
int closeMode () const
virtual void setResizeEnabled (bool b)
virtual void setMovingEnabled (bool b)
bool isResizeEnabled () const
bool isMovingEnabled () const
virtual void setHorizontallyStretchable (bool b)
virtual void setVerticallyStretchable (bool b)
bool isHorizontallyStretchable () const
bool isVerticallyStretchable () const
void setHorizontalStretchable (bool b)
void setVerticalStretchable (bool b)
bool isHorizontalStretchable () const
bool isVerticalStretchable () const
bool isStretchable () const
virtual void setOffset (int o)
int offset () const
virtual void setFixedExtentWidth (int w)
virtual void setFixedExtentHeight (int h)
QSize fixedExtent () const
virtual void setNewLine (bool b)
bool newLine () const
Qt::Orientation orientation () const
QSize sizeHint () const
QSize minimumSize () const
QSize minimumSizeHint () const
QBoxLayoutboxLayout ()
virtual void setOpaqueMoving (bool b)
bool opaqueMoving () const
bool eventFilter (QObject *o, QEvent *e)
 QDockWindow (Place p=InDock, QWidget *parent=0, const char *name=0, WFlags f=0)
 QDockWindow (QWidget *parent, const char *name=0, WFlags f=0)
 ~QDockWindow ()
virtual void setWidget (QWidget *w)
QWidgetwidget () const
Place place () const
QDockAreaarea () const
virtual void setCloseMode (int m)
bool isCloseEnabled () const
int closeMode () const
virtual void setResizeEnabled (bool b)
virtual void setMovingEnabled (bool b)
bool isResizeEnabled () const
bool isMovingEnabled () const
virtual void setHorizontallyStretchable (bool b)
virtual void setVerticallyStretchable (bool b)
bool isHorizontallyStretchable () const
bool isVerticallyStretchable () const
void setHorizontalStretchable (bool b)
void setVerticalStretchable (bool b)
bool isHorizontalStretchable () const
bool isVerticalStretchable () const
bool isStretchable () const
virtual void setOffset (int o)
int offset () const
virtual void setFixedExtentWidth (int w)
virtual void setFixedExtentHeight (int h)
QSize fixedExtent () const
virtual void setNewLine (bool b)
bool newLine () const
Qt::Orientation orientation () const
QSize sizeHint () const
QSize minimumSize () const
QSize minimumSizeHint () const
QBoxLayoutboxLayout ()
virtual void setOpaqueMoving (bool b)
bool opaqueMoving () const
bool eventFilter (QObject *o, QEvent *e)

Métodos protegidos

void resizeEvent (QResizeEvent *e)
void showEvent (QShowEvent *e)
void hideEvent (QHideEvent *e)
void contextMenuEvent (QContextMenuEvent *e)
void drawFrame (QPainter *)
void drawContents (QPainter *)
bool event (QEvent *e)
void resizeEvent (QResizeEvent *e)
void showEvent (QShowEvent *e)
void hideEvent (QHideEvent *e)
void contextMenuEvent (QContextMenuEvent *e)
void drawFrame (QPainter *)
void drawContents (QPainter *)
bool event (QEvent *e)

Propiedades

int closeMode
 the close mode of a dock window
bool resizeEnabled
 whether the dock window is resizeable
bool movingEnabled
 whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window.
bool horizontallyStretchable
 whether the dock window is horizontally stretchable.
bool verticallyStretchable
 whether the dock window is vertically stretchable.
bool stretchable
 whether the dock window is stretchable in the current orientation()
bool newLine
 whether the dock window prefers to start a new line in the dock area.
bool opaqueMoving
 whether the dock window will be shown normally whilst it is being moved.
int offset
 the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas)
Place place

Amigas

class QDockWindowHandle
class QDockWindowTitleBar
class QDockArea
class QDockAreaLayout
class QMainWindow
class QCEMainWindow
class QToolBar
class QWindowsXPStyle

Descripción detallada

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

This class handles moving, resizing, docking and undocking dock windows. QToolBar is a subclass of QDockWindow so the functionality provided for dock windows is available with the same API for toolbars.

qmainwindow-qdockareas.png QDockWindows in a QDockArea Two QDockWindows ({QToolBar}s) in a QDockArea

qdockwindow.png A QDockWindow A Floating QDockWindow

If the user drags the dock window into the dock area the dock window will be docked. If the user drags the dock area outside any dock areas the dock window will be undocked (floated) and will become a top level window. Double clicking a floating dock window's titlebar will dock the dock window to the last dock area it was docked in. Double clicking a docked dock window's handle will undock (float) the dock window. Single clicking a docked dock window's handle will minimize the dock window (only its handle will appear, below the menu bar). Single clicking the minimized handle will restore the dock window to the last dock area that it was docked in. If the user clicks the close button (which does not appear on dock windows by default - see closeMode) the dock window will disappear. You can control whether or not a dock window has a close button with setCloseMode().

QMainWindow provides four dock areas (top, left, right and bottom) which can be used by dock windows. For many applications using the dock areas provided by QMainWindow is sufficient. (See the QDockArea documentation if you want to create your own dock areas.) In QMainWindow a right-click popup menu (the dock window menu) is available which lists dock windows and can be used to show or hide them. (The popup menu only lists dock windows that have a caption.)

When you construct a dock window you must pass it a QDockArea or a QMainWindow as its parent if you want it docked. Pass 0 for the parent if you want it floated.

    QToolBar *fileTools = new QToolBar( this, "File Actions" );
    moveDockWindow( fileTools, Left );

In the example above we create a new QToolBar in the constructor of a QMainWindow subclass (so that the this pointer points to the QMainWindow). By default the toolbar will be added to the Top dock area, but we've moved it to the Left dock area.

A dock window is often used to contain a single widget. In these cases the widget can be set by calling setWidget(). If you're constructing a dock window that contains multiple widgets, e.g. a toolbar, arrange the widgets within a box layout inside the dock window. To do this use the boxLayout() function to get a pointer to the dock window's box layout, then add widgets to the layout using the box layout's QBoxLayout::addWidget() function. The dock window will dynamically set the orientation of the layout to be vertical or horizontal as necessary, although you can control this yourself with setOrientation().

Although a common use of dock windows is for toolbars, they can be used with any widgets. (See the Qt Designer and Qt Linguist applications, for example.) When using larger widgets it may make sense for the dock window to be resizable by calling setResizeEnabled(). Resizable dock windows are given splitter-like handles to allow the user to resize them within their dock area. When resizable dock windows are undocked they become top level windows and can be resized like any other top level windows, e.g. by dragging a corner or edge.

Dock windows can be docked and undocked using dock() and undock(). A dock window's orientation can be set with setOrientation(). You can also use QDockArea::moveDockWindow(). If you're using a QMainWindow, QMainWindow::moveDockWindow() and QMainWindow::removeDockWindow() are available.

A dock window can have some preferred settings, for example, you can set a preferred offset from the left edge (or top edge for vertical dock areas) of the dock area using setOffset(). If you'd prefer a dock window to start on a new line when it is docked use setNewLine(). The setFixedExtentWidth() and setFixedExtentHeight() functions can be used to define the dock window's preferred size, and the setHorizontallyStretchable() and setVerticallyStretchable() functions set whether the dock window can be stretched or not. Dock windows can be moved by default, but this can be changed with setMovingEnabled(). When a dock window is moved it is shown as a rectangular outline, but it can be shown normally using setOpaqueMoving().

When a dock window's visibility changes, i.e. it is shown or hidden, the visibilityChanged() signal is emitted. When a dock window is docked, undocked or moved inside the dock area the placeChanged() signal is emitted.


Documentación de las enumeraciones miembro de la clase

This enum type specifies when (if ever) a dock window has a close button.

Never The dock window never has a close button and cannot be closed by the user. Docked The dock window has a close button only when docked. Undocked The dock window has a close button only when floating. Always The dock window always has a close button. Note that dock windows can always be minimized if the user clicks their dock window handle when they are docked.

Valores de enumeraciones:
Never 
Docked 
Undocked 
Always 
Never 
Docked 
Undocked 
Always 
Valores de enumeraciones:
Never 
Docked 
Undocked 
Always 
Never 
Docked 
Undocked 
Always 
Valores de enumeraciones:
InDock 
OutsideDock 
InDock 
OutsideDock 

This enum specifies the possible locations for a QDockWindow:

InDock Inside a QDockArea. OutsideDock Floating as a top level window on the desktop.

Valores de enumeraciones:
InDock 
OutsideDock 
InDock 
OutsideDock 

Documentación del constructor y destructor

QDockWindow::QDockWindow ( Place  p = InDock,
QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Constructs a QDockWindow with parent parent, called name and with widget flags f.

If p is InDock, the dock window is docked into a dock area and parent must be a QDockArea or a QMainWindow. If the parent is a QMainWindow the dock window will be docked in the main window's Top dock area.

If p is OutsideDock, the dock window is created as a floating window.

We recommend creating the dock area InDock with a QMainWindow as parent then calling QMainWindow::moveDockWindow() to move the dock window where you want it.

QDockWindow::QDockWindow ( QWidget parent,
const char *  name = 0,
WFlags  f = 0 
)

Constructs a QDockWindow with parent parent, called name and with widget flags f.

QDockWindow::~QDockWindow ( )

Destroys the dock window and its child widgets.

QDockWindow::QDockWindow ( Place  p = InDock,
QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)
QDockWindow::QDockWindow ( QWidget parent,
const char *  name = 0,
WFlags  f = 0 
)
QDockWindow::~QDockWindow ( )

Documentación de las funciones miembro

QDockArea * QDockWindow::area ( ) const [inline]

Returns the dock area in which this dock window is docked, or 0 if the dock window is floating.

QDockArea* QDockWindow::area ( ) const
QBoxLayout * QDockWindow::boxLayout ( )

Returns the layout which is used for adding widgets to the dock window. The layout's orientation is set automatically to match the orientation of the dock window. You can add widgets to the layout using the box layout's QBoxLayout::addWidget() function.

If the dock window only needs to contain a single widget use setWidget() instead.

Ver también:
setWidget() setOrientation()
QBoxLayout* QDockWindow::boxLayout ( )
int QDockWindow::closeMode ( ) const
int QDockWindow::closeMode ( ) const
void QDockWindow::contextMenuEvent ( QContextMenuEvent e) [protected, virtual]

Reimplementado de QWidget.

Reimplementado en QDesignerToolBar.

void QDockWindow::contextMenuEvent ( QContextMenuEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive widget context menu events.

The default implementation calls e->ignore(), which rejects the context event. See the QContextMenuEvent documentation for more details.

Ver también:
event(), QContextMenuEvent

Reimplementado de QWidget.

Reimplementado en QDesignerToolBar.

void QDockWindow::dock ( ) [virtual, slot]

Docks the dock window into the last dock area in which it was docked.

If the dock window has no last dock area (e.g. it was created as a floating window and has never been docked), or if the last dock area it was docked in does not exist (e.g. the dock area has been deleted), nothing happens.

The dock window will dock with the dock area regardless of the return value of QDockArea::isDockWindowAccepted().

Ver también:
undock() QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow(), QMainWindow::removeDockWindow(), QDockArea::isDockWindowAccepted()
virtual void QDockWindow::dock ( ) [virtual, slot]
void QDockWindow::drawContents ( QPainter ) [protected, virtual]

Virtual function that draws the contents of the frame.

The QPainter is already open when you get it, and you must leave it open. Painter transformations are switched off on entry. If you transform the painter, remember to take the frame into account and reset transformation before returning.

This function is reimplemented by subclasses that draw something inside the frame. It should only draw inside contentsRect(). The default function does nothing.

Ver también:
contentsRect(), QPainter::setClipRect()

Reimplementado de QFrame.

void QDockWindow::drawContents ( QPainter p) [protected, virtual]

Reimplementado de QFrame.

void QDockWindow::drawFrame ( QPainter p) [protected, virtual]

Reimplementado de QFrame.

void QDockWindow::drawFrame ( QPainter p) [protected, virtual]

Draws the frame using the painter p and the current frame attributes and color group. The rectangle inside the frame is not affected.

This function is virtual, but in general you do not need to reimplement it. If you do, note that the QPainter is already open and must remain open.

Ver también:
frameRect(), contentsRect(), drawContents(), frameStyle(), setPalette()

Reimplementado de QFrame.

bool QDockWindow::event ( QEvent e) [protected, virtual]

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

bool QDockWindow::event ( QEvent e) [protected, virtual]

This is the main event handler; it handles event e. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.

The main event handler first passes an event through all event filters that have been installed. If none of the filters intercept the event, it calls one of the specialized event handlers.

Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls keyPressEvent().

This function returns TRUE if it is able to pass the event over to someone (i.e. someone wanted the event); otherwise returns FALSE.

Ver también:
closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(), keyPressEvent(), keyReleaseEvent(), leaveEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), paintEvent(), resizeEvent(), QObject::event(), QObject::timerEvent()

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

bool QDockWindow::eventFilter ( QObject o,
QEvent e 
) [virtual]

Reimplementado de QObject.

Reimplementado en QDesignerToolBar.

bool QDockWindow::eventFilter ( QObject ,
QEvent  
) [virtual]

Filters events if this object has been installed as an event filter for the watched object.

In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.

Example:

    class MyMainWindow : public QMainWindow
    {
    public:
        MyMainWindow( QWidget *parent = 0, const char *name = 0 );

    protected:
        bool eventFilter( QObject *obj, QEvent *ev );

    private:
        QTextEdit *textEdit;
    };

    MyMainWindow::MyMainWindow( QWidget *parent, const char *name )
        : QMainWindow( parent, name )
    {
        textEdit = new QTextEdit( this );
        setCentralWidget( textEdit );
        textEdit->installEventFilter( this );
    }

    bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev )
    {
        if ( obj == textEdit ) {
            if ( e->type() == QEvent::KeyPress ) {
                QKeyEvent *k = (QKeyEvent*)ev;
                qDebug( "Ate key press %d", k->key() );
                return TRUE;
            } else {
                return FALSE;
            }
        } else {
            // pass the event on to the parent class
            return QMainWindow::eventFilter( obj, ev );
        }
    }

Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

Reimplementado de QObject.

Reimplementado en QDesignerToolBar.

QSize QDockWindow::fixedExtent ( ) const
QSize QDockWindow::fixedExtent ( ) const

Returns the dock window's preferred size (fixed extent).

Ver también:
setFixedExtentWidth() setFixedExtentHeight()
void QDockWindow::hideEvent ( QHideEvent e) [protected, virtual]

Reimplementado de QWidget.

void QDockWindow::hideEvent ( QHideEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget hide events.

Hide events are sent to widgets immediately after they have been hidden.

Ver también:
event(), QHideEvent

Reimplementado de QWidget.

bool QDockWindow::isCloseEnabled ( ) const

Returns TRUE if the dock window has a close button; otherwise returns FALSE. The result depends on the dock window's Place and its CloseMode.

Ver también:
setCloseMode()
bool QDockWindow::isCloseEnabled ( ) const
bool QDockWindow::isHorizontallyStretchable ( ) const
bool QDockWindow::isHorizontallyStretchable ( ) const
bool QDockWindow::isHorizontalStretchable ( ) const [inline]
bool QDockWindow::isHorizontalStretchable ( ) const [inline]
bool QDockWindow::isMovingEnabled ( ) const
bool QDockWindow::isMovingEnabled ( ) const
bool QDockWindow::isResizeEnabled ( ) const
bool QDockWindow::isResizeEnabled ( ) const
bool QDockWindow::isStretchable ( ) const
bool QDockWindow::isStretchable ( ) const
bool QDockWindow::isVerticallyStretchable ( ) const
bool QDockWindow::isVerticallyStretchable ( ) const
bool QDockWindow::isVerticalStretchable ( ) const [inline]
bool QDockWindow::isVerticalStretchable ( ) const [inline]
QSize QDockWindow::minimumSize ( ) const

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

QSize QDockWindow::minimumSize ( ) const

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

QSize QDockWindow::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

QSize QDockWindow::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

Reimplementado en QToolBar y QToolBar.

bool QDockWindow::newLine ( ) const
bool QDockWindow::newLine ( ) const
int QDockWindow::offset ( ) const
int QDockWindow::offset ( ) const
bool QDockWindow::opaqueMoving ( ) const
bool QDockWindow::opaqueMoving ( ) const
Qt::Orientation QDockWindow::orientation ( ) const
Qt::Orientation QDockWindow::orientation ( ) const

Returns the orientation of the dock window.

Ver también:
orientationChanged()
void QDockWindow::orientationChanged ( Orientation  o) [signal]

This signal is emitted when the orientation of the dock window is changed. The new orientation is o.

void QDockWindow::orientationChanged ( Orientation  o) [signal]
Place QDockWindow::place ( ) const [inline]
Place QDockWindow::place ( ) const [inline]
void QDockWindow::placeChanged ( QDockWindow::Place  p) [signal]

This signal is emitted when the dock window is docked (p is InDock), undocked (p is OutsideDock) or moved inside the the dock area.

Ver también:
QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow(), QMainWindow::removeDockWindow()
void QDockWindow::placeChanged ( QDockWindow::Place  p) [signal]
void QDockWindow::resizeEvent ( QResizeEvent e) [protected, virtual]

Reimplementado de QFrame.

Reimplementado en QToolBar y QToolBar.

void QDockWindow::resizeEvent ( QResizeEvent e) [protected, virtual]

Processes the resize event e.

Adjusts the frame rectangle for the resized widget. The frame rectangle is elastic, and the surrounding area is static.

The resulting frame rectangle may be null or invalid. You can use setMinimumSize() to avoid those possibilities.

Nothing is done if the frame rectangle is a null rectangle already.

Reimplementado de QFrame.

Reimplementado en QToolBar y QToolBar.

void QDockWindow::setCaption ( const QString s) [virtual, slot]

Reimplementado de QWidget.

void QDockWindow::setCaption ( const QString caption) [virtual, slot]

Sets the window caption (title) to caption.

Ver también:
caption(), setIcon(), setIconText()

Reimplementado de QWidget.

void QDockWindow::setCloseMode ( int  m) [virtual]
virtual void QDockWindow::setCloseMode ( int  m) [virtual]
virtual void QDockWindow::setFixedExtentHeight ( int  h) [virtual]
void QDockWindow::setFixedExtentHeight ( int  h) [virtual]

Sets the dock window's preferred height for its fixed extent (size) to h.

Ver también:
setFixedExtentWidth()
virtual void QDockWindow::setFixedExtentWidth ( int  w) [virtual]
void QDockWindow::setFixedExtentWidth ( int  w) [virtual]

Sets the dock window's preferred width for its fixed extent (size) to w.

Ver también:
setFixedExtentHeight()
void QDockWindow::setHorizontallyStretchable ( bool  b) [virtual]
virtual void QDockWindow::setHorizontallyStretchable ( bool  b) [virtual]
void QDockWindow::setHorizontalStretchable ( bool  b) [inline]
void QDockWindow::setHorizontalStretchable ( bool  b) [inline]
void QDockWindow::setMovingEnabled ( bool  b) [virtual]
virtual void QDockWindow::setMovingEnabled ( bool  b) [virtual]
virtual void QDockWindow::setNewLine ( bool  b) [virtual]
void QDockWindow::setNewLine ( bool  b) [virtual]
void QDockWindow::setOffset ( int  o) [virtual]
virtual void QDockWindow::setOffset ( int  o) [virtual]
void QDockWindow::setOpaqueMoving ( bool  b) [virtual]
virtual void QDockWindow::setOpaqueMoving ( bool  b) [virtual]
void QDockWindow::setOrientation ( Orientation  o) [virtual, slot]

Sets the orientation of the dock window to o. The orientation is propagated to the layout boxLayout().

Atención:
All undocked QToolBars will always have a horizontal orientation.
virtual void QDockWindow::setOrientation ( Orientation  o) [virtual, slot]
virtual void QDockWindow::setResizeEnabled ( bool  b) [virtual]
void QDockWindow::setResizeEnabled ( bool  b) [virtual]
void QDockWindow::setVerticallyStretchable ( bool  b) [virtual]
virtual void QDockWindow::setVerticallyStretchable ( bool  b) [virtual]
void QDockWindow::setVerticalStretchable ( bool  b) [inline]
void QDockWindow::setVerticalStretchable ( bool  b) [inline]
void QDockWindow::setWidget ( QWidget w) [virtual]

Sets the dock window's main widget to w.

Ver también:
boxLayout()
virtual void QDockWindow::setWidget ( QWidget w) [virtual]
void QDockWindow::showEvent ( QShowEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget show events.

Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of top-level widgets are delivered afterwards.

Ver también:
event(), QShowEvent

Reimplementado de QWidget.

void QDockWindow::showEvent ( QShowEvent e) [protected, virtual]

Reimplementado de QWidget.

QSize QDockWindow::sizeHint ( ) const [virtual]

Reimplementado de QFrame.

QSize QDockWindow::sizeHint ( ) const [virtual]

Reimplementado de QFrame.

virtual void QDockWindow::undock ( ) [inline, virtual, slot]
void QDockWindow::undock ( QWidget w) [virtual, slot]
virtual void QDockWindow::undock ( QWidget w) [virtual, slot]
void QDockWindow::undock ( ) [inline, virtual, slot]

Undocks the QDockWindow from its current dock area if it is docked; otherwise does nothing.

Ver también:
dock() QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow(), QMainWindow::removeDockWindow()
void QDockWindow::visibilityChanged ( bool  visible) [signal]

This signal is emitted when the visibility of the dock window relatively to its dock area is changed. If visible is TRUE, the QDockWindow is now visible to the dock area, otherwise it has been hidden.

A dock window can be hidden if it has a close button which the user has clicked. In the case of a QMainWindow a dock window can have its visibility changed (hidden or shown) by clicking its name in the dock window menu that lists the QMainWindow's dock windows.

void QDockWindow::visibilityChanged ( bool  ) [signal]
QWidget* QDockWindow::widget ( ) const
QWidget * QDockWindow::widget ( ) const

Returns the dock window's main widget.

Ver también:
setWidget()

Documentación de las funciones relacionadas y clases amigas

QCEMainWindow [friend]
QDockArea [friend]
QDockAreaLayout [friend]
QMainWindow [friend]

Reimplementado en QToolBar.

QToolBar [friend]
QWindowsXPStyle [friend]

Documentación de propiedades

int QDockWindow::closeMode [read, write]

the close mode of a dock window

Defines when (if ever) the dock window has a close button. The choices are Never, Docked (i.e. only when docked), Undocked (only when undocked, i.e. floated) or Always.

The default is Never.

bool QDockWindow::horizontallyStretchable [read, write]

whether the dock window is horizontally stretchable.

A dock window is horizontally stretchable if you call setHorizontallyStretchable(TRUE) or setResizeEnabled(TRUE).

Ver también:
setResizeEnabled()
Bug:
Strecthability is broken. You must call setResizeEnabled(TRUE) to get proper behavior and even then QDockWindow does not limit stretchablilty.
bool QDockWindow::movingEnabled [read, write]

whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window.

This property is TRUE by default.

bool QDockWindow::newLine [read, write]

whether the dock window prefers to start a new line in the dock area.

The default is FALSE, i.e. the dock window doesn't require a new line in the dock area.

int QDockWindow::offset [read, write]

the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas)

The default is 0.

bool QDockWindow::opaqueMoving [read, write]

whether the dock window will be shown normally whilst it is being moved.

If this property is FALSE, (the default), the dock window will be represented by an outline rectangle whilst it is being moved.

Atención:
Currently opaque moving has some problems and we do not recommend using it at this time. We expect to fix these problems in a future release.
Place QDockWindow::place [read]

This function returns where the dock window is placed. This is either InDock or OutsideDock.

Ver también:
QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow(), QMainWindow::removeDockWindow()
bool QDockWindow::resizeEnabled [read, write]

whether the dock window is resizeable

A resizeable dock window can be resized using splitter-like handles inside a dock area and like every other top level window when floating.

A dock window is both horizontally and vertically stretchable if you call setResizeEnabled(TRUE).

This property is FALSE by default.

Ver también:
setVerticallyStretchable() setHorizontallyStretchable()
bool QDockWindow::stretchable [read]

whether the dock window is stretchable in the current orientation()

This property can be set using setHorizontallyStretchable() and setVerticallyStretchable(), or with setResizeEnabled().

Ver también:
setResizeEnabled()
Bug:
Strecthability is broken. You must call setResizeEnabled(TRUE) to get proper behavior and even then QDockWindow does not limit stretchablilty.
bool QDockWindow::verticallyStretchable [read, write]

whether the dock window is vertically stretchable.

A dock window is vertically stretchable if you call setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE).

Ver también:
setResizeEnabled()
Bug:
Strecthability is broken. You must call setResizeEnabled(TRUE) to get proper behavior and even then QDockWindow does not limit stretchablilty.

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'