From ff327ded1ef3e4f41e4e240d1e7baa9884d32a94 Mon Sep 17 00:00:00 2001 From: Rogier Date: Thu, 2 Jul 2015 18:04:54 +0200 Subject: [PATCH 1/4] Added some filenames to .gitignore --- .gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 1ea62db..a380dad 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,12 @@ #Qt Translator Files *.qm + +# Other +Makefile +MinetestMapperGui +*.o +moc_mainwindow.cpp +qrc_minetestmappergui.cpp +ui_mainwindow.h + From 8a2fd652a0b7d25c2af66b9e3f8190ea28df2c86 Mon Sep 17 00:00:00 2001 From: Rogier Date: Thu, 2 Jul 2015 18:04:54 +0200 Subject: [PATCH 2/4] Fix regular and heightmap scale interval which would not enable --- mainwindow.cpp | 27 +++++++++++++++++++++ mainwindow.h | 6 +++++ mainwindow.ui | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 18351bf..a49ed34 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -42,6 +42,7 @@ InitStatics::InitStatics(void) } + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) @@ -926,3 +927,29 @@ void MainWindow::on_actionEdit_heightmap_colors_txt_triggered() { QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->path_HeightmapColors->text()).absoluteFilePath())); } + +void MainWindow::on_drawScaleLeft_toggled(bool checked) +{ + bool state = checked || ui->drawScaleTop->isChecked(); + ui->sidescaleInterval->setEnabled(state); + state = state && ui->sidescaleInterval->isChecked(); + ui->sidescaleIntervalMajor->setEnabled(state); + ui->sidescaleIntervalMinor->setEnabled(state); +} + +void MainWindow::on_drawScaleTop_toggled(bool checked) +{ + bool state = checked || ui->drawScaleLeft->isChecked(); + ui->sidescaleInterval->setEnabled(state); + state = state && ui->sidescaleInterval->isChecked(); + ui->sidescaleIntervalMajor->setEnabled(state); + ui->sidescaleIntervalMinor->setEnabled(state); +} + +void MainWindow::on_drawHeightscale_toggled(bool checked) +{ + ui->heightscaleInterval->setEnabled(checked); + bool state = checked && ui->heightscaleInterval->isChecked(); + ui->heightscaleIntervalMajor->setEnabled(state); + ui->heightscaleIntervalMinor->setEnabled(state); +} diff --git a/mainwindow.h b/mainwindow.h index 7fdbb2b..7746569 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -83,6 +83,12 @@ private slots: void on_actionEdit_heightmap_colors_txt_triggered(); + void on_drawScaleLeft_toggled(bool checked); + + void on_drawScaleTop_toggled(bool checked); + + void on_drawHeightscale_toggled(bool checked); + private: Ui::MainWindow *ui; QProgressBar *progressBar; diff --git a/mainwindow.ui b/mainwindow.ui index 04f656d..9d49397 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2947,6 +2947,70 @@ p, li { white-space: pre-wrap; } + + heightscaleInterval + toggled(bool) + heightscaleIntervalMajor + setEnabled(bool) + + + 124 + 368 + + + 284 + 369 + + + + + heightscaleInterval + toggled(bool) + heightscaleIntervalMinor + setEnabled(bool) + + + 124 + 368 + + + 434 + 369 + + + + + sidescaleInterval + toggled(bool) + sidescaleIntervalMajor + setEnabled(bool) + + + 95 + 138 + + + 359 + 142 + + + + + sidescaleInterval + toggled(bool) + sidescaleIntervalMinor + setEnabled(bool) + + + 95 + 138 + + + 359 + 171 + + + From 97f07778b0c37b310b81b6824a57bf3459a4ea61 Mon Sep 17 00:00:00 2001 From: Rogier Date: Thu, 2 Jul 2015 18:04:54 +0200 Subject: [PATCH 3/4] Improve 'Tiles' tab a little --- mainwindow.cpp | 10 +++++++++ mainwindow.h | 4 ++++ mainwindow.ui | 55 +++++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index a49ed34..ca74f61 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -953,3 +953,13 @@ void MainWindow::on_drawHeightscale_toggled(bool checked) ui->heightscaleIntervalMajor->setEnabled(state); ui->heightscaleIntervalMinor->setEnabled(state); } + +void MainWindow::on_tilecenter_clicked() +{ + ui->tiles_map->setText(tr("map center")); +} + +void MainWindow::on_tileorigin_clicked() +{ + ui->tiles_map->setText(tr("map origin (top left)")); +} diff --git a/mainwindow.h b/mainwindow.h index 7746569..c151b92 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -88,6 +88,10 @@ private slots: void on_drawScaleTop_toggled(bool checked); void on_drawHeightscale_toggled(bool checked); + + void on_tilecenter_clicked(); + + void on_tileorigin_clicked(); private: Ui::MainWindow *ui; diff --git a/mainwindow.ui b/mainwindow.ui index 9d49397..b396756 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1966,8 +1966,11 @@ + + A chunk is the unit of map generation. Usually 5x5x5 blocks. + - chunk + chunk-aligned @@ -1980,8 +1983,11 @@ + + A block is 16x16x16 nodes + - block + block-aligned true @@ -2012,16 +2018,28 @@ arrange - - + + + + + 0 + 0 + + tilecenter - + + + + 0 + 0 + + tileorigin @@ -2030,10 +2048,29 @@ - + + + + + 0 + 0 + + + + Arrange: + + + + + + + 0 + 0 + + - arrange at + at: @@ -2046,7 +2083,7 @@ - world + world center (0,0) true @@ -2056,7 +2093,7 @@ - map + map origin (top-left) From e3ea69d2154ae22b79b395a7bc8c48511df50803 Mon Sep 17 00:00:00 2001 From: Rogier Date: Thu, 2 Jul 2015 18:04:54 +0200 Subject: [PATCH 4/4] Document license information in LICENSE file See the source code (MainWindow::on_actionAbout_MinetestMapperGUI_triggered) --- AUTHORS | 2 ++ LICENSE | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 AUTHORS create mode 100644 LICENSE diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e8c7174 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +adrido +rogier diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..670acd5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,4 @@ +Copyright: adrido and other authors. See AUTHORS. + +This work is licensed under a Creative Commons Attribution 3.0 Unported License. +See: http://creativecommons.org/licenses/by/3.0/