equal
deleted
inserted
replaced
37 if (!m_userData->cd("Data")) |
37 if (!m_userData->cd("Data")) |
38 m_userData = NULL; |
38 m_userData = NULL; |
39 |
39 |
40 m_defaultData = new QDir(datadir->absolutePath()); |
40 m_defaultData = new QDir(datadir->absolutePath()); |
41 |
41 |
|
42 m_hatModel = NULL; |
42 m_mapModel = NULL; |
43 m_mapModel = NULL; |
43 m_themeModel = NULL; |
44 m_themeModel = NULL; |
44 } |
45 } |
45 |
46 |
46 |
47 |
115 |
116 |
116 |
117 |
117 return ""; |
118 return ""; |
118 } |
119 } |
119 |
120 |
|
121 HatModel * DataManager::hatModel() |
|
122 { |
|
123 if (m_hatModel == NULL) { |
|
124 m_hatModel = new HatModel(); |
|
125 m_hatModel->loadHats(); |
|
126 } |
|
127 return m_hatModel; |
|
128 } |
|
129 |
120 MapModel * DataManager::mapModel() |
130 MapModel * DataManager::mapModel() |
121 { |
131 { |
122 if (m_mapModel == NULL) { |
132 if (m_mapModel == NULL) { |
123 m_mapModel = new MapModel(); |
133 m_mapModel = new MapModel(); |
124 m_mapModel->loadMaps(); |
134 m_mapModel->loadMaps(); |
135 return m_themeModel; |
145 return m_themeModel; |
136 } |
146 } |
137 |
147 |
138 void DataManager::reload() |
148 void DataManager::reload() |
139 { |
149 { |
|
150 m_hatModel->loadHats(); |
140 m_mapModel->loadMaps(); |
151 m_mapModel->loadMaps(); |
141 m_themeModel->loadThemes(); |
152 m_themeModel->loadThemes(); |
142 emit updated(); |
153 emit updated(); |
143 } |
154 } |