mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-03 04:15:37 -04:00
Say hello to EncryptWidget.
This commit is contained in:
parent
e090463545
commit
6e92a04320
4 changed files with 269 additions and 2 deletions
57
src/modules/partition/gui/EncryptWidget.h
Normal file
57
src/modules/partition/gui/EncryptWidget.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* 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 ENCRYPTWIDGET_H
|
||||
#define ENCRYPTWIDGET_H
|
||||
|
||||
#include "ui_EncryptWidget.h"
|
||||
|
||||
class EncryptWidget : public QWidget, private Ui::EncryptWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum State : unsigned short
|
||||
{
|
||||
EncryptionDisabled = 0,
|
||||
EncryptionUnconfirmed,
|
||||
EncryptionConfirmed
|
||||
};
|
||||
|
||||
explicit EncryptWidget( QWidget* parent = nullptr );
|
||||
|
||||
State state() const;
|
||||
|
||||
QString passphrase() const;
|
||||
|
||||
signals:
|
||||
void stateChanged( State );
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
|
||||
private:
|
||||
void updateState();
|
||||
void onPassphraseEdited();
|
||||
void onCheckBoxStateChanged( int state );
|
||||
|
||||
State m_state;
|
||||
};
|
||||
|
||||
#endif // ENCRYPTWIDGET_H
|
Loading…
Add table
Add a link
Reference in a new issue