1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Save / load properties of new map window

This commit is contained in:
Tomasz Zieliński
2022-09-08 21:49:10 +02:00
parent e3ff264f25
commit 773877f523
4 changed files with 818 additions and 446 deletions

View File

@ -72,8 +72,6 @@ void MainWindow::loadUserSettings()
{
move(position);
}
//TODO: New map / random template settings
}
void MainWindow::saveUserSettings()

View File

@ -22,6 +22,8 @@ WindowNewMap::WindowNewMap(QWidget *parent) :
setWindowModality(Qt::ApplicationModal);
loadUserSettings();
show();
//setup initial parameters
@ -34,9 +36,139 @@ WindowNewMap::WindowNewMap(QWidget *parent) :
WindowNewMap::~WindowNewMap()
{
saveUserSettings();
delete ui;
}
void WindowNewMap::loadUserSettings()
{
//load window settings
QSettings s(Ui::teamName, Ui::appName);
auto width = s.value(newMapWidth);
if (width.isValid())
{
ui->widthTxt->setText(width.toString());
}
auto height = s.value(newMapHeight);
if (height.isValid())
{
ui->heightTxt->setText(height.toString());
}
auto twoLevel = s.value(newMapTwoLevel);
if (twoLevel.isValid())
{
ui->twoLevelCheck->setChecked(twoLevel.toBool());
}
auto generateRandom = s.value(newMapGenerateRandom);
if (generateRandom.isValid())
{
ui->randomMapCheck->setChecked(generateRandom.toBool());
}
auto players = s.value(newMapPlayers);
if (players.isValid())
{
ui->humanCombo->setCurrentIndex(players.toInt());
}
auto cpuPlayers = s.value(newMapCpuPlayers);
if (cpuPlayers.isValid())
{
ui->cpuCombo->setCurrentIndex(cpuPlayers.toInt());
}
//TODO: teams when implemented
auto waterContent = s.value(newMapWaterContent);
if (waterContent.isValid())
{
switch (waterContent.toInt())
{
case EWaterContent::RANDOM:
ui->waterOpt1->setChecked(true); break;
case EWaterContent::NORMAL:
ui->waterOpt2->setChecked(true); break;
case EWaterContent::ISLANDS:
ui->waterOpt3->setChecked(true); break;
case EWaterContent::NONE:
ui->waterOpt4->setChecked(true); break;
}
}
auto monsterStrength = s.value(newMapWaterContent);
if (monsterStrength.isValid())
{
switch (monsterStrength.toInt())
{
case EMonsterStrength::RANDOM:
ui->monsterOpt1->setChecked(true); break;
case EMonsterStrength::GLOBAL_WEAK:
ui->monsterOpt2->setChecked(true); break;
case EMonsterStrength::GLOBAL_NORMAL:
ui->monsterOpt3->setChecked(true); break;
case EMonsterStrength::GLOBAL_STRONG:
ui->monsterOpt4->setChecked(true); break;
}
}
auto templateName = s.value(newMapTemplate);
if (templateName.isValid())
{
updateTemplateList();
auto* templ = VLC->tplh->getTemplate(templateName.toString().toStdString());
if (templ)
{
ui->templateCombo->setCurrentText(templateName.toString());
//TODO: validate inside this method
mapGenOptions.setMapTemplate(templ);
}
else
{
//Display problem on status bar
}
}
}
void WindowNewMap::saveUserSettings()
{
QSettings s(Ui::teamName, Ui::appName);
s.setValue(newMapWidth, ui->widthTxt->text().toInt());
s.setValue(newMapHeight, ui->heightTxt->text().toInt());
s.setValue(newMapTwoLevel, ui->twoLevelCheck->isChecked());
s.setValue(newMapGenerateRandom, ui->randomMapCheck->isChecked());
s.setValue(newMapPlayers,ui->humanCombo->currentIndex());
s.setValue(newMapCpuPlayers,ui->cpuCombo->currentIndex());
//TODO: teams when implemented
EWaterContent::EWaterContent water = EWaterContent::RANDOM;
if(ui->waterOpt1->isChecked())
water = EWaterContent::RANDOM;
else if(ui->waterOpt2->isChecked())
water = EWaterContent::NONE;
else if(ui->waterOpt3->isChecked())
water = EWaterContent::NORMAL;
else if(ui->waterOpt4->isChecked())
water = EWaterContent::ISLANDS;
s.setValue(newMapWaterContent, static_cast<int>(water));
EMonsterStrength::EMonsterStrength monster = EMonsterStrength::RANDOM;
if(ui->monsterOpt1->isChecked())
monster = EMonsterStrength::RANDOM;
else if(ui->monsterOpt2->isChecked())
monster = EMonsterStrength::GLOBAL_WEAK;
else if(ui->monsterOpt3->isChecked())
monster = EMonsterStrength::GLOBAL_NORMAL;
else if(ui->monsterOpt4->isChecked())
monster = EMonsterStrength::GLOBAL_STRONG;
s.setValue(newMapMonsterStrength, static_cast<int>(water));
auto templateName = ui->templateCombo->currentText();
if (templateName.size())
{
s.setValue(newMapTemplate, templateName);
}
}
void WindowNewMap::on_cancelButton_clicked()
{
close();
@ -151,21 +283,7 @@ void WindowNewMap::on_twoLevelCheck_stateChanged(int arg1)
void WindowNewMap::on_humanCombo_activated(int index)
{
const int playerLimit = 8;
std::map<int, int> players
{
{0, CMapGenOptions::RANDOM_SIZE},
{1, 1},
{2, 2},
{3, 3},
{4, 4},
{5, 5},
{6, 6},
{7, 7},
{8, 8}
};
int humans = players[index];
int humans = players.at(index);
if(humans > playerLimit)
{
humans = playerLimit;
@ -203,22 +321,8 @@ void WindowNewMap::on_humanCombo_activated(int index)
void WindowNewMap::on_cpuCombo_activated(int index)
{
const int playerLimit = 8;
std::map<int, int> players
{
{0, CMapGenOptions::RANDOM_SIZE},
{1, 0},
{2, 1},
{3, 2},
{4, 3},
{5, 4},
{6, 5},
{7, 6},
{8, 7}
};
int humans = mapGenOptions.getPlayerCount();
int cpu = players[index];
int cpu = cpuPlayers.at(index);
if(cpu > playerLimit - humans)
{
cpu = playerLimit - humans;

View File

@ -4,7 +4,8 @@
#include <QDialog>
#include "../lib/rmg/CMapGenOptions.h"
namespace Ui {
namespace Ui
{
class WindowNewMap;
}
@ -12,6 +13,44 @@ class WindowNewMap : public QDialog
{
Q_OBJECT
const QString newMapWidth = "NewMapWindow/Width";
const QString newMapHeight = "NewMapWindow/Height";
const QString newMapTwoLevel = "NewMapWindow/TwoLevel";
const QString newMapGenerateRandom = "NewMapWindow/GenerateRandom";
const QString newMapPlayers = "NewMapWindow/Players"; //map index
const QString newMapCpuPlayers = "NewMapWindow/CpuPlayers"; //map index
const QString newMapWaterContent = "NewMapWindow/WaterContent";
const QString newMapMonsterStrength = "NewMapWindow/MonsterStrength";
const QString newMapTemplate = "NewMapWindow/Template";
const int playerLimit = 8;
const std::map<int, int> players
{
{0, CMapGenOptions::RANDOM_SIZE},
{1, 1},
{2, 2},
{3, 3},
{4, 4},
{5, 5},
{6, 6},
{7, 7},
{8, 8}
};
const std::map<int, int> cpuPlayers
{
{0, CMapGenOptions::RANDOM_SIZE},
{1, 0},
{2, 1},
{3, 2},
{4, 3},
{5, 4},
{6, 5},
{7, 6},
{8, 7}
};
public:
explicit WindowNewMap(QWidget *parent = nullptr);
~WindowNewMap();
@ -41,6 +80,9 @@ private:
void updateTemplateList();
void loadUserSettings();
void saveUserSettings();
private:
Ui::WindowNewMap *ui;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>447</width>
<height>385</height>
<width>448</width>
<height>379</height>
</rect>
</property>
<property name="sizePolicy">
@ -24,8 +24,8 @@
</property>
<property name="maximumSize">
<size>
<width>9999</width>
<height>9999</height>
<width>448</width>
<height>379</height>
</size>
</property>
<property name="windowTitle">
@ -38,23 +38,109 @@
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>271</width>
<y>20</y>
<width>291</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>Map size</string>
</property>
<widget class="QComboBox" name="sizeCombo">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>141</width>
<height>32</height>
<width>261</width>
<height>51</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,0,0">
<item row="1" column="0">
<widget class="QCheckBox" name="twoLevelCheck">
<property name="text">
<string>Two level map</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="widthTxt">
<property name="text">
<string>36</string>
</property>
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="heightTxt">
<property name="text">
<string>36</string>
</property>
<property name="maxLength">
<number>3</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>48</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="sizeCombo">
<property name="minimumSize">
<size>
<width>96</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<item>
<property name="text">
<string>S (36x36)</string>
@ -76,103 +162,11 @@
</property>
</item>
</widget>
<widget class="QLineEdit" name="heightTxt">
<property name="geometry">
<rect>
<x>210</x>
<y>50</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>36</string>
</property>
<property name="maxLength">
<number>3</number>
</property>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QLineEdit" name="widthTxt">
<property name="geometry">
<rect>
<x>210</x>
<y>20</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>36</string>
</property>
<property name="maxLength">
<number>3</number>
</property>
</widget>
<widget class="QCheckBox" name="twoLevelCheck">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>121</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Two level map</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>140</x>
<y>20</y>
<width>58</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Width</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>140</x>
<y>50</y>
<width>58</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Height</string>
</property>
</widget>
</widget>
<widget class="QPushButton" name="okButtong">
<property name="geometry">
<rect>
<x>310</x>
<y>20</y>
<width>111</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Ok</string>
</property>
</widget>
<widget class="QPushButton" name="cancelButton">
<property name="geometry">
<rect>
<x>310</x>
<y>50</y>
<width>111</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_5">
<property name="geometry">
@ -183,38 +177,15 @@
<height>251</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Random map</string>
</property>
<widget class="QComboBox" name="templateCombo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>90</x>
<y>220</y>
<width>331</width>
<height>32</height>
</rect>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>20</x>
<y>220</y>
<width>58</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Template</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
@ -227,15 +198,79 @@
<property name="title">
<string>Players</string>
</property>
<widget class="QComboBox" name="humanCombo">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>120</x>
<x>10</x>
<y>20</y>
<width>91</width>
<height>32</height>
<width>391</width>
<height>61</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,1">
<item row="0" column="3">
<widget class="QComboBox" name="humanTeamsCombo">
<property name="minimumSize">
<size>
<width>48</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>16777215</height>
</size>
</property>
<item>
<property name="text">
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="3">
<widget class="QComboBox" name="cpuTeamsCombo">
<item>
<property name="text">
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>96</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Human/Computer</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="humanCombo">
<property name="minimumSize">
<size>
<width>96</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<item>
<property name="text">
<string>Random</string>
@ -282,15 +317,29 @@
</property>
</item>
</widget>
<widget class="QComboBox" name="cpuCombo">
<property name="geometry">
<rect>
<x>120</x>
<y>50</y>
<width>91</width>
<height>32</height>
</rect>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Computer only</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cpuCombo">
<item>
<property name="text">
<string>Random</string>
@ -337,61 +386,21 @@
</property>
</item>
</widget>
<widget class="QComboBox" name="humanTeamsCombo">
<property name="geometry">
<rect>
<x>320</x>
<y>20</y>
<width>91</width>
<height>32</height>
</rect>
</property>
<item>
<property name="text">
<string>0</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="cpuTeamsCombo">
<property name="geometry">
<rect>
<x>320</x>
<y>50</y>
<width>91</width>
<height>32</height>
</rect>
<item row="1" column="4">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<item>
<property name="text">
<string>0</string>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Human/Computer</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Computer only</string>
</property>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_4">
@ -406,15 +415,30 @@
<property name="title">
<string>Monster strength</string>
</property>
<widget class="QRadioButton" name="monsterOpt1">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>99</width>
<height>20</height>
<width>411</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1">
<item>
<widget class="QRadioButton" name="monsterOpt1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Random</string>
</property>
@ -422,45 +446,91 @@
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="monsterOpt2">
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Weak</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="monsterOpt3">
<property name="geometry">
<rect>
<x>170</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Normal</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="monsterOpt4">
<property name="geometry">
<rect>
<x>260</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Strong</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3">
<property name="geometry">
@ -471,18 +541,45 @@
<height>41</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>480</width>
<height>96</height>
</size>
</property>
<property name="title">
<string>Water content</string>
</property>
<widget class="QRadioButton" name="waterOpt1">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>99</width>
<height>20</height>
<width>411</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,1,1,1">
<item>
<widget class="QRadioButton" name="waterOpt1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>144</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>Random</string>
</property>
@ -490,45 +587,120 @@
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="waterOpt2">
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>144</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>None</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="waterOpt3">
<property name="geometry">
<rect>
<x>170</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>144</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>Normal</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="waterOpt4">
<property name="geometry">
<rect>
<x>260</x>
<y>20</y>
<width>99</width>
<height>20</height>
</rect>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>144</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>Islands</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>220</y>
<width>411</width>
<height>21</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Template</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="templateCombo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QCheckBox" name="randomMapCheck">
@ -536,7 +708,7 @@
<rect>
<x>10</x>
<y>100</y>
<width>331</width>
<width>291</width>
<height>20</height>
</rect>
</property>
@ -544,6 +716,62 @@
<string>Generate random map</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>310</x>
<y>20</y>
<width>111</width>
<height>101</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="okButtong">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="text">
<string>Ok</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>