|
|
|
@ -29,10 +29,10 @@ public:
@@ -29,10 +29,10 @@ public:
|
|
|
|
|
, pOfflineMaps(NULL) |
|
|
|
|
, pMAVLink(NULL) |
|
|
|
|
, pConsole(NULL) |
|
|
|
|
#if defined(QT_DEBUG) |
|
|
|
|
#if defined(QT_DEBUG) |
|
|
|
|
, pMockLink(NULL) |
|
|
|
|
, pDebug(NULL) |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
, defaultOptions(NULL) |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
@ -89,10 +89,10 @@ QGCCorePlugin::QGCCorePlugin(QGCApplication *app)
@@ -89,10 +89,10 @@ QGCCorePlugin::QGCCorePlugin(QGCApplication *app)
|
|
|
|
|
|
|
|
|
|
void QGCCorePlugin::setToolbox(QGCToolbox *toolbox) |
|
|
|
|
{ |
|
|
|
|
QGCTool::setToolbox(toolbox); |
|
|
|
|
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership); |
|
|
|
|
qmlRegisterUncreatableType<QGCCorePlugin>("QGroundControl.QGCCorePlugin", 1, 0, "QGCCorePlugin", "Reference only"); |
|
|
|
|
qmlRegisterUncreatableType<QGCOptions>("QGroundControl.QGCOptions", 1, 0, "QGCOptions", "Reference only"); |
|
|
|
|
QGCTool::setToolbox(toolbox); |
|
|
|
|
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership); |
|
|
|
|
qmlRegisterUncreatableType<QGCCorePlugin>("QGroundControl.QGCCorePlugin", 1, 0, "QGCCorePlugin", "Reference only"); |
|
|
|
|
qmlRegisterUncreatableType<QGCOptions>("QGroundControl.QGCOptions", 1, 0, "QGCOptions", "Reference only"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QVariantList &QGCCorePlugin::settingsPages() |
|
|
|
@ -101,33 +101,33 @@ QVariantList &QGCCorePlugin::settingsPages()
@@ -101,33 +101,33 @@ QVariantList &QGCCorePlugin::settingsPages()
|
|
|
|
|
if(!_p->pGeneral) { |
|
|
|
|
//-- Default Settings
|
|
|
|
|
_p->pGeneral = new QGCSettings(tr("General"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/GeneralSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/gear-white.svg")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/GeneralSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/gear-white.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pGeneral)); |
|
|
|
|
_p->pCommLinks = new QGCSettings(tr("Comm Links"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/LinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/LinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pCommLinks)); |
|
|
|
|
_p->pOfflineMaps = new QGCSettings(tr("Offline Maps"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/OfflineMap.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/OfflineMap.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pOfflineMaps)); |
|
|
|
|
_p->pMAVLink = new QGCSettings(tr("MAVLink"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MavlinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MavlinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pMAVLink)); |
|
|
|
|
_p->pConsole = new QGCSettings(tr("Console"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/QGroundControl/Controls/AppMessages.qml")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/QGroundControl/Controls/AppMessages.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pConsole)); |
|
|
|
|
#if defined(QT_DEBUG) |
|
|
|
|
#if defined(QT_DEBUG) |
|
|
|
|
//-- These are always present on Debug builds
|
|
|
|
|
_p->pMockLink = new QGCSettings(tr("Mock Link"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MockLink.qml")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MockLink.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pMockLink)); |
|
|
|
|
_p->pDebug = new QGCSettings(tr("Debug"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/DebugWindow.qml")); |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/DebugWindow.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pDebug)); |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
return _p->settingsList; |
|
|
|
|
} |
|
|
|
@ -168,3 +168,19 @@ bool QGCCorePlugin::adjustSettingMetaData(FactMetaData& metaData)
@@ -168,3 +168,19 @@ bool QGCCorePlugin::adjustSettingMetaData(FactMetaData& metaData)
|
|
|
|
|
|
|
|
|
|
return true; // Show setting in ui
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void QGCCorePlugin::setShowTouchAreas(bool show) |
|
|
|
|
{ |
|
|
|
|
if (show != _showTouchAreas) { |
|
|
|
|
_showTouchAreas = show; |
|
|
|
|
emit showTouchAreasChanged(show); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void QGCCorePlugin::setShowAdvancedUI(bool show) |
|
|
|
|
{ |
|
|
|
|
if (show != _showAdvancedUI) { |
|
|
|
|
_showAdvancedUI = show; |
|
|
|
|
emit showAdvancedUIChanged(show); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|