projects
/
simple-launcher
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed building of a test application for target 'all'
[simple-launcher]
/
gconf-wrapper.h
diff --git
a/gconf-wrapper.h
b/gconf-wrapper.h
index
a3e4518
..
be94905
100644
(file)
--- a/
gconf-wrapper.h
+++ b/
gconf-wrapper.h
@@
-54,49
+54,57
@@
class GConfOption : public GConfItem {
protected:
GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(key.merge(path)) { }
protected:
GConfOption(const GConfKey& key, const std::string& path): myIsSynchronized(false), myPath(key.merge(path)) { }
+ virtual GConfValueType kind() const = 0;
+
void setGConfValue(const GConfValue *);
void setGConfValue(const GConfValue *);
- GConfValue *getGConfValue(GConfValueType) const;
+ GConfValue *getGConfValue() const;
void unsetGConfValue();
protected:
mutable bool myIsSynchronized;
void unsetGConfValue();
protected:
mutable bool myIsSynchronized;
- std::string myPath;
+ const std::string myPath;
};
};
-class GConfStringValue : public GConfOption {
+class GConfStringOption : public GConfOption {
public:
public:
- GConfStringValue(const GConfKey&, const std::string&, const std::string& = "");
+ GConfStringOption(const GConfKey&, const std::string&, const std::string&);
+
+ virtual GConfValueType kind() const { return GCONF_VALUE_STRING; }
const std::string& value() const;
const std::string& setValue(const std::string& newValue);
private:
mutable std::string myValue;
const std::string& value() const;
const std::string& setValue(const std::string& newValue);
private:
mutable std::string myValue;
- std::string myDefaultValue;
+ const std::string myDefaultValue;
};
};
-class GConfBooleanValue : public GConfOption {
+class GConfBooleanOption : public GConfOption {
public:
public:
- GConfBooleanValue(const GConfKey&, const std::string&, bool = false);
+ GConfBooleanOption(const GConfKey&, const std::string&, bool);
+
+ virtual GConfValueType kind() const { return GCONF_VALUE_BOOL; }
bool value() const;
bool setValue(bool newValue);
private:
mutable bool myValue;
bool value() const;
bool setValue(bool newValue);
private:
mutable bool myValue;
- bool myDefaultValue;
+ const bool myDefaultValue;
};
};
-class GConfIntegerValue : public GConfOption {
+class GConfIntegerOption : public GConfOption {
public:
public:
- GConfIntegerValue(const GConfKey&, const std::string&, int = false);
+ GConfIntegerOption(const GConfKey&, const std::string&, int);
+
+ virtual GConfValueType kind() const { return GCONF_VALUE_INT; }
int value() const;
int setValue(int newValue);
private:
mutable int myValue;
int value() const;
int setValue(int newValue);
private:
mutable int myValue;
- int myDefaultValue;
+ const int myDefaultValue;
};
#endif
};
#endif