kpilot
KPilotConfig Class Reference
#include <kpilotConfig.h>
Public Types | |
enum | RunMode { Cancel = 0, Normal, ConfigureKPilot, ConfigureConduits, ConfigureAndContinue, WizardAndContinue } |
Static Public Member Functions | |
static void | addAppBlockChangedDatabase (QString db) |
static void | addDirtyDatabase (QString db) |
static void | addFlagsChangedDatabase (QString db) |
static const QFont & | fixed () |
static int | getConfigVersion () |
static int | getDebugLevel (KCmdLineArgs *p) |
static QString | getDefaultDBPath () |
static RunMode | interactiveUpdate () |
static void | sorryVersionOutdated (int fileversion) |
static void | sync () |
static void | updateConfigVersion () |
static QString | versionDetails (int fileversion, bool run) |
Static Public Attributes | |
static const uint | ConfigurationVersion = 443 |
Detailed Description
Definition at line 39 of file kpilotConfig.h.
Member Enumeration Documentation
Definition at line 42 of file kpilotConfig.h.
Member Function Documentation
void KPilotConfig::addAppBlockChangedDatabase | ( | QString | db | ) | [static] |
Definition at line 136 of file kpilotConfig.cc.
void KPilotConfig::addDirtyDatabase | ( | QString | db | ) | [static] |
Definition at line 124 of file kpilotConfig.cc.
void KPilotConfig::addFlagsChangedDatabase | ( | QString | db | ) | [static] |
Definition at line 146 of file kpilotConfig.cc.
const QFont & KPilotConfig::fixed | ( | ) | [static] |
Returns the user's preference for the system-wide fixed font.
Definition at line 113 of file kpilotConfig.cc.
int KPilotConfig::getConfigVersion | ( | ) | [static] |
Reads the configuration version from a configuration file.
TODO: Make this use the *standard* location.
Definition at line 59 of file kpilotConfig.cc.
int KPilotConfig::getDebugLevel | ( | KCmdLineArgs * | p | ) | [static] |
QString KPilotConfig::getDefaultDBPath | ( | ) | [static] |
- Returns:
- QString of default path for the BackupDB files are located
Definition at line 86 of file kpilotConfig.cc.
KPilotConfig::RunMode KPilotConfig::interactiveUpdate | ( | ) | [static] |
Update the config file as best we can, and inform the user.
Returns a suggested run mode if it's ok (ie. update finished, or file was already up-to-date) and Cancel if the user cancels. If the user cancels, it's probably best to _not_ continue with anything, since the config is bogus.
The suggested run mode might be anything - usually normal, but might return ConfigureAndContinue as well.
This function can call functions to update from different versions to current; these are static in kpilotConfig.cc.
Definition at line 293 of file kpilotConfig.cc.
void KPilotConfig::sorryVersionOutdated | ( | int | fileversion | ) | [static] |
Definition at line 195 of file kpilotConfig.cc.
void KPilotConfig::sync | ( | ) | [static] |
Definition at line 343 of file kpilotConfig.cc.
void KPilotConfig::updateConfigVersion | ( | ) | [static] |
Write the current configuration version to the standard location.
Only call this after the KApplication object is created, or crashes will result.
Definition at line 80 of file kpilotConfig.cc.
QString KPilotConfig::versionDetails | ( | int | fileversion, | |
bool | run | |||
) | [static] |
Warn the user that the config file is outdated.
versionDetails() returns a descriptive string. Pass in the actual version of the config file. Set run
to true to add an admonition to run kpilot in config mode to fix this. sorryVersionOutdated() uses KMessageBox to display it.
Definition at line 159 of file kpilotConfig.cc.
Member Data Documentation
const uint KPilotConfig::ConfigurationVersion = 443 [static] |
This number can be changed every time a new KPilot version is released that absolutely requires the user to take a look at the configuration of KPilot.
Definition at line 70 of file kpilotConfig.h.
The documentation for this class was generated from the following files: