mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +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("Right"), SideBarRight, menu);
|
||||||
d->createAutoHideToAction(tr("Bottom"), SideBarBottom, menu);
|
d->createAutoHideToAction(tr("Bottom"), SideBarBottom, menu);
|
||||||
|
|
||||||
|
Action = Menu.addAction(tr("Unpin (Dock)"), this, SLOT(unpinDockWidget()));
|
||||||
|
|
||||||
Menu.exec(ev->globalPos());
|
Menu.exec(ev->globalPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +402,14 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev)
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CAutoHideTab::setDockWidgetFloating()
|
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
|
* Set the dock widget floating, if it is floatable
|
||||||
*/
|
*/
|
||||||
void setDockWidgetFloating();
|
void setDockWidgetFloating();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unpin and dock the auto hide widget
|
||||||
|
*/
|
||||||
|
void unpinDockWidget();
|
||||||
}; // class AutoHideTab
|
}; // class AutoHideTab
|
||||||
}
|
}
|
||||||
// namespace ads
|
// namespace ads
|
||||||
|
Loading…
Reference in New Issue
Block a user