The QAbstractToolWindowManagerArea class is the base class for widgets used by QToolWindowManager to display one or several tool windows in its layout or floating windows.
More...
Inherits QWidget.
|
class | QToolWindowManager |
|
class | QToolWindowManagerPrivate |
|
The QAbstractToolWindowManagerArea class is the base class for widgets used by QToolWindowManager to display one or several tool windows in its layout or floating windows.
To customize appearance and behavior of areas, subclass QAbstractToolWindowManagerArea and implement its virtual functions. Also subclass QToolWindowManager and reimplement QToolWindowManager::createArea to return new object of created subclass.
A subclass of QAbstractToolWindowManagerArea should implement displaying one or multiple tool windows, ability to switch between them, drag one tool window or entire area out of its place using mouse.
QtWidgets
- Since
- 5.4
QAbstractToolWindowManagerArea::QAbstractToolWindowManagerArea |
( |
QToolWindowManager * |
manager | ) |
|
|
explicit |
Creates new area for the manager.
QAbstractToolWindowManagerArea::activateToolWindow |
( |
QWidget * |
toolWindow | ) |
|
|
pure virtual |
Implement this function to activate (show, raise) toolWindow in the area. toolWindow must be a member of the area.
QAbstractToolWindowManagerArea::addToolWindows |
( |
const QWidgetList & |
toolWindows | ) |
|
|
protectedpure virtual |
Implement this function to add toolWindows to the area. The area may become a parent of tool windows to display them. toolWindows should appear in the end of QAbstractToolWindowManagerArea::toolWindows list immediately after this action. However if the area implementation provides a way to change tool windows order and user has changed it, QAbstractToolWindowManagerArea::toolWindow order should change accordingly.
Returns the manager for this area.
QAbstractToolWindowManagerArea::removeToolWindow |
( |
QWidget * |
toolWindow | ) |
|
|
protectedpure virtual |
Implement this function to remove toolWindow from the area. Ownership and visibility of toolWindow should not be changed, as it's a responsibility of the manager to adjust them.
void QAbstractToolWindowManagerArea::restoreState |
( |
const QVariant & |
state | ) |
|
|
protectedvirtual |
QVariant QAbstractToolWindowManagerArea::saveState |
( |
| ) |
const |
|
protectedvirtual |
This virtual function should be reimplemented to return additional state data specific to this area, e.g. current tool window (if applicable). Default implementation returns invalid QVariant.
void QAbstractToolWindowManagerArea::startDrag |
( |
const QWidgetList & |
toolWindows | ) |
|
|
protected |
Call this function to notify the manager that a drag operation on toolWindows has begun. The manager will take control of this process and move toolWindows to new position when the drag operation ends successfully.
QAbstractToolWindowManagerArea::toolWindows |
( |
| ) |
const |
|
pure virtual |
Implement this function to return list of tool windows in this area in actual order.
void QAbstractToolWindowManagerArea::updateDragPosition |
( |
| ) |
|
|
protected |
When user starts dragging tool windows from the area, it continues to receive mouse events even if the mouse pointer leaves its boundaries. Call this function on every mouse move or release event to update manager's state according to new mouse state.
TODO: we should try to implement this internally using event filters.