From c708fc24e40d9c9fa5ce40f46478c4a2f152a5c7 Mon Sep 17 00:00:00 2001 From: Bay Dam Date: Wed, 16 Mar 2016 11:08:34 +0100 Subject: [PATCH] Preparing for Windows operating system --- Commands.cpp | 23 +++++++++++++++++++++++ Commands.h | 5 +++-- MapperGLCanvas.cpp | 1 + MappingGui.h | 7 +------ Maths.h | 4 ---- Paint.cpp | 1 - Shape.h | 1 - ShapeGraphicsItem.cpp | 4 ---- VideoImpl.cpp | 2 +- mapmap.pro | 28 +++++++++++++--------------- 10 files changed, 42 insertions(+), 34 deletions(-) diff --git a/Commands.cpp b/Commands.cpp index 514c0b7..b1e0146 100644 --- a/Commands.cpp +++ b/Commands.cpp @@ -1,3 +1,26 @@ +/* + * Commands.cpp + * + * (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com + * (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net + * (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com + * + * 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 . + */ + +#include "MainWindow.h" +#include "MapperGLCanvas.h" #include "Commands.h" diff --git a/Commands.h b/Commands.h index ee5a7d3..4d53faf 100644 --- a/Commands.h +++ b/Commands.h @@ -23,8 +23,6 @@ #define COMMANDS_H_ #include -#include "MainWindow.h" -#include "MapperGLCanvas.h" enum CommandId { CMD_KEY_MOVE_VERTEX, @@ -33,6 +31,9 @@ enum CommandId { CMD_MOUSE_TRANSLATE_SHAPE, }; +class MainWindow; +class MapperGLCanvas; + class AddShapesCommand : public QUndoCommand { public: diff --git a/MapperGLCanvas.cpp b/MapperGLCanvas.cpp index af798c9..db57a40 100644 --- a/MapperGLCanvas.cpp +++ b/MapperGLCanvas.cpp @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include "ShapeGraphicsItem.h" #include "MapperGLCanvas.h" #include "MainWindow.h" diff --git a/MappingGui.h b/MappingGui.h index 63d434a..116cade 100644 --- a/MappingGui.h +++ b/MappingGui.h @@ -39,11 +39,10 @@ #include "MapperGLCanvas.h" -#ifndef WIN32 #include "ShapeGraphicsItem.h" #include "ShapeControlPainter.h" + #include "Util.h" -#endif #include "qtpropertymanager.h" #include "qtvariantproperty.h" @@ -54,10 +53,6 @@ #include "variantmanager.h" #include "variantfactory.h" -class MapperGLCanvas; -class ShapeGraphicsItem; -class ShapeControlPainter; - /** * This is the "view" side of the Mapping class (model). It contains the graphic items for * both input and output as well as the properties editor. diff --git a/Maths.h b/Maths.h index d14ba3e..0d28f6e 100644 --- a/Maths.h +++ b/Maths.h @@ -25,10 +25,6 @@ #include #include -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - /// Converts from degrees to radians. inline qreal degreesToRadians(qreal degrees) { return degrees / 180.0f * M_PI; } diff --git a/Paint.cpp b/Paint.cpp index 5da1cfe..4611b57 100644 --- a/Paint.cpp +++ b/Paint.cpp @@ -235,7 +235,6 @@ bool Video::_generateThumbnail() // Copy bits into thumbnail QImage. QImage thumbnail(getWidth(), getHeight(), QImage::Format_ARGB32); - int i=0; for (int y=0; y -#include #include diff --git a/ShapeGraphicsItem.cpp b/ShapeGraphicsItem.cpp index c3d656f..678ffd0 100644 --- a/ShapeGraphicsItem.cpp +++ b/ShapeGraphicsItem.cpp @@ -22,10 +22,6 @@ #include "MainWindow.h" -#ifdef WIN32 -#include "Util.h" -#endif - ShapeGraphicsItem::ShapeGraphicsItem(Mapping::ptr mapping, bool output) : _mapping(mapping), _output(output) { diff --git a/VideoImpl.cpp b/VideoImpl.cpp index 39fe02c..d70095b 100644 --- a/VideoImpl.cpp +++ b/VideoImpl.cpp @@ -296,7 +296,7 @@ void VideoImpl::resetMovie() if (_seekEnabled) { if (_rate > 0) - seekTo(0UL); + seekTo((guint64)0); else { // NOTE: Untested. diff --git a/mapmap.pro b/mapmap.pro index 119e9f4..9212c0b 100644 --- a/mapmap.pro +++ b/mapmap.pro @@ -163,25 +163,23 @@ mac { # Windows-specific: win32 { DEFINES += WIN32 - INCLUDEPATH += \ - C:/gstreamer/include \ - C:/gstreamer/include/libxml2 \ - C:/gstreamer/include/glib-2.0 \ - C:/gstreamer/lib/glib-2.0/include \ - C:/gstreamer/include/gstreamer-0.10 - LIBS += -L"C:/gstreamer/lib" \ - -L"C:/gstreamer/bin" \ - -lgstreamer-0.10 \ - -lglib-2.0 \ - -lgmodule-2.0 \ + INCLUDEPATH += C:/gstreamer/1.0/x86/lib/gstreamer-1.0/include \ + C:/gstreamer/1.0/x86/include/glib-2.0 \ + C:/gstreamer/1.0/x86/lib/glib-2.0/include \ + C:/gstreamer/1.0/x86/include/gstreamer-1.0 + LIBS += -LC:/gstreamer/1.0/x86/lib \ + -lgstapp-1.0 \ + -lgstbase-1.0 \ + -lgstpbutils-1.0 \ + -lgstreamer-1.0 \ -lgobject-2.0 \ - -lgthread-2.0 \ - -lgstinterfaces-0.10 \ - -lopengl32 \ - -lglu32 + -lglib-2.0 \ + -lopengl32 + # Add console to the CONFIG to see debug messages printed in # the console on Windows CONFIG += console + QMAKE_CXXFLAGS += -D_USE_MATH_DEFINES } # Adds the tarball target