From 0f075500067eb36011aca203aee2b658a102f933 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 11 Nov 2020 13:08:42 +0100 Subject: [PATCH] [plasmalnf] Introduce (empty) Config object --- src/modules/plasmalnf/CMakeLists.txt | 1 + src/modules/plasmalnf/Config.cpp | 20 ++++++++++++++++ src/modules/plasmalnf/Config.h | 26 +++++++++++++++++++++ src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 3 +++ src/modules/plasmalnf/PlasmaLnfViewStep.h | 2 ++ 5 files changed, 52 insertions(+) create mode 100644 src/modules/plasmalnf/Config.cpp create mode 100644 src/modules/plasmalnf/Config.h diff --git a/src/modules/plasmalnf/CMakeLists.txt b/src/modules/plasmalnf/CMakeLists.txt index 15c836b5b..f13f4f9c7 100644 --- a/src/modules/plasmalnf/CMakeLists.txt +++ b/src/modules/plasmalnf/CMakeLists.txt @@ -32,6 +32,7 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND ) COMPILE_DEFINITIONS ${option_defs} SOURCES + Config.cpp PlasmaLnfViewStep.cpp PlasmaLnfPage.cpp PlasmaLnfJob.cpp diff --git a/src/modules/plasmalnf/Config.cpp b/src/modules/plasmalnf/Config.cpp new file mode 100644 index 000000000..6a80509f4 --- /dev/null +++ b/src/modules/plasmalnf/Config.cpp @@ -0,0 +1,20 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +#include "Config.h" + +Config::Config( QObject* parent ) + : QObject( parent ) +{ +} + +void +Config::setConfigurationMap( const QVariantMap& ) +{ +} diff --git a/src/modules/plasmalnf/Config.h b/src/modules/plasmalnf/Config.h new file mode 100644 index 000000000..389e2aff4 --- /dev/null +++ b/src/modules/plasmalnf/Config.h @@ -0,0 +1,26 @@ +/* === This file is part of Calamares - === + * + * SPDX-FileCopyrightText: 2020 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +#ifndef PLASMALNF_CONFIG_H +#define PLASMALNF_CONFIG_H + +#include + +class Config : public QObject +{ + Q_OBJECT + +public: + Config( QObject* parent = nullptr ); + virtual ~Config() override = default; + + void setConfigurationMap( const QVariantMap& ); +}; + +#endif diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index 9bda0164b..971805502 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -8,6 +8,7 @@ */ #include "PlasmaLnfViewStep.h" +#include "Config.h" #include "PlasmaLnfJob.h" #include "PlasmaLnfPage.h" #include "ThemeInfo.h" @@ -39,6 +40,7 @@ currentPlasmaTheme() PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent ) : Calamares::ViewStep( parent ) + , m_config( new Config( this ) ) , m_widget( new PlasmaLnfPage ) { connect( m_widget, &PlasmaLnfPage::plasmaThemeSelected, this, &PlasmaLnfViewStep::themeSelected ); @@ -127,6 +129,7 @@ PlasmaLnfViewStep::jobs() const void PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { + m_config->setConfigurationMap( configurationMap ); m_lnfPath = CalamaresUtils::getString( configurationMap, "lnftool" ); m_widget->setLnfPath( m_lnfPath ); diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h index 74de803c9..f30761ffc 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.h +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.h @@ -14,6 +14,7 @@ #include "utils/PluginFactory.h" #include "viewpages/ViewStep.h" +class Config; class PlasmaLnfPage; class PLUGINDLLEXPORT PlasmaLnfViewStep : public Calamares::ViewStep @@ -44,6 +45,7 @@ public slots: void themeSelected( const QString& id ); private: + Config* m_config; PlasmaLnfPage* m_widget; QString m_lnfPath; // Path to the lnf tool QString m_themeId; // Id of selected theme