A settings dialog. More...
#include <klfsettings.h>
AppLanguage | |
AppFonts | |
Preview | |
TooltipPreview | |
SyntaxHighlighting | |
ExecutablePaths | |
ExpandEPSBBox | |
ExportProfiles | |
LibrarySettings | |
ManageAddOns | |
ManagePlugins | |
PluginsConfig |
Definition at line 51 of file klfsettings.h.
KLFSettings::KLFSettings | ( | KLFMainWin * | parent = 0 | ) |
Definition at line 73 of file klfsettings.cpp.
References accept(), QMenu::addAction(), apply(), KLFConfig::defaultCMUFont, KLFConfig::defaultStdFont, KLFConfig::defaultTTFont, QFontDatabase::families(), importAddOn(), klf_addons_canimport, klfconfig, populateExportProfilesCombos(), populateLocaleCombo(), refreshAddOnList(), refreshAddOnSelected(), refreshPluginSelected(), REG_SH_TEXTFORMATENSEMBLE, QDialog::reject(), removeAddOn(), reset(), retranslateUi(), QAction::setData(), setDefaultPaths(), QFont::setPointSize(), slotChangeFontPresetSender(), and slotChangeFontSender().
KLFSettings::~KLFSettings | ( | ) |
Definition at line 281 of file klfsettings.cpp.
void KLFSettings::accept | ( | ) | [protected, virtual, slot] |
Reimplemented from QDialog.
Definition at line 1201 of file klfsettings.cpp.
References apply().
Referenced by KLFSettings().
void KLFSettings::apply | ( | ) | [slot] |
Definition at line 1030 of file klfsettings.cpp.
References KLFConfig::applicationFont, KLFMainWin::applySettings(), KLFBackend::klfSettings::bborderoffset, KLFConfig::clearLatexOnly, KLFConfig::configFlags, KLFConfig::confirmClose, KLFConfig::copyExportProfile, KLFMainWin::currentSettings(), QString::data(), KLFConfig::defaultStdFont, KLFConfig::dragExportProfile, KLFBackend::klfSettings::dvipsexec, KLFLatexSyntaxHighlighter::Enabled, KLFConfig::enableRealTimePreview, KLFConfig::enableToolTipPreview, KLFBackend::klfSettings::epstopdfexec, QDir::fromNativeSeparators(), KLFConfig::getPluginConfigAccess(), KLFConfig::glowEffect, KLFBackend::klfSettings::gsexec, KLFLatexSyntaxHighlighter::HighlightLonelyParen, KLFLatexSyntaxHighlighter::HighlightParensOnly, KLFConfig::historyTagCopyToArchive, KLFConfig::iconViewFlow, QMessageBox::information(), QString::isEmpty(), QColor::isValid(), klf_detect_execenv(), klf_plugins, klfconfig, klfDbg, KLFSETTINGS_ROLE_PLUGINDEX, KLFSETTINGS_ROLE_PLUGNAME, KLFConfig::labelOutputFixedSize, KLFConfig::latexEditFont, KLFBackend::klfSettings::latexexec, KLFBackend::klfSettings::lborderoffset, KLFConfig::LibraryBrowser, KLFConfig::locale, KLFConfig::menuExportProfileAffectsCopy, KLFConfig::menuExportProfileAffectsDrag, KLFBackend::klfSettings::outlineFonts, KLFConfig::pluginConfig, KLFConfig::Plugins, KLFConfig::preambleEditFont, KLFConfig::previewTooltipMaxSize, KLFBackend::klfSettings::rborderoffset, KLFMainWin::refreshAllWindowStyleSheets(), KLFMainWin::refreshShowCorrectClearButton(), KLFMainWin::refreshWindowSizes(), reset(), KLFConfig::restoreURLs, KLFMainWin::saveSettings(), KLFMainWin::setApplicationLocale(), QLocale::setDefault(), KLFMainWin::setTxtLatexFont(), KLFMainWin::setTxtPreambleFont(), KLFConfig::showHintPopups, QList::size(), KLFConfig::SyntaxHighlighter, KLFBackend::klfSettings::tborderoffset, KLFBackend::klfSettings::tempdir, KLFConfig::UI, and KLFConfig::useSystemAppFont.
Referenced by accept(), importAddOn(), and KLFSettings().
Definition at line 433 of file klfsettings.cpp.
References treeMaybeUnselect().
void KLFSettings::help | ( | ) | [slot] |
Definition at line 1209 of file klfsettings.cpp.
References QWhatsThis::enterWhatsThisMode().
void KLFSettings::importAddOn | ( | ) | [slot] |
Definition at line 839 of file klfsettings.cpp.
References QFileDialog::getOpenFileNames(), and QMessageBox::information().
Referenced by KLFSettings(), and KLFAddOnDataOpener::openFile().
void KLFSettings::importAddOn | ( | const QString & | fileName, |
bool | uiSuggestRestart = true |
||
) | [slot] |
Definition at line 855 of file klfsettings.cpp.
References apply(), QFile::copy(), QMessageBox::critical(), QFile::exists(), QFileInfo::exists(), QFileInfo::fileName(), KLFConfig::homeConfigDirRCCResources, QMessageBox::information(), QString::isEmpty(), QFileInfo::isReadable(), klf_add_avail_translation(), klf_addons, klf_avail_translations, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfconfig, klfDbg, KLFAddOnInfo::klfminversion(), klfVersionCompareLessThan(), KLFI18nFile::locale, populateLocaleCombo(), QMessageBox::question(), KLFAddOnInfo::rccmountroot(), refreshAddOnList(), and KLFAddOnInfo::translations().
void KLFSettings::initPluginControls | ( | ) | [protected, slot] |
Definition at line 535 of file klfsettings.cpp.
References KLFPluginGenericInterface::createConfigWidget(), KLFConfig::getPluginConfigAccess(), klf_plugins, klfconfig, KLFSETTINGS_ROLE_PLUGINDEX, KLFSETTINGS_ROLE_PLUGNAME, KLFPluginGenericInterface::loadFromConfig(), KLFConfig::pluginConfig, KLFConfig::Plugins, QTreeWidgetItem::setCheckState(), QTreeWidgetItem::setData(), and QTreeWidgetItem::setText().
Referenced by show().
void KLFSettings::populateExportProfilesCombos | ( | ) | [protected, slot] |
Definition at line 309 of file klfsettings.cpp.
References KLFMimeExportProfile::exportProfileList(), and QList::size().
Referenced by KLFSettings(), and show().
void KLFSettings::populateLocaleCombo | ( | ) | [protected, slot] |
Definition at line 286 of file klfsettings.cpp.
References klf_avail_translations, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfconfig, klfDbg, KLFConfig::locale, KLFTranslationInfo::localename, KLFTranslationInfo::translatedname, and KLFConfig::UI.
Referenced by importAddOn(), and KLFSettings().
void KLFSettings::refreshAddOnList | ( | ) | [protected, slot] |
Definition at line 770 of file klfsettings.cpp.
References klf_addons, KLFSETTINGS_ROLE_ADDONINDEX, QTreeWidgetItem::setBackground(), QTreeWidgetItem::setData(), and QTreeWidgetItem::setText().
Referenced by importAddOn(), KLFSettings(), removeAddOn(), and removePlugin().
void KLFSettings::refreshAddOnSelected | ( | ) | [protected, slot] |
Definition at line 797 of file klfsettings.cpp.
References klf_addons, KLFSETTINGS_ROLE_ADDONINDEX, QFontInfo::pointSize(), QDir::separator(), QList::size(), and QDir::toNativeSeparators().
Referenced by KLFSettings(), removeAddOn(), and removePlugin().
void KLFSettings::refreshPluginSelected | ( | ) | [protected, slot] |
Definition at line 610 of file klfsettings.cpp.
References klf_plugins, KLFSETTINGS_ROLE_PLUGINDEX, QFontInfo::pointSize(), QList::size(), and QDir::toNativeSeparators().
Referenced by KLFSettings().
void KLFSettings::removeAddOn | ( | ) | [slot] |
Definition at line 935 of file klfsettings.cpp.
References QString::arg(), QMessageBox::critical(), QMessageBox::exec(), QMessageBox::information(), QStringList::join(), klf_addons, KLFSETTINGS_ROLE_ADDONINDEX, refreshAddOnList(), refreshAddOnSelected(), QFile::remove(), removePlugin(), QMessageBox::setDefaultButton(), QMessageBox::setEscapeButton(), QMessageBox::setWindowTitle(), and QList::size().
Referenced by KLFSettings().
void KLFSettings::removePlugin | ( | ) | [slot] |
Definition at line 643 of file klfsettings.cpp.
References QMessageBox::critical(), QTreeWidgetItem::data(), QMessageBox::exec(), QMessageBox::information(), klf_plugins, KLFSETTINGS_ROLE_PLUGINDEX, refreshAddOnList(), refreshAddOnSelected(), QFile::remove(), QMessageBox::setDefaultButton(), QMessageBox::setEscapeButton(), QMessageBox::setWindowTitle(), and QList::size().
Referenced by removeAddOn().
void KLFSettings::removePlugin | ( | const QString & | fname | ) | [slot] |
Definition at line 695 of file klfsettings.cpp.
References QMessageBox::critical(), klf_plugins, klfDbg, KLFSETTINGS_ROLE_PLUGINDEX, and QFile::remove().
void KLFSettings::reset | ( | ) | [slot] |
Definition at line 448 of file klfsettings.cpp.
References KLFConfig::applicationFont, KLFBackend::klfSettings::bborderoffset, KLFConfig::clearLatexOnly, KLFConfig::configFlags, KLFConfig::confirmClose, KLFConfig::copyExportProfile, KLFMainWin::currentSettings(), KLFConfig::dragExportProfile, KLFBackend::klfSettings::dvipsexec, KLFLatexSyntaxHighlighter::Enabled, KLFConfig::enableRealTimePreview, KLFConfig::enableToolTipPreview, KLFBackend::klfSettings::epstopdfexec, KLFConfig::glowEffect, KLFBackend::klfSettings::gsexec, QSize::height(), KLFLatexSyntaxHighlighter::HighlightLonelyParen, KLFLatexSyntaxHighlighter::HighlightParensOnly, KLFConfig::historyTagCopyToArchive, KLFConfig::iconViewFlow, QString::isEmpty(), klfconfig, KLFConfig::labelOutputFixedSize, KLFConfig::latexEditFont, KLFBackend::klfSettings::latexexec, KLFBackend::klfSettings::lborderoffset, KLFConfig::LibraryBrowser, KLFConfig::locale, KLFConfig::menuExportProfileAffectsCopy, KLFConfig::menuExportProfileAffectsDrag, KLFBackend::klfSettings::outlineFonts, KLFConfig::preambleEditFont, KLFConfig::previewTooltipMaxSize, KLFBackend::klfSettings::rborderoffset, KLFConfig::restoreURLs, KLFConfig::showHintPopups, QList::size(), KLFConfig::SyntaxHighlighter, KLFBackend::klfSettings::tborderoffset, KLFBackend::klfSettings::tempdir, QDir::toNativeSeparators(), KLFConfig::UI, KLFConfig::useSystemAppFont, and QSize::width().
Referenced by apply(), KLFSettings(), and show().
void KLFSettings::resetPluginControls | ( | ) | [protected, slot] |
Definition at line 580 of file klfsettings.cpp.
References QMap::contains(), KLFConfig::getPluginConfigAccess(), KLF_ASSERT_CONDITION, KLF_FUNC_NAME, klf_plugins, klfconfig, KLFPluginGenericInterface::loadFromConfig(), KLFConfig::pluginConfig, and KLFConfig::Plugins.
Referenced by show().
void KLFSettings::retranslateUi | ( | bool | alsoBaseUi = true | ) | [slot] |
Definition at line 257 of file klfsettings.cpp.
References QMap::contains(), QAction::data(), KLF_ASSERT_CONDITION, and QList::size().
Referenced by KLFSettings().
void KLFSettings::setDefaultPaths | ( | ) | [slot] |
Definition at line 756 of file klfsettings.cpp.
References KLFBackend::detectSettings(), KLFBackend::klfSettings::dvipsexec, KLFBackend::klfSettings::epstopdfexec, KLFBackend::klfSettings::gsexec, KLFBackend::klfSettings::latexexec, KLFBackend::klfSettings::tempdir, and QDir::toNativeSeparators().
Referenced by KLFSettings().
void KLFSettings::show | ( | ) | [slot] |
Definition at line 323 of file klfsettings.cpp.
References initPluginControls(), klfDbg, populateExportProfilesCombos(), reset(), and resetPluginControls().
Referenced by KLFAddOnDataOpener::openFile(), KLFMainWin::showSettingsHelpLinkAction(), KLFMainWin::slotEvaluate(), and KLFMainWin::slotSettings().
void KLFSettings::showControl | ( | int | controlNum | ) | [slot] |
controlNum
is one of the values of the SettingsControl enum.
Definition at line 344 of file klfsettings.cpp.
References __KLF_SHOW_SETTINGS_CONTROL, AppFonts, AppLanguage, ExecutablePaths, ExpandEPSBBox, ExportProfiles, KLF_FUNC_NAME, LibrarySettings, ManageAddOns, ManagePlugins, PluginsConfig, Preview, SyntaxHighlighting, and TooltipPreview.
Referenced by KLFAddOnDataOpener::openFile(), KLFMainWin::showSettingsHelpLinkAction(), and KLFMainWin::slotEvaluate().
void KLFSettings::showControl | ( | const QString & | controlName | ) | [slot] |
controlName
is the name (string) of one of the controls listed in the SettingsControl
enum, eg. "AppFonts"
or "ManageAddOns"
.
Definition at line 395 of file klfsettings.cpp.
References __KLF_SETTINGS_TEST_STR_CONTROL, AppFonts, AppLanguage, ExecutablePaths, ExpandEPSBBox, LibrarySettings, ManageAddOns, ManagePlugins, PluginsConfig, Preview, SyntaxHighlighting, and TooltipPreview.
void KLFSettings::slotChangeFont | ( | QPushButton * | btn, |
const QFont & | f | ||
) | [protected, slot] |
Definition at line 1020 of file klfsettings.cpp.
Referenced by slotChangeFontPresetSender(), and slotChangeFontSender().
void KLFSettings::slotChangeFontPresetSender | ( | ) | [protected, slot] |
Definition at line 996 of file klfsettings.cpp.
References QMap::contains(), QAction::data(), KLF_ASSERT_CONDITION, klfDbg, and slotChangeFont().
Referenced by KLFSettings().
void KLFSettings::slotChangeFontSender | ( | ) | [protected, slot] |
Definition at line 1012 of file klfsettings.cpp.
References QFontDialog::getFont(), and slotChangeFont().
Referenced by KLFSettings().