KDDockWidgets API Documentation  1.6
MainWindow.h
Go to the documentation of this file.
1 /*
2  This file is part of KDDockWidgets.
3 
4  SPDX-FileCopyrightText: 2019-2022 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 
24 QT_BEGIN_NAMESPACE
25 class QHBoxLayout;
26 QT_END_NAMESPACE
27 
28 namespace KDDockWidgets {
29 
30 class SideBar;
31 
36 class DOCKS_EXPORT MainWindow : public MainWindowBase
37 {
38  Q_OBJECT
39 public:
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 
68 protected:
69  void closeEvent(QCloseEvent *) override;
70  void resizeEvent(QResizeEvent *) override;
71  QRect centralAreaGeometry() const override;
72 
73 private:
75  void setCentralWidget(QWidget *); // overridden just to make it private
76  class Private;
77  Private *const d;
78 };
79 
80 }
81 
82 #endif
QRect
QMainWindow::setCentralWidget
void setCentralWidget(QWidget *widget)
QWidget
KDDockWidgets::MainWindowOption_None
@ MainWindowOption_None
Definition: KDDockWidgets.h:54
MainWindowBase.h
The MainWindow base-class that's shared between QtWidgets and QtQuick stack.
Qt::WindowFlags
typedef WindowFlags
QCloseEvent
QString
QMargins
KDDockWidgets::SideBarLocation
SideBarLocation
Each main window supports 4 sidebars.
Definition: KDDockWidgets.h:208
KDDockWidgets::MainWindow
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition: MainWindow.h:37
QResizeEvent
QHBoxLayout
KDDockWidgets
Definition: Config.cpp:37
KDDockWidgets::MainWindowBase
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
Definition: MainWindowBase.h:56
KDDockWidgets::MainWindow::List
QVector< MainWindow * > List
Definition: MainWindow.h:40
QVector

© 2019-2022 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 Thu Sep 15 2022 00:16:29 for KDDockWidgets API Documentation by doxygen 1.8.20