1 /* === This file is part of Calamares - <https://calamares.io> === 2 * 3 * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org> 4 * SPDX-License-Identifier: GPL-3.0-or-later 5 * 6 * Calamares is Free Software: see the License-Identifier above. 7 * 8 */ 9 #include "PlasmaLnfViewStep.h" 10 11 #include "Config.h" 12 #include "PlasmaLnfPage.h" 13 #include "ThemeInfo.h" 14 15 #include "utils/Logger.h" 16 #include "utils/Variant.h" 17 18 #include <QVariantMap> 19 CALAMARES_PLUGIN_FACTORY_DEFINITION(PlasmaLnfViewStepFactory,registerPlugin<PlasmaLnfViewStep> ();)20CALAMARES_PLUGIN_FACTORY_DEFINITION( PlasmaLnfViewStepFactory, registerPlugin< PlasmaLnfViewStep >(); ) 21 22 PlasmaLnfViewStep::PlasmaLnfViewStep( QObject* parent ) 23 : Calamares::ViewStep( parent ) 24 , m_config( new Config( this ) ) 25 , m_widget( new PlasmaLnfPage( m_config ) ) 26 { 27 emit nextStatusChanged( false ); 28 } 29 30 ~PlasmaLnfViewStep()31PlasmaLnfViewStep::~PlasmaLnfViewStep() 32 { 33 if ( m_widget && m_widget->parent() == nullptr ) 34 { 35 m_widget->deleteLater(); 36 } 37 } 38 39 40 QString prettyName() const41PlasmaLnfViewStep::prettyName() const 42 { 43 return tr( "Look-and-Feel" ); 44 } 45 46 47 QWidget* widget()48PlasmaLnfViewStep::widget() 49 { 50 return m_widget; 51 } 52 53 54 bool isNextEnabled() const55PlasmaLnfViewStep::isNextEnabled() const 56 { 57 return true; 58 } 59 60 61 bool isBackEnabled() const62PlasmaLnfViewStep::isBackEnabled() const 63 { 64 return true; 65 } 66 67 68 bool isAtBeginning() const69PlasmaLnfViewStep::isAtBeginning() const 70 { 71 return true; 72 } 73 74 75 bool isAtEnd() const76PlasmaLnfViewStep::isAtEnd() const 77 { 78 return true; 79 } 80 81 82 void onLeave()83PlasmaLnfViewStep::onLeave() 84 { 85 } 86 87 88 Calamares::JobList jobs() const89PlasmaLnfViewStep::jobs() const 90 { 91 return m_config->createJobs(); 92 } 93 94 95 void setConfigurationMap(const QVariantMap & configurationMap)96PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap ) 97 { 98 m_config->setConfigurationMap( configurationMap ); 99 } 100