diff options
Diffstat (limited to 'dialog.cpp')
-rw-r--r-- | dialog.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -256,6 +256,20 @@ void Dialog::on_checkBoxClipboard_clicked() } /** + * @brief Dialog::on_checkBoxAutoclearPanel_clicked + */ +void Dialog::on_checkBoxAutoclearPanel_clicked() +{ + if (ui->checkBoxAutoclearPanel->isChecked()) { + ui->spinBoxAutoclearPanelSeconds->setEnabled(true); + ui->labelPanelSeconds->setEnabled(true); + } else { + ui->spinBoxAutoclearPanelSeconds->setEnabled(false); + ui->labelPanelSeconds->setEnabled(false); + } +} + +/** * @brief Dialog::useClipboard */ void Dialog::useClipboard(bool useClipboard) @@ -284,6 +298,25 @@ void Dialog::setAutoclear(int seconds) } /** + * @brief Dialog::useAutoclearPanel + * @param useAutoclearPanel + */ +void Dialog::useAutoclearPanel(bool useAutoclearPanel) +{ + ui->checkBoxAutoclearPanel->setChecked(useAutoclearPanel); + on_checkBoxAutoclearPanel_clicked(); +} + +/** + * @brief Dialog::setAutoclearPanel + * @param seconds + */ +void Dialog::setAutoclearPanel(int seconds) +{ + ui->spinBoxAutoclearPanelSeconds->setValue(seconds); +} + +/** * @brief Dialog::useClipboard * @return */ @@ -319,6 +352,24 @@ void Dialog::on_checkBoxAutoclear_clicked() } /** + * @brief Dialog::useAutoclearPanel + * @return + */ +bool Dialog::useAutoclearPanel() +{ + return ui->checkBoxAutoclearPanel->isChecked(); +} + +/** + * @brief Dialog::getAutoclearPanel + * @return + */ +int Dialog::getAutoclearPanel() +{ + return ui->spinBoxAutoclearPanelSeconds->value(); +} + +/** * @brief Dialog::hidePassword * @return */ |