#include <VisualPreferences.h>

Stores preference values of different data type (integer, float, char, boolean). All public methods are declared static.
typedef std::vector<Preference*> VizKit::VisualPreferences::PreferenceVector [private] |
Preferences are collected as a vector of pointers to Preferences.
typedef PreferenceVector::iterator VizKit::VisualPreferences::PreferenceVectorIterator [private] |
The PreferenceVectorIterator is an iterator of the PreferenceVector.
enum VizKit::VisualPreferences::PrefDataType [private] |
Float preferences.
enum VizKit::VisualPreferences::PrefStatus [private] |
| VisualPreferences::VisualPreferences | ( | ) | [private] |
The constructor. VisualPreferences is a singleton class. The constructor is private. New instance of class can only be created internally.
| VisualPreferences::~VisualPreferences | ( | ) | [private] |
The destructor. VisualPreferences is a singleton class. The destructor is private. Instance of class can only be destructed internally.
| VizKit::VisualPreferences::VisualPreferences | ( | const VisualPreferences & | other | ) | [private] |
Copy constructor.
| other | Another VisualPreferences. |
| VisualPreferences::PreferenceKeyBool VisualPreferences::convertPreferenceKeyBoolStringToKey | ( | const char *const | aPreferenceKeyString | ) | [static] |
Static helper function that converts a string with a boolean PreferenceKey to the according PreferenceKey. Possibly useful for debugging or tracing purposes.
| aPreferenceKeyString | A string with a PreferenceKey |
| VisualPreferences::PreferenceKeyChar VisualPreferences::convertPreferenceKeyCharStringToKey | ( | const char *const | aPreferenceKeyString | ) | [static] |
Static helper function that converts a string with a char PreferenceKey to the according PreferenceKey. Possibly useful for debugging or tracing purposes.
| aPreferenceKeyString | A string with a PreferenceKey |
| VisualPreferences::PreferenceKeyFloat VisualPreferences::convertPreferenceKeyFloatStringToKey | ( | const char *const | aPreferenceKeyString | ) | [static] |
Static helper function that converts a string with a float PreferenceKey to the according PreferenceKey. Possibly useful for debugging or tracing purposes.
| aPreferenceKeyString | A string with a PreferenceKey |
| VisualPreferences::PreferenceKeyInt VisualPreferences::convertPreferenceKeyIntStringToKey | ( | const char *const | aPreferenceKeyString | ) | [static] |
Static helper function that converts a string with an integer PreferenceKey to the according PreferenceKey. Possibly useful for debugging or tracing purposes.
| aPreferenceKeyString | A string with a PreferenceKey |
| void VisualPreferences::convertPreferenceKeyToString | ( | const PreferenceKeyChar | aKey, | |
| char * | outString | |||
| ) | [static] |
Static helper function that converts a char PreferenceKey to the string. Possibly useful for debugging or tracing purposes.
| aKey | The key of a preference. | |
| outString | The character string value of the PreferenceKey enum value. |
| void VisualPreferences::convertPreferenceKeyToString | ( | const PreferenceKeyBool | aKey, | |
| char * | outString | |||
| ) | [static] |
Static helper function that converts a boolean PreferenceKey to the string. Possibly useful for debugging or tracing purposes.
| aKey | The key of a preference. | |
| outString | The character string value of the PreferenceKey enum value. |
| void VisualPreferences::convertPreferenceKeyToString | ( | const PreferenceKeyFloat | aKey, | |
| char * | outString | |||
| ) | [static] |
Static helper function that converts a float PreferenceKey to the string. Possibly useful for debugging or tracing purposes.
| aKey | The key of a preference. | |
| outString | The character string value of the PreferenceKey enum value. |
| void VisualPreferences::convertPreferenceKeyToString | ( | const PreferenceKeyInt | aKey, | |
| char * | outString | |||
| ) | [static] |
Static helper function that converts an integer PreferenceKey to the string. Possibly useful for debugging or tracing purposes.
| aKey | The key of a preference. | |
| outString | The character string value of the PreferenceKey enum value. |
| void VisualPreferences::dispose | ( | void | ) | [static] |
Disposes the VisualPreferences.
| bool VisualPreferences::getDefault | ( | const PreferenceKeyChar | anIdentifier, | |
| char * | outPrefVal | |||
| ) | [static] |
Retrieves a default preference value (char). The default preference is handled as a fallback if a preference value is requested. It is handled as an error if a preference value is requested and no default value has been specified before nor any value with the requested key has been saved before.
| anIdentifier | The identifier (key) of the preference value. | |
| [out] | outPrefVal | The value of the character preference. |
| bool VisualPreferences::getDefault | ( | const PreferenceKeyBool | anIdentifier, | |
| bool * | isDefaultValue | |||
| ) | [static] |
Retrieves a default preference value (boolean). The default preference is handled as a fallback if a preference value is requested. It is handled as an error if a preference value is requested and no default value has been specified before nor any value with the requested key has been saved before.
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if default preference value was found. |
| int VisualPreferences::getDefault | ( | const PreferenceKeyInt | anIdentifier, | |
| bool * | isDefaultValue | |||
| ) | [static] |
Retrieves a default preference value (integer). The default preference is handled as a fallback if a preference value is requested. It is handled as an error if a preference value is requested and no default value has been specified before nor any value with the requested key has been saved before.
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if default preference value was found. |
| float VisualPreferences::getDefault | ( | const PreferenceKeyFloat | anIdentifier, | |
| bool * | isDefaultValue | |||
| ) | [static] |
Retrieves a default preference value (float). The default preference is handled as a fallback if a preference value is requested. It is handled as an error if a preference value is requested and no default value has been specified before nor any value with the requested key has been saved before.
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if default preference value was found. |
| VisualPreferences * VisualPreferences::getInstance | ( | void | ) | [static, private] |
Constructs a VisualPreferences. The VisualPreferences internally is a singleton. Returns a pointer to the initialized VisualPreferences.
| int VisualPreferences::getValue | ( | const PreferenceKeyInt | anIdentifier, | |
| bool * | isDefaultValue = NULL | |||
| ) | [static] |
Retrieves a persistent preference value (integer).
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if returned value is default value. |
| float VisualPreferences::getValue | ( | const PreferenceKeyFloat | anIdentifier, | |
| bool * | isDefaultValue = NULL | |||
| ) | [static] |
Retrieves a persistent preference value (float).
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if returned value is default value. |
| void VisualPreferences::getValue | ( | const PreferenceKeyChar | anIdentifier, | |
| char * | outPrefVal, | |||
| bool * | isDefaultValue = NULL | |||
| ) | [static] |
Retrieves a persistent preference value (char).
| anIdentifier | The identifier (key) of the preference value. | |
| [out] | outPrefVal | The value of the character preference. |
| isDefaultValue | True if returned value is default value. |
| bool VisualPreferences::getValue | ( | const PreferenceKeyBool | anIdentifier, | |
| bool * | isDefaultValue = NULL | |||
| ) | [static] |
Retrieves a persistent preference value (boolean).
| anIdentifier | The identifier (key) of the preference value. | |
| isDefaultValue | True if returned value is default value. |
| VisualPreferences& VizKit::VisualPreferences::operator= | ( | const VisualPreferences & | other | ) | [private] |
Assignment operator.
| void VisualPreferences::setDefault | ( | const PreferenceKeyBool | anIdentifier, | |
| const bool | aValue | |||
| ) | [static, private] |
Sets a default preference value (boolean). The default preference value is set by VisualPreferences' setDefaultValues(). That way there will always be a preference value present even if the user hasn't set any yet. If it is not possible to set a default value, at least a value has to be set and stored before the value will be returned on request.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (boolean) of the preference value. |
| void VisualPreferences::setDefault | ( | const PreferenceKeyInt | anIdentifier, | |
| const int | aValue | |||
| ) | [static, private] |
Sets a default preference value (integer). The default preference value is set by VisualPreferences' setDefaultValues(). That way there will always be a preference value present even if the user hasn't set any yet. If it is not possible to set a default value, at least a value has to be set and stored before the value will be returned on request.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (integer) of the preference value. |
| void VisualPreferences::setDefault | ( | const PreferenceKeyChar | anIdentifier, | |
| const char *const | aValue | |||
| ) | [static, private] |
Sets a default preference value (char). The default preference value is set by VisualPreferences' setDefaultValues(). That way there will always be a preference value present even if the user hasn't set any yet. If it is not possible to set a default value, at least a value has to be set and stored before the value will be returned on request.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (character) of the preference value. |
| void VisualPreferences::setDefault | ( | const PreferenceKeyFloat | anIdentifier, | |
| const float | aValue | |||
| ) | [static, private] |
Sets a default preference value (float). The default preference value is set by VisualPreferences' setDefaultValues(). That way there will always be a preference value present even if the user hasn't set any yet. If it is not possible to set a default value, at least a value has to be set and stored before the value will be returned on request.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (float) of the preference value. |
| void VisualPreferences::setDefaultValues | ( | void | ) | [static] |
Called on init of the plug-in in VisualMainAction::handleInitMessage(). The default (factory) preference values are set.
| void VisualPreferences::setValue | ( | const PreferenceKeyInt | anIdentifier, | |
| const int | aValue | |||
| ) | [static] |
Sets a preference value (integer). To store a preference persistently, the method storeValues has to be called afterwards.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (integer) of the preference value. |
| void VisualPreferences::setValue | ( | const PreferenceKeyChar | anIdentifier, | |
| const char *const | aValue | |||
| ) | [static] |
Sets a preference value (char). To store a preference persistently, the method storeValues has to be called afterwards.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (character) of the preference value. |
| void VisualPreferences::setValue | ( | const PreferenceKeyFloat | anIdentifier, | |
| const float | aValue | |||
| ) | [static] |
Sets a preference value (float). To store a preference persistently, the method storeValues has to be called afterwards.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (float) of the preference value. |
| void VisualPreferences::setValue | ( | const PreferenceKeyBool | anIdentifier, | |
| const bool | aValue | |||
| ) | [static] |
Sets a preference value (boolean). To store a preference persistently, the method storeValues has to be called afterwards.
| anIdentifier | The identifier (key) of the preference value. | |
| aValue | The value (boolean) of the preference value. |
| void VisualPreferences::storeValues | ( | void | ) | [static] |
Stores the preferences in persistent storage.
Vector of preferences.
VisualPreferences * VisualPreferences::theVisualPreferences = NULL [static, private] |
VisualPreferences is a singleton class. Pointer to private instance is handled internally.