-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtabsforeditorswidget.h
48 lines (34 loc) · 1.08 KB
/
tabsforeditorswidget.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
#ifndef TABBEDEDITORVIEW_H
#define TABBEDEDITORVIEW_H
#include "tabbededitorplugin.h"
#include <coreplugin/editormanager/ieditor.h>
#include <QtGui>
#include <QTabWidget>
#include <QShortcut>
namespace TabbedEditor {
namespace Internal {
class TabsForEditorsWidget : public QWidget
{
Q_OBJECT
public:
TabsForEditorsWidget(QWidget * parent = nullptr);
~TabsForEditorsWidget();
QWidget *getTabWidget();
Core::IEditor *getEditor(QWidget *tab);
QWidget *getTab(Core::IEditor *editor);
bool isEditorWdiget(QObject *obj);
private:
QTabWidget *tabWidget;
QMap<QWidget*, Core::IEditor*> tabsEditors;
QList<QShortcut*> tabShortcuts;
private slots:
void updateCurrentTab(Core::IEditor* editor);
void handleCurrentChanged(int index);
void handleEditorOpened(Core::IEditor* editor);
void handlerEditorClosed(QList<Core::IEditor*> editors);
void handleTabCloseRequested(int index);
void selectTabAction();
};
} // namespace Internal
} // namespace TabbedEditor
#endif // TABBEDEDITORVIEW_H