KDDockWidgets API Documentation 1.7
Loading...
Searching...
No Matches
MainWindowMDI.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Sérgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#include "MainWindowMDI.h"
13#include "private/MDILayoutWidget_p.h"
14
15using namespace KDDockWidgets;
16
18 : MDIMainWindowBase(uniqueName, MainWindowOption_MDI, parent, flags)
19{
20}
21
25
26void MainWindowMDI::addDockWidget(DockWidgetBase *dockWidget, QPoint localPos, InitialOption addingOption)
27{
28 auto layout = static_cast<MDILayoutWidget *>(this->layoutWidget());
29 layout->addDockWidget(dockWidget, localPos, addingOption);
30}
31
MainWindow sub-class which uses MDI as a layout.
The DockWidget base-class. DockWidget and DockWidgetBase are only split in two so we can share some c...
LayoutWidget * layoutWidget() const
~MainWindowMDI() override
Destructor.
void addDockWidget(DockWidgetBase *dockWidget, QPoint localPos, InitialOption addingOption={})
Docks dockWidget The widget will be placed at the specified position.
MainWindowMDI(const QString &uniqueName, WidgetType *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
Constructor. See base class documentation.
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition MainWindow.h:37
@ MainWindowOption_MDI
‍Makes the MainWindow always have a central frame, for tabbing documents
T qobject_cast(QObject *object)
QPoint toPoint() const const
typedef WindowFlags
QLayout * layout() const const
Struct describing the preferred dock widget size and visibility when adding it to a layout.

© 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