mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Menu item to reset all dock widgets' settings
This commit is contained in:
committed by
Mat Sutcliffe
parent
1d5bbb6747
commit
7efebad51a
@@ -92,8 +92,10 @@ namespace BlackGui
|
||||
bool hasDockedWidgets = this->countDockedWidgetInfoAreas() > 0;
|
||||
if (hasDockedWidgets)
|
||||
{
|
||||
menu->addAction(CIcons::dockTop16(), "Dock all", this, &CInfoArea::dockAllWidgets);
|
||||
menu->addAction(CIcons::dockTop16(), "Dock all", this, &CInfoArea::dockAllWidgets);
|
||||
menu->addAction(CIcons::floatAll16(), "Float all", this, &CInfoArea::floatAllWidgets);
|
||||
menu->addAction(CIcons::refresh16(), "Reset all to defaults", this, &CInfoArea::resetAllWidgetSettings);
|
||||
|
||||
menu->addAction(CIcons::floatOne16(), QStringLiteral("Dock / float '%1'").arg(this->windowTitle()), this, &CInfoArea::toggleFloatingWholeInfoArea);
|
||||
QAction *lockTabBarMenuAction = new QAction(menu);
|
||||
lockTabBarMenuAction->setObjectName(this->objectName().append("LockTabBar"));
|
||||
@@ -352,6 +354,15 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoArea::resetAllWidgetSettings()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
if (!dw->isFloating()) { continue; }
|
||||
dw->resetSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoArea::allFloatingOnTop()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
|
||||
@@ -104,6 +104,9 @@ namespace BlackGui
|
||||
//! All floating info areas on top
|
||||
void allFloatingOnTop();
|
||||
|
||||
//! Reset all widgets
|
||||
void resetAllWidgetSettings();
|
||||
|
||||
//! Toggle dock / floating of the whole info area
|
||||
virtual void toggleFloatingWholeInfoArea();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user