Added Auto-Hide tab unpin context menu entry
This commit is contained in:
@@ -393,6 +393,8 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev)
|
||||
d->createAutoHideToAction(tr("Right"), SideBarRight, menu);
|
||||
d->createAutoHideToAction(tr("Bottom"), SideBarBottom, menu);
|
||||
|
||||
Action = Menu.addAction(tr("Unpin (Dock)"), this, SLOT(unpinDockWidget()));
|
||||
|
||||
Menu.exec(ev->globalPos());
|
||||
}
|
||||
|
||||
@@ -400,7 +402,14 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev)
|
||||
//============================================================================
|
||||
void CAutoHideTab::setDockWidgetFloating()
|
||||
{
|
||||
dockWidget()->setFloating();
|
||||
d->DockWidget->setFloating();
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
void CAutoHideTab::unpinDockWidget()
|
||||
{
|
||||
d->DockWidget->setAutoHide(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -145,6 +145,11 @@ public Q_SLOTS:
|
||||
* Set the dock widget floating, if it is floatable
|
||||
*/
|
||||
void setDockWidgetFloating();
|
||||
|
||||
/**
|
||||
* Unpin and dock the auto hide widget
|
||||
*/
|
||||
void unpinDockWidget();
|
||||
}; // class AutoHideTab
|
||||
}
|
||||
// namespace ads
|
||||
|
||||
Reference in New Issue
Block a user