Skip to content

Commit

Permalink
Updates for latest QGC source
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Dec 17, 2024
1 parent af7221f commit 8f38b5f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions custom-example/qgroundcontrol.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@
<file alias="QGroundControl/Controls/QGCComboBox.qml">../src/QmlControls/QGCComboBox.qml</file>
<file alias="QGroundControl/Controls/QGCFileDialog.qml">../src/QmlControls/QGCFileDialog.qml</file>
<file alias="QGroundControl/Controls/QGCFlickable.qml">../src/QmlControls/QGCFlickable.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">../src/QmlControls/QGCFlickableHorizontalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">../src/QmlControls/QGCFlickableVerticalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableScrollIndicator.qml">../src/QmlControls/QGCFlickableScrollIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCGroupBox.qml">../src/QmlControls/QGCGroupBox.qml</file>
<file alias="QGroundControl/Controls/QGCLabel.qml">../src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCListView.qml">../src/QmlControls/QGCListView.qml</file>
Expand Down
10 changes: 5 additions & 5 deletions custom-example/src/CustomPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void CustomPlugin::_addSettingsEntry(const QString& title, const char* qmlFile,
this)));
}

QGCOptions* CustomPlugin::options() const
QGCOptions* CustomPlugin::options()
{
return _options;
}
Expand All @@ -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.
Expand All @@ -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);

Expand All @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
10 changes: 5 additions & 5 deletions custom-example/src/CustomPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f38b5f

Please sign in to comment.