mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
Read configuration map into GreetingViewStep.
This commit is contained in:
parent
43487198a2
commit
23ddfaae67
2 changed files with 28 additions and 0 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "GreetingPage.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "viewpages/ViewStep.h"
|
||||
#include "PluginDllMacro.h"
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
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;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue