[plasmalnf] Introduce (empty) Config object
This commit is contained in:
parent
a8359696ca
commit
0f07550006
@ -32,6 +32,7 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND )
|
|||||||
COMPILE_DEFINITIONS
|
COMPILE_DEFINITIONS
|
||||||
${option_defs}
|
${option_defs}
|
||||||
SOURCES
|
SOURCES
|
||||||
|
Config.cpp
|
||||||
PlasmaLnfViewStep.cpp
|
PlasmaLnfViewStep.cpp
|
||||||
PlasmaLnfPage.cpp
|
PlasmaLnfPage.cpp
|
||||||
PlasmaLnfJob.cpp
|
PlasmaLnfJob.cpp
|
||||||
|
20
src/modules/plasmalnf/Config.cpp
Normal file
20
src/modules/plasmalnf/Config.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||||
|
* 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& )
|
||||||
|
{
|
||||||
|
}
|
26
src/modules/plasmalnf/Config.h
Normal file
26
src/modules/plasmalnf/Config.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||||
|
* 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 <QObject>
|
||||||
|
|
||||||
|
class Config : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
Config( QObject* parent = nullptr );
|
||||||
|
virtual ~Config() override = default;
|
||||||
|
|
||||||
|
void setConfigurationMap( const QVariantMap& );
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "PlasmaLnfViewStep.h"
|
#include "PlasmaLnfViewStep.h"
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
#include "PlasmaLnfJob.h"
|
#include "PlasmaLnfJob.h"
|
||||||
#include "PlasmaLnfPage.h"
|
#include "PlasmaLnfPage.h"
|
||||||
#include "ThemeInfo.h"
|
#include "ThemeInfo.h"
|
||||||
@ -39,6 +40,7 @@ currentPlasmaTheme()
|
|||||||
|
|
||||||
PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent )
|
PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent )
|
||||||
: Calamares::ViewStep( parent )
|
: Calamares::ViewStep( parent )
|
||||||
|
, m_config( new Config( this ) )
|
||||||
, m_widget( new PlasmaLnfPage )
|
, m_widget( new PlasmaLnfPage )
|
||||||
{
|
{
|
||||||
connect( m_widget, &PlasmaLnfPage::plasmaThemeSelected, this, &PlasmaLnfViewStep::themeSelected );
|
connect( m_widget, &PlasmaLnfPage::plasmaThemeSelected, this, &PlasmaLnfViewStep::themeSelected );
|
||||||
@ -127,6 +129,7 @@ PlasmaLnfViewStep::jobs() const
|
|||||||
void
|
void
|
||||||
PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
|
m_config->setConfigurationMap( configurationMap );
|
||||||
m_lnfPath = CalamaresUtils::getString( configurationMap, "lnftool" );
|
m_lnfPath = CalamaresUtils::getString( configurationMap, "lnftool" );
|
||||||
m_widget->setLnfPath( m_lnfPath );
|
m_widget->setLnfPath( m_lnfPath );
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "utils/PluginFactory.h"
|
#include "utils/PluginFactory.h"
|
||||||
#include "viewpages/ViewStep.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
|
class Config;
|
||||||
class PlasmaLnfPage;
|
class PlasmaLnfPage;
|
||||||
|
|
||||||
class PLUGINDLLEXPORT PlasmaLnfViewStep : public Calamares::ViewStep
|
class PLUGINDLLEXPORT PlasmaLnfViewStep : public Calamares::ViewStep
|
||||||
@ -44,6 +45,7 @@ public slots:
|
|||||||
void themeSelected( const QString& id );
|
void themeSelected( const QString& id );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Config* m_config;
|
||||||
PlasmaLnfPage* m_widget;
|
PlasmaLnfPage* m_widget;
|
||||||
QString m_lnfPath; // Path to the lnf tool
|
QString m_lnfPath; // Path to the lnf tool
|
||||||
QString m_themeId; // Id of selected theme
|
QString m_themeId; // Id of selected theme
|
||||||
|
Loading…
Reference in New Issue
Block a user