KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
qtcommon/ViewWrapper.cpp
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#include "ViewWrapper_p.h"
13#include "core/View_p.h"
14
15#include <QDebug>
16
17using namespace KDDockWidgets;
18using namespace KDDockWidgets::QtCommon;
19
20
21ViewWrapper::ViewWrapper(Core::Controller *controller, QObject *thisObj)
22 : View_qt(controller, Core::ViewType::ViewWrapper, thisObj)
23 , m_ownsController(controller == nullptr) // Base class created a dummy controller for us
24{
25}
26
27ViewWrapper::~ViewWrapper()
28{
29 if (m_ownsController) {
30 m_inDtor = true;
31 delete controller();
32 }
33}
34
35void ViewWrapper::setMinimumSize(QSize)
36{
37 qFatal("Not implemented");
38}
39
40QSize ViewWrapper::maxSizeHint() const
41{
42 qFatal("Not implemented");
43 return {};
44}
45
46QRect ViewWrapper::normalGeometry() const
47{
48 qFatal("Not implemented");
49 return {};
50}
51
52void ViewWrapper::setWidth(int)
53{
54 qFatal("Not implemented");
55}
56
57void ViewWrapper::setHeight(int)
58{
59 qFatal("Not implemented");
60}
61
62void ViewWrapper::show()
63{
64 qFatal("Not implemented");
65}
66
67void ViewWrapper::hide()
68{
69 qFatal("Not implemented");
70}
71
72void ViewWrapper::update()
73{
74 qFatal("Not implemented");
75}
76
77void ViewWrapper::raiseAndActivate()
78{
79 qFatal("Not implemented");
80}
81
82void ViewWrapper::raise()
83{
84 qFatal("Not implemented");
85}
86
87void ViewWrapper::setFlag(Qt::WindowType, bool)
88{
89 qFatal("Not implemented");
90}
91
92void ViewWrapper::enableAttribute(Qt::WidgetAttribute, bool)
93{
94 // Not relevant to QtQuick
95}
96
97Qt::WindowFlags ViewWrapper::flags() const
98{
99 qFatal("Not implemented");
100 return {};
101}
102
103void ViewWrapper::setWindowIcon(const QIcon &)
104{
105 qFatal("Not implemented");
106}
107
108void ViewWrapper::showNormal()
109{
110 if (m_controller) {
111 if (auto v = m_controller->view()) {
112 v->showNormal();
113 }
114 }
115}
116
117void ViewWrapper::showMinimized()
118{
119 if (m_controller) {
120 if (auto v = m_controller->view()) {
121 v->showMinimized();
122 }
123 }
124}
125
126void ViewWrapper::showMaximized()
127{
128 if (m_controller) {
129 if (auto v = m_controller->view()) {
130 v->showMaximized();
131 }
132 }
133}
134
135void ViewWrapper::setMaximumSize(QSize)
136{
137 qFatal("Not implemented");
138}
139
140bool ViewWrapper::isActiveWindow() const
141{
142 qFatal("Not implemented");
143 return {};
144}
145
146void ViewWrapper::setFixedWidth(int)
147{
148 qFatal("Not implemented");
149}
150
151void ViewWrapper::setFixedHeight(int)
152{
153 qFatal("Not implemented");
154}
155
156void ViewWrapper::setWindowOpacity(double)
157{
158 qFatal("Not implemented");
159}
160
161void ViewWrapper::releaseKeyboard()
162{
163 qFatal("Not implemented");
164}
165
166void ViewWrapper::render(QPainter *)
167{
168 qFatal("Not implemented");
169}
170
171void ViewWrapper::setMouseTracking(bool)
172{
173 qFatal("Not implemented");
174}
175
176std::shared_ptr<Core::View> ViewWrapper::asWrapper()
177{
178 if (auto sharedptr = d->m_thisWeakPtr.lock())
179 return sharedptr;
180
181 qFatal("No shared ptr. Shouldn't happen.");
182 return {};
183}
ViewType
Each View type also has a specific Controller associated with, except for ViewType::None.
Definition Controller.h:26
Class to abstract QAction, so code still works with QtQuick and Flutter.
WidgetAttribute
WindowType

© 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