summaryrefslogtreecommitdiffstats
path: root/utils/regtools/qeditor/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/regtools/qeditor/settings.cpp')
-rw-r--r--utils/regtools/qeditor/settings.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/settings.cpp b/utils/regtools/qeditor/settings.cpp
new file mode 100644
index 0000000000..d72a15f74f
--- /dev/null
+++ b/utils/regtools/qeditor/settings.cpp
@@ -0,0 +1,32 @@
+#include <QCoreApplication>
+#include <QDebug>
+#include "settings.h"
+
+Settings::Settings()
+{
+
+}
+
+Settings::~Settings()
+{
+ if(m_settings)
+ delete m_settings;
+}
+
+QSettings *Settings::GetSettings()
+{
+ if(!m_settings)
+ {
+ QDir dir(QCoreApplication::applicationDirPath());
+ QString filename = dir.filePath(QCoreApplication::organizationDomain() + ".ini");
+ m_settings = new QSettings(filename, QSettings::IniFormat);
+ }
+ return m_settings;
+}
+
+QSettings *Settings::Get()
+{
+ return g_settings.GetSettings();
+}
+
+Settings Settings::g_settings; \ No newline at end of file