Changeset View
Changeset View
Standalone View
Standalone View
src/DetachableTabBar.h
Show All 32 Lines | 30 | public: | |||
---|---|---|---|---|---|
33 | explicit DetachableTabBar(QWidget *parent = nullptr); | 33 | explicit DetachableTabBar(QWidget *parent = nullptr); | ||
34 | Q_SIGNALS: | 34 | Q_SIGNALS: | ||
35 | void detachTab(int index); | 35 | void detachTab(int index); | ||
36 | void moveTabToWindow(int tabIndex, QWidget *otherWindow); | 36 | void moveTabToWindow(int tabIndex, QWidget *otherWindow); | ||
37 | protected: | 37 | protected: | ||
38 | void mousePressEvent(QMouseEvent *event) override; | 38 | void mousePressEvent(QMouseEvent *event) override; | ||
39 | void mouseMoveEvent(QMouseEvent*event) override; | 39 | void mouseMoveEvent(QMouseEvent*event) override; | ||
40 | void mouseReleaseEvent(QMouseEvent *event) override; | 40 | void mouseReleaseEvent(QMouseEvent *event) override; | ||
41 | bool droppedContainerIsNotThis(const QPoint& currentPos) const; | | |||
42 | 41 | | |||
43 | private: | 42 | private: | ||
44 | DragType dragType; | 43 | DragType dragType; | ||
45 | QCursor _originalCursor; | 44 | QCursor _originalCursor; | ||
46 | QList<TabbedViewContainer*> _containers; | 45 | QList<TabbedViewContainer*> _containers; | ||
47 | }; | 46 | }; | ||
48 | } | 47 | } | ||
49 | 48 | | |||
50 | #endif | 49 | #endif |