mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
add orientation prop to SideTabBar.
This commit is contained in:
parent
48163d2679
commit
5df2467592
@ -102,6 +102,7 @@ void CSideTabBar::removeSideTab(CDockWidgetSideTab* SideTab)
|
|||||||
d->TabsLayout->removeWidget(SideTab);
|
d->TabsLayout->removeWidget(SideTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void CSideTabBar::paintEvent(QPaintEvent* event)
|
void CSideTabBar::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
@ -110,4 +111,11 @@ void CSideTabBar::paintEvent(QPaintEvent* event)
|
|||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
style()->drawPrimitive(QStyle::PE_Widget, &option, &painter, this);
|
style()->drawPrimitive(QStyle::PE_Widget, &option, &painter, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
Qt::Orientation CSideTabBar::orientation() const
|
||||||
|
{
|
||||||
|
return d->Orientation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,9 @@ class CDockWidgetTab;
|
|||||||
class ADS_EXPORT CSideTabBar : public QWidget
|
class ADS_EXPORT CSideTabBar : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_PROPERTY(Qt::Orientation orientation READ orientation)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SideTabBarPrivate* d; ///< private data (pimpl)
|
SideTabBarPrivate* d; ///< private data (pimpl)
|
||||||
friend struct SideTabBarPrivate;
|
friend struct SideTabBarPrivate;
|
||||||
@ -76,6 +79,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void removeSideTab(CDockWidgetSideTab* SideTab);
|
void removeSideTab(CDockWidgetSideTab* SideTab);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns orientation of side tab.
|
||||||
|
*/
|
||||||
|
Qt::Orientation orientation() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void sideTabAutoHideToggleRequested();
|
void sideTabAutoHideToggleRequested();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user