KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
DockWidgetViewInterface.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/KDDockWidgets.h"
15
16namespace KDDockWidgets {
17
18namespace Core {
19
20class DockWidget;
21class Group;
22class TitleBar;
23class View;
24
26class DOCKS_EXPORT DockWidgetViewInterface
27{
28public:
31
32 Group *group() const;
33 DockWidget *dockWidget() const;
34 TitleBar *actualTitleBar() const;
35
36 bool isFocused() const;
37 bool isFloating() const;
38 void setFloating(bool);
39 QString uniqueName() const;
40 QString title() const;
41 void setTitle(const QString &);
42 void setAsCurrentTab();
43 bool isOpen() const;
44 void forceClose();
45 void open();
46 void raise();
47 void moveToSideBar();
48 void setIcon(const Icon &icon, IconPlaces places = IconPlace::All);
49 Icon icon(IconPlace place = IconPlace::TitleBar) const;
50
51 void setAffinities(const Vector<QString> &);
52 void setAffinityName(const QString &name);
53 Vector<QString> affinities() const;
54
55 void addDockWidgetAsTab(DockWidgetViewInterface *other,
56 KDDockWidgets::InitialOption initialOption = {});
57
58 void addDockWidgetToContainingWindow(DockWidgetViewInterface *other,
60 DockWidgetViewInterface *relativeTo = nullptr,
61 KDDockWidgets::InitialOption initialOption = {});
62
63 DockWidgetOptions options() const;
64 void setOptions(DockWidgetOptions);
65
67 void show();
68
69 virtual std::shared_ptr<Core::View> focusCandidate() const = 0;
70
71protected:
73
76};
77
78}
79
80}
The interface that DockWidget views should implement.
virtual std::shared_ptr< Core::View > focusCandidate() const =0
DockWidgetViewInterface & operator=(const DockWidgetViewInterface &)=delete
DockWidgetViewInterface(const DockWidgetViewInterface &)=delete
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
Class to abstract QAction, so code still works with QtQuick and Flutter.
Struct describing the preferred dock widget size and visibility when adding it to a layout.

© 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