-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabbar.h
58 lines (41 loc) · 1018 Bytes
/
tabbar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef TABBAR_H
#define TABBAR_H
#include <QTabBar>
QT_BEGIN_NAMESPACE
class QShortcut;
QT_END_NAMESPACE
namespace Core
{
class IEditor;
class IDocument;
}
namespace TabbedEditor
{
namespace Internal
{
class TabBar : public QTabBar
{
Q_OBJECT
public:
explicit TabBar(QWidget* parent = 0);
private slots:
void activateEditor(int index);
void addEditorTab(Core::IEditor* editor);
void removeEditorTabs(QList<Core::IEditor*> editors);
void selectEditorTab(Core::IEditor* editor);
void closeTab(int index);
void prevTabAction();
void nextTabAction();
void handleTimeout();
protected:
void contextMenuEvent(QContextMenuEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
private:
QList<Core::IEditor*> m_editors;
QList<QShortcut*> m_shortcuts;
int m_PinedCount = 0;
QTimer* m_pTimer;
};
} // namespace Internal
} // namespace TabbedEditor
#endif // TABBAR_H