KDDockWidgets API Documentation 1.7
Loading...
Searching...
No Matches
MainWindow.h
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
19#ifndef KD_MAINWINDOW_H
20#define KD_MAINWINDOW_H
21
22#include "MainWindowBase.h"
23
24QT_BEGIN_NAMESPACE
25class QHBoxLayout;
27
28namespace KDDockWidgets {
29
30class SideBar;
31
36class DOCKS_EXPORT MainWindow : public MainWindowBase
37{
38 Q_OBJECT
39public:
41
48 explicit MainWindow(const QString &uniqueName, MainWindowOptions options = MainWindowOption_None,
49 QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
50
52 ~MainWindow() override;
53
55 SideBar *sideBar(SideBarLocation) const override;
56
57 //@brief returns the margins for the contents widget
58 QMargins centerWidgetMargins() const override;
59
60 //@brief sets the margins for the contents widgets
61 void setCenterWidgetMargins(QMargins);
62
66 QHBoxLayout *internalLayout() const;
67
68protected:
69 void closeEvent(QCloseEvent *) override;
70 void resizeEvent(QResizeEvent *) override;
71 QRect centralAreaGeometry() const override;
72
73private:
75 void setCentralWidget(QWidget *); // overridden just to make it private
76 class Private;
77 Private *const d;
78};
79
80}
81
82#endif
The MainWindow base-class that's shared between QtWidgets and QtQuick stack.
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition MainWindow.h:37
QVector< MainWindow * > List
Definition MainWindow.h:40
SideBarLocation
Each main window supports 4 sidebars.
void setCentralWidget(QWidget *widget)
T qobject_cast(QObject *object)
typedef WindowFlags

© 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