|  | KDDockWidgets API Documentation 1.7
    | 
MDIArea allows to host dock widget in MDI mode. This is an alternative to using a full blown MainWindowMDI. The use case is when you already have a MainWindow (doing normal docking) and you want to add an area where you want to use MDI dock widgets. Instead of docking a MainWindowMDI, you'd just use an MDIArea, and avoid having nested main windows. More...
#include <MDIArea.h>


| Public Member Functions | |
| MDIArea (QWidgetOrQuick *parent=nullptr) | |
| ~MDIArea () | |
| void | addDockWidget (DockWidgetBase *dw, QPoint localPt, InitialOption addingOption={}) | 
| docks the dock widgets into this MDI area, at the specified position | |
| QList< Frame * > | frames () const | 
| Returns the list of frames in this MDI Area Each Frame object represents a 'window' emebedded in the MDI Area. | |
| void | moveDockWidget (DockWidgetBase *dw, QPoint pos) | 
| Moves a dock widget dwto pointpos. | |
| void | onCloseEvent (QCloseEvent *) override | 
| Forwards the close event to the MDI dock widgets, aborts closing if at least one dock widget doesn't allow it. | |
| void | resizeDockWidget (DockWidgetBase *dw, QSize size) | 
| Sets the size of dock widget dwtosize. | |
MDIArea allows to host dock widget in MDI mode. This is an alternative to using a full blown MainWindowMDI. The use case is when you already have a MainWindow (doing normal docking) and you want to add an area where you want to use MDI dock widgets. Instead of docking a MainWindowMDI, you'd just use an MDIArea, and avoid having nested main windows.
See examples/mdi_with_docking/.
| 
 | explicit | 
Definition at line 45 of file MDIArea.cpp.
| MDIArea::~MDIArea | ( | ) | 
Definition at line 58 of file MDIArea.cpp.
| void MDIArea::addDockWidget | ( | DockWidgetBase * | dw, | 
| QPoint | localPt, | ||
| InitialOption | addingOption = {} | ||
| ) | 
docks the dock widgets into this MDI area, at the specified position
Definition at line 63 of file MDIArea.cpp.
References KDDockWidgets::Location_OnBottom, KDDockWidgets::DockWidgetBase::Option_MDINestable, KDDockWidgets::DockWidgetBase::options, and KDDockWidgets::DockWidgetBase::uniqueName.
| QList< Frame * > MDIArea::frames | ( | ) | const | 
Returns the list of frames in this MDI Area Each Frame object represents a 'window' emebedded in the MDI Area.
Definition at line 88 of file MDIArea.cpp.
Referenced by onCloseEvent().
| void MDIArea::moveDockWidget | ( | DockWidgetBase * | dw, | 
| QPoint | pos | ||
| ) | 
Moves a dock widget dw to point pos. 
Definition at line 78 of file MDIArea.cpp.
| 
 | override | 
Forwards the close event to the MDI dock widgets, aborts closing if at least one dock widget doesn't allow it.
Definition at line 93 of file MDIArea.cpp.
References QEvent::accept(), frames(), and QEvent::isAccepted().
| void MDIArea::resizeDockWidget | ( | DockWidgetBase * | dw, | 
| QSize | size | ||
| ) | 
Sets the size of dock widget dw to size. 
Definition at line 83 of file MDIArea.cpp.
 © 2019-2023 Klarälvdalens Datakonsult AB (KDAB)
      © 2019-2023 Klarälvdalens Datakonsult AB (KDAB)
       KDDockWidgets
      KDDockWidgets