Go to the documentation of this file.
65 const string TRUE =
"true";
115 configurationName_(name) {
235 string toolbarLayout =
options->
257 for (
int i = 0; i <
options->childCount(); i++) {
273 for (
int i = 0; i <
options->childCount(); i++) {
285 for (
int i = 0; i <
options->childCount(); i++) {
317 if (charKey == 127) {
371 for (
int i = 0; i < root->
childCount(); i++) {
461 for (
int i = 0; i < toolbarElem->
childCount(); i++) {
525 keyChar = *(key.c_str());
static const std::string OSNAME_SEPARATOR
ObjectState name for separator.
static const std::string OSNAME_OPTIONS
ObjectState name for the options.
bool hasAttribute(const std::string &name) const
const string WI_FULLSCREEN
Name of the full-screen element inside window element.
GUIOptions * readOptions()
const string TB_LA_ICON
Name of the icon element insie layout element.
void setWindowProperties(const ObjectState *windowElem, ObjectState *options) const
std::string stringAttribute(const std::string &name) const
static const std::string OSKEY_ACTION
ObjectState attribute key for action name.
static const std::string OSKEY_KEY
ObjectState attribute key for normal letter or number key.
static const std::string OSNAME_KEYBOARD_SHORTCUT
ObjectState name for keyboard shortcut.
const int DEFAULT_WIDTH
Default window width.
const string DELETE_KEY
String to mean delete key.
static const std::string OSKEY_POSITION
ObjectState attribute key for separator position.
const string WI_X_POSITION
Name of the element declaring x position of the window.
const int DEFAULT_X_POS
Default x position.
const string TB_SLOT
Name of the element declaring a toolbar button.
static const std::string OSKEY_FULL_SCREEN
ObjectState attribute key for full screen feature.
const string TOOLBAR
Name of the element containing toolbar declaration.
const int DEFAULT_HEIGHT
Default window height.
static const std::string OSKEY_TOOLBAR_VISIBILITY
ObjectState attribute key for toolbar visibility.
const string KS_ACTION
Name of the element declaring the action performed by the keyboard shortcut.
const string TB_SEPARATOR
Name of the element declaring a toolbar separator.
const string TB_LAYOUT
Name of the element containing toolbar layout declaration.
static std::string toString(const T &source)
const string WI_Y_POSITION
Name of the element declaring y position of the window.
ObjectState * readState()
ObjectState * childByName(const std::string &name) const
#define assert(condition)
virtual ObjectState * convertToConfigFileFormat(const ObjectState *options) const
const string KEY_COMB_ALT
Name of the element meaning alt key in key combination.
static const std::string OSKEY_ALT
ObjectState attribute key for alt key.
const string FKEY_NUMBER
Name of the attribute declaring function key number.
const string KEY_COMB_FKEY
Name of the element meaning some function key in key combination.
const string TB_SLOT_ACTION
Name of the element declaring action name inside slot element.
static const std::string OSKEY_Y_POS
ObjectState attribute key for window y position.
const string TB_LA_TEXT
Name of the text element inside layout element.
const string WI_HEIGHT
Name of the element declaring window height.
void setToolbarProperties(const ObjectState *toolbarElem, ObjectState *options) const
virtual ObjectState * readState()
static const std::string OSKEY_WINDOW_HEIGHT
ObjectState attribute key for window height.
static const std::string OSVALUE_ICON
ObjectState attribute value for icon layout.
const string KEY_COMB_KEY
Name of the element meaning some other key in key combination.
static const std::string OSVALUE_BOTH
ObjectState attribute value for text & icon layout.
ObjectState * child(int index) const
void addChild(ObjectState *child)
static const std::string OSKEY_CTRL
ObjectState attribute key for ctrl key.
static const std::string OSKEY_X_POS
ObjectState attribute key for window x position.
bool hasChild(const std::string &name) const
const string TRUE
Value used for true in attribute and element values.
const string SEPARATOR_POSITION
Name of the attribute of the separator element.
const string WINDOW
Name of the element containing window declaration.
static MachInfoCmdLineOptions options
const string WI_WIDTH
Name of the element declaring window width.
static const std::string OSKEY_FKEY
ObjectState attribute key for function key number.
const string KEY_COMB_CTRL
Name of the element meaning ctrl key in key combination.
static const std::string OSKEY_WINDOW_WIDTH
ObjectState attribute key for window width.
const string TB_VISIBLE
Name of the element declaring toolbar visibility.
void addKeyboardShortcut(const ObjectState *ksElem, ObjectState *options) const
const string FALSE
Value used for false in attribute and element values.
static const std::string OSVALUE_TEXT
ObjectState attribute value for text layout.
const string SLOT_POSITION
Name of the attribute of the slot element.
std::string stringValue() const
int intAttribute(const std::string &name) const
const string KEY_VALUE
Name of the attribute which declares the actual key of the key element.
static const std::string OSKEY_TOOLBAR_LAYOUT
ObjectState attribute key for toolbar layout.
virtual ObjectState * convertToOptionsObjectFormat(const ObjectState *root) const
void writeOptions(const GUIOptions &options)
const string KEYBOARD_SHORTCUT
Name of the element declaring a keyboard shortcut.
std::string configurationName_
Name of the configuration to read/write.
void setValue(const std::string &value)
virtual ~GUIOptionsSerializer()
const int DEFAULT_Y_POS
Default y position.
void setAttribute(const std::string &name, const std::string &value)
void writeState(const ObjectState *optionsState)
const string KS_KEY_COMBINATION
Name of the element declaring key combination.
GUIOptionsSerializer(std::string configurationName)
virtual void writeState(const ObjectState *rootState)