diff --git a/src/SideTabBar.cpp b/src/SideTabBar.cpp index da18456..08cb111 100644 --- a/src/SideTabBar.cpp +++ b/src/SideTabBar.cpp @@ -102,6 +102,7 @@ void CSideTabBar::removeSideTab(CDockWidgetSideTab* SideTab) d->TabsLayout->removeWidget(SideTab); } + //============================================================================ void CSideTabBar::paintEvent(QPaintEvent* event) { @@ -110,4 +111,11 @@ void CSideTabBar::paintEvent(QPaintEvent* event) QPainter painter(this); style()->drawPrimitive(QStyle::PE_Widget, &option, &painter, this); } + + +//============================================================================ +Qt::Orientation CSideTabBar::orientation() const +{ + return d->Orientation; +} } diff --git a/src/SideTabBar.h b/src/SideTabBar.h index 5e442b9..9575d53 100644 --- a/src/SideTabBar.h +++ b/src/SideTabBar.h @@ -45,6 +45,9 @@ class CDockWidgetTab; class ADS_EXPORT CSideTabBar : public QWidget { Q_OBJECT + + Q_PROPERTY(Qt::Orientation orientation READ orientation) + private: SideTabBarPrivate* d; ///< private data (pimpl) friend struct SideTabBarPrivate; @@ -52,7 +55,7 @@ private: protected: void paintEvent(QPaintEvent* event) override; - + public: using Super = QWidget; @@ -76,6 +79,11 @@ public: */ void removeSideTab(CDockWidgetSideTab* SideTab); + /** + * Returns orientation of side tab. + */ + Qt::Orientation orientation() const; + Q_SIGNALS: void sideTabAutoHideToggleRequested(); };