KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
qtwidgets/Platform.h
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2020 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#ifndef KDDOCKWIDGETS_PLATFORM_QTWIDGETS_H
13#define KDDOCKWIDGETS_PLATFORM_QTWIDGETS_H
14#pragma once
15
16#include "kddockwidgets/qtcommon/Platform.h"
17
18namespace KDDockWidgets {
19
20namespace Core {
21class MainWindow;
22}
23
24namespace QtWidgets {
25
28class DOCKS_EXPORT Platform : public QtCommon::Platform_qt
29{
30public:
31 Platform();
32 ~Platform() override;
33 const char *name() const override;
34 bool hasActivePopup() const override;
35 std::shared_ptr<Core::View> qobjectAsView(QObject *) const override;
36 std::shared_ptr<Core::Window> windowFromQWindow(QWindow *) const override;
37 Core::ViewFactory *createDefaultViewFactory() override;
38 std::shared_ptr<Core::Window> windowAt(QPoint globalPos) const override;
39
40 int screenNumberForView(Core::View *) const override;
41 QSize screenSizeFor(Core::View *) const override;
42
43 int startDragDistance_impl() const override;
44 Core::View *createView(Core::Controller *controller, Core::View *parent = nullptr) const override;
45 bool inDisallowedDragView(QPoint globalPos) const override;
46 bool usesFallbackMouseGrabber() const override;
47 void ungrabMouse() override;
48
49#ifdef DOCKS_TESTING_METHODS
50 explicit Platform(int &argc, char **argv, bool defaultToOffscreenQPA);
51 void tests_initPlatform_impl() override;
52 void tests_deinitPlatform_impl() override;
53 Core::View *tests_createView(Core::CreateViewOptions, Core::View *parent = nullptr) override;
54 Core::View *tests_createFocusableView(Core::CreateViewOptions, Core::View *parent = nullptr) override;
55 Core::View *tests_createNonClosableView(Core::View *parent = nullptr) override;
56 std::shared_ptr<Core::Window> tests_createWindow() override;
58 createMainWindow(const QString &uniqueName, Core::CreateViewOptions,
59 MainWindowOptions options = MainWindowOption_HasCentralFrame,
60 Core::View *parent = nullptr, Qt::WindowFlags = {}) const override;
61#endif
62protected:
63 void init();
64 class GlobalEventFilter;
65 GlobalEventFilter *const m_globalEventFilter;
66};
67}
68
69}
70
71#endif
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
A factory class for allowing the user to customize some internal views. This is optional,...
Baseclass platform for Qt based platform Useful since QtWidgets and QtQuick share some similarities.
implements functions specific to a particular platform A platform can be for example qtwidgets,...
GlobalEventFilter *const m_globalEventFilter
Class to abstract QAction, so code still works with QtQuick and Flutter.
@ MainWindowOption_HasCentralFrame
‍No option set
typedef WindowFlags

© 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 by doxygen 1.9.8