| 401 | } |
| 402 | |
| 403 | void WindowMain::checkBoxAutoScreen(bool clicked) |
| 404 | { |
| 405 | int state = ui.checkBoxAutoScreen->checkState(); |
| 406 | if ((int)userinfo["last_account"] == 0) |
| 407 | { |
| 408 | ui.checkBoxAutoScreen->setChecked(false); |
| 409 | QMessageBox::information(this, "提示", "你没有选择默认账号!", QMessageBox::Yes); |
| 410 | return; |
| 411 | } |
| 412 | if (state == Qt::Checked) |
| 413 | { |
| 414 | ui.checkBoxAutoScreen->setChecked(true); |
| 415 | userinfo["auto_start"] = true; |
| 416 | } |
| 417 | else if (state == Qt::Unchecked) |
| 418 | { |
| 419 | ui.checkBoxAutoScreen->setChecked(false); |
| 420 | userinfo["auto_start"] = false; |
| 421 | } |
| 422 | m_config->updateConfig(userinfo.dump()); |
| 423 | } |
| 424 | |
| 425 | void WindowMain::checkBoxAutoExit(bool clicked) |
| 426 | { |
nothing calls this directly
no test coverage detected