KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
core/Window.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 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 "Window_p.h"
13#include "core/Logging_p.h"
14
15using namespace KDDockWidgets;
16using namespace KDDockWidgets::Core;
17
18Window::~Window() = default;
19
20int Window::minWidth() const
21{
22 return minSize().width();
23}
24
25int Window::minHeight() const
26{
27 return minSize().height();
28}
29
30int Window::maxWidth() const
31{
32 return maxSize().width();
33}
34
35int Window::maxHeight() const
36{
37 return maxSize().height();
38}
39
40void Window::startSystemMove()
41{
42 KDDW_ERROR("Not needed in this platform");
43}
44
45Point Window::framePosition() const
46{
47 return frameGeometry().topLeft();
48}
49
50bool Window::containsView(View *view) const
51{
52 if (!view)
53 return false;
54
55 return equals(view->window());
56}
57
58bool Window::containsView(Controller *c) const
59{
60 if (!c)
61 return false;
62
63 return containsView(c->view());
64}
65
66Size Window::size() const
67{
68 return geometry().size();
69}
70
71void Window::setPosition(Point pos)
72{
73 Rect geo = geometry();
74 geo.moveTopLeft(pos);
75 setGeometry(geo);
76}
View * view() const
Returns the view associated with this controller, if any.
virtual std::shared_ptr< Core::Window > window() const =0
Returns the window this view is inside For the Qt frontend, this wraps a QWindow. Like QWidget::windo...
Class to abstract QAction, so code still works with QtQuick and Flutter.

© 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