3rdparty
Qt-Advanced-Docking
include
Qads
DockAreaTabBar.h
Go to the documentation of this file.
1
#ifndef DockAreaTabBarH
2
#define DockAreaTabBarH
3
/*******************************************************************************
4
** Qt Advanced Docking System
5
** Copyright (C) 2017 Uwe Kindler
6
**
7
** This library is free software; you can redistribute it and/or
8
** modify it under the terms of the GNU Lesser General Public
9
** License as published by the Free Software Foundation; either
10
** version 2.1 of the License, or (at your option) any later version.
11
**
12
** This library is distributed in the hope that it will be useful,
13
** but WITHOUT ANY WARRANTY; without even the implied warranty of
14
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
** Lesser General Public License for more details.
16
**
17
** You should have received a copy of the GNU Lesser General Public
18
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
19
******************************************************************************/
20
21
22
//============================================================================
27
//============================================================================
28
29
//============================================================================
30
// INCLUDES
31
//============================================================================
32
#include <QScrollArea>
33
#include "
ads_globals.h
"
34
35
namespace
ads
36
{
37
class
CDockAreaWidget;
38
class
CDockWidgetTab;
39
struct
DockAreaTabBarPrivate;
40
class
CDockAreaTitleBar;
41
class
CFloatingDockContainer;
42
class
IFloatingWidget;
43
53
class
ADS_EXPORT
CDockAreaTabBar
:
public
QScrollArea
54
{
55
Q_OBJECT
56
private
:
57
DockAreaTabBarPrivate
*
d
;
58
friend
struct
DockAreaTabBarPrivate
;
59
friend
class
CDockAreaTitleBar
;
60
61
private
slots:
62
void
onTabClicked();
63
void
onTabCloseRequested();
64
void
onCloseOtherTabsRequested();
65
void
onTabWidgetMoved(
const
QPoint& GlobalPos);
66
67
protected
:
68
virtual
void
wheelEvent(QWheelEvent* Event)
override
;
69
70
71
public
:
72
using
Super
= QScrollArea;
73
77
CDockAreaTabBar
(
CDockAreaWidget
* parent);
78
82
virtual
~
CDockAreaTabBar
();
83
89
void
insertTab(
int
Index,
CDockWidgetTab
* Tab);
90
94
void
removeTab(
CDockWidgetTab
* Tab);
95
99
int
count
()
const
;
100
104
int
currentIndex()
const
;
105
109
CDockWidgetTab
* currentTab()
const
;
110
114
CDockWidgetTab
* tab(
int
Index)
const
;
115
119
virtual
bool
eventFilter(QObject *watched, QEvent *event)
override
;
120
126
bool
isTabOpen(
int
Index)
const
;
127
135
virtual
QSize minimumSizeHint()
const override
;
136
141
virtual
QSize sizeHint()
const override
;
142
143
public
slots:
147
void
setCurrentIndex(
int
Index);
148
153
void
closeTab(
int
Index);
154
155
signals:
160
void
currentChanging(
int
Index);
161
166
void
currentChanged(
int
Index);
167
171
void
tabBarClicked(
int
index);
172
177
void
tabCloseRequested(
int
index);
178
182
void
tabClosed(
int
index);
183
188
void
tabOpened(
int
index);
189
194
void
tabMoved(
int
from,
int
to);
195
200
void
removingTab(
int
index);
201
205
void
tabInserted(
int
index);
206
210
void
elidedChanged(
bool
elided);
211
};
// class CDockAreaTabBar
212
}
// namespace ads
213
//-----------------------------------------------------------------------------
214
#endif // DockAreaTabBarH
215
ads_globals.h
Declaration of.
ads::CDockAreaTabBar::d
DockAreaTabBarPrivate * d
private data (pimpl)
Definition:
DockAreaTabBar.h:57
ads::CDockAreaTitleBar
Definition:
DockAreaTitleBar.h:50
ads::CDockAreaWidget
Definition:
DockAreaWidget.h:55
detail::count
constexpr auto count() -> size_t
Definition:
core.h:1222
ads
Definition:
ads_globals.h:69
ads::CDockAreaTabBar
Definition:
DockAreaTabBar.h:53
ads::DockAreaTabBarPrivate
Definition:
DockAreaTabBar.cpp:55
ads::CDockAreaTabBar::Super
QScrollArea Super
Definition:
DockAreaTabBar.h:72
ads::CDockWidgetTab
Definition:
DockWidgetTab.h:50
ADS_EXPORT
#define ADS_EXPORT
Definition:
ads_globals.h:50
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44