Read configuration map into GreetingViewStep.

main
Teo Mrnjavac 10 years ago
parent 43487198a2
commit 23ddfaae67

@ -20,6 +20,8 @@
#include "GreetingPage.h" #include "GreetingPage.h"
#include <QVariant>
GreetingViewStep::GreetingViewStep( QObject* parent ) GreetingViewStep::GreetingViewStep( QObject* parent )
: Calamares::ViewStep( parent ) : Calamares::ViewStep( parent )
, m_widget( new GreetingPage() ) , m_widget( new GreetingPage() )
@ -95,3 +97,25 @@ GreetingViewStep::jobs() const
return QList< Calamares::job_ptr >(); 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 );
}

@ -24,6 +24,8 @@
#include "viewpages/ViewStep.h" #include "viewpages/ViewStep.h"
#include "PluginDllMacro.h" #include "PluginDllMacro.h"
#include <QVariantMap>
class GreetingPage; class GreetingPage;
class PLUGINDLLEXPORT GreetingViewStep : public Calamares::ViewStep class PLUGINDLLEXPORT GreetingViewStep : public Calamares::ViewStep
@ -52,6 +54,8 @@ public:
QList< Calamares::job_ptr > jobs() const override; QList< Calamares::job_ptr > jobs() const override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
private: private:
GreetingPage* m_widget; GreetingPage* m_widget;
}; };

Loading…
Cancel
Save