removed unnecessary files and includes

Sat, 24 Mar 2018 11:05:40 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 24 Mar 2018 11:05:40 +0200
changeset 1318
568fcfc6da71
parent 1317
845c340fe71b
child 1319
39d7a9642eea

removed unnecessary files and includes

CMakeLists.txt file | annotate | diff | comparison | revisions
src/algorithms/invert.cpp file | annotate | diff | comparison | revisions
src/basics.cpp file | annotate | diff | comparison | revisions
src/canvas.cpp file | annotate | diff | comparison | revisions
src/dialogs/externalprogrampathdialog.cpp file | annotate | diff | comparison | revisions
src/documentation.cpp file | annotate | diff | comparison | revisions
src/documentation.h file | annotate | diff | comparison | revisions
src/documentmanager.cpp file | annotate | diff | comparison | revisions
src/editHistory.cpp file | annotate | diff | comparison | revisions
src/lddocument.cpp file | annotate | diff | comparison | revisions
src/lddocument.h file | annotate | diff | comparison | revisions
src/mainwindow.cpp file | annotate | diff | comparison | revisions
src/primitives.cpp file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Sat Mar 24 10:51:20 2018 +0200
+++ b/CMakeLists.txt	Sat Mar 24 11:05:40 2018 +0200
@@ -36,7 +36,6 @@
 	src/canvas.cpp
 	src/colors.cpp
 	src/crashCatcher.cpp
-	src/documentation.cpp
 	src/documentmanager.cpp
 	src/editHistory.cpp
 	src/glcamera.cpp
@@ -105,7 +104,6 @@
 	src/canvas.h
 	src/colors.h
 	src/crashCatcher.h
-	src/documentation.h
 	src/documentmanager.h
 	src/editHistory.h
 	src/format.h
@@ -135,6 +133,7 @@
 	src/ringFinder.h
 	src/serializer.h
 	src/transform.h
+	src/version.h
 	src/algorithms/invert.h
 	src/dialogs/colorselector.h
 	src/dialogs/configdialog.h
--- a/src/algorithms/invert.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/algorithms/invert.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -18,6 +18,7 @@
 
 #include "../linetypes/modelobject.h"
 #include "../lddocument.h"
+#include "../glShared.h"
 
 /*
  * Returns whether or not the document is flat.
--- a/src/basics.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/basics.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -16,9 +16,9 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "miscallenous.h"
-#include "linetypes/modelobject.h"
-#include "lddocument.h"
+#include <QLineF>
+#include "basics.h"
+#include "types/vertex.h"
 
 // http://stackoverflow.com/a/18204188/3629665
 template<typename T>
--- a/src/canvas.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/canvas.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -18,13 +18,8 @@
 
 #include <QMouseEvent>
 #include "canvas.h"
-#include "documentmanager.h"
-#include "glcamera.h"
 #include "grid.h"
 #include "lddocument.h"
-#include "mainwindow.h"
-#include "messageLog.h"
-#include "miscallenous.h"
 #include "primitives.h"
 
 Canvas::Canvas(LDDocument* document, QWidget* parent) :
--- a/src/dialogs/externalprogrampathdialog.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/dialogs/externalprogrampathdialog.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -22,7 +22,6 @@
 #include "ui_externalprogrampathdialog.h"
 #include "../mainwindow.h"
 #include "../glrenderer.h"
-#include "../documentation.h"
 
 /*
  * Constructs a new external program path dialog.
--- a/src/documentation.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- *  LDForge: LDraw parts authoring CAD
- *  Copyright (C) 2013 - 2017 Teemu Piippo
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QDialog>
-#include <QTextEdit>
-#include <QDialogButtonBox>
-#include <QBoxLayout>
-#include "main.h"
-#include "basics.h"
-
-// =============================================================================
-// =============================================================================
-class DocumentViewer : public QDialog
-{
-	public:
-		explicit DocumentViewer (QWidget* parent = nullptr, Qt::WindowFlags f = 0) : QDialog (parent, f)
-		{
-			te_text = new QTextEdit (this);
-			te_text->setMinimumSize (QSize (400, 300));
-			te_text->setReadOnly (true);
-
-			QDialogButtonBox* bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Close);
-			QVBoxLayout* layout = new QVBoxLayout (this);
-			layout->addWidget (te_text);
-			layout->addWidget (bbx_buttons);
-
-			connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject()));
-		}
-
-		void setText (const char* text)
-		{
-			te_text->setText (text);
-		}
-
-	private:
-		QTextEdit* te_text;
-};
-
-const char* g_docs_overlays =
-	"<h1>Overlay images</h1><br />"
-	"<p>" APPNAME " supports drawing transparent images over the part model. This "
-	"can be used to have, for instance, a photo of the part overlaid on top of the "
-	"model and use it for drawing curves somewhat accurately.</p>"
-	"<p>For this purpose, a specific photo has to be taken of the part; it should "
-	"represent the part as true as possible to the actual camera used for editing. "
-	"The image should be taken from straight above the part, at as an orthogonal "
-	"angle as possible. It is recommended to take a lot of pictures this way and "
-	"select the best candidate.</p>"
-	"<p>The image should then be cropped with the knowledge of the image's LDU "
-	"dimensions in mind. The offset should then be identified in the image in pixels.</p>"
-	"<p>Finally, use the \"Set Overlay Image\" dialog and fill in the details. The "
-	"overlay image should then be ready for use.";
-
-// =============================================================================
-// =============================================================================
-void showDocumentation (const char* text)
-{
-	DocumentViewer dlg;
-	dlg.setText (text);
-	dlg.exec();
-}
--- a/src/documentation.h	Sat Mar 24 10:51:20 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
- *  LDForge: LDraw parts authoring CAD
- *  Copyright (C) 2013 - 2017 Teemu Piippo
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-extern const char* g_docs_overlays;
-void showDocumentation (const char* text);
--- a/src/documentmanager.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/documentmanager.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -16,16 +16,14 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <QApplication>
 #include <QDir>
 #include <QFileInfo>
 #include <QMessageBox>
 #include "documentmanager.h"
 #include "lddocument.h"
-#include "mainwindow.h"
 #include "partdownloader.h"
 #include "parser.h"
-#include "glrenderer.h"
+#include "editHistory.h"
 
 const QStringList DocumentManager::specialSubdirectories {"s", "48", "8"};
 
--- a/src/editHistory.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/editHistory.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -17,11 +17,7 @@
  */
 
 #include "editHistory.h"
-#include "linetypes/modelobject.h"
 #include "lddocument.h"
-#include "miscallenous.h"
-#include "mainwindow.h"
-#include "glrenderer.h"
 
 EditHistory::EditHistory (LDDocument* document) :
 	m_document (document),
--- a/src/lddocument.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/lddocument.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -19,12 +19,10 @@
 #include <QMessageBox>
 #include <QFileDialog>
 #include "lddocument.h"
-#include "miscallenous.h"
-#include "mainwindow.h"
-#include "canvas.h"
 #include "documentmanager.h"
-#include "linetypes/comment.h"
 #include "parser.h"
+#include "editHistory.h"
+#include "glShared.h"
 
 LDDocument::LDDocument (DocumentManager* parent) :
     Model {parent},
--- a/src/lddocument.h	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/lddocument.h	Sat Mar 24 11:05:40 2018 +0200
@@ -18,15 +18,12 @@
 
 #pragma once
 #include <QObject>
-#include "main.h"
-#include "linetypes/modelobject.h"
-#include "editHistory.h"
-#include "glShared.h"
 #include "model.h"
 #include "hierarchyelement.h"
 
 struct LDGLData;
 class DocumentManager;
+class EditHistory;
 
 struct LDHeader
 {
@@ -146,12 +143,6 @@
 	QSet<Vertex> m_vertices;
 	DocumentManager* m_manager;
 
-	template<typename T, typename... Args>
-	void addToHistory(Args&&... args)
-	{
-		m_history->add<T>(args...);
-	}
-
 private slots:
 	void objectChanged(const LDObjectState &before, const LDObjectState &after);
 	void handleNewObject(const QModelIndex& index);
--- a/src/mainwindow.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/mainwindow.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -41,6 +41,7 @@
 #include "ldobjectiterator.h"
 #include "grid.h"
 #include "mathfunctions.h"
+#include "editHistory.h"
 
 struct MainWindow::ToolInfo
 {
--- a/src/primitives.cpp	Sat Mar 24 10:51:20 2018 +0200
+++ b/src/primitives.cpp	Sat Mar 24 11:05:40 2018 +0200
@@ -24,6 +24,7 @@
 #include "miscallenous.h"
 #include "colors.h"
 #include "documentmanager.h"
+#include "editHistory.h"
 #include "linetypes/comment.h"
 #include "linetypes/conditionaledge.h"
 #include "linetypes/edgeline.h"

mercurial