QtCanpool 3.3.0
载入中...
搜索中...
未找到
docktabbar.h
浏览该文件的文档.
1
5#pragma once
6
7#include "qxdock_global.h"
8#include <QScrollArea>
9
11
12class DockPanel;
13class DockTab;
14
15class DockTabBarPrivate;
16
26class QX_DOCK_EXPORT DockTabBar : public QScrollArea
27{
28 Q_OBJECT
29public:
30 using Super = QScrollArea;
31public:
32 explicit DockTabBar(DockPanel *parent = nullptr);
33 virtual ~DockTabBar();
34
35 void insertTab(int index, DockTab *tab);
36 void removeTab(DockTab *tab);
37
38 int count() const;
39
40 int currentIndex() const;
41
42 DockTab *currentTab() const;
43 DockTab *tab(int index) const;
44
45 int tabAt(const QPoint &pos) const;
46 int tabInsertIndexAt(const QPoint &pos) const;
47
48 bool isTabOpen(int index) const;
49
50 virtual QSize minimumSizeHint() const override;
51 virtual QSize sizeHint() const override;
52
53 bool areTabsOverflowing() const;
54
55public Q_SLOTS:
56 void setCurrentIndex(int index);
57 void closeTab(int index);
58
59private Q_SLOTS:
60 void onTabClicked();
61 void onTabCloseRequested();
62 void onCloseOtherTabsRequested();
63 void onTabWidgetMoved(const QPoint &globalPos);
64
65Q_SIGNALS:
66 void currentChanging(int index);
67 void currentChanged(int index);
68 void tabBarClicked(int index);
69 void tabCloseRequested(int index);
70 void tabClosed(int index);
71 void tabOpened(int index);
72 void tabMoved(int from, int to);
73 void removingTab(int index);
74 void tabInserted(int index);
75 void elidedChanged(bool elided);
76protected:
77 virtual bool eventFilter(QObject *watched, QEvent *event) override;
78 virtual void wheelEvent(QWheelEvent *event) override;
79private:
81};
82
DockPanel manages multiple instances of DockWidgets.
Definition dockpanel.h:31
Custom tabbar implementation for tab area that is shown on top of a dock panel widget.
Definition docktabbar.h:27
void tabMoved(int from, int to)
void tabOpened(int index)
void currentChanged(int index)
void tabInserted(int index)
void removingTab(int index)
void tabCloseRequested(int index)
QScrollArea Super
Definition docktabbar.h:30
void currentChanging(int index)
void tabBarClicked(int index)
void tabClosed(int index)
void elidedChanged(bool elided)
#define QX_DECLARE_PRIVATE(Class)
#define QX_DOCK_END_NAMESPACE
#define QX_DOCK_BEGIN_NAMESPACE
#define QX_DOCK_EXPORT