From 8f38b5f77f2d67f11e3f4a050071a42e4859e2a0 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 17 Dec 2024 12:31:18 -0800 Subject: [PATCH] Updates for latest QGC source --- custom-example/qgroundcontrol.qrc | 3 +-- custom-example/src/CustomPlugin.cc | 10 +++++----- custom-example/src/CustomPlugin.h | 10 +++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/custom-example/qgroundcontrol.qrc b/custom-example/qgroundcontrol.qrc index 1a2dbdfa0c5..a087cc21165 100644 --- a/custom-example/qgroundcontrol.qrc +++ b/custom-example/qgroundcontrol.qrc @@ -153,8 +153,7 @@ ../src/QmlControls/QGCComboBox.qml ../src/QmlControls/QGCFileDialog.qml ../src/QmlControls/QGCFlickable.qml - ../src/QmlControls/QGCFlickableHorizontalIndicator.qml - ../src/QmlControls/QGCFlickableVerticalIndicator.qml + ../src/QmlControls/QGCFlickableScrollIndicator.qml ../src/QmlControls/QGCGroupBox.qml ../src/QmlControls/QGCLabel.qml ../src/QmlControls/QGCListView.qml diff --git a/custom-example/src/CustomPlugin.cc b/custom-example/src/CustomPlugin.cc index 5dd0a86bd64..a6fe8625659 100644 --- a/custom-example/src/CustomPlugin.cc +++ b/custom-example/src/CustomPlugin.cc @@ -103,7 +103,7 @@ void CustomPlugin::_addSettingsEntry(const QString& title, const char* qmlFile, this))); } -QGCOptions* CustomPlugin::options() const +QGCOptions* CustomPlugin::options() { return _options; } @@ -118,7 +118,7 @@ QString CustomPlugin::brandImageOutdoor(void) const return QStringLiteral("/custom/img/dronecode-black.svg"); } -bool CustomPlugin::overrideSettingsGroupVisibility(const QString &name) const +bool CustomPlugin::overrideSettingsGroupVisibility(const QString &name) { // We have set up our own specific brand imaging. Hide the brand image settings such that the end user // can't change it. @@ -129,7 +129,7 @@ bool CustomPlugin::overrideSettingsGroupVisibility(const QString &name) const } // This allows you to override/hide QGC Application settings -bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& metaData) const +bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& metaData) { bool parentResult = QGCCorePlugin::adjustSettingMetaData(settingsGroup, metaData); @@ -149,7 +149,7 @@ bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaD } // This modifies QGC colors palette to match possible custom corporate branding -void CustomPlugin::paletteOverride(const QString &colorName, QGCPalette::PaletteColorInfo_t& colorInfo) const +void CustomPlugin::paletteOverride(const QString &colorName, QGCPalette::PaletteColorInfo_t& colorInfo) { if (colorName == QStringLiteral("window")) { colorInfo[QGCPalette::Dark][QGCPalette::ColorGroupEnabled] = QColor("#212529"); @@ -340,7 +340,7 @@ void CustomPlugin::paletteOverride(const QString &colorName, QGCPalette::Palette } // We override this so we can get access to QQmlApplicationEngine and use it to register our qml module -QQmlApplicationEngine* CustomPlugin::createQmlApplicationEngine(QObject* parent) const +QQmlApplicationEngine* CustomPlugin::createQmlApplicationEngine(QObject* parent) { QQmlApplicationEngine* qmlEngine = QGCCorePlugin::createQmlApplicationEngine(parent); qmlEngine->addImportPath("qrc:/Custom/Widgets"); diff --git a/custom-example/src/CustomPlugin.h b/custom-example/src/CustomPlugin.h index 739368943a4..671d94c7e1b 100644 --- a/custom-example/src/CustomPlugin.h +++ b/custom-example/src/CustomPlugin.h @@ -59,13 +59,13 @@ class CustomPlugin : public QGCCorePlugin static QGCCorePlugin *instance(); // Overrides from QGCCorePlugin - QGCOptions* options (void) const final; + QGCOptions* options (void) final; QString brandImageIndoor (void) const final; QString brandImageOutdoor (void) const final; - bool overrideSettingsGroupVisibility (const QString &name) const final; - bool adjustSettingMetaData (const QString& settingsGroup, FactMetaData& metaData) const final; - void paletteOverride (const QString &colorName, QGCPalette::PaletteColorInfo_t& colorInfo) const final; - QQmlApplicationEngine* createQmlApplicationEngine (QObject* parent) const final; + bool overrideSettingsGroupVisibility (const QString &name) final; + bool adjustSettingMetaData (const QString& settingsGroup, FactMetaData& metaData) final; + void paletteOverride (const QString &colorName, QGCPalette::PaletteColorInfo_t& colorInfo) final; + QQmlApplicationEngine* createQmlApplicationEngine (QObject* parent) final; private slots: void _advancedChanged(bool advanced);