/** * Handles the "Settings->Configure KScope..." command. * Displays the prferences dialog, which allows the user to set different * configuration parameters for KScope. */ void KScope::slotConfigure() { PreferencesDlg dlg; // Apply the preferences if either the "Apply" or the "OK" buttons are // clicked connect(&dlg, SIGNAL(applyPref()), this, SLOT(slotApplyPref())); // Show the dialog if (dlg.exec() == QDialog::Accepted) { // Verify Cscope's installation verifyCscope(); } }
/** * Sets the configured parameters to the global configuration object. * This method is called when either the "OK" or the "Apply" button are * clicked. Before the new settings are applied, their values are verified. * @return true if the new parameters were applied successfully, false * otherwise */ bool PreferencesDlg::updateConfig() { // Verify configured paths lead to the executables if (!verifyPaths()) return false; // Apply the changes m_pPrefFrontend->apply(); m_pPrefColor->apply(); m_pPrefFont->apply(); m_pPrefOpt->apply(); emit applyPref(); return true; }