Add setText/reset to EncryptWidget, and fix tooltip string.

This commit is contained in:
Teo Mrnjavac 2016-06-10 14:40:49 +02:00
parent 18742d2afd
commit 99e719882f
2 changed files with 21 additions and 1 deletions

View File

@ -42,6 +42,16 @@ EncryptWidget::EncryptWidget( QWidget* parent )
}
void
EncryptWidget::reset()
{
m_passphraseLineEdit->clear();
m_confirmLineEdit->clear();
m_encryptCheckBox->setChecked( false );
}
EncryptWidget::State
EncryptWidget::state() const
{
@ -49,6 +59,13 @@ EncryptWidget::state() const
}
void
EncryptWidget::setText( const QString& text )
{
m_encryptCheckBox->setText( text );
}
QString
EncryptWidget::passphrase() const
{
@ -129,7 +146,7 @@ EncryptWidget::onPassphraseEdited()
m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::No,
CalamaresUtils::Original,
m_iconLabel->size() ) );
m_iconLabel->setToolTip( "Please enter the same passphrase in both boxes." );
m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) );
}
updateState();

View File

@ -36,7 +36,10 @@ public:
explicit EncryptWidget( QWidget* parent = nullptr );
void reset();
State state() const;
void setText( const QString& text );
QString passphrase() const;