KDDockWidgets API Documentation
1.7
Loading...
Searching...
No Matches
source
src
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
15
using namespace
KDDockWidgets
;
16
17
MainWindowMDI::MainWindowMDI
(
const
QString
&uniqueName,
WidgetType
*parent,
Qt::WindowFlags
flags)
18
:
MDIMainWindowBase
(uniqueName,
MainWindowOption_MDI
, parent, flags)
19
{
20
}
21
22
MainWindowMDI::~MainWindowMDI
()
23
{
24
}
25
26
void
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
32
void
MainWindowMDI::addDockWidget
(
DockWidgetBase
*dockWidget,
QPointF
localPos,
InitialOption
addingOption)
33
{
34
MainWindowMDI::addDockWidget
(
dockWidget
, localPos.
toPoint
(),
addingOption
);
35
}
MainWindowMDI.h
MainWindow sub-class which uses MDI as a layout.
KDDockWidgets::DockWidgetBase
The DockWidget base-class. DockWidget and DockWidgetBase are only split in two so we can share some c...
Definition
DockWidgetBase.h:61
KDDockWidgets::MainWindowBase::layoutWidget
LayoutWidget * layoutWidget() const
Definition
MainWindowBase.cpp:205
KDDockWidgets::MainWindowMDI::~MainWindowMDI
~MainWindowMDI() override
Destructor.
Definition
MainWindowMDI.cpp:22
KDDockWidgets::MainWindowMDI::addDockWidget
void addDockWidget(DockWidgetBase *dockWidget, QPoint localPos, InitialOption addingOption={})
Docks dockWidget The widget will be placed at the specified position.
Definition
MainWindowMDI.cpp:26
KDDockWidgets::MainWindowMDI::MainWindowMDI
MainWindowMDI(const QString &uniqueName, WidgetType *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
Constructor. See base class documentation.
Definition
MainWindowMDI.cpp:17
KDDockWidgets::MainWindow
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition
MainWindow.h:37
KDDockWidgets
Definition
Config.cpp:37
KDDockWidgets::MainWindowOption_MDI
@ MainWindowOption_MDI
Makes the MainWindow always have a central frame, for tabbing documents
Definition
KDDockWidgets.h:56
QObject::qobject_cast
T qobject_cast(QObject *object)
QPoint
QPointF
QPointF::toPoint
QPoint toPoint() const const
QString
Qt::WindowFlags
typedef WindowFlags
QWidget
QWidget::layout
QLayout * layout() const const
KDDockWidgets::InitialOption
Struct describing the preferred dock widget size and visibility when adding it to a layout.
Definition
KDDockWidgets.h:101
© 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