diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2014-07-31 20:39:14 +0200 |
---|---|---|
committer | Anne Jan Brouwer <ajbrouwer@totalactivemedia.nl> | 2014-07-31 20:39:14 +0200 |
commit | e4479e2f708f59f8d0c7a7c59d5de8ab37b348d7 (patch) | |
tree | bbfa203fd0792f93c9c0d6bf3deb3a8c2921c180 /dialog.cpp | |
parent | 7b7f652ac1f20e3b8bfd1ca3b0cd31ad741f5400 (diff) |
configurable
Diffstat (limited to 'dialog.cpp')
-rw-r--r-- | dialog.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -84,3 +84,45 @@ QString Dialog::getStorePath() { return ui->storePath->text(); } +/** + * @brief Dialog::usePass + * @return + */ +bool Dialog::usePass() { + return ui->radioButtonPass->isChecked(); +} + +/** + * @brief Dialog::usePass + * @param pass + */ +void Dialog::usePass(bool usePass) { + if (usePass) { + ui->radioButtonNative->setChecked(false); + ui->radioButtonPass->setChecked(true); + } else { + ui->radioButtonNative->setChecked(true); + ui->radioButtonPass->setChecked(false); + } + setGroupBoxState(); +} + +void Dialog::on_radioButtonNative_clicked() +{ + setGroupBoxState(); +} + +void Dialog::on_radioButtonPass_clicked() +{ + setGroupBoxState(); +} + +void Dialog::setGroupBoxState() { + if (ui->radioButtonPass->isChecked()) { + ui->groupBoxNative->setEnabled(false); + ui->groupBoxPass->setEnabled(true); + } else { + ui->groupBoxNative->setEnabled(true); + ui->groupBoxPass->setEnabled(false); + } +} |