diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 10:15:50 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 10:33:32 +0100 |
| commit | a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5 (patch) | |
| tree | 859befb5df101432b7388e1562f90a01c6d8e238 /src/tabhybrid.cpp | |
| download | IT-Sicherheit-a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5.tar.gz IT-Sicherheit-a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5.zip | |
First commit of IT-Sicherheit
Diffstat (limited to 'src/tabhybrid.cpp')
| -rw-r--r-- | src/tabhybrid.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tabhybrid.cpp b/src/tabhybrid.cpp new file mode 100644 index 0000000..b985c32 --- /dev/null +++ b/src/tabhybrid.cpp @@ -0,0 +1,34 @@ +#include "tabhybrid.h" +#include "ui_tabhybrid.h" + +TabHybrid::TabHybrid(QWidget *parent) : + QWidget(parent), + ui(new Ui::TabHybrid) +{ + ui->setupUi(this); + + //Set SpinBoxCiphers to number of Symmetric Ciphers + ui->spinBoxCipherSymmetric->setMaximum( (CiphersSingleton::getInstance()).symmetricCiphersCount()-1 ); + //Set SpinBoxCiphers to number of Asymmetric Ciphers + ui->spinBoxCipherAsymmetric->setMinimum( (CiphersSingleton::getInstance()).symmetricCiphersCount() ); + ui->spinBoxCipherAsymmetric->setMaximum( (CiphersSingleton::getInstance()).symmetricCiphersCount() + + (CiphersSingleton::getInstance()).asymmetricCiphersCount()-1 ); + + //Send Selection from SpinBox on to TabWidgetSelectAlgorithm + connect( ui->spinBoxCipherSymmetric, SIGNAL(valueChanged(int)), + this, SIGNAL(cipherChanged(int)) ); + + //TODO enable Hybrid - Asymmetric + connect( ui->spinBoxKeylengthSymmetric, SIGNAL(valueChanged(int)), + this, SLOT(on_spinBoxKeylengthSymmetric_valueChanged(int))); +} + +TabHybrid::~TabHybrid() +{ + delete ui; +} + +void TabHybrid::on_spinBoxKeylengthSymmetric_valueChanged(int value) +{ + emit keyLengthChanged(value, true); +} |
