KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
TabBarViewInterface.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/docks_export.h"
15#include "kddockwidgets/QtCompat_p.h"
16
17QT_BEGIN_NAMESPACE
18class Icon;
19class QString;
20QT_END_NAMESPACE
21
22namespace KDDockWidgets {
23
24namespace Core {
25
26class DockWidget;
27class TabBar;
28
30class DOCKS_EXPORT TabBarViewInterface
31{
32public:
33 explicit TabBarViewInterface(TabBar *);
35
38 virtual void setTabsAreMovable(bool);
39
42 virtual QString text(int index) const = 0;
43
44 virtual int tabAt(Point localPt) const = 0;
45 virtual void moveTabTo(int from, int to) = 0;
46 virtual Rect rectForTab(int index) const = 0;
47 virtual void setCurrentIndex(int index) = 0;
48
49 virtual void renameTab(int index, const QString &) = 0;
50 virtual void changeTabIcon(int index, const Icon &icon) = 0;
51
52 virtual void removeDockWidget(DockWidget *dw) = 0;
53 virtual void insertDockWidget(int index, DockWidget *dw, const Icon &icon,
54 const QString &title) = 0;
55
56protected:
60};
61
62}
63
64}
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
The interface that TabBar views should implement.
virtual void removeDockWidget(DockWidget *dw)=0
virtual QString text(int index) const =0
Returns the tab text for the specified index This is only used by tests, to make sure your tab's text...
virtual void renameTab(int index, const QString &)=0
virtual void moveTabTo(int from, int to)=0
TabBarViewInterface & operator=(const TabBarViewInterface &)=delete
virtual void changeTabIcon(int index, const Icon &icon)=0
virtual int tabAt(Point localPt) const =0
TabBarViewInterface(const TabBarViewInterface &)=delete
virtual void setCurrentIndex(int index)=0
virtual Rect rectForTab(int index) const =0
virtual void insertDockWidget(int index, DockWidget *dw, const Icon &icon, const QString &title)=0
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