2017-12-20 14:39:09 +01:00
|
|
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
2014-11-11 02:58:14 +01:00
|
|
|
*
|
2016-09-22 12:31:57 +02:00
|
|
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
2014-11-11 02:58:14 +01:00
|
|
|
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Calamares is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SETKEYBOARDLAYOUTJOB_H
|
|
|
|
#define SETKEYBOARDLAYOUTJOB_H
|
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "Job.h"
|
2014-11-11 02:58:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
class SetKeyboardLayoutJob : public Calamares::Job
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
SetKeyboardLayoutJob( const QString& model,
|
|
|
|
const QString& layout,
|
2014-11-11 14:37:05 +01:00
|
|
|
const QString& variant,
|
|
|
|
const QString& xOrgConfFileName,
|
2016-09-26 10:57:23 +02:00
|
|
|
const QString& convertedKeymapPath,
|
|
|
|
bool writeEtcDefaultKeyboard );
|
2014-11-11 02:58:14 +01:00
|
|
|
|
|
|
|
QString prettyName() const override;
|
|
|
|
Calamares::JobResult exec() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString findConvertedKeymap( const QString& convertedKeymapPath ) const;
|
|
|
|
QString findLegacyKeymap() const;
|
|
|
|
bool writeVConsoleData( const QString& vconsoleConfPath,
|
|
|
|
const QString& convertedKeymapPath ) const;
|
2016-09-22 12:31:57 +02:00
|
|
|
bool writeX11Data( const QString& keyboardConfPath ) const;
|
|
|
|
bool writeDefaultKeyboardData( const QString& defaultKeyboardPath ) const;
|
2014-11-11 02:58:14 +01:00
|
|
|
|
|
|
|
QString m_model;
|
|
|
|
QString m_layout;
|
|
|
|
QString m_variant;
|
2014-11-11 14:37:05 +01:00
|
|
|
QString m_xOrgConfFileName;
|
|
|
|
QString m_convertedKeymapPath;
|
2016-09-26 10:57:23 +02:00
|
|
|
const bool m_writeEtcDefaultKeyboard;
|
2014-11-11 02:58:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SETKEYBOARDLAYOUTJOB_H */
|