The QWorkspace widget provides a workspace window that can contain decorated windows, e.g. for MDI. More...
#include <qworkspace.h>
Inherits QWidget.
An MDI application has one main window with a menu bar. The central widget of this window is a workspace. The workspace itself contains zero, one or more document windows, each of which displays a document.
The workspace itself is an ordinary Qt widget. It has a standard constructor that takes a parent widget and an object name. The parent window is usually a QMainWindow, but it need not be.
Document windows (alias MDI windows) are also ordinary Qt widgets, that have the workspace as parent widget. When you call show(), hide(), showMaximized(), setCaption(), etc on a document window, it is shown, hidden etc. with a frame, caption, icon and icon text, just as you'd expect.
A document window becomes active when it gets the keyboard focus. You can activate it using setFocus(), and the user can activate it by moving focus in the normal ways. The workspace emits a signal clientActivated() when it detects the activation change, and the function activeClient() always returns a pointer to the active document window.
The convenience function clientList() returns a list of all document windows. This is useful to create a popup menu "&Windows" on the fly, for example.
QWorkspace provides two built-in layout strategies for child windows, cascade() and tile(). Both are slots, so you can easily connect menu entries to them.
In case the toplevel window contains a menu bar and a document window is maximized, QWorkspace moves the child window's minimize, restore and close buttons from the document's frame to the workspace window's menu bar, and inserts a window operations menu on the extreme left of the menu bar.
Warning: User interface research indicates that most users have problems with MDI applications. Use this class cautiously.
Constructs a workspace with a parent and a name
Destroys the object and frees any allocated resources.
Returns the active client, or 0 if no client is active.
[slot]
Arranges all child windows in a cascade pattern
See also: tile().
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QObject.
[signal]
This signal is emitted when the client widget w becomes active.
See also: activeClient() and clientList().
Returns a list of all clients.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QObject.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QWidget.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QWidget.
[virtual]
Specifies that this widget can use additional space, and that it can survive on less than sizeHint().
Reimplemented from QWidget.
[slot]
Arranges all child windows in a tile pattern
See also: cascade().
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-2000 Troll Tech, all rights reserved.
Copyright © 2000 Troll Tech | Trademarks | Qt version 2.1.0-beta1
|