-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathtabbar.h
47 lines (34 loc) · 915 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
#ifndef TABBAR_H
#define TABBAR_H
#include <QTabBar>
QT_BEGIN_NAMESPACE
class QShortcut;
QT_END_NAMESPACE
namespace Core {
class IEditor;
}
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();
protected:
void contextMenuEvent(QContextMenuEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
private:
QList<Core::IEditor *> m_editors;
QList<QShortcut *> m_shortcuts;
};
} // namespace Internal
} // namespace TabbedEditor
#endif // TABBAR_H