From 23ddfaae67eca73454b2f754aa9456cf41920d1e Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 2 Apr 2015 12:27:54 +0200 Subject: [PATCH] Read configuration map into GreetingViewStep. --- src/modules/greeting/GreetingViewStep.cpp | 24 +++++++++++++++++++++++ src/modules/greeting/GreetingViewStep.h | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/src/modules/greeting/GreetingViewStep.cpp b/src/modules/greeting/GreetingViewStep.cpp index 269ed2ca0..e1e74d883 100644 --- a/src/modules/greeting/GreetingViewStep.cpp +++ b/src/modules/greeting/GreetingViewStep.cpp @@ -20,6 +20,8 @@ #include "GreetingPage.h" +#include + GreetingViewStep::GreetingViewStep( QObject* parent ) : Calamares::ViewStep( parent ) , m_widget( new GreetingPage() ) @@ -95,3 +97,25 @@ GreetingViewStep::jobs() const return QList< Calamares::job_ptr >(); } + +void +GreetingViewStep::setConfigurationMap( const QVariantMap& configurationMap ) +{ + bool showSupportUrl = + configurationMap.contains( "showSupportUrl" ) && + configurationMap.value( "showSupportUrl" ).type() == QVariant::Bool && + configurationMap.value( "showSupportUrl" ).toBool(); + bool showKnownIssuesUrl = + configurationMap.contains( "showKnownIssuesUrl" ) && + configurationMap.value( "showKnownIssuesUrl" ).type() == QVariant::Bool && + configurationMap.value( "showKnownIssuesUrl" ).toBool(); + bool showReleaseNotesUrl = + configurationMap.contains( "showReleaseNotesUrl" ) && + configurationMap.value( "showReleaseNotesUrl" ).type() == QVariant::Bool && + configurationMap.value( "showReleaseNotesUrl" ).toBool(); + + m_widget->setUpLinks( showSupportUrl, + showKnownIssuesUrl, + showReleaseNotesUrl ); +} + diff --git a/src/modules/greeting/GreetingViewStep.h b/src/modules/greeting/GreetingViewStep.h index bb6f194f6..4ed4da6d4 100644 --- a/src/modules/greeting/GreetingViewStep.h +++ b/src/modules/greeting/GreetingViewStep.h @@ -24,6 +24,8 @@ #include "viewpages/ViewStep.h" #include "PluginDllMacro.h" +#include + class GreetingPage; class PLUGINDLLEXPORT GreetingViewStep : public Calamares::ViewStep @@ -52,6 +54,8 @@ public: QList< Calamares::job_ptr > jobs() const override; + void setConfigurationMap( const QVariantMap& configurationMap ) override; + private: GreetingPage* m_widget; };