calamares/src/modules/keyboard/KeyboardPage.h
Adriaan de Groot d464e98e89 [keyboard] Move remaining variables to Config
- Config already *has* everythind, but drop the useless copies
  and duplicated code from the Page
- Plug the models model into the Page
- While here, document the model / layout / variant distinctions

The code doesn't fill the UI properly, and the drop-down
for the models combobox is not right, but at least the data
is shared.
2020-10-28 01:25:42 +01:00

52 lines
1.3 KiB
C++

/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Portions from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org>
* Copyright (C) 2007 Free Software Foundation, Inc.
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef KEYBOARDPAGE_H
#define KEYBOARDPAGE_H
#include "Job.h"
#include <QListWidgetItem>
#include <QTimer>
#include <QWidget>
namespace Ui
{
class Page_Keyboard;
}
class Config;
class KeyBoardPreview;
class KeyboardPage : public QWidget
{
Q_OBJECT
public:
explicit KeyboardPage( Config* config, QWidget* parent = nullptr );
~KeyboardPage() override;
protected slots:
void onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous );
void onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous );
private:
void updateVariants( const QPersistentModelIndex& currentItem, QString currentVariant = QString() );
Ui::Page_Keyboard* ui;
KeyBoardPreview* m_keyboardPreview;
};
#endif // KEYBOARDPAGE_H