forked from KDAB/KDDockWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyMainWindow.h
40 lines (33 loc) · 1.48 KB
/
MyMainWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
Author: Sérgio Martins <[email protected]>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
Contact KDAB at <[email protected]> for commercial licensing options.
*/
#pragma once
#include <kddockwidgets/DockWidget.h>
#include <kddockwidgets/MainWindow.h>
class MyMainWindow : public KDDockWidgets::MainWindow
{
Q_OBJECT
public:
explicit MyMainWindow(const QString &uniqueName, KDDockWidgets::MainWindowOptions options,
bool dockWidget0IsNonClosable, bool nonDockableDockWidget9, bool restoreIsRelative,
bool maxSizeForDockWidget8, bool dockwidget5DoesntCloseBeforeRestore, bool dock0BlocksCloseEvent,
const QString &affinityName = {}, // Usually not needed. Just here to show the feature.
QWidget *parent = nullptr);
~MyMainWindow() override;
private:
void createDockWidgets();
bool eventFilter(QObject *obj, QEvent *ev) override;
KDDockWidgets::DockWidgetBase *newDockWidget();
QMenu *m_toggleMenu = nullptr;
const bool m_dockWidget0IsNonClosable;
const bool m_dockWidget9IsNonDockable;
const bool m_restoreIsRelative;
const bool m_maxSizeForDockWidget8;
const bool m_dockwidget5DoesntCloseBeforeRestore;
const bool m_dock0BlocksCloseEvent;
KDDockWidgets::DockWidget::List m_dockwidgets;
};