mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T25, menu starting swift map
This commit is contained in:
committed by
Mathew Sutcliffe
parent
8e388bfeb5
commit
48f65ee080
@@ -280,9 +280,16 @@
|
||||
<addaction name="menu_WindowToggleNavigator"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Map">
|
||||
<property name="title">
|
||||
<string>Map</string>
|
||||
</property>
|
||||
<addaction name="menu_MovingMap"/>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
<addaction name="menu_Window"/>
|
||||
<addaction name="menu_InfoAreas"/>
|
||||
<addaction name="menu_Map"/>
|
||||
<addaction name="menu_Help"/>
|
||||
<addaction name="menu_Test"/>
|
||||
</widget>
|
||||
@@ -499,6 +506,11 @@
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_MovingMap">
|
||||
<property name="text">
|
||||
<string>Moving map</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
||||
@@ -208,6 +208,7 @@ void SwiftGuiStd::initGuiSignals()
|
||||
connect(ui->menu_WindowToggleNavigator, &QAction::triggered, this->m_navigator.data(), &CNavigatorDialog::toggleNavigator);
|
||||
connect(this->m_navigator.data(), &CNavigatorDialog::navigatorClosed, this, &SwiftGuiStd::ps_navigatorClosed);
|
||||
connect(ui->menu_InternalsPage, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(ui->menu_MovingMap, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
|
||||
// command line / text messages
|
||||
connect(ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, ui->fr_CentralFrameInside, &COverlayMessagesFrame::showOverlayVariant);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "blackgui/guiactionbind.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
#include "blackmisc/network/urllist.h"
|
||||
#include "blackmisc/pq/units.h"
|
||||
#include "swiftguistd.h"
|
||||
#include "ui_swiftguistd.h"
|
||||
@@ -22,12 +23,14 @@
|
||||
#include <QScopedPointer>
|
||||
#include <QStackedWidget>
|
||||
#include <QtGlobal>
|
||||
#include <QDesktopServices>
|
||||
|
||||
using namespace BlackGui;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
void SwiftGuiStd::ps_onMenuClicked()
|
||||
{
|
||||
@@ -61,6 +64,12 @@ void SwiftGuiStd::ps_onMenuClicked()
|
||||
{
|
||||
ui->sw_MainMiddle->setCurrentIndex(MainPageInternals);
|
||||
}
|
||||
else if (sender == ui->menu_MovingMap && sGui && !sGui->getGlobalSetup().getSwiftMapUrls().isEmpty())
|
||||
{
|
||||
const CUrlList urls = sGui->getGlobalSetup().getSwiftMapUrls();
|
||||
const CUrl url = urls.getRandomUrl();
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
void SwiftGuiStd::initMenus()
|
||||
@@ -72,6 +81,7 @@ void SwiftGuiStd::initMenus()
|
||||
sGui->addMenuWindow(*ui->menu_Window);
|
||||
sGui->addMenuHelp(*ui->menu_Help);
|
||||
ui->menu_InfoAreas->addActions(ui->comp_MainInfoArea->getInfoAreaSelectActions(true, ui->menu_InfoAreas));
|
||||
ui->menu_MovingMap->setIcon(CIcons::swiftMap16());
|
||||
|
||||
// for hotkeys
|
||||
const QString swift(CGuiActionBindHandler::pathSwiftPilotClient());
|
||||
|
||||
Reference in New Issue
Block a user