-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsplittabswidget.h
57 lines (47 loc) · 1.18 KB
/
splittabswidget.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
#ifndef SPLITTABSWIDGET_H
#define SPLITTABSWIDGET_H
#include <QObject>
#include <QWidget>
#include <QGridLayout>
#include <QLayoutItem>
#include <QWidgetItem>
#include <QFrame>
#include <QPalette>
#include <QColor>
#include <QMessageBox>
#include <functional>
#include "welcomewidget.h"
#include "draggabletabwidget.h"
#include "tabpressedeventfilter.h"
#include "qdmswidget.hpp"
class SplitTabsWidget : public QWidget
{
Q_OBJECT
public:
enum class TabSplitType
{
HORIZONTAL,
VERTICAL,
};
enum class TabSplitMode
{
SINGLE,
HORIZONTAL,
VERTICAL,
};
explicit SplitTabsWidget(QWidget *parent = nullptr);
void createNewTab(TabSplitType split = TabSplitType::HORIZONTAL);
DraggableTabWidget *selected();
public slots:
void createHorizontalTab();
void createVerticalTab();
void onTabClicked(DraggableTabWidget *tab);
signals:
void single();
private:
DraggableTabWidget *_selected{nullptr};
TabSplitMode mode{TabSplitMode::SINGLE};
TabPressedEventFilter *tabPressedEventFilter;
static inline void installEventFilterRecursively(QWidget *widget, QObject *filter);
};
#endif // SPLITTABSWIDGET_H