diff --git a/drawmapfigure.h b/drawmapfigure.h index d124e8f..b919d63 100644 --- a/drawmapfigure.h +++ b/drawmapfigure.h @@ -43,6 +43,11 @@ public: explicit DrawMapFigure(Geometry *geometry, QColor color, QObject *parent = nullptr) : QObject(parent), geometry(geometry), color(color) { } + ~DrawMapFigure() + { + delete geometry; + } + //DrawMapFigure(const DrawMapFigure &f) {} bool requiresPoint() const; bool requiresGeometry() const; diff --git a/drawmapfiguretablemodel.cpp b/drawmapfiguretablemodel.cpp index 2beacca..9bd571e 100644 --- a/drawmapfiguretablemodel.cpp +++ b/drawmapfiguretablemodel.cpp @@ -112,9 +112,6 @@ QVariant DrawMapFigureTableModel::data(const QModelIndex &index, int role) const default: return QVariant(); } - - // FIXME: Implement me! - return QVariant(); } else if(role == Qt::DecorationRole && col==4){ return item->getColor(); @@ -153,7 +150,6 @@ bool DrawMapFigureTableModel::setData(const QModelIndex &index, const QVariant & default: break; } - // FIXME: Implement me! emit dataChanged(index, index, QVector() << role); return true; } @@ -202,7 +198,6 @@ bool DrawMapFigureTableModel::insertRows(int position, int count, const QModelIn bool DrawMapFigureTableModel::insertColumns(int column, int count, const QModelIndex &parent) { beginInsertColumns(parent, column, column + count - 1); - // FIXME: Implement me! endInsertColumns(); return false; } @@ -220,7 +215,6 @@ bool DrawMapFigureTableModel::removeRows(int position, int count, const QModelIn bool DrawMapFigureTableModel::removeColumns(int column, int count, const QModelIndex &parent) { beginRemoveColumns(parent, column, column + count - 1); - // FIXME: Implement me! endRemoveColumns(); return false; } diff --git a/drawmapfiguretablemodel.h b/drawmapfiguretablemodel.h index d966f6b..63eb317 100644 --- a/drawmapfiguretablemodel.h +++ b/drawmapfiguretablemodel.h @@ -13,6 +13,12 @@ class DrawMapFigureTableModel : public QAbstractTableModel public: explicit DrawMapFigureTableModel(QObject *parent = nullptr); + ~DrawMapFigureTableModel() + { + list->clear(); + delete list; + } + // Header: QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; diff --git a/mainwindow.cpp b/mainwindow.cpp index 255030b..702af14 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -228,6 +228,8 @@ void MainWindow::changeEvent(QEvent* event) MainWindow::~MainWindow() { minetestMapper->cancel(); + delete settings; + delete profile; delete ui; } diff --git a/translations/gui_de.ts b/translations/gui_de.ts index 279a788..a9b5867 100644 --- a/translations/gui_de.ts +++ b/translations/gui_de.ts @@ -1306,7 +1306,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + Cancel Abbrechen @@ -1339,7 +1339,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + About MinetestMapper Über MinetestMapper @@ -1383,7 +1383,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + New Profile Neues Profil @@ -1393,7 +1393,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + Expert Mode Expertenmodus @@ -1413,12 +1413,12 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + About MinetestMapper GUI Über MinetestMapperGUI - + Minetestmapper not found Minetestmapper nicht gefunden @@ -1443,7 +1443,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati Das Bild existiert bereits - + The File <i>%1</i> does already exist. <br><br>Do you want to overwrite? Die Datei <i>%1</i> existiert bereits. <br><br>Soll die Datei Überschrieben werden? @@ -1452,58 +1452,58 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati Der Ordner existiert nicht - + The directory <i>%1</i> does not exist. <br><br>Should it be created? Der Ordner <i>%1</i> existiert nicht. <br><br>Möchten sie den Ordner erstellen? - + MinetestMapper will be executed using this arguments. The arguments can be removed, modified, or new arguments can be added. MinetestMapper wird mit den folgenden Parametern ausgeführt. Die einzelnen Parameter können entfernt, verändert, oder neue hinzugefügt werden. - + Finisched :) Fertig :-) - + minetestmapper terminated minetestmapper abgebrochen - + ERROR: No minetestmapper executable could not be found. Please configure one. FEHLER: Kein Minetestmapper programm gefunden. Bitte Konfiguriere eins. - + ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper Please configure a correct MinetestMapper Application. FEHLER: Das Minetestmapper Programm (%1) ist möglicherweise kein Minetestmapper Programm. Bitte Wählen sie eine Korrekte Minetestmapper Anwendung aus. - + (Edit->Preferences) (Bearbeiten->Einstellungen) - + Do you want to open Preferences now? Sollen die Einstellungen jetzt geöffnet werden? - + No input world selected Keine Welt ausgewählt - + ERROR: No MinetestWorld selected. please select a world @@ -1512,12 +1512,12 @@ please select a world Bitte wähle eine aus - + No output image selected Kein Ausgansbild ausgewählt - + ERROR: No output image selected. Please select a output image @@ -1526,28 +1526,28 @@ Please select a output image Bitte ein Ausgabebild wählen - + The image file does already exist Die Datei existiert bereits - + The directory does not exist Der Ordner existiert nicht - - + + Minetest Mapper failed Minetestmapper hat ein Fehler festgestellt - + <h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again <h1>Fehler</h1> <h2>kartenerstellung fehlgeschlagen</h2>Exit code: <i>%1</i> <br>Ausgabe des Minetstmapper: <pre>%2</pre><br><br>Bitte den Fehler beheben und erneut versuchen - + <h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br> <h1>FEHLER</h1> <h2>minetestmapper ist abgestürzt</h2>Fehlercode: <i>%1</i> <br>Fehlernachricht: <pre>%2</pre><br> @@ -1560,92 +1560,92 @@ Bitte ein Ausgabebild wählen Konnte die Einstellungen nicht migrieren - + Can not save settings Kann die Einstellungen nicht speichern - + Minetest Mapper GUI could not save the settings to %1. Please make shure Minetest Mapper Gui can access to the file/directory Minetest Mapper GUI konnte die Einstellungen nicht nach %1 speichern. Bitte stelle sicher, dass Minetest Mapper GUI auf die Datei/ den Ordner zugreifen darf. - + Can not save profile Konnte das Profil nicht speichern - + Minetest Mapper GUI could not save the current Profile '%1' to %2. Please make shure Minetest Mapper Gui can access to the file/directory - + Open Minetest World Minetest Welt-Ordner öffnen - + Save generated map to... Karte speichern nach... - + png image (*.png) png Grafik (*.png) - + Open HeightmapNodes File Öffne HeightmapNodes Datei - - - + + + TXT File (*.txt) TXT Datei (*.txt) - + Open HeightmapColors File Öffne Höhenkarte Farbdefinitionsdatei - + Open colors.txt File Öffne colors.txt Datei - + <h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon - + <h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br> - + map center - + map origin (top left) - + Create a colors.txt Erstelle eine colors.txt Datei - + There is a nodes.txt but no colors.txt in the world directory Do you want to generate one? If you select 'No' the default colors.txt will be used. @@ -1654,34 +1654,34 @@ Möchtest du eine erstellen? Wenn du auf 'Nein' clickst, wird eine standard colors.txt Datei verwendet. - + No colors.txt file Keine colors.txt Datei - + ERROR: Still no colors.txt file found inside world directory. Do you want to cancel or proceed with default colors.txt file? - + Proceed with default Mit standard Datei fortfahren - + Could not open Terminal - + Error: Could not open scriptfile (%1) for Terminal - + Open Directory @@ -1716,12 +1716,12 @@ Bitte erneut eine gültige minetestmapper Anwendung auswählen. (Bearbeiten-> Möchten Sie die Einstellungen jetzt öffnen? - + preview: %1 Vorschau: %1 - + Name of the new Profile: Name des Neuen Profils: diff --git a/translations/gui_en.ts b/translations/gui_en.ts index c9f5c6f..d6be607 100644 --- a/translations/gui_en.ts +++ b/translations/gui_en.ts @@ -994,7 +994,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + Cancel @@ -1052,7 +1052,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + About MinetestMapper @@ -1088,7 +1088,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + About MinetestMapper GUI @@ -1139,13 +1139,13 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + New Profile - + Expert Mode @@ -1190,238 +1190,238 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati - + ERROR: No minetestmapper executable could not be found. Please configure one. - + ERROR: The Minetetmapper Application (%1) does not look like a Minetetestmapper Please configure a correct MinetestMapper Application. - + Minetestmapper not found - + The File <i>%1</i> does already exist. <br><br>Do you want to overwrite? - + The directory <i>%1</i> does not exist. <br><br>Should it be created? - + MinetestMapper will be executed using this arguments. The arguments can be removed, modified, or new arguments can be added. - + Finisched :) - + minetestmapper terminated - + (Edit->Preferences) - + Do you want to open Preferences now? - + No input world selected - + ERROR: No MinetestWorld selected. please select a world - + No output image selected - + ERROR: No output image selected. Please select a output image - + The image file does already exist - + The directory does not exist - - + + Minetest Mapper failed - + <h1>ERROR</h1> <h2>minetestmapper failed</h2>Exit code: <i>%1</i> <br>Status of MinetestMapper: <pre>%2</pre><br><br>Please fix the error and try again - + <h1>ERROR</h1> <h2>minetestmapper failed</h2>Error code: <i>%1</i> <br>Error Message: <pre>%2</pre><br> - + Can not save settings - + Minetest Mapper GUI could not save the settings to %1. Please make shure Minetest Mapper Gui can access to the file/directory - + Can not save profile - + Minetest Mapper GUI could not save the current Profile '%1' to %2. Please make shure Minetest Mapper Gui can access to the file/directory - + Open Minetest World - + Save generated map to... - + png image (*.png) - + Open HeightmapNodes File - - - + + + TXT File (*.txt) - + Open HeightmapColors File - + Open colors.txt File - + <h1>About MinetestMapperGUI</h1>The <b>MinetestMapper Gui</b> is written by addi.<br />It is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br>The current version is %1. <br>The sourcecode is aviable on <a href='https://bitbucket.org/adrido/minetestmappergui/'>Bitbucket</a>.<br>You may also want to read the <a href='https://forum.minetest.net/viewtopic.php?f=14&t=12139'>Minetest forum thread</a>.<br><br><b>Thanks to:</b><br>McKrustenkaese for his great icon - + <h1>About MinetestMapper</h1>The <b>MinetestMapper</b> is written by:<br>Miroslav Bendík <miroslav.bendik@gmail.com><br>ShadowNinja <shadowninja@minetest.net><br>sfan5 <sfan5@live.de><br>Rogier <rogier777@gmail.com><br><br><u>Version:</u> %1 (%2)<br><u>License:</u> LGPLv2.1+ and BSD 2-clause.<br><u>Source Code:</u> <a href='https://github.com/Rogier-5/minetest-mapper-cpp'>Github</a><br> - + map center - + map origin (top left) - + Create a colors.txt - + There is a nodes.txt but no colors.txt in the world directory Do you want to generate one? If you select 'No' the default colors.txt will be used. - + No colors.txt file - + ERROR: Still no colors.txt file found inside world directory. Do you want to cancel or proceed with default colors.txt file? - + Proceed with default - + Could not open Terminal - + Error: Could not open scriptfile (%1) for Terminal - + Open Directory - + preview: %1 - + Name of the new Profile: