mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Ref T673, incognito flag/menu
This commit is contained in:
@@ -280,6 +280,7 @@
|
||||
</property>
|
||||
<addaction name="menu_MovingMap"/>
|
||||
<addaction name="menu_AutoPublish"/>
|
||||
<addaction name="menu_ToggleIncognito"/>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
<addaction name="menu_Window"/>
|
||||
@@ -510,6 +511,11 @@
|
||||
<string>Auto-publish</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_ToggleIncognito">
|
||||
<property name="text">
|
||||
<string>Toggle incognito mode</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
||||
@@ -224,6 +224,8 @@ void SwiftGuiStd::initGuiSignals()
|
||||
connect(ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||
connect(ui->menu_AutoPublish, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||
connect(ui->menu_MovingMap, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||
connect(ui->menu_ToggleIncognito, &QAction::triggered, this, &SwiftGuiStd::onMenuClicked);
|
||||
|
||||
connect(m_navigator.data(), &CNavigatorDialog::navigatorClosed, this, &SwiftGuiStd::onNavigatorClosed, Qt::QueuedConnection);
|
||||
|
||||
// settings (GUI component), styles
|
||||
|
||||
@@ -86,6 +86,14 @@ void SwiftGuiStd::onMenuClicked()
|
||||
{
|
||||
this->autoPublishDialog();
|
||||
}
|
||||
else if (sender == ui->menu_ToggleIncognito)
|
||||
{
|
||||
if (sGui)
|
||||
{
|
||||
sGui->toggleIncognito();
|
||||
this->displayInOverlayWindow(QStringLiteral("Incognito mode is %1").arg(boolToOnOff(sGui->isIncognito())), 5000);
|
||||
}
|
||||
}
|
||||
else if (sender == ui->menu_MovingMap && sGui && !sGui->getGlobalSetup().getSwiftMapUrls().isEmpty())
|
||||
{
|
||||
const CUrlList urls = sGui->getGlobalSetup().getSwiftMapUrls();
|
||||
|
||||
Reference in New Issue
Block a user