mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 15:41:34 +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);
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
@ -76,6 +79,11 @@ public:
|
||||
*/
|
||||
void removeSideTab(CDockWidgetSideTab* SideTab);
|
||||
|
||||
/**
|
||||
* Returns orientation of side tab.
|
||||
*/
|
||||
Qt::Orientation orientation() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void sideTabAutoHideToggleRequested();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user