//------------------------------------------------------------------------------ // Name: showEvent // Desc: //------------------------------------------------------------------------------ void DialogOptions::showEvent(QShowEvent *event) { QDialog::showEvent(event); const Configuration &config = edb::v1::config(); ui->rdoSytntaxATT->setChecked(config.syntax == Configuration::ATT); ui->rdoSytntaxIntel->setChecked(config.syntax != Configuration::ATT); ui->rdoDetach->setChecked(config.close_behavior == Configuration::Detach); ui->rdoKill->setChecked(config.close_behavior != Configuration::Detach); ui->rdoBPEntry->setChecked(config.initial_breakpoint == Configuration::EntryPoint); ui->rdoBPMain->setChecked(config.initial_breakpoint != Configuration::EntryPoint); ui->chkTTY->setChecked(config.tty_enabled); ui->txtTTY->setText(config.tty_command); ui->chkDeleteStaleSymbols->setChecked(config.remove_stale_symbols); ui->chkZerosAreFilling->setChecked(config.zeros_are_filling); ui->chkUppercase->setChecked(config.uppercase_disassembly); ui->chkSmallIntAsDecimal->setChecked(config.small_int_as_decimal); ui->chkFindMain->setChecked(config.find_main); ui->chkWarnDataBreakpoint->setChecked(config.warn_on_no_exec_bp); ui->spnMinString->setValue(config.min_string_length); ui->stackFont->setCurrentFont(config.stack_font); ui->dataFont->setCurrentFont(config.data_font); ui->registerFont->setCurrentFont(config.registers_font); ui->disassemblyFont->setCurrentFont(config.disassembly_font); ui->txtSymbolDir->setText(config.symbol_path); ui->txtPluginDir->setText(config.plugin_path); ui->txtSessionDir->setText(config.session_path); ui->chkDataShowAddress->setChecked(config.data_show_address); ui->chkDataShowHex->setChecked(config.data_show_hex); ui->chkDataShowAscii->setChecked(config.data_show_ascii); ui->chkDataShowComments->setChecked(config.data_show_comments); ui->cmbDataWordWidth->setCurrentIndex(width_to_index(config.data_word_width)); ui->cmbDataRowWidth->setCurrentIndex(width_to_index(config.data_row_width)); ui->chkAddressColon->setChecked(config.show_address_separator); ui->signalsMessageBoxEnable->setChecked(config.enable_signals_message_box); }
//------------------------------------------------------------------------------ // Name: showEvent // Desc: //------------------------------------------------------------------------------ void DialogOptions::showEvent(QShowEvent *event) { QDialog::showEvent(event); const Configuration &config = edb::v1::config(); ui->rdoSytntaxATT->setChecked(config.syntax == Configuration::ATT); ui->rdoSytntaxIntel->setChecked(config.syntax != Configuration::ATT); ui->rdoDetach->setChecked(config.close_behavior == Configuration::Detach); ui->rdoKill->setChecked(config.close_behavior == Configuration::Kill); ui->rdoReverseCapture->setChecked(config.close_behavior == Configuration::KillIfLaunchedDetachIfAttached); ui->rdoBPEntry->setChecked(config.initial_breakpoint == Configuration::EntryPoint); ui->rdoBPMain->setChecked(config.initial_breakpoint != Configuration::EntryPoint); ui->chkTTY->setChecked(config.tty_enabled); ui->txtTTY->setText(config.tty_command); ui->chkDeleteStaleSymbols->setChecked(config.remove_stale_symbols); ui->chkDisableASLR->setChecked(config.disableASLR); ui->chkDisableLazyBinding->setChecked(config.disableLazyBinding); ui->chkZerosAreFilling->setChecked(config.zeros_are_filling); ui->chkUppercase->setChecked(config.uppercase_disassembly); ui->chkSmallIntAsDecimal->setChecked(config.small_int_as_decimal); ui->chkSyntaxHighlighting->setChecked(config.syntax_highlighting_enabled); ui->chkFindMain->setChecked(config.find_main); ui->chkWarnDataBreakpoint->setChecked(config.warn_on_no_exec_bp); ui->spnMinString->setValue(config.min_string_length); ui->stackFont->setCurrentFont(config.stack_font); ui->dataFont->setCurrentFont(config.data_font); ui->registerFont->setCurrentFont(config.registers_font); ui->disassemblyFont->setCurrentFont(config.disassembly_font); ui->txtSymbolDir->setText(config.symbol_path); ui->txtPluginDir->setText(config.plugin_path); ui->txtSessionDir->setText(config.session_path); ui->chkDataShowAddress->setChecked(config.data_show_address); ui->chkDataShowHex->setChecked(config.data_show_hex); ui->chkDataShowAscii->setChecked(config.data_show_ascii); ui->chkDataShowComments->setChecked(config.data_show_comments); ui->cmbDataWordWidth->setCurrentIndex(width_to_index(config.data_word_width)); ui->cmbDataRowWidth->setCurrentIndex(width_to_index(config.data_row_width)); ui->chkAddressColon->setChecked(config.show_address_separator); ui->signalsMessageBoxEnable->setChecked(config.enable_signals_message_box); ui->chkTabBetweenMnemonicAndOperands->setChecked(config.tab_between_mnemonic_and_operands); ui->chkShowLocalModuleName->setChecked(config.show_local_module_name_in_jump_targets); ui->chkShowSymbolicAddresses->setChecked(config.show_symbolic_addresses); ui->chkSimplifyRIPRelativeTargets->setChecked(config.simplify_rip_relative_targets); ui->rdoPlaceDefault ->setChecked(config.startup_window_location == Configuration::SystemDefault); ui->rdoPlaceCentered->setChecked(config.startup_window_location == Configuration::Centered); ui->rdoPlaceRestore ->setChecked(config.startup_window_location == Configuration::Restore); }