KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
qtcommon/View.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#pragma once
13
14#include "kddockwidgets/core/View.h"
15
16QT_BEGIN_NAMESPACE
17class QWidget;
18class QQuickItem;
19QT_END_NAMESPACE
20
21namespace KDDockWidgets::Core {
22class Controller;
23}
24
26
27class DOCKS_EXPORT View_qt : public Core::View
28{
29public:
30 explicit View_qt(Core::Controller *controller, Core::ViewType type, QObject *thisObj);
31 ~View_qt() override;
32
33 QObject *thisObject() const;
34
35 Core::HANDLE handle() const override;
36 void setViewName(const QString &name) override;
37
38 static QObject *asQObject(View *);
39
40#ifdef KDDW_FRONTEND_QTWIDGETS
41 static QWidget *asQWidget(Core::View *);
42 static QWidget *asQWidget(Core::Controller *);
43#endif
44
45#ifdef KDDW_FRONTEND_QTQUICK
46 static QQuickItem *asQQuickItem(Core::View *);
47#endif
48
50 virtual QVariant viewProperty(const char *name) const
51 {
52 return m_thisObj->property(name);
53 }
54
55#if defined(DOCKS_DEVELOPER_MODE)
56 static int s_logicalDpiFactorOverride;
57#endif
58
59protected:
60 class EventFilter;
61 EventFilter *const m_eventFilter;
63 Q_DISABLE_COPY(View_qt)
64};
65
66}
virtual QVariant viewProperty(const char *name) const
Equivalent to Qt's QObject::property()
ViewType
Each View type also has a specific Controller associated with, except for ViewType::None.
Definition Controller.h:26
const void * HANDLE
Definition core/View.h:28

© 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