equal
deleted
inserted
replaced
59 // don't show preview anything until first show event |
59 // don't show preview anything until first show event |
60 m_previewEnabled = false; |
60 m_previewEnabled = false; |
61 m_missionsViewSetup = false; |
61 m_missionsViewSetup = false; |
62 m_staticViewSetup = false; |
62 m_staticViewSetup = false; |
63 m_script = QString(); |
63 m_script = QString(); |
|
64 m_prevMapFeatureSize = 50; |
|
65 m_mapFeatureSize = 50; |
64 |
66 |
65 hhSmall.load(":/res/hh_small.png"); |
67 hhSmall.load(":/res/hh_small.png"); |
66 hhLimit = 18; |
68 hhLimit = 18; |
67 templateFilter = 0; |
69 templateFilter = 0; |
68 m_master = true; |
70 m_master = true; |
225 mapFeatureSize->setObjectName("mapFeatureSize"); |
227 mapFeatureSize->setObjectName("mapFeatureSize"); |
226 //mapFeatureSize->setTickPosition(QSlider::TicksBelow); |
228 //mapFeatureSize->setTickPosition(QSlider::TicksBelow); |
227 mapFeatureSize->setMaximum(100); |
229 mapFeatureSize->setMaximum(100); |
228 mapFeatureSize->setMinimum(1); |
230 mapFeatureSize->setMinimum(1); |
229 //mapFeatureSize->setFixedWidth(259); |
231 //mapFeatureSize->setFixedWidth(259); |
230 mapFeatureSize->setValue(50); |
232 mapFeatureSize->setValue(m_mapFeatureSize); |
231 mapFeatureSize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
233 mapFeatureSize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
232 bottomLeftLayout->addWidget(mapFeatureSize, 0); |
234 bottomLeftLayout->addWidget(mapFeatureSize, 0); |
233 connect(mapFeatureSize, SIGNAL(valueChanged(int)), this, SLOT(mapFeatureSizeChanged(int))); |
235 connect(mapFeatureSize, SIGNAL(valueChanged(int)), this, SLOT(mapFeatureSizeChanged(int))); |
234 |
236 |
235 /* Mission description */ |
237 /* Mission description */ |
320 pMap->getImage(m_seed, |
322 pMap->getImage(m_seed, |
321 getTemplateFilter(), |
323 getTemplateFilter(), |
322 get_mapgen(), |
324 get_mapgen(), |
323 getMazeSize(), |
325 getMazeSize(), |
324 getDrawnMapData(), |
326 getDrawnMapData(), |
325 m_script |
327 m_script, |
|
328 m_mapFeatureSize |
326 ); |
329 ); |
327 |
330 |
328 setHHLimit(0); |
331 setHHLimit(0); |
329 |
332 |
330 const QPixmap waitIcon(":/res/iconTime.png"); |
333 const QPixmap waitIcon(":/res/iconTime.png"); |
399 } |
402 } |
400 |
403 |
401 quint32 HWMapContainer::getTemplateFilter() const |
404 quint32 HWMapContainer::getTemplateFilter() const |
402 { |
405 { |
403 return generationStyles->currentRow(); |
406 return generationStyles->currentRow(); |
|
407 } |
|
408 |
|
409 quint32 HWMapContainer::getFeatureSize() const |
|
410 { |
|
411 return m_mapFeatureSize; |
404 } |
412 } |
405 |
413 |
406 void HWMapContainer::resizeEvent ( QResizeEvent * event ) |
414 void HWMapContainer::resizeEvent ( QResizeEvent * event ) |
407 { |
415 { |
408 Q_UNUSED(event); |
416 Q_UNUSED(event); |
809 repaint(); |
817 repaint(); |
810 |
818 |
811 emit mapgenChanged(mapgen); |
819 emit mapgenChanged(mapgen); |
812 } |
820 } |
813 |
821 |
814 void HWMapContainer::mapFeatureSizeChanged(int index) |
822 void HWMapContainer::mapFeatureSizeChanged(int val) |
815 { |
823 { |
|
824 // needs to be per map type, scales will be different |
|
825 m_mapFeatureSize = val; |
|
826 if (qAbs(m_prevMapFeatureSize-m_mapFeatureSize) > 8) |
|
827 { |
|
828 m_prevMapFeatureSize = m_mapFeatureSize; |
|
829 updatePreview(); |
|
830 } |
816 } |
831 } |
817 |
832 |
818 // unused because I needed the space for the slider |
833 // unused because I needed the space for the slider |
819 void HWMapContainer::updateThemeButtonSize() |
834 void HWMapContainer::updateThemeButtonSize() |
820 { |
835 { |