void StaticPage::on_advStaticLenBox_valueChanged(int value) {
    int len = value / 2 - KEY_SIZE;
    if(len > 0) {
        enablePubId(true);

        QString modhexMask("");
        for(int i = 1; i <= len; i++) {
            modhexMask.append("nn ");
        }
        ui->advPubIdTxt->setInputMask(modhexMask);
        on_advPubIdTxt_editingFinished();
    } else {
        enablePubId(false);
    }
}
void StaticPage::resetAdvPage() {
    if(ui->advConfigSlot1Radio->isChecked()) {
        ui->advConfigSlot2Radio->setChecked(true);
    }

    ui->advConfigParamsCombo->setCurrentIndex(SCHEME_FIXED);
    ui->advAutoProgramKeysCheck->setChecked(false);
    ui->advProgramMulKeysBox->setChecked(false);

    ui->advConfigProtectionBox->reset();

    ui->advStaticLen32Radio->setChecked(true);
    int minStaticLen = ui->advStaticLenBox->minimum();
    ui->advStaticLenBox->setValue(minStaticLen);

    enablePubId(false);

    ui->advPvtIdTxt->clear();
    on_advPvtIdTxt_editingFinished();

    ui->advSecretKeyTxt->clear();
    on_advSecretKeyTxt_editingFinished();

    ui->advStopBtn->setEnabled(false);
    ui->advResetBtn->setEnabled(false);
}
void StaticPage::on_advStaticLen16Radio_clicked(bool checked) {
    ui->advStaticLenBox->setEnabled(!checked);
    enablePubId(!checked);
}