Add transform round benchmark button to DatabaseWidget.

This commit is contained in:
Felix Geyer 2012-05-12 15:39:55 +02:00
parent efb40a6567
commit 0387da48a4
3 changed files with 37 additions and 18 deletions

View file

@ -19,7 +19,7 @@
#include "ui_DatabaseSettingsWidget.h"
#include "core/Metadata.h"
#include "keys/CompositeKey.h"
DatabaseSettingsWidget::DatabaseSettingsWidget(QWidget* parent)
: DialogyWidget(parent)
@ -33,6 +33,7 @@ DatabaseSettingsWidget::DatabaseSettingsWidget(QWidget* parent)
this, SLOT(toggleHistoryMaxItemsSpinBox(int)));
connect(m_ui->historyMaxSizeCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(toggleHistoryMaxSizeSpinBox(int)));
connect(m_ui->transformBenchmarkButton, SIGNAL(clicked()), SLOT(transformRoundsBenchmark()));
}
DatabaseSettingsWidget::~DatabaseSettingsWidget()
@ -163,3 +164,10 @@ void DatabaseSettingsWidget::toggleHistoryMaxSizeSpinBox(int state)
}
}
void DatabaseSettingsWidget::transformRoundsBenchmark()
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
m_ui->transformRoundsSpinBox->setValue(CompositeKey::transformKeyBenchmark(1000));
QApplication::restoreOverrideCursor();
}