summaryrefslogtreecommitdiffstats
path: root/src/UiGuiSettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/UiGuiSettings.h')
-rw-r--r--[-rwxr-xr-x]src/UiGuiSettings.h108
1 files changed, 60 insertions, 48 deletions
diff --git a/src/UiGuiSettings.h b/src/UiGuiSettings.h
index c9e5917..14376ad 100755..100644
--- a/src/UiGuiSettings.h
+++ b/src/UiGuiSettings.h
@@ -30,54 +30,66 @@ class TQSettings;
class UiGuiSettings : public TQObject
{
- Q_OBJECT
-private:
- UiGuiSettings();
- static TQWeakPointer<UiGuiSettings> _instance;
-
-public:
- static TQSharedPointer<UiGuiSettings> getInstance();
- ~UiGuiSettings();
-
- bool registerObjectProperty(TQObject *obj, const TQString &propertyName, const TQString &settingName);
- bool registerObjectPropertyRecursive(TQObject *obj);
- bool setObjectPropertyToSettingValue(TQObject *obj, const TQString &propertyName, const TQString &settingName);
- bool setObjectPropertyToSettingValueRecursive(TQObject *obj);
- bool setSettingToObjectPropertyValue(TQObject *obj, const TQString &propertyName, const TQString &settingName);
- bool setSettingToObjectPropertyValueRecursive(TQObject *obj);
- bool registerObjectSlot(TQObject *obj, const TQString &slotName, const TQString &settingName);
- TQVariant getValueByName(TQString settingName);
- TQStringList getAvailableTranslations();
-
-public slots:
- void setValueByName(const TQString &settingName, const TQVariant &value);
- void unregisterObjectProperty(TQObject *obj);
- void unregisterObjectSlot(TQObject *obj, const TQString &slotName = "", const TQString &settingName = "");
-
-protected:
- bool initSettings();
- bool invokeMethodWithValue(TQObject *obj, TQMetaMethod mMethod, TQVariant value);
- bool checkCustomPropertiesAndCallFunction(TQObject *obj, bool (UiGuiSettings::*callBackFunc)(TQObject *obj, const TQString &propertyName, const TQString &settingName));
-
-private slots:
- void handleObjectPropertyChange();
-
-private:
- void readAvailableTranslations();
-
- //! Stores the mnemonics of the available translations.
- TQStringList _availableTranslations;
-
- //! The settings file.
- TQSettings *_qsettings;
-
- //! Maps an TQObject to a string list containing the property name and the associated setting name.
- TQMap<TQObject*, TQStringList> _registeredObjectProperties;
-
- //! Maps TQObjects to a string list containing the method name and the associated setting name.
- TQMultiMap<TQObject*, TQStringList> _registeredObjectSlots;
-
- TQString _indenterDirctoryStr;
+ Q_OBJECT
+
+ private:
+ UiGuiSettings();
+
+ static TQWeakPointer<UiGuiSettings> _instance;
+
+ public:
+ static TQSharedPointer<UiGuiSettings> getInstance();
+
+ ~UiGuiSettings();
+
+ bool registerObjectProperty(TQObject *obj, const TQString &propertyName,
+ const TQString &settingName);
+ bool registerObjectPropertyRecursive(TQObject *obj);
+ bool setObjectPropertyToSettingValue(TQObject *obj, const TQString &propertyName,
+ const TQString &settingName);
+ bool setObjectPropertyToSettingValueRecursive(TQObject *obj);
+ bool setSettingToObjectPropertyValue(TQObject *obj, const TQString &propertyName,
+ const TQString &settingName);
+ bool setSettingToObjectPropertyValueRecursive(TQObject *obj);
+ bool registerObjectSlot(TQObject *obj, const TQString &slotName,
+ const TQString &settingName);
+ TQVariant getValueByName(TQString settingName);
+ TQStringList getAvailableTranslations();
+
+ public slots:
+ void setValueByName(const TQString &settingName, const TQVariant &value);
+ void unregisterObjectProperty(TQObject *obj);
+ void unregisterObjectSlot(TQObject *obj, const TQString &slotName = "",
+ const TQString &settingName = "");
+
+ protected:
+ bool initSettings();
+ bool invokeMethodWithValue(TQObject *obj, TQMetaMethod mMethod, TQVariant value);
+
+ bool checkCustomPropertiesAndCallFunction(TQObject * obj,
+ bool (UiGuiSettings::*callBackFunc)(TQObject *obj, const TQString &propertyName,
+ const TQString &settingName));
+
+ private slots:
+ void handleObjectPropertyChange();
+
+ private:
+ void readAvailableTranslations();
+
+ //! Stores the mnemonics of the available translations.
+ TQStringList _availableTranslations;
+
+ //! The settings file.
+ TQSettings *_qsettings;
+
+ //! Maps an TQObject to a string list containing the property name and the associated setting
+ // name.
+ TQMap<TQObject*, TQStringList> _registeredObjectProperties;
+
+ //! Maps TQObjects to a string list containing the method name and the associated setting name.
+ TQMultiMap<TQObject*, TQStringList> _registeredObjectSlots;
+
+ TQString _indenterDirctoryStr;
};
#endif // UIGUISETTINGS_H