Structure that stores klatexformula's configuration in memory. More...
#include <klfconfig.h>
Structure that stores klatexformula's configuration in memory.
This structure is more of a namespace than a class. Access it through the global object klfconfig.
See also KLFSettings for a graphical interface for editing these settings.
Definition at line 141 of file klfconfig.h.
KLFConfig::KLFConfig | ( | ) |
this doesn't do anything. It actually leaves every entry with undefined values. This is why it's important to call loadDefaults() quickly after building an instance of KLFConfig. readFromConfig() isn't enough, beacause it assumes the default values are already stored in the current fields.
Definition at line 134 of file klfconfig.cpp.
bool KLFConfig::checkExePaths | ( | ) |
returns TRUE if the executable paths are valid.
Definition at line 382 of file klfconfig.cpp.
References BackendSettings, and QFileInfo::isExecutable().
Referenced by KLFMainWin::KLFMainWin().
void KLFConfig::detectMissingSettings | ( | ) |
Definition at line 336 of file klfconfig.cpp.
References BackendSettings, KLFBackend::detectSettings(), KLFBackend::klfSettings::dvipsexec, KLFBackend::klfSettings::epstopdfexec, KLFBackend::klfSettings::execenv, KLFBackend::klfSettings::gsexec, KLFBackend::klfSettings::latexexec, and KLFBackend::klfSettings::tempdir.
Referenced by main().
int KLFConfig::ensureHomeConfigDir | ( | ) |
Definition at line 365 of file klfconfig.cpp.
References homeConfigDir, homeConfigDirI18n, homeConfigDirPluginData, homeConfigDirPlugins, homeConfigDirRCCResources, and klfEnsureDir().
Referenced by readFromConfig(), KLFMainWin::saveStyles(), and writeToConfig().
KLFPluginConfigAccess KLFConfig::getPluginConfigAccess | ( | const QString & | name | ) |
Definition at line 712 of file klfconfig.cpp.
Referenced by KLFSettings::apply(), KLFSettings::initPluginControls(), main_load_plugins(), and KLFSettings::resetPluginControls().
void KLFConfig::loadDefaults | ( | ) |
call loadDefaults() before anything, at the beginning, to ensure that the values in this structure are not undefined. (the constructor doesn't set any values).
loadDefaults() will set reasonable default values for most settings, but will not start detecting system settings, specifically look for system executables, possibly other long detection tasks. To perform that, call detectMissingSettings().
In practice, main() calls, in order, loadDefaults(), readFromConfig(), and detectMissingSettings().
Definition at line 164 of file klfconfig.cpp.
References adjust_font_size(), BackendSettings, Core, defaultCMUFont, defaultStdFont, defaultTTFont, QFontDatabase::families(), QApplication::font(), globalShareDir, homeConfigDir, homeConfigDirI18n, homeConfigDirPluginData, homeConfigDirPlugins, homeConfigDirRCCResources, homeConfigSettingsFile, homeConfigSettingsFileIni, QDir::homePath(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klf_share_dir_abspath(), KLFCONFIG_TEST_FIXED_FONT, klfDbg, LibraryBrowser, Plugins, QFontInfo::pointSize(), QFont::setPointSize(), SyntaxHighlighter, QLocale::system(), and UI.
Referenced by main().
int KLFConfig::readFromConfig | ( | ) |
Definition at line 394 of file klfconfig.cpp.
References ensureHomeConfigDir(), QFile::exists(), globalShareDir, homeConfigSettingsFile, homeConfigSettingsFileIni, klfDbg, and klfDbgT.
Referenced by main().
int KLFConfig::writeToConfig | ( | ) |
Definition at line 609 of file klfconfig.cpp.
References BackendSettings, QSettings::beginGroup(), Core, QSettings::endGroup(), ensureHomeConfigDir(), firstRunConfigKey(), homeConfigDirPluginData, homeConfigSettingsFile, klf_config_write(), klf_config_write_list(), klf_plugins, LibraryBrowser, Plugins, QSettings::setValue(), QSettings::sync(), SyntaxHighlighter, and UI.
Referenced by KLFMainWin::saveSettings().
Definition at line 179 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::event(), KLFMainWin::KLFMainWin(), main(), and KLFSettings::reset().
Definition at line 192 of file klfconfig.h.
struct { ... } KLFConfig::BackendSettings |
double KLFConfig::bborderoffset |
Definition at line 229 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
Definition at line 194 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::refreshShowCorrectClearButton(), and KLFSettings::reset().
Definition at line 188 of file klfconfig.h.
Referenced by main(), and KLFMainWin::saveSettings().
Definition at line 187 of file klfconfig.h.
Referenced by main(), and KLFMainWin::saveSettings().
Definition at line 236 of file klfconfig.h.
Referenced by KLFLibBrowser::KLFLibBrowser().
Definition at line 237 of file klfconfig.h.
Referenced by KLFLibBrowser::KLFLibBrowser().
unsigned int KLFConfig::configFlags |
Definition at line 209 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFLatexSyntaxHighlighter::highlightBlock(), and KLFSettings::reset().
Definition at line 240 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::reset(), and KLFLibBrowser::slotResourceClose().
Definition at line 195 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::eventFilter(), KLFSettings::reset(), KLFMainWin::saveSettings(), KLFMainWin::slotCopy(), KLFMainWin::slotSetExportProfile(), and KLFMainWin::startupFinished().
struct { ... } KLFConfig::Core |
Referenced by KLFMainWin::KLFMainWin(), loadDefaults(), KLFMainWin::loadLibrary(), KLFMainWin::showEvent(), and writeToConfig().
Definition at line 200 of file klfconfig.h.
Referenced by KLFMainWin::collectInput(), and KLFMainWin::KLFMainWin().
Not a saved setting. This is set in loadDefaults()
Definition at line 259 of file klfconfig.h.
Referenced by KLFSettings::KLFSettings(), and loadDefaults().
Not a saved setting. This is set in loadDefaults()
Definition at line 261 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::KLFSettings(), and loadDefaults().
Not a saved setting. This is set in loadDefaults()
Definition at line 263 of file klfconfig.h.
Referenced by KLFSettings::KLFSettings(), and loadDefaults().
Definition at line 196 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::eventFilter(), KLFSettings::reset(), KLFMainWin::saveSettings(), KLFMainWin::slotDrag(), KLFMainWin::slotSetExportProfile(), and KLFMainWin::startupFinished().
Definition at line 191 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::KLFMainWin(), KLFSettings::reset(), and KLFMainWin::saveSettings().
Definition at line 190 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::KLFMainWin(), KLFSettings::reset(), and KLFMainWin::saveSettings().
Definition at line 222 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), main(), and KLFMainWin::saveSettings().
Definition at line 225 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
Definition at line 224 of file klfconfig.h.
Referenced by KLFMimeExporterImage::keys(), KLFMainWin::loadSettings(), main(), and KLFMainWin::saveSettings().
Definition at line 223 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), main(), and KLFMainWin::saveSettings().
Definition at line 221 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), main(), and KLFMainWin::saveSettings().
Definition at line 211 of file klfconfig.h.
Definition at line 210 of file klfconfig.h.
Definition at line 214 of file klfconfig.h.
Definition at line 212 of file klfconfig.h.
Definition at line 213 of file klfconfig.h.
Definition at line 152 of file klfconfig.h.
Referenced by KLFPluginConfigAccess::globalShareDir(), klf_reload_translations(), loadDefaults(), main_load_extra_resources(), main_load_plugins(), and readFromConfig().
Definition at line 197 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFLibEntryEditor::displayEntries(), KLFMainWin::KLFMainWin(), KLFLibViewDelegate::paintEntry(), KLFSettings::reset(), and KLFMainWin::saveSettings().
Definition at line 198 of file klfconfig.h.
Referenced by KLFMimeExporterGlowImage::data(), KLFLibEntryEditor::displayEntries(), KLFMainWin::KLFMainWin(), KLFLibViewDelegate::paintEntry(), and KLFMainWin::saveSettings().
Definition at line 199 of file klfconfig.h.
Referenced by KLFMimeExporterGlowImage::data(), KLFLibEntryEditor::displayEntries(), KLFMainWin::KLFMainWin(), KLFLibViewDelegate::paintEntry(), and KLFMainWin::saveSettings().
Definition at line 241 of file klfconfig.h.
Referenced by KLFLibBrowserViewContainer::openView(), and KLFLibDefaultView::updateResourceEngine().
Definition at line 243 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::reset(), and KLFLibBrowser::slotMetaInfoChanged().
Definition at line 151 of file klfconfig.h.
Referenced by ensureHomeConfigDir(), KLFPluginConfigAccess::homeConfigDir(), loadDefaults(), KLFMainWin::loadLibrary(), KLFMainWin::loadLibrarySavedState(), KLFMainWin::loadStyles(), KLFLibLegacyFileDataPrivate::save(), KLFMainWin::saveLibraryState(), KLFMainWin::saveStyles(), and KLFLatexSymbolsCache::saveTheCache().
Definition at line 158 of file klfconfig.h.
Referenced by ensureHomeConfigDir(), klf_reload_translations(), and loadDefaults().
Definition at line 157 of file klfconfig.h.
Referenced by ensureHomeConfigDir(), KLFPluginConfigAccess::homeConfigPluginDataDir(), loadDefaults(), and writeToConfig().
Definition at line 156 of file klfconfig.h.
Referenced by ensureHomeConfigDir(), loadDefaults(), main_cleanup(), and main_load_plugins().
Definition at line 155 of file klfconfig.h.
Referenced by ensureHomeConfigDir(), KLFSettings::importAddOn(), loadDefaults(), and main_load_extra_resources().
current (now, "new" klatexformula.conf) settings file
Definition at line 153 of file klfconfig.h.
Referenced by loadDefaults(), readFromConfig(), and writeToConfig().
OLD config file.
Definition at line 154 of file klfconfig.h.
Referenced by loadDefaults(), and readFromConfig().
Definition at line 248 of file klfconfig.h.
Referenced by KLFLibDefaultView::KLFLibDefaultView().
Definition at line 242 of file klfconfig.h.
Referenced by KLFSettings::apply(), and KLFSettings::reset().
Definition at line 183 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMimeExporterLibFmts::data(), KLFLibDefaultView::KLFLibDefaultView(), KLFLibEntryEditor::KLFLibEntryEditor(), KLFMainWin::KLFMainWin(), KLFSettings::reset(), KLFMainWin::saveSettings(), KLFMainWin::slotEvaluate(), KLFLibDefaultView::slotPreviewSizeActionsRefreshChecked(), and KLFLibDefaultView::slotPreviewSizeFromActionSender().
Definition at line 244 of file klfconfig.h.
Referenced by KLFLibLocalFileOpenWidget::browseFileName(), KLFLibExportDialog::KLFLibExportDialog(), KLFLibLocalFileOpenWidget::setUrl(), KLFLibBrowser::slotExportSelection(), and KLFLibBrowser::slotOpenAll().
Definition at line 184 of file klfconfig.h.
Referenced by KLFMainWin::slotSave().
Definition at line 180 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::KLFMainWin(), and KLFSettings::reset().
double KLFConfig::lborderoffset |
Definition at line 226 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
struct { ... } KLFConfig::LibraryBrowser |
Referenced by KLFSettings::apply(), KLFLibLocalFileOpenWidget::browseFileName(), KLFLibBrowser::KLFLibBrowser(), KLFLibDefaultView::KLFLibDefaultView(), KLFLibExportDialog::KLFLibExportDialog(), loadDefaults(), KLFMainWin::loadLibrarySavedState(), KLFLibBrowserViewContainer::openView(), KLFSettings::reset(), KLFLibLocalFileOpenWidget::setUrl(), KLFLibBrowser::slotExportSelection(), KLFLibBrowser::slotMetaInfoChanged(), KLFLibBrowser::slotOpenAll(), KLFLibBrowser::slotResourceClose(), KLFLibDefaultView::updateResourceEngine(), and writeToConfig().
The library file name, relative to homeConfigDir.
Definition at line 168 of file klfconfig.h.
Referenced by KLFMainWin::loadLibrary().
The lib scheme to use to store the library. This scheme will be given the full path to the library in the URL path part.
Definition at line 171 of file klfconfig.h.
Referenced by KLFMainWin::loadLibrary().
Definition at line 247 of file klfconfig.h.
Referenced by KLFLibDefaultView::KLFLibDefaultView().
When setting this, don't forget to call QLocale::setDefault().
Definition at line 177 of file klfconfig.h.
Referenced by KLFSettings::apply(), klfFindTranslatedDataFile(), main(), KLFSettings::populateLocaleCombo(), and KLFSettings::reset().
Definition at line 189 of file klfconfig.h.
Referenced by main().
Definition at line 203 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::reset(), KLFMainWin::saveSettings(), and KLFMainWin::slotSetExportProfile().
Definition at line 202 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::reset(), KLFMainWin::saveSettings(), and KLFMainWin::slotSetExportProfile().
Definition at line 230 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
Definition at line 254 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::initPluginControls(), main_load_plugins(), KLFPluginConfigAccess::makeDefaultValue(), KLFPluginConfigAccess::readValue(), KLFSettings::resetPluginControls(), and KLFPluginConfigAccess::writeValue().
struct { ... } KLFConfig::Plugins |
Definition at line 181 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFLibEntryEditor::KLFLibEntryEditor(), KLFMainWin::KLFMainWin(), KLFLibViewDelegate::paintText(), and KLFSettings::reset().
Definition at line 182 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFSettings::reset(), and KLFMainWin::slotEvaluate().
double KLFConfig::rborderoffset |
Definition at line 228 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
Definition at line 239 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::loadLibrarySavedState(), and KLFSettings::reset().
Definition at line 201 of file klfconfig.h.
Definition at line 193 of file klfconfig.h.
Referenced by KLFSettings::apply(), and KLFSettings::reset().
Definition at line 185 of file klfconfig.h.
Referenced by KLFLatexSymbolsView::recalcLayout().
struct { ... } KLFConfig::SyntaxHighlighter |
double KLFConfig::tborderoffset |
Definition at line 227 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().
Definition at line 220 of file klfconfig.h.
Referenced by KLFMainWin::loadSettings(), main(), KLFMainWin::saveSettings(), KLFPluginConfigAccess::tempDir(), and KLFMimeExporterUrilist::tempFileForOutput().
Definition at line 165 of file klfconfig.h.
Definition at line 162 of file klfconfig.h.
Definition at line 163 of file klfconfig.h.
Referenced by KLFMainWin::KLFMainWin(), and KLFMainWin::showEvent().
Definition at line 164 of file klfconfig.h.
Definition at line 246 of file klfconfig.h.
Referenced by KLFLibDefaultView::KLFLibDefaultView().
struct { ... } KLFConfig::UI |
Referenced by KLFSettings::apply(), KLFMainWin::collectInput(), KLFMimeExporterGlowImage::data(), KLFMimeExporterLibFmts::data(), KLFLibEntryEditor::displayEntries(), KLFMainWin::event(), KLFMainWin::eventFilter(), klfFindTranslatedDataFile(), KLFLibDefaultView::KLFLibDefaultView(), KLFLibEntryEditor::KLFLibEntryEditor(), KLFMainWin::KLFMainWin(), loadDefaults(), main(), KLFLibViewDelegate::paintEntry(), KLFLibViewDelegate::paintText(), KLFSettings::populateLocaleCombo(), KLFLatexSymbolsView::recalcLayout(), KLFMainWin::refreshShowCorrectClearButton(), KLFSettings::reset(), KLFMainWin::saveSettings(), KLFMainWin::slotCopy(), KLFMainWin::slotDrag(), KLFMainWin::slotEvaluate(), KLFLibDefaultView::slotPreviewSizeActionsRefreshChecked(), KLFLibDefaultView::slotPreviewSizeFromActionSender(), KLFMainWin::slotSave(), KLFMainWin::slotSetExportProfile(), KLFMainWin::startupFinished(), and writeToConfig().
Definition at line 186 of file klfconfig.h.
Referenced by main(), and KLFMainWin::saveSettings().
Definition at line 178 of file klfconfig.h.
Referenced by KLFSettings::apply(), KLFMainWin::event(), main(), and KLFSettings::reset().