mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
Added Auto-Hide tab unpin context menu entry
This commit is contained in:
parent
6924e69b6b
commit
df1bc94d9e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user