KDDockWidgets API Documentation 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDDockWidgets::MDIArea Class Reference

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>

Inheritance diagram for KDDockWidgets::MDIArea:
Inheritance graph
[legend]
Collaboration diagram for KDDockWidgets::MDIArea:
Collaboration graph
[legend]

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 dw to point pos.
 
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 dw to size.
 

Detailed Description

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/.

Definition at line 36 of file MDIArea.h.

Constructor & Destructor Documentation

◆ MDIArea()

MDIArea::MDIArea ( QWidgetOrQuick parent = nullptr)
explicit

Definition at line 45 of file MDIArea.cpp.

◆ ~MDIArea()

MDIArea::~MDIArea ( )

Definition at line 58 of file MDIArea.cpp.

Member Function Documentation

◆ addDockWidget()

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.

◆ frames()

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().

◆ moveDockWidget()

void MDIArea::moveDockWidget ( DockWidgetBase dw,
QPoint  pos 
)

Moves a dock widget dw to point pos.

Definition at line 78 of file MDIArea.cpp.

◆ onCloseEvent()

void MDIArea::onCloseEvent ( QCloseEvent e)
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().

◆ resizeDockWidget()

void MDIArea::resizeDockWidget ( DockWidgetBase dw,
QSize  size 
)

Sets the size of dock widget dw to size.

Definition at line 83 of file MDIArea.cpp.


The documentation for this class was generated from the following files:

© 2019-2023 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated on Wed Nov 1 2023 00:02:31 for KDDockWidgets API Documentation by doxygen 1.9.8