236 } |
236 } |
237 |
237 |
238 void HWMapContainer::themeSelected(int currentRow) |
238 void HWMapContainer::themeSelected(int currentRow) |
239 { |
239 { |
240 QString theme = Themes->at(currentRow); |
240 QString theme = Themes->at(currentRow); |
241 QList<QVariant> mapInfo; |
241 QList<QVariant> mapInfo; |
242 mapInfo.push_back(theme); |
242 mapInfo.push_back(theme); |
243 mapInfo.push_back(18); |
243 mapInfo.push_back(18); |
244 chooseMap->setItemData(0, mapInfo); |
244 chooseMap->setItemData(0, mapInfo); |
245 gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme))); |
245 gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme))); |
246 emit themeChanged(theme); |
246 emit themeChanged(theme); |
247 } |
247 } |
248 |
248 |
249 QString HWMapContainer::getCurrentSeed() const |
249 QString HWMapContainer::getCurrentSeed() const |
250 { |
250 { |
251 return m_seed; |
251 return m_seed; |
252 } |
252 } |
253 |
253 |
254 QString HWMapContainer::getCurrentMap() const |
254 QString HWMapContainer::getCurrentMap() const |
255 { |
255 { |
256 if(!chooseMap->currentIndex()) return QString(); |
256 if(!chooseMap->currentIndex()) return QString(); |
257 return chooseMap->currentText(); |
257 return chooseMap->currentText(); |
258 } |
258 } |
259 |
259 |
260 QString HWMapContainer::getCurrentTheme() const |
260 QString HWMapContainer::getCurrentTheme() const |
261 { |
261 { |
262 return chooseMap->itemData(chooseMap->currentIndex()).toList()[0].toString(); |
262 return chooseMap->itemData(chooseMap->currentIndex()).toList()[0].toString(); |
310 lwThemes->setCurrentItem(items.at(0)); |
310 lwThemes->setCurrentItem(items.at(0)); |
311 } |
311 } |
312 |
312 |
313 void HWMapContainer::setRandomSeed() |
313 void HWMapContainer::setRandomSeed() |
314 { |
314 { |
315 m_seed = QUuid::createUuid().toString(); |
315 m_seed = QUuid::createUuid().toString(); |
316 emit seedChanged(m_seed); |
316 emit seedChanged(m_seed); |
317 changeImage(); |
317 changeImage(); |
318 } |
318 } |
319 |
319 |
320 void HWMapContainer::setRandomTheme() |
320 void HWMapContainer::setRandomTheme() |
321 { |
321 { |
322 if(!Themes->size()) return; |
322 if(!Themes->size()) return; |