calamares/src/modules/keyboardq/KeyboardQmlViewStep.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

95 lines
1.8 KiB
C++
Raw Normal View History

/* === This file is part of Calamares - <https://calamares.io> ===
*
2020-08-22 01:19:58 +02:00
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
2020-10-25 18:35:03 +01:00
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
2020-08-22 01:19:58 +02:00
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#include "KeyboardQmlViewStep.h"
2020-10-25 18:35:03 +01:00
#include "Config.h"
#include "GlobalStorage.h"
2020-03-26 15:57:02 +01:00
#include "JobQueue.h"
2020-03-26 15:57:02 +01:00
CALAMARES_PLUGIN_FACTORY_DEFINITION( KeyboardQmlViewStepFactory, registerPlugin< KeyboardQmlViewStep >(); )
KeyboardQmlViewStep::KeyboardQmlViewStep( QObject* parent )
2020-03-26 15:57:02 +01:00
: Calamares::QmlViewStep( parent )
, m_config( new Config( this ) )
{
m_config->detectCurrentKeyboardLayout();
emit nextStatusChanged( true );
}
QString
KeyboardQmlViewStep::prettyName() const
{
return tr( "Keyboard" );
}
QString
KeyboardQmlViewStep::prettyStatus() const
{
return m_config->prettyStatus();
}
bool
KeyboardQmlViewStep::isNextEnabled() const
{
return true;
}
bool
KeyboardQmlViewStep::isBackEnabled() const
{
return true;
}
bool
KeyboardQmlViewStep::isAtBeginning() const
{
return true;
}
bool
KeyboardQmlViewStep::isAtEnd() const
{
return true;
}
Calamares::JobList
KeyboardQmlViewStep::jobs() const
{
2020-10-25 18:35:03 +01:00
return m_config->createJobs();
}
void
KeyboardQmlViewStep::onActivate()
{
m_config->guessLocaleKeyboardLayout();
}
void
KeyboardQmlViewStep::onLeave()
{
m_config->finalize();
}
2020-03-26 15:57:02 +01:00
QObject*
KeyboardQmlViewStep::getConfig()
{
return m_config;
}
void
KeyboardQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
m_config->setConfigurationMap( configurationMap );
Calamares::QmlViewStep::setConfigurationMap( configurationMap );
}