|
|
|
@ -93,49 +93,34 @@ QVariantList &QGCCorePlugin::settings()
@@ -93,49 +93,34 @@ QVariantList &QGCCorePlugin::settings()
|
|
|
|
|
{ |
|
|
|
|
//-- If this hasn't been overridden, create default set of settings
|
|
|
|
|
if(!_p->pGeneral) { |
|
|
|
|
QGCOptions* pOptions = options(); |
|
|
|
|
//-- Default Settings
|
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_GENERAL) { |
|
|
|
|
_p->pGeneral = new QGCSettings(tr("General"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/GeneralSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/gear-white.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pGeneral)); |
|
|
|
|
} |
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_COMM_LINKS) { |
|
|
|
|
_p->pCommLinks = new QGCSettings(tr("Comm Links"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/LinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pCommLinks)); |
|
|
|
|
} |
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_OFFLINE_MAPS) { |
|
|
|
|
_p->pOfflineMaps = new QGCSettings(tr("Offline Maps"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/OfflineMap.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pOfflineMaps)); |
|
|
|
|
} |
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_MAVLINK) { |
|
|
|
|
_p->pMAVLink = new QGCSettings(tr("MAVLink"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MavlinkSettings.qml"), |
|
|
|
|
QUrl::fromUserInput("qrc:/res/waves.svg")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pMAVLink)); |
|
|
|
|
} |
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_CONSOLE) { |
|
|
|
|
_p->pConsole = new QGCSettings(tr("Console"), |
|
|
|
|
QUrl::fromUserInput("qrc:/QGroundControl/Controls/AppMessages.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pConsole)); |
|
|
|
|
} |
|
|
|
|
_p->pGeneral = new QGCSettings(tr("General"), |
|
|
|
|
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")); |
|
|
|
|
_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")); |
|
|
|
|
_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")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pMAVLink)); |
|
|
|
|
_p->pConsole = new QGCSettings(tr("Console"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/QGroundControl/Controls/AppMessages.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pConsole)); |
|
|
|
|
#if defined(QT_DEBUG) |
|
|
|
|
//-- These are always present on Debug builds
|
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_MOCKLINK) { |
|
|
|
|
_p->pMockLink = new QGCSettings(tr("Mock Link"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/MockLink.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pMockLink)); |
|
|
|
|
} |
|
|
|
|
if(pOptions->enabledSettings() & QGCOptions::SETTINGS_DEBUG) { |
|
|
|
|
_p->pDebug = new QGCSettings(tr("Debug"), |
|
|
|
|
QUrl::fromUserInput("qrc:/qml/DebugWindow.qml")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pDebug)); |
|
|
|
|
} |
|
|
|
|
_p->pMockLink = new QGCSettings(tr("Mock Link"), |
|
|
|
|
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")); |
|
|
|
|
_p->settingsList.append(QVariant::fromValue((QGCSettings*)_p->pDebug)); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
return _p->settingsList; |
|
|
|
|