Convert all includes to be relative to project root directory. Files that cannot be found in this manner use angle brackets.

Sun, 26 Jun 2022 21:32:51 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 26 Jun 2022 21:32:51 +0300
changeset 264
76a025db4948
parent 263
59b6027b9843
child 265
b2b7af293c46

Convert all includes to be relative to project root directory. Files that cannot be found in this manner use angle brackets.

CMakeLists.txt file | annotate | diff | comparison | revisions
src/basics.h file | annotate | diff | comparison | revisions
src/circularprimitive.h file | annotate | diff | comparison | revisions
src/colors.cpp file | annotate | diff | comparison | revisions
src/colors.h file | annotate | diff | comparison | revisions
src/documentmanager.cpp file | annotate | diff | comparison | revisions
src/documentmanager.h file | annotate | diff | comparison | revisions
src/geometry.cpp file | annotate | diff | comparison | revisions
src/gl/basicshaderprogram.cpp file | annotate | diff | comparison | revisions
src/gl/basicshaderprogram.h file | annotate | diff | comparison | revisions
src/gl/common.h file | annotate | diff | comparison | revisions
src/gl/compiler.cpp file | annotate | diff | comparison | revisions
src/gl/compiler.h file | annotate | diff | comparison | revisions
src/gl/debug.cpp file | annotate | diff | comparison | revisions
src/gl/debug.h file | annotate | diff | comparison | revisions
src/gl/partrenderer.cpp file | annotate | diff | comparison | revisions
src/gl/partrenderer.h file | annotate | diff | comparison | revisions
src/invert.cpp file | annotate | diff | comparison | revisions
src/invert.h file | annotate | diff | comparison | revisions
src/layers/axeslayer.cpp file | annotate | diff | comparison | revisions
src/layers/axeslayer.h file | annotate | diff | comparison | revisions
src/layers/edittools.cpp file | annotate | diff | comparison | revisions
src/layers/edittools.h file | annotate | diff | comparison | revisions
src/layers/gridlayer.cpp file | annotate | diff | comparison | revisions
src/layers/gridlayer.h file | annotate | diff | comparison | revisions
src/ldrawalgorithm.cpp file | annotate | diff | comparison | revisions
src/ldrawalgorithm.h file | annotate | diff | comparison | revisions
src/libraries.cpp file | annotate | diff | comparison | revisions
src/libraries.h file | annotate | diff | comparison | revisions
src/main.cpp file | annotate | diff | comparison | revisions
src/mainwindow.h file | annotate | diff | comparison | revisions
src/messagelog.cpp file | annotate | diff | comparison | revisions
src/messagelog.h file | annotate | diff | comparison | revisions
src/model.cpp file | annotate | diff | comparison | revisions
src/model.h file | annotate | diff | comparison | revisions
src/parser.cpp file | annotate | diff | comparison | revisions
src/parser.h file | annotate | diff | comparison | revisions
src/polygoncache.cpp file | annotate | diff | comparison | revisions
src/polygoncache.h file | annotate | diff | comparison | revisions
src/settings.h file | annotate | diff | comparison | revisions
src/settingseditor/keyboardshortcutseditor.cpp file | annotate | diff | comparison | revisions
src/settingseditor/librarieseditor.cpp file | annotate | diff | comparison | revisions
src/settingseditor/librarieseditor.h file | annotate | diff | comparison | revisions
src/settingseditor/settingseditor.cpp file | annotate | diff | comparison | revisions
src/settingseditor/settingseditor.h file | annotate | diff | comparison | revisions
src/types/boundingbox.cpp file | annotate | diff | comparison | revisions
src/types/boundingbox.h file | annotate | diff | comparison | revisions
src/ui/circletooloptionswidget.cpp file | annotate | diff | comparison | revisions
src/ui/circletooloptionswidget.h file | annotate | diff | comparison | revisions
src/ui/objecteditor.cpp file | annotate | diff | comparison | revisions
src/ui/objecteditor.h file | annotate | diff | comparison | revisions
src/ui/objecteditor.ui file | annotate | diff | comparison | revisions
src/uiutilities.cpp file | annotate | diff | comparison | revisions
src/version.cpp file | annotate | diff | comparison | revisions
src/vertexmap.cpp file | annotate | diff | comparison | revisions
src/vertexmap.h file | annotate | diff | comparison | revisions
src/widgets/colorindexinput.cpp file | annotate | diff | comparison | revisions
src/widgets/colorindexinput.h file | annotate | diff | comparison | revisions
src/widgets/colorselectdialog.cpp file | annotate | diff | comparison | revisions
src/widgets/colorselectdialog.h file | annotate | diff | comparison | revisions
widgets/CMakeLists.txt file | annotate | diff | comparison | revisions
widgets/colorbutton.cpp file | annotate | diff | comparison | revisions
widgets/designerplugins.cpp file | annotate | diff | comparison | revisions
widgets/doublespinbox.cpp file | annotate | diff | comparison | revisions
widgets/matrixeditor.cpp file | annotate | diff | comparison | revisions
widgets/matrixeditor.ui file | annotate | diff | comparison | revisions
widgets/multiplyfactordialog.cpp file | annotate | diff | comparison | revisions
widgets/multiplyfactordialog.h file | annotate | diff | comparison | revisions
widgets/multiplyfactordialog.ui file | annotate | diff | comparison | revisions
widgets/vec3editor.cpp file | annotate | diff | comparison | revisions
widgets/vec3editor.h file | annotate | diff | comparison | revisions
widgets/vec3editor.ui file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Sun Jun 26 21:00:06 2022 +0300
+++ b/CMakeLists.txt	Sun Jun 26 21:32:51 2022 +0300
@@ -122,7 +122,6 @@
 include_directories("${PROJECT_BINARY_DIR}")
 include_directories("${PROJECT_BINARY_DIR}/src")
 include_directories("${PROJECT_SOURCE_DIR}")
-include_directories("${PROJECT_SOURCE_DIR}/src")
 add_custom_target(resources ALL DEPENDS ${LDFORGE_RESOURCES})
 
 if (NOT MSVC)
--- a/src/basics.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/basics.h	Sun Jun 26 21:32:51 2022 +0300
@@ -37,9 +37,9 @@
 #include <QVector>
 #include <QMdiArea>
 #include <glm/glm.hpp>
-#include "geometry.h"
-#include "functional.h"
-#include "typeconversions.h"
+#include "src/geometry.h"
+#include "src/functional.h"
+#include "src/typeconversions.h"
 
 template<typename T>
 using opt = std::optional<T>;
@@ -49,7 +49,6 @@
 
 Q_DECLARE_METATYPE(glm::vec3)
 Q_DECLARE_METATYPE(glm::mat4)
-Q_DECLARE_METATYPE(QMdiArea::ViewMode)
 
 //! \brief count the amount of elements in a basic array
 template<typename T, int N>
--- a/src/circularprimitive.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/circularprimitive.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,8 +1,8 @@
 #pragma once
 #include <glm/gtc/matrix_transform.hpp>
-#include "basics.h"
-#include "model.h"
-#include "ldrawalgorithm.h"
+#include "src/basics.h"
+#include "src/model.h"
+#include "src/ldrawalgorithm.h"
 
 template<typename Fn>
 void rasterize(const CircularPrimitive& circ, Fn&& fn)
--- a/src/colors.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/colors.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #include <QRegExp>
 #include <QIODevice>
-#include "colors.h"
+#include "src/colors.h"
 
 const ColorDefinition unknownColor{{}, {}, "Unknown", "???"};
 
--- a/src/colors.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/colors.h	Sun Jun 26 21:32:51 2022 +0300
@@ -18,7 +18,7 @@
 
 #pragma once
 #include <QColor>
-#include "basics.h"
+#include "src/basics.h"
 
 /**
  * @brief Represents an LDraw color index (e.g 16, 24, ...)
--- a/src/documentmanager.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/documentmanager.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -21,8 +21,8 @@
 #include <QFileInfo>
 #include <QSaveFile>
 #include <deque>
-#include "documentmanager.h"
-#include "parser.h"
+#include "src/documentmanager.h"
+#include "src/parser.h"
 
 DocumentManager::DocumentManager(QObject *parent) :
 	QObject{parent}
--- a/src/documentmanager.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/documentmanager.h	Sun Jun 26 21:32:51 2022 +0300
@@ -17,9 +17,9 @@
  */
 
 #pragma once
-#include "libraries.h"
-#include "model.h"
-#include "polygoncache.h"
+#include "src/libraries.h"
+#include "src/model.h"
+#include "src/polygoncache.h"
 
 enum OpenType
 {
--- a/src/geometry.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/geometry.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
 #include <glm/gtc/matrix_transform.hpp>
-#include "geometry.h"
-#include "basics.h"
-#include "ring.h"
+#include "src/geometry.h"
+#include "src/basics.h"
+#include "src/ring.h"
 
 /**
  * @brief Computes line-plane intersection
--- a/src/gl/basicshaderprogram.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/basicshaderprogram.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,7 +16,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "basicshaderprogram.h"
+#include "src/gl/basicshaderprogram.h"
 
 BasicShader::BasicShader() :
 	buffer{QOpenGLBuffer::VertexBuffer},
--- a/src/gl/basicshaderprogram.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/basicshaderprogram.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
 #pragma once
-#include "common.h"
+#include "src/gl/common.h"
 
 struct GLAttributeSpec
 {
--- a/src/gl/common.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/common.h	Sun Jun 26 21:32:51 2022 +0300
@@ -25,9 +25,9 @@
 #include <QOpenGLVertexArrayObject>
 #include <QOpenGLFunctions>
 #include <glm/gtc/type_ptr.hpp>
-#include "basics.h"
-#include "colors.h"
-#include "model.h"
+#include "src/basics.h"
+#include "src/colors.h"
+#include "src/model.h"
 
 class RenderLayer
 {
--- a/src/gl/compiler.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/compiler.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -17,10 +17,10 @@
  */
 
 #include <QMessageBox>
-#include "gl/compiler.h"
-#include "documentmanager.h"
-#include "invert.h"
-#include "ring.h"
+#include "src/documentmanager.h"
+#include "src/invert.h"
+#include "src/ring.h"
+#include "src/gl/compiler.h"
 
 constexpr char VERTEX_SHADER_SOURCE[] = R"(
 #version 330 core
--- a/src/gl/compiler.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/compiler.h	Sun Jun 26 21:32:51 2022 +0300
@@ -21,10 +21,10 @@
 #include <QOpenGLVertexArrayObject>
 #include <QOpenGLBuffer>
 #include <QOpenGLShaderProgram>
-#include "basics.h"
-#include "gl/common.h"
-#include "types/boundingbox.h"
-#include "model.h"
+#include "src/basics.h"
+#include "src/types/boundingbox.h"
+#include "src/model.h"
+#include "src/gl/common.h"
 
 class Model;
 class DocumentManager;
--- a/src/gl/debug.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/debug.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,4 +1,4 @@
-#include "debug.h"
+#include "src/gl/debug.h"
 
 QString sourceToString(const QOpenGLDebugMessage::Source source)
 {
--- a/src/gl/debug.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/debug.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
 #pragma once
 #include <QOpenGLDebugMessage>
-#include "basics.h"
+#include "src/basics.h"
 
 Message debugMessageToString(const QOpenGLDebugMessage& glmessage);
--- a/src/gl/partrenderer.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/partrenderer.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -24,12 +24,12 @@
 #include <QMouseEvent>
 #include <QMessageBox>
 #include <QAbstractButton>
-#include "geometry.h"
-#include "partrenderer.h"
-#include "model.h"
-#include "gl/compiler.h"
-#include "gl/debug.h"
-#include "settings.h"
+#include "src/geometry.h"
+#include "src/model.h"
+#include "src/settings.h"
+#include "src/gl/partrenderer.h"
+#include "src/gl/compiler.h"
+#include "src/gl/debug.h"
 
 static constexpr double MIN_ZOOM = -3.0;
 static constexpr double MAX_ZOOM = 3.0;
--- a/src/gl/partrenderer.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/gl/partrenderer.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,11 +1,11 @@
 #pragma once
 #include <QOpenGLWidget>
 #include <QOpenGLDebugLogger>
-#include "basics.h"
-#include "gl/common.h"
-#include "gl/compiler.h"
-#include "documentmanager.h"
-#include "types/boundingbox.h"
+#include "src/basics.h"
+#include "src/documentmanager.h"
+#include "src/types/boundingbox.h"
+#include "src/gl/common.h"
+#include "src/gl/compiler.h"
 
 class PartRenderer final : public QOpenGLWidget
 {
--- a/src/invert.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/invert.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,11 +16,11 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "basics.h"
-#include "model.h"
-#include "gl/common.h"
-#include "invert.h"
-#include "documentmanager.h"
+#include "src/basics.h"
+#include "src/model.h"
+#include "src/gl/common.h"
+#include "src/invert.h"
+#include "src/documentmanager.h"
 
 /*
  * Returns a matrix that causes a flip on the given dimension.
--- a/src/invert.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/invert.h	Sun Jun 26 21:32:51 2022 +0300
@@ -17,8 +17,8 @@
  */
 
 #pragma once
-#include "basics.h"
-#include "gl/common.h"
+#include "src/basics.h"
+#include "src/gl/common.h"
 
 enum Axis { X, Y, Z };
 
--- a/src/layers/axeslayer.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/axeslayer.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,10 +16,10 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "gl/partrenderer.h"
 #include <QPainter>
 #include <QPainterPath>
-#include "axeslayer.h"
+#include "src/gl/partrenderer.h"
+#include "src/layers/axeslayer.h"
 
 static constexpr char vertexShaderSource[] = R"(
 #version 330 core
--- a/src/layers/axeslayer.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/axeslayer.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #pragma once
-#include "gl/common.h"
-#include "gl/basicshaderprogram.h"
+#include "src/gl/common.h"
+#include "src/gl/basicshaderprogram.h"
 
 class AxesLayer final : public RenderLayer
 {
--- a/src/layers/edittools.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/edittools.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -18,12 +18,12 @@
 
 #include <QMouseEvent>
 #include <QPainter>
-#include "../algorithm/earcut.h"
-#include "../model.h"
-#include "../ui/objecteditor.h"
-#include "../gl/partrenderer.h"
-#include "../circularprimitive.h"
-#include "edittools.h"
+#include "src/algorithm/earcut.h"
+#include "src/model.h"
+#include "src/ui/objecteditor.h"
+#include "src/gl/partrenderer.h"
+#include "src/circularprimitive.h"
+#include "src/layers/edittools.h"
 
 // Make mapbox::earcut work with glm::vec3
 template<> struct mapbox::util::nth<0, glm::vec3>
--- a/src/layers/edittools.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/edittools.h	Sun Jun 26 21:32:51 2022 +0300
@@ -20,9 +20,9 @@
 #include <memory>
 #include <QWidget>
 #include <QToolBar>
-#include "model.h"
-#include "vertexmap.h"
-#include "gl/common.h"
+#include "src/model.h"
+#include "src/vertexmap.h"
+#include "src/gl/common.h"
 
 enum EditingMode
 {
--- a/src/layers/gridlayer.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/gridlayer.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,8 +16,8 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "../gl/partrenderer.h"
-#include "gridlayer.h"
+#include "src/gl/partrenderer.h"
+#include "src/layers/gridlayer.h"
 
 constexpr char vertexShaderSource[] = R"(
 #version 330 core
--- a/src/layers/gridlayer.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/layers/gridlayer.h	Sun Jun 26 21:32:51 2022 +0300
@@ -17,8 +17,8 @@
  */
 
 #pragma once
-#include "../gl/basicshaderprogram.h"
-#include "../gl/common.h"
+#include "src/gl/basicshaderprogram.h"
+#include "src/gl/common.h"
 
 class GridLayer final : public RenderLayer
 {
--- a/src/ldrawalgorithm.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ldrawalgorithm.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,4 +1,4 @@
-#include "ldrawalgorithm.h"
+#include "src/ldrawalgorithm.h"
 
 std::pair<Triangle, Triangle> splitTriangles(
 	const Quadrilateral& q,
--- a/src/ldrawalgorithm.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ldrawalgorithm.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #pragma once
-#include "basics.h"
-#include "model.h"
+#include "src/basics.h"
+#include "src/model.h"
 
 namespace ldraw
 {
--- a/src/libraries.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/libraries.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -17,8 +17,8 @@
  */
 
 #include <QSettings>
-#include "libraries.h"
-#include "settings.h"
+#include "src/libraries.h"
+#include "src/settings.h"
 
 /**
  * @brief Constructs a new library manager
--- a/src/libraries.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/libraries.h	Sun Jun 26 21:32:51 2022 +0300
@@ -19,8 +19,8 @@
 #pragma once
 #include <QDir>
 #include <QAbstractTableModel>
-#include "basics.h"
-#include "colors.h"
+#include "src/basics.h"
+#include "src/colors.h"
 
 class QSettings;
 
--- a/src/main.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/main.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,24 +1,24 @@
 #include <QApplication>
+#include <QCloseEvent>
 #include <QFileDialog>
+#include <QMdiSubWindow>
 #include <QMessageBox>
-#include <QMdiSubWindow>
 #include <QScrollBar>
 #include <QStackedWidget>
-#include <QCloseEvent>
-#include "mainwindow.h"
-#include "ui_mainwindow.h"
-#include "version.h"
-#include "gl/partrenderer.h"
-#include "layers/axeslayer.h"
-#include "layers/gridlayer.h"
-#include "layers/edittools.h"
-#include "settingseditor/settingseditor.h"
-#include "widgets/colorselectdialog.h"
-#include "settings.h"
-#include "ui/circletooloptionswidget.h"
-#include "messagelog.h"
-#include "ui/objecteditor.h"
-#include "ldrawalgorithm.h"
+#include <QTranslator>
+#include <ui_mainwindow.h>
+#include "src/gl/partrenderer.h"
+#include "src/layers/axeslayer.h"
+#include "src/layers/edittools.h"
+#include "src/layers/gridlayer.h"
+#include "src/ldrawalgorithm.h"
+#include "src/messagelog.h"
+#include "src/settings.h"
+#include "src/settingseditor/settingseditor.h"
+#include "src/ui/circletooloptionswidget.h"
+#include "src/ui/objecteditor.h"
+#include "src/version.h"
+#include "src/widgets/colorselectdialog.h"
 
 static const QDir LOCALE_DIR {":/locale"};
 
@@ -65,7 +65,7 @@
 Q_SIGNALS:
 	void triggered();
 };
-#include "main.moc"
+#include <main.moc>
 
 static void doQtRegistrations()
 {
--- a/src/mainwindow.h	Sun Jun 26 21:00:06 2022 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
- *  LDForge: LDraw parts authoring CAD
- *  Copyright (C) 2013 - 2020 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
-#include <QMainWindow>
-#include <QTranslator>
-#include <QSettings>
-#include <QKeySequence>
-#include "documentmanager.h"
-#include "libraries.h"
-#include "uiutilities.h"
--- a/src/messagelog.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/messagelog.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
 #include <QColor>
-#include "messagelog.h"
+#include "src/messagelog.h"
 
 MessageLog::MessageLog(QObject *parent) :
 	QAbstractTableModel{parent}
--- a/src/messagelog.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/messagelog.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
 #include <QAbstractTableModel>
-#include "basics.h"
+#include "src/basics.h"
 
 class MessageLog final : public QAbstractTableModel
 {
--- a/src/model.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/model.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -17,7 +17,7 @@
  */
 
 #include <QPixmap>
-#include "model.h"
+#include "src/model.h"
 
 constexpr unsigned int gcd(unsigned int a, unsigned int b)
 {
--- a/src/model.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/model.h	Sun Jun 26 21:32:51 2022 +0300
@@ -19,8 +19,8 @@
 #pragma once
 #include <QAbstractListModel>
 #include <memory>
-#include "basics.h"
-#include "colors.h"
+#include "src/basics.h"
+#include "src/colors.h"
 
 struct SubfileReference
 {
--- a/src/parser.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/parser.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -18,9 +18,9 @@
 
 #include <QRegExp>
 #include <QIODevice>
-#include "model.h"
-#include "parser.h"
-#include "ldrawalgorithm.h"
+#include "src/ldrawalgorithm.h"
+#include "src/model.h"
+#include "src/parser.h"
 
 struct BodyParseError
 {
--- a/src/parser.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/parser.h	Sun Jun 26 21:32:51 2022 +0300
@@ -17,8 +17,8 @@
  */
 
 #pragma once
-#include "basics.h"
-#include "model.h"
+#include "src/basics.h"
+#include "src/model.h"
 
 class Parser : public QObject
 {
--- a/src/polygoncache.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/polygoncache.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
-#include "polygoncache.h"
-#include "documentmanager.h"
-#include "invert.h"
-#include "circularprimitive.h"
+#include "src/circularprimitive.h"
+#include "src/documentmanager.h"
+#include "src/invert.h"
+#include "src/polygoncache.h"
 
 Model* resolve(const QString& name, const ModelId callingModelId, DocumentManager* documents)
 {
--- a/src/polygoncache.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/polygoncache.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
 #pragma once
-#include "basics.h"
-#include "model.h"
-#include "gl/common.h"
+#include "src/basics.h"
+#include "src/model.h"
+#include "src/gl/common.h"
 
 template<typename T>
 struct WithId : T
--- a/src/settings.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settings.h	Sun Jun 26 21:32:51 2022 +0300
@@ -2,8 +2,8 @@
 #define SETTINGS_H
 #include <QSettings>
 #include <QMdiArea>
-#include "libraries.h"
-#include "gl/common.h"
+#include "src/libraries.h"
+#include "src/gl/common.h"
 
 template<class>
 struct SettingInfo{};
@@ -24,6 +24,8 @@
 // -----------------------------------------------------------------------------
 // Setting definitions
 
+Q_DECLARE_METATYPE(QMdiArea::ViewMode)
+
 // Rendering options
 SETTING(Locale, QString{"system"})
 SETTING(BackgroundColor, (QColor{48, 48, 48}))
--- a/src/settingseditor/keyboardshortcutseditor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settingseditor/keyboardshortcutseditor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #include <QAction>
-#include "keyboardshortcutseditor.h"
-#include "uiutilities.h"
+#include "src/uiutilities.h"
+#include "src/settingseditor/keyboardshortcutseditor.h"
 
 KeyboardShortcutsEditor::KeyboardShortcutsEditor(QObject* subject, QObject* parent) :
 	QAbstractTableModel{parent},
--- a/src/settingseditor/librarieseditor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settingseditor/librarieseditor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,8 +1,8 @@
 #include <QFileDialog>
 #include <QMenu>
 #include <QMessageBox>
-#include "librarieseditor.h"
-#include "ui_librarieseditor.h"
+#include <ui_librarieseditor.h>
+#include "src/settingseditor/librarieseditor.h"
 
 LibrariesEditor::LibrariesEditor(QWidget* parent) :
 	QWidget{parent},
--- a/src/settingseditor/librarieseditor.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settingseditor/librarieseditor.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
 #pragma once
 #include <QWidget>
-#include "basics.h"
-#include "libraries.h"
+#include "src/basics.h"
+#include "src/libraries.h"
 
 class LibrariesEditor : public QWidget
 {
--- a/src/settingseditor/settingseditor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settingseditor/settingseditor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,10 +1,10 @@
 #include <QSettings>
 #include <QMdiArea>
-#include "settings.h"
-#include "gl/common.h"
-#include "keyboardshortcutseditor.h"
-#include "settingseditor.h"
-#include "ui_settingseditor.h"
+#include <ui_settingseditor.h>
+#include "src/settings.h"
+#include "src/gl/common.h"
+#include "src/settingseditor/keyboardshortcutseditor.h"
+#include "src/settingseditor/settingseditor.h"
 
 SettingsEditor::SettingsEditor(
 	const uiutilities::KeySequenceMap& defaultKeyboardShortcuts,
--- a/src/settingseditor/settingseditor.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/settingseditor/settingseditor.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,9 +1,9 @@
 #pragma once
 #include <QDialog>
-#include "basics.h"
-#include "librarieseditor.h"
-#include "libraries.h"
-#include "uiutilities.h"
+#include "src/basics.h"
+#include "src/libraries.h"
+#include "src/uiutilities.h"
+#include "src/settingseditor/librarieseditor.h"
 
 class SettingsEditor : public QDialog
 {
--- a/src/types/boundingbox.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/types/boundingbox.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,7 +16,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "boundingbox.h"
+#include "src/types/boundingbox.h"
 
 /**
  * @brief Resizes @c box so that @c vertex fits inside
--- a/src/types/boundingbox.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/types/boundingbox.h	Sun Jun 26 21:32:51 2022 +0300
@@ -17,7 +17,7 @@
  */
 
 #pragma once
-#include "basics.h"
+#include "../basics.h"
 
 struct BoundingBox
 {
--- a/src/ui/circletooloptionswidget.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ui/circletooloptionswidget.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,4 +1,4 @@
-#include "circletooloptionswidget.h"
+#include "src/ui/circletooloptionswidget.h"
 
 static QString circularPrimitiveTypeName(CircularPrimitive::Type type)
 {
--- a/src/ui/circletooloptionswidget.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ui/circletooloptionswidget.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
 #pragma once
 #include <QWidget>
-#include "ui_circletool.h"
-#include "model.h"
+#include <ui_circletool.h>
+#include "src/model.h"
 
 class CircleToolOptionsWidget : public QWidget
 {
--- a/src/ui/objecteditor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ui/objecteditor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,11 +1,10 @@
 #include <QCheckBox>
 #include <QLineEdit>
 #include <QFormLayout>
-#include <widgets/vec3editor.h>
-#include "objecteditor.h"
+#include "src/ui/objecteditor.h"
+#include "src/widgets/colorindexinput.h"
 #include "widgets/colorbutton.h"
-#include "widgets/colorindexinput.h"
-#include "ui_objecteditor.h"
+#include "widgets/vec3editor.h"
 
 using PropertyPointer = std::variant<
 	glm::vec3*,
--- a/src/ui/objecteditor.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ui/objecteditor.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,8 +1,8 @@
 #pragma once
 #include <QWidget>
-#include "../basics.h"
-#include "../model.h"
-#include "ui_objecteditor.h"
+#include <ui_objecteditor.h>
+#include "src/basics.h"
+#include "src/model.h"
 
 class ObjectEditor final : public QWidget
 {
--- a/src/ui/objecteditor.ui	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/ui/objecteditor.ui	Sun Jun 26 21:32:51 2022 +0300
@@ -24,8 +24,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>908</width>
-        <height>857</height>
+        <width>907</width>
+        <height>481</height>
        </rect>
       </property>
       <layout class="QHBoxLayout" name="horizontalLayout_2">
@@ -71,7 +71,7 @@
                </widget>
               </item>
               <item row="1" column="1">
-               <widget class="VectorInput" name="point1"/>
+               <widget class="VectorInput" name="point1" native="true"/>
               </item>
               <item row="2" column="0">
                <widget class="QLabel" name="point2Label">
@@ -84,7 +84,7 @@
                </widget>
               </item>
               <item row="2" column="1">
-               <widget class="VectorInput" name="point2"/>
+               <widget class="VectorInput" name="point2" native="true"/>
               </item>
               <item row="3" column="0">
                <widget class="QLabel" name="point3Label">
@@ -94,7 +94,7 @@
                </widget>
               </item>
               <item row="3" column="1">
-               <widget class="VectorInput" name="point3"/>
+               <widget class="VectorInput" name="point3" native="true"/>
               </item>
               <item row="4" column="0">
                <widget class="QLabel" name="point4Label">
@@ -104,7 +104,7 @@
                </widget>
               </item>
               <item row="4" column="1">
-               <widget class="VectorInput" name="point4"/>
+               <widget class="VectorInput" name="point4" native="true"/>
               </item>
               <item row="5" column="0">
                <widget class="QLabel" name="control1Label">
@@ -114,7 +114,7 @@
                </widget>
               </item>
               <item row="5" column="1">
-               <widget class="VectorInput" name="control1"/>
+               <widget class="VectorInput" name="control1" native="true"/>
               </item>
               <item row="6" column="0">
                <widget class="QLabel" name="control2Label">
@@ -124,7 +124,7 @@
                </widget>
               </item>
               <item row="6" column="1">
-               <widget class="VectorInput" name="control2"/>
+               <widget class="VectorInput" name="control2" native="true"/>
               </item>
               <item row="8" column="0">
                <widget class="QLabel" name="transformLabel">
@@ -134,7 +134,7 @@
                </widget>
               </item>
               <item row="8" column="1">
-               <widget class="MatrixEditor" name="transformation"/>
+               <widget class="MatrixEditor" name="transformation" native="true"/>
               </item>
               <item row="9" column="0">
                <widget class="QLabel" name="nameLabel">
@@ -238,17 +238,17 @@
   <customwidget>
    <class>VectorInput</class>
    <extends>QWidget</extends>
-   <header>vec3editor.h</header>
+   <header>widgets/vec3editor.h</header>
   </customwidget>
   <customwidget>
    <class>MatrixEditor</class>
    <extends>QWidget</extends>
-   <header>matrixeditor.h</header>
+   <header>widgets/matrixeditor.h</header>
   </customwidget>
   <customwidget>
    <class>ColorIndexInput</class>
    <extends>QWidget</extends>
-   <header>widgets/colorindexinput.h</header>
+   <header>src/widgets/colorindexinput.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>
--- a/src/uiutilities.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/uiutilities.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -18,7 +18,7 @@
 
 #include <QStyleFactory>
 #include <QWidget>
-#include "uiutilities.h"
+#include "src/uiutilities.h"
 
 std::vector<QAction*> uiutilities::collectActions(QObject* subject)
 {
--- a/src/version.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/version.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -18,8 +18,8 @@
 
 #include <QString>
 #include <time.h>
-#include "version.h"
-#include "hginfo.h"
+#include <hginfo.h>
+#include "src/version.h"
 
 static QString makeVersionString(const Version &version)
 {
--- a/src/vertexmap.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/vertexmap.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
-#include "vertexmap.h"
-#include "gl/common.h"
+#include "src/vertexmap.h"
+#include "src/gl/common.h"
 
 hash_t hashVertex(const glm::vec3& vec)
 {
--- a/src/vertexmap.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/vertexmap.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,8 +1,8 @@
 #ifndef VERTEXMAP_H
 #define VERTEXMAP_H
 #include <set>
-#include "basics.h"
-#include "model.h"
+#include "src/basics.h"
+#include "src/model.h"
 
 /**
  * @brief Collects a map of all vertices in a model to all objects that use the specified vertex.
--- a/src/widgets/colorindexinput.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/widgets/colorindexinput.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
-#include "colorindexinput.h"
-#include "ui_colorindexinput.h"
-#include "colorselectdialog.h"
-#include "uiutilities.h"
+#include <ui_colorindexinput.h>
+#include "src/uiutilities.h"
+#include "src/widgets/colorindexinput.h"
+#include "src/widgets/colorselectdialog.h"
 
 ColorIndexInput::ColorIndexInput(QWidget *parent) :
 	QWidget{parent},
--- a/src/widgets/colorindexinput.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/widgets/colorindexinput.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
 #pragma once
-#include "colors.h"
+#include "src/colors.h"
 
 class ColorIndexInput : public QWidget
 {
--- a/src/widgets/colorselectdialog.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/widgets/colorselectdialog.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,9 +1,7 @@
 #include <QColorDialog>
-#include <QTableView>
-#include <QStyleFactory>
-#include "colorselectdialog.h"
-#include "ui_colorselectdialog.h"
-#include "uiutilities.h"
+#include <ui_colorselectdialog.h>
+#include "src/widgets/colorselectdialog.h"
+#include "src/uiutilities.h"
 
 ColorSelectDialog::ColorSelectDialog(const ColorTable& colorTable, QWidget *parent) :
 	QDialog{parent},
--- a/src/widgets/colorselectdialog.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/src/widgets/colorselectdialog.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #pragma once
-#include "../basics.h"
-#include "../colors.h"
+#include "src/basics.h"
+#include "src/colors.h"
 #include <QPushButton>
 #include <QAbstractTableModel>
 #include <QDialog>
--- a/widgets/CMakeLists.txt	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/CMakeLists.txt	Sun Jun 26 21:32:51 2022 +0300
@@ -22,7 +22,7 @@
 
 get_target_property(UIPLUGIN_INCLUDES QtUiPlugin INTERFACE_INCLUDE_DIRECTORIES)
 target_include_directories(ldforgewidgets PUBLIC "${UIPLUGIN_INCLUDES}")
-target_include_directories(ldforgewidgets PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
+target_include_directories(ldforgewidgets PUBLIC "${CMAKE_SOURCE_DIR}")
 target_include_directories(ldforgewidgets PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
 target_link_libraries(ldforgewidgets Qt::Widgets)
 set_target_properties(ldforgewidgets PROPERTIES AUTOMOC 1)
--- a/widgets/colorbutton.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/colorbutton.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #include <QColorDialog>
 #include <QStyleFactory>
-#include "colorbutton.h"
+#include "widgets/colorbutton.h"
 
 ColorButton::ColorButton(const QColor& color, QWidget* parent) :
 	ColorButton{parent}
--- a/widgets/designerplugins.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/designerplugins.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
-#include "designerplugins.h"
-#include "vec3editor.h"
-#include "matrixeditor.h"
-#include "colorbutton.h"
+#include "widgets/designerplugins.h"
+#include "widgets/vec3editor.h"
+#include "widgets/matrixeditor.h"
+#include "widgets/colorbutton.h"
 
 LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) :
 	QObject{parent}
@@ -38,7 +38,7 @@
 
 QString Vec3EditorPlugin::includeFile() const
 {
-	return "vec3editor.h";
+	return "widgets/vec3editor.h";
 }
 
 QIcon Vec3EditorPlugin::icon() const
@@ -78,7 +78,7 @@
 
 QString MatrixEditorPlugin::includeFile() const
 {
-	return "matrixeditor.h";
+	return "widgets/matrixeditor.h";
 }
 
 QIcon MatrixEditorPlugin::icon() const
@@ -119,7 +119,7 @@
 
 QString ColorButtonPlugin::includeFile() const
 {
-	return "colorbutton.h";
+	return "widgets/colorbutton.h";
 }
 
 QIcon ColorButtonPlugin::icon() const
--- a/widgets/doublespinbox.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/doublespinbox.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -16,7 +16,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "doublespinbox.h"
+#include "widgets/doublespinbox.h"
 
 /*
  * Constructs a new double spin box. The locale is fixed to system default "C".
--- a/widgets/matrixeditor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/matrixeditor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
-#include "matrixeditor.h"
-#include "ui_matrixeditor.h"
-#include "multiplyfactordialog.h"
+#include <ui_matrixeditor.h>
+#include "widgets/matrixeditor.h"
+#include "widgets/multiplyfactordialog.h"
 
 constexpr char BUTTON_COLUMN_PROPERTY[] = "_ldforge_column";
 
--- a/widgets/matrixeditor.ui	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/matrixeditor.ui	Sun Jun 26 21:32:51 2022 +0300
@@ -115,7 +115,7 @@
   <customwidget>
    <class>DoubleSpinBox</class>
    <extends>QDoubleSpinBox</extends>
-   <header>doublespinbox.h</header>
+   <header>widgets/doublespinbox.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
--- a/widgets/multiplyfactordialog.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/multiplyfactordialog.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,5 +1,5 @@
-#include "multiplyfactordialog.h"
-#include "ui_multiplyfactordialog.h"
+#include <ui_multiplyfactordialog.h>
+#include "widgets/multiplyfactordialog.h"
 
 MultiplyFactorDialog::MultiplyFactorDialog(const glm::vec3& baseVector, QWidget* parent) :
 	QDialog{parent},
--- a/widgets/multiplyfactordialog.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/multiplyfactordialog.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,6 +1,6 @@
 #pragma once
 #include <QDialog>
-#include "vec3editor.h"
+#include "widgets/vec3editor.h"
 
 namespace Ui
 {
--- a/widgets/multiplyfactordialog.ui	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/multiplyfactordialog.ui	Sun Jun 26 21:32:51 2022 +0300
@@ -62,7 +62,7 @@
   <customwidget>
    <class>DoubleSpinBox</class>
    <extends>QDoubleSpinBox</extends>
-   <header>doublespinbox.h</header>
+   <header>widgets/doublespinbox.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
--- a/widgets/vec3editor.cpp	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/vec3editor.cpp	Sun Jun 26 21:32:51 2022 +0300
@@ -1,8 +1,8 @@
 #include <QDialog>
 #include <QCheckBox>
 #include <QSignalBlocker>
-#include "vec3editor.h"
-#include "multiplyfactordialog.h"
+#include "widgets/vec3editor.h"
+#include "widgets/multiplyfactordialog.h"
 
 VectorInput::VectorInput(const glm::vec3& value, QWidget* parent, QFlags<VectorInput::Flag> flags) :
 	VectorInput{parent, flags}
--- a/widgets/vec3editor.h	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/vec3editor.h	Sun Jun 26 21:32:51 2022 +0300
@@ -1,7 +1,7 @@
 #pragma once
 #include <QWidget>
 #include <glm/glm.hpp>
-#include "ui_vec3editor.h"
+#include <ui_vec3editor.h>
 
 class VectorInput : public QWidget
 {
--- a/widgets/vec3editor.ui	Sun Jun 26 21:00:06 2022 +0300
+++ b/widgets/vec3editor.ui	Sun Jun 26 21:32:51 2022 +0300
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>613</width>
-    <height>46</height>
+    <height>50</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -75,7 +75,7 @@
   <customwidget>
    <class>DoubleSpinBox</class>
    <extends>QDoubleSpinBox</extends>
-   <header>doublespinbox.h</header>
+   <header>widgets/doublespinbox.h</header>
   </customwidget>
  </customwidgets>
  <resources/>

mercurial