[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Member Functions | Public Attributes

KLFConfig Class Reference

Structure that stores klatexformula's configuration in memory. More...

#include <klfconfig.h>

Collaboration diagram for KLFConfig:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 KLFConfig ()
KLFPluginConfigAccess getPluginConfigAccess (const QString &name)
void loadDefaults ()
int readFromConfig ()
void detectMissingSettings ()
int ensureHomeConfigDir ()
int writeToConfig ()
bool checkExePaths ()

Public Attributes

QString homeConfigDir
QString globalShareDir
QString homeConfigSettingsFile
 current (now, "new" klatexformula.conf) settings file
QString homeConfigSettingsFileIni
 OLD config file.
QString homeConfigDirRCCResources
QString homeConfigDirPlugins
QString homeConfigDirPluginData
QString homeConfigDirI18n
struct {
   bool   thisVersionMajFirstRun
   bool   thisVersionMajMinFirstRun
   bool   thisVersionMajMinRelFirstRun
   bool   thisVersionExactFirstRun
   QString   libraryFileName
   QString   libraryLibScheme
Core
struct {
   QString   locale
 When setting this, don't forget to call QLocale::setDefault().
   bool   useSystemAppFont
   QFont   applicationFont
   QFont   latexEditFont
   QFont   preambleEditFont
   QSize   previewTooltipMaxSize
   QSize   labelOutputFixedSize
   QString   lastSaveDir
   int   symbolsPerLine
   QList< QColor >   userColorList
   QList< QColor >   colorChooseWidgetRecent
   QList< QColor >   colorChooseWidgetCustom
   int   maxUserColors
   bool   enableToolTipPreview
   bool   enableRealTimePreview
   int   autosaveLibraryMin
   bool   showHintPopups
   bool   clearLatexOnly
   QString   copyExportProfile
   QString   dragExportProfile
   bool   glowEffect
   QColor   glowEffectColor
   int   glowEffectRadius
   QStringList   customMathModes
   bool   showExportProfilesLabel
   bool   menuExportProfileAffectsDrag
   bool   menuExportProfileAffectsCopy
UI
struct {
   unsigned int   configFlags
   QTextCharFormat   fmtKeyword
   QTextCharFormat   fmtComment
   QTextCharFormat   fmtParenMatch
   QTextCharFormat   fmtParenMismatch
   QTextCharFormat   fmtLonelyParen
SyntaxHighlighter
struct {
   QString   tempDir
   QString   execLatex
   QString   execDvips
   QString   execGs
   QString   execEpstopdf
   QStringList   execenv
   double   lborderoffset
   double   tborderoffset
   double   rborderoffset
   double   bborderoffset
   bool   outlineFonts
BackendSettings
struct {
   QColor   colorFound
   QColor   colorNotFound
   bool   restoreURLs
   bool   confirmClose
   bool   groupSubCategories
   int   iconViewFlow
   bool   historyTagCopyToArchive
   QString   lastFileDialogPath
   int   treePreviewSizePercent
   int   listPreviewSizePercent
   int   iconPreviewSizePercent
LibraryBrowser
struct {
   QMap< QString, QMap< QString,
QVariant > >   pluginConfig
Plugins
QFont defaultCMUFont
QFont defaultStdFont
QFont defaultTTFont

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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 ( )
int KLFConfig::ensureHomeConfigDir ( )
KLFPluginConfigAccess KLFConfig::getPluginConfigAccess ( const QString name)
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 ( )
int KLFConfig::writeToConfig ( )

Member Data Documentation

Definition at line 192 of file klfconfig.h.

Definition at line 229 of file klfconfig.h.

Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().

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
struct { ... } KLFConfig::Core

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 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 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 158 of file klfconfig.h.

Referenced by ensureHomeConfigDir(), klf_reload_translations(), and loadDefaults().

Definition at line 156 of file klfconfig.h.

Referenced by ensureHomeConfigDir(), loadDefaults(), main_cleanup(), and main_load_plugins().

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 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().

Definition at line 226 of file klfconfig.h.

Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().

struct { ... } KLFConfig::LibraryBrowser

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 230 of file klfconfig.h.

Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().

struct { ... } KLFConfig::Plugins

Definition at line 182 of file klfconfig.h.

Referenced by KLFSettings::apply(), KLFSettings::reset(), and KLFMainWin::slotEvaluate().

Definition at line 228 of file klfconfig.h.

Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().

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().

Definition at line 227 of file klfconfig.h.

Referenced by KLFMainWin::loadSettings(), and KLFMainWin::saveSettings().

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

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().


The documentation for this class was generated from the following files:

Generated by doxygen 1.7.3