comparison gui/src/ResourceManager.cpp @ 13537:a43ecce77eec

Introduced a central ResourceManager class.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Tue, 26 Jul 2011 19:04:07 +0200
parents
children a4b5cad8f7c6
comparison
equal deleted inserted replaced
13536:869c62c15e95 13537:a43ecce77eec
1 #include "ResourceManager.h"
2
3 ResourceManager ResourceManager::m_singleton;
4
5 ResourceManager::ResourceManager ()
6 {
7 QDesktopServices desktopServices;
8 m_homePath = desktopServices.storageLocation (QDesktopServices::HomeLocation);
9 m_settings = new QSettings (m_homePath + "/.octave-gui", QSettings::IniFormat);
10 }
11
12 ResourceManager::~ResourceManager ()
13 {
14 delete m_settings;
15 }
16
17 QSettings *
18 ResourceManager::settings ()
19 {
20 return m_settings;
21 }
22
23 QString
24 ResourceManager::homePath ()
25 {
26 return m_homePath;
27 }