calamares/src/modules/partition/gui/EncryptWidget.h

58 lines
1.0 KiB
C
Raw Normal View History

/* === This file is part of Calamares - <https://calamares.io> ===
2016-04-22 16:00:19 +02:00
*
2020-08-22 01:19:58 +02:00
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
2016-04-22 16:00:19 +02:00
*
* Calamares is Free Software: see the License-Identifier above.
2016-04-22 16:00:19 +02:00
*
*/
#ifndef ENCRYPTWIDGET_H
#define ENCRYPTWIDGET_H
#include <QWidget>
2016-04-22 16:00:19 +02:00
namespace Ui
{
2020-08-22 01:19:58 +02:00
class EncryptWidget;
}
class EncryptWidget : public QWidget
2016-04-22 16:00:19 +02:00
{
Q_OBJECT
public:
enum class Encryption : unsigned short
2016-04-22 16:00:19 +02:00
{
Disabled = 0,
Unconfirmed,
Confirmed
2016-04-22 16:00:19 +02:00
};
explicit EncryptWidget( QWidget* parent = nullptr );
void reset();
Encryption state() const;
void setText( const QString& text );
2016-04-22 16:00:19 +02:00
QString passphrase() const;
void retranslate();
2016-04-22 16:00:19 +02:00
signals:
void stateChanged( Encryption );
2016-04-22 16:00:19 +02:00
private:
void updateState();
void onPassphraseEdited();
void onCheckBoxStateChanged( int checked );
2016-04-22 16:00:19 +02:00
Ui::EncryptWidget* m_ui;
Encryption m_state;
2016-04-22 16:00:19 +02:00
};
#endif // ENCRYPTWIDGET_H