equal
deleted
inserted
replaced
39 mainLayout(this), |
39 mainLayout(this), |
40 pMap(0) |
40 pMap(0) |
41 { |
41 { |
42 hhSmall.load(":/res/hh_small.png"); |
42 hhSmall.load(":/res/hh_small.png"); |
43 hhLimit = 18; |
43 hhLimit = 18; |
|
44 templateFilter = 0; |
44 |
45 |
45 mainLayout.setContentsMargins(QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin), |
46 mainLayout.setContentsMargins(QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin), |
46 1, |
47 1, |
47 QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin), |
48 QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin), |
48 QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin)); |
49 QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin)); |
196 void HWMapContainer::changeImage() |
197 void HWMapContainer::changeImage() |
197 { |
198 { |
198 pMap = new HWMap(); |
199 pMap = new HWMap(); |
199 connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage))); |
200 connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage))); |
200 connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int))); |
201 connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int))); |
201 pMap->getImage(m_seed.toStdString()); |
202 pMap->getImage(m_seed.toStdString(), templateFilter); |
202 } |
203 } |
203 |
204 |
204 void HWMapContainer::themeSelected(int currentRow) |
205 void HWMapContainer::themeSelected(int currentRow) |
205 { |
206 { |
206 QString theme = Themes->at(currentRow); |
207 QString theme = Themes->at(currentRow); |
282 { |
283 { |
283 if(!Themes->size()) return; |
284 if(!Themes->size()) return; |
284 quint32 themeNum = rand() % Themes->size(); |
285 quint32 themeNum = rand() % Themes->size(); |
285 lwThemes->setCurrentRow(themeNum); |
286 lwThemes->setCurrentRow(themeNum); |
286 } |
287 } |
|
288 |
|
289 void HWMapContainer::setTemplateFilter(int filter) |
|
290 { |
|
291 templateFilter = filter; |
|
292 } |