diff --git a/AboutDialog.cpp b/AboutDialog.cpp index b3bc840..0245ab1 100644 --- a/AboutDialog.cpp +++ b/AboutDialog.cpp @@ -21,7 +21,7 @@ #include -MM_BEGIN_NAMESPACE +namespace mmp { AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) { @@ -163,4 +163,4 @@ void AboutDialog::createLicenseTab() _tabWidget->addTab(_licenseTextBrowser, tr("License")); } -MM_END_NAMESPACE +} diff --git a/AboutDialog.h b/AboutDialog.h index 1d4708b..6d41ffd 100644 --- a/AboutDialog.h +++ b/AboutDialog.h @@ -28,7 +28,7 @@ #include "GuiForward.h" #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { class AboutDialog : public QDialog { @@ -65,6 +65,6 @@ private: }; -MM_END_NAMESPACE +} #endif // ABOUTDIALOG_H diff --git a/Commands.cpp b/Commands.cpp index 81c5fb1..1eb0d86 100644 --- a/Commands.cpp +++ b/Commands.cpp @@ -24,7 +24,7 @@ #include "Commands.h" -MM_BEGIN_NAMESPACE +namespace mmp { AddPaintCommand::AddPaintCommand(MainWindow *mainWindow, uid paintId, const QIcon &icon, const QString &name, QUndoCommand *parent) : QUndoCommand(parent), @@ -245,4 +245,4 @@ void DeleteMappingCommand::redo() _mainWindow->deleteMapping(_mappingId); } -MM_END_NAMESPACE +} diff --git a/Commands.h b/Commands.h index deda76c..84fab18 100644 --- a/Commands.h +++ b/Commands.h @@ -25,7 +25,7 @@ #include #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { enum CommandId { CMD_KEY_MOVE_VERTEX, @@ -164,6 +164,6 @@ private: uid _mappingId; }; -MM_END_NAMESPACE +} #endif /* COMMANDS_H_ */ diff --git a/ConcurrentQueue.h b/ConcurrentQueue.h index 56095e9..4d0a6e2 100644 --- a/ConcurrentQueue.h +++ b/ConcurrentQueue.h @@ -33,7 +33,7 @@ #include #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { template class ConcurrentQueue @@ -85,6 +85,6 @@ class ConcurrentQueue } }; -MM_END_NAMESPACE +} #endif // _CONCURRENT_QUEUE_H_ diff --git a/ConsoleWindow.cpp b/ConsoleWindow.cpp index e56361b..9d94f20 100644 --- a/ConsoleWindow.cpp +++ b/ConsoleWindow.cpp @@ -20,7 +20,7 @@ #include "ConsoleWindow.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { ConsoleWindow* ConsoleWindow::instance = NULL; @@ -153,4 +153,4 @@ ConsoleWindow::~ConsoleWindow() kill(); } -MM_END_NAMESPACE +} diff --git a/ConsoleWindow.h b/ConsoleWindow.h index fccdb16..81be7ca 100644 --- a/ConsoleWindow.h +++ b/ConsoleWindow.h @@ -25,7 +25,7 @@ #include "MM.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { class ConsoleWindow : public QMainWindow { @@ -76,6 +76,6 @@ private: static const int CONSOLE_WINDOW_DEFAULT_HEIGHT = 480; }; -MM_END_NAMESPACE +} #endif // CONSOLE_H diff --git a/Element.cpp b/Element.cpp index e380156..5f539f4 100644 --- a/Element.cpp +++ b/Element.cpp @@ -21,7 +21,7 @@ #include -MM_BEGIN_NAMESPACE +namespace mmp { Element::Element(uid id, UidAllocator* allocator) : _name(""), _isLocked(false), _opacity(1.0f), _allocator(allocator) { @@ -88,4 +88,4 @@ void Element::_emitPropertyChanged(const QString& propertyName) emit propertyChanged(getId(), propertyName, property(propertyName.toAscii())); } -MM_END_NAMESPACE +} diff --git a/Element.h b/Element.h index 7c37cd7..cf7b60f 100644 --- a/Element.h +++ b/Element.h @@ -30,7 +30,7 @@ #include Q_DECLARE_METATYPE(uid) -MM_BEGIN_NAMESPACE +namespace mmp { class Element : public Serializable { @@ -84,6 +84,6 @@ private: UidAllocator* _allocator; }; -MM_END_NAMESPACE +} #endif /* MOBJECT_H_ */ diff --git a/Ellipse.cpp b/Ellipse.cpp index 35e5eee..aca9f22 100644 --- a/Ellipse.cpp +++ b/Ellipse.cpp @@ -19,7 +19,7 @@ #include "Ellipse.h" -MM_BEGIN_NAMESPACE +namespace mmp { void Ellipse::sanitize() { @@ -149,4 +149,4 @@ void Ellipse::setVertex(int i, const QPointF& v) sanitize(); } -MM_END_NAMESPACE +} diff --git a/Ellipse.h b/Ellipse.h index 08ece09..1f50e17 100644 --- a/Ellipse.h +++ b/Ellipse.h @@ -23,7 +23,7 @@ #include "Shape.h" -MM_BEGIN_NAMESPACE +namespace mmp { class Ellipse : public MShape { @@ -144,6 +144,6 @@ protected: // } }; -MM_END_NAMESPACE +} #endif /* ELLIPSE_H_ */ diff --git a/GuiForward.h b/GuiForward.h index 6260e6f..e80912f 100644 --- a/GuiForward.h +++ b/GuiForward.h @@ -31,8 +31,8 @@ class QDialogButtonBox; class QString; // MapMap Gui -MM_BEGIN_NAMESPACE +namespace mmp { class AboutDialog; -MM_END_NAMESPACE +} #endif // GUIFORWARD_H diff --git a/MM.cpp b/MM.cpp index 8006705..4c81a01 100644 --- a/MM.cpp +++ b/MM.cpp @@ -20,7 +20,7 @@ #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { const QString MM::APPLICATION_NAME = "MapMap"; const QString MM::VERSION = "0.4.1"; @@ -70,4 +70,4 @@ const qreal MM::ZOOM_MAX = 5.0f; // Default values const QString MM::DEFAULT_LANGUAGE = "en"; -MM_END_NAMESPACE +} diff --git a/MM.h b/MM.h index f2fed77..c4b609a 100644 --- a/MM.h +++ b/MM.h @@ -40,7 +40,7 @@ #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) -MM_BEGIN_NAMESPACE +namespace mmp { /** * This class is a placeholder for predefined static variables that can be used @@ -147,8 +147,6 @@ public: }; }; -MM_END_NAMESPACE +} #endif - - diff --git a/MainApplication.cpp b/MainApplication.cpp index 398ad83..e86a238 100644 --- a/MainApplication.cpp +++ b/MainApplication.cpp @@ -21,7 +21,7 @@ #include "MainApplication.h" -MM_BEGIN_NAMESPACE +namespace mmp { MainApplication::MainApplication(int &argc, char *argv[]) : QApplication(argc, argv) @@ -69,4 +69,4 @@ bool MainApplication::notify(QObject *receiver, QEvent *event) return false; } -MM_END_NAMESPACE +} diff --git a/MainApplication.h b/MainApplication.h index 6f21494..b3e5777 100644 --- a/MainApplication.h +++ b/MainApplication.h @@ -28,7 +28,7 @@ #include "MM.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { class MainApplication : public QApplication { @@ -39,6 +39,6 @@ public: bool notify(QObject *receiver, QEvent *event); }; -MM_END_NAMESPACE +} #endif /* MAINAPPLICATION_H_ */ diff --git a/MainWindow.cpp b/MainWindow.cpp index c99600b..6f9ddc4 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -28,7 +28,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { MainWindow::MainWindow() { @@ -3321,4 +3321,4 @@ void MainWindow::quitMapMap() close(); } -MM_END_NAMESPACE +} diff --git a/MainWindow.h b/MainWindow.h index 1b09341..52150af 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -55,7 +55,7 @@ #include "PaintGui.h" -MM_BEGIN_NAMESPACE +namespace mmp { class PreferenceDialog; class AboutDialog; @@ -587,6 +587,6 @@ public: static const int OUTPUT_WINDOW_MINIMUM_HEIGHT = 270; }; -MM_END_NAMESPACE +} #endif /* MAIN_WINDOW_H_ */ diff --git a/MapperGLCanvas.cpp b/MapperGLCanvas.cpp index e55cc46..b9a4065 100644 --- a/MapperGLCanvas.cpp +++ b/MapperGLCanvas.cpp @@ -25,7 +25,7 @@ #include "MainWindow.h" #include "Commands.h" -MM_BEGIN_NAMESPACE +namespace mmp { MapperGLCanvas::MapperGLCanvas(MainWindow* mainWindow, bool isOutput, QWidget* parent, const QGLWidget * shareWidget, @@ -724,4 +724,4 @@ void MapperGLCanvas::_snapVertex(QPointF* p) } } -MM_END_NAMESPACE +} diff --git a/MapperGLCanvas.h b/MapperGLCanvas.h index db4ab7f..dd8b1cf 100644 --- a/MapperGLCanvas.h +++ b/MapperGLCanvas.h @@ -38,7 +38,7 @@ #include "MappingGui.h" -MM_BEGIN_NAMESPACE +namespace mmp { class MainWindow; class ShapeGraphicsItem; @@ -203,6 +203,6 @@ public: static const int NO_VERTEX = -1; }; -MM_END_NAMESPACE +} #endif /* MAPPERGLCANVAS_H_ */ diff --git a/MapperGLCanvasToolbar.cpp b/MapperGLCanvasToolbar.cpp index 81829f3..b24e2cd 100644 --- a/MapperGLCanvasToolbar.cpp +++ b/MapperGLCanvasToolbar.cpp @@ -19,7 +19,7 @@ #include "MapperGLCanvasToolbar.h" -MM_BEGIN_NAMESPACE +namespace mmp { MapperGLCanvasToolbar::MapperGLCanvasToolbar(MapperGLCanvas* canvas, QWidget* parent) : QWidget(parent), @@ -150,4 +150,4 @@ void MapperGLCanvasToolbar::updateDropdownMenu(qreal factor) _dropdownMenu->setCurrentText(zoomFactor); } -MM_END_NAMESPACE +} diff --git a/MapperGLCanvasToolbar.h b/MapperGLCanvasToolbar.h index 273f270..08ec5dc 100644 --- a/MapperGLCanvasToolbar.h +++ b/MapperGLCanvasToolbar.h @@ -23,7 +23,7 @@ #include "MM.h" #include "MapperGLCanvas.h" -MM_BEGIN_NAMESPACE +namespace mmp { class MapperGLCanvasToolbar : public QWidget { Q_OBJECT @@ -63,6 +63,6 @@ protected: }; -MM_END_NAMESPACE +} #endif /* MAPPERGLCANVASTOOLBAR_H_ */ diff --git a/Mapping.cpp b/Mapping.cpp index 2f8ba51..02e4583 100644 --- a/Mapping.cpp +++ b/Mapping.cpp @@ -22,7 +22,7 @@ #include "Mapping.h" #include "MainWindow.h" -MM_BEGIN_NAMESPACE +namespace mmp { UidAllocator Mapping::allocator; @@ -168,4 +168,4 @@ void Mapping::_writeShape(QDomElement& obj, bool isOutput) obj.appendChild(shapeObj); } -MM_END_NAMESPACE +} diff --git a/Mapping.h b/Mapping.h index 9ee38a2..09b9817 100644 --- a/Mapping.h +++ b/Mapping.h @@ -33,7 +33,7 @@ #include "MetaObjectRegistry.h" -MM_BEGIN_NAMESPACE +namespace mmp { // TODO: replace by ProjectAttribute //#include "ProjectWriter.h" @@ -201,6 +201,6 @@ public: } }; -MM_END_NAMESPACE +} #endif /* MAPPING_H_ */ diff --git a/MappingGui.cpp b/MappingGui.cpp index d99ab8b..536ee73 100644 --- a/MappingGui.cpp +++ b/MappingGui.cpp @@ -20,7 +20,7 @@ #include "MappingGui.h" -MM_BEGIN_NAMESPACE +namespace mmp { MappingGui::MappingGui(Mapping::ptr mapping) : _mapping(mapping), @@ -428,4 +428,4 @@ EllipseTextureMappingGui::EllipseTextureMappingGui(QSharedPointer mappingList; }; -MM_END_NAMESPACE +} #endif // MAPPINGLISTMODEL_H diff --git a/MappingManager.cpp b/MappingManager.cpp index 9a15080..4441ab2 100644 --- a/MappingManager.cpp +++ b/MappingManager.cpp @@ -21,7 +21,7 @@ #include "MappingManager.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { MappingManager::MappingManager() { @@ -266,4 +266,4 @@ void MappingManager::clearAll() mappingMap.clear(); } -MM_END_NAMESPACE +} diff --git a/MappingManager.h b/MappingManager.h index a36215f..928587d 100644 --- a/MappingManager.h +++ b/MappingManager.h @@ -27,7 +27,7 @@ #include "Paint.h" #include "Mapping.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * This is a container class for all the paints and mappings ie. the main model object that allows @@ -156,6 +156,6 @@ private: } }; -MM_END_NAMESPACE +} #endif /* MAPPINGMANAGER_H_ */ diff --git a/Maths.h b/Maths.h index 1c0582f..493a106 100644 --- a/Maths.h +++ b/Maths.h @@ -25,7 +25,7 @@ #include "MM.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { /// Converts from degrees to radians. inline qreal degreesToRadians(qreal degrees) { return degrees / 180.0f * M_PI; } @@ -73,6 +73,6 @@ inline bool xOr(bool a, bool b) { return (a && !b) || (!a && b); } -MM_END_NAMESPACE +} #endif /* MATH_H_ */ diff --git a/Mesh.cpp b/Mesh.cpp index fb905b7..7fa3e5d 100644 --- a/Mesh.cpp +++ b/Mesh.cpp @@ -19,7 +19,7 @@ #include "Mesh.h" -MM_BEGIN_NAMESPACE +namespace mmp { Mesh::Mesh() : Quad() { // Create dummy points (will be all overwritten later on by load/save). @@ -490,4 +490,4 @@ void Mesh::_reorderVertices() vertices = newVertices; } -MM_END_NAMESPACE +} diff --git a/Mesh.h b/Mesh.h index 84e7dbb..25f3d84 100644 --- a/Mesh.h +++ b/Mesh.h @@ -23,7 +23,7 @@ #include "Quad.h" -MM_BEGIN_NAMESPACE +namespace mmp { class Mesh : public Quad { @@ -124,6 +124,6 @@ protected: virtual MShape* _create() const { return new Mesh(); } }; -MM_END_NAMESPACE +} #endif /* MESH_H_ */ diff --git a/MetaObjectRegistry.cpp b/MetaObjectRegistry.cpp index 3aebb63..2e87a54 100644 --- a/MetaObjectRegistry.cpp +++ b/MetaObjectRegistry.cpp @@ -19,7 +19,7 @@ #include "MetaObjectRegistry.h" -MM_BEGIN_NAMESPACE +namespace mmp { MetaObjectRegistry& MetaObjectRegistry::instance() { @@ -33,4 +33,4 @@ const QMetaObject* MetaObjectRegistry::getMetaObject(QString className) const return (it == metaObjectLookup.constEnd() ? 0 : *it); } -MM_END_NAMESPACE +} diff --git a/MetaObjectRegistry.h b/MetaObjectRegistry.h index 1be2a9d..51d1351 100644 --- a/MetaObjectRegistry.h +++ b/MetaObjectRegistry.h @@ -25,7 +25,7 @@ #include #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { class MetaObjectRegistry { private: @@ -53,6 +53,6 @@ public: }; -MM_END_NAMESPACE +} #endif /* METAOBJECTREGISTRY_H_ */ diff --git a/OscInterface.cpp b/OscInterface.cpp index de57906..5269ee9 100644 --- a/OscInterface.cpp +++ b/OscInterface.cpp @@ -25,7 +25,7 @@ #include "MainWindow.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { const QString OscInterface::OSC_ROOT("mapmap"); const QString OscInterface::OSC_PAINT("paint"); @@ -311,6 +311,6 @@ bool OscInterface::setElementProperty(const QSharedPointer& elem, const } } -MM_END_NAMESPACE +} #endif // HAVE_OSC diff --git a/OscInterface.h b/OscInterface.h index bd4c327..e618dea 100644 --- a/OscInterface.h +++ b/OscInterface.h @@ -32,7 +32,7 @@ #include "ConcurrentQueue.h" #include "OscReceiver.h" -MM_BEGIN_NAMESPACE +namespace mmp { class MainWindow; class Element; @@ -99,7 +99,7 @@ private: bool setElementProperty(const QSharedPointer& elem, const QString& property, const QVariant& value); }; -MM_END_NAMESPACE +} #endif // HAVE_OSC diff --git a/OscReceiver.cpp b/OscReceiver.cpp index b845325..bdf0fdf 100644 --- a/OscReceiver.cpp +++ b/OscReceiver.cpp @@ -3,7 +3,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { bool OscReceiver::server_is_ok_ = true; @@ -76,6 +76,6 @@ std::string OscReceiver::toString() const { return "port:" + port_; } -MM_END_NAMESPACE +} #endif // HAVE_OSC diff --git a/OscReceiver.h b/OscReceiver.h index d8342e4..a9984b8 100644 --- a/OscReceiver.h +++ b/OscReceiver.h @@ -7,7 +7,7 @@ #include "MM.h" #define CONFIG_DEBUG -MM_BEGIN_NAMESPACE +namespace mmp { /** * General-purpose wrapper around liblo to receive OSC messages. @@ -41,7 +41,7 @@ private: static void error(int num, const char *msg, const char *path); }; -MM_END_NAMESPACE +} #endif // HAVE_OSC diff --git a/OutputGLCanvas.cpp b/OutputGLCanvas.cpp index cac87b5..e35e946 100644 --- a/OutputGLCanvas.cpp +++ b/OutputGLCanvas.cpp @@ -22,7 +22,7 @@ #include "OutputGLCanvas.h" #include "MainWindow.h" -MM_BEGIN_NAMESPACE +namespace mmp { OutputGLCanvas::OutputGLCanvas(MainWindow* mainWindow, QWidget* parent, const QGLWidget* shareWidget, QGraphicsScene* scene) : MapperGLCanvas(mainWindow, true, parent, shareWidget, scene), @@ -254,4 +254,4 @@ void OutputGLCanvas::mouseMoveEvent(QMouseEvent *event) } } -MM_END_NAMESPACE +} diff --git a/OutputGLCanvas.h b/OutputGLCanvas.h index a912ac9..075f6d2 100644 --- a/OutputGLCanvas.h +++ b/OutputGLCanvas.h @@ -24,7 +24,7 @@ #include "MapperGLCanvas.h" -MM_BEGIN_NAMESPACE +namespace mmp { class OutputGLCanvas: public MapperGLCanvas { @@ -71,6 +71,6 @@ protected: void mouseMoveEvent(QMouseEvent *event); }; -MM_END_NAMESPACE +} #endif /* OutputGLCanvas_H_ */ diff --git a/OutputGLWindow.cpp b/OutputGLWindow.cpp index 4fd8d21..6cafcf4 100644 --- a/OutputGLWindow.cpp +++ b/OutputGLWindow.cpp @@ -23,7 +23,7 @@ #include "MainWindow.h" -MM_BEGIN_NAMESPACE +namespace mmp { OutputGLWindow:: OutputGLWindow(QWidget* parent, const MapperGLCanvas* canvas_) : QDialog(parent) { @@ -115,4 +115,4 @@ void OutputGLWindow::setPreferredScreen(int screen) } -MM_END_NAMESPACE +} diff --git a/OutputGLWindow.h b/OutputGLWindow.h index 13c4344..2ad9f8b 100644 --- a/OutputGLWindow.h +++ b/OutputGLWindow.h @@ -26,7 +26,7 @@ #include #include "OutputGLCanvas.h" -MM_BEGIN_NAMESPACE +namespace mmp { // TODO: add SLOT for mySetVisible // TODO: Maybe improve support for Ubuntu: http://stackoverflow.com/questions/12645880/fullscreen-for-qdialog-from-within-mainwindow-only-working-sometimes @@ -67,6 +67,6 @@ private: int _preferredScreen; }; -MM_END_NAMESPACE +} #endif /* OutputGLWINDOW_H_ */ diff --git a/Paint.cpp b/Paint.cpp index dc5881d..6a405e8 100644 --- a/Paint.cpp +++ b/Paint.cpp @@ -25,7 +25,7 @@ #include "VideoShmSrcImpl.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { UidAllocator Paint::allocator; @@ -378,4 +378,4 @@ bool Video::_generateThumbnail() return true; } -MM_END_NAMESPACE +} diff --git a/Paint.h b/Paint.h index b456db9..b0f2d7a 100644 --- a/Paint.h +++ b/Paint.h @@ -38,7 +38,7 @@ #include "Element.h" #include "Maths.h" -MM_BEGIN_NAMESPACE +namespace mmp { typedef enum { VIDEO_URI, @@ -365,6 +365,6 @@ protected: VideoImpl *_impl; }; -MM_END_NAMESPACE +} #endif /* PAINT_H_ */ diff --git a/PaintGui.cpp b/PaintGui.cpp index 9254910..7dc3c64 100644 --- a/PaintGui.cpp +++ b/PaintGui.cpp @@ -19,7 +19,7 @@ #include -MM_BEGIN_NAMESPACE +namespace mmp { PaintGui::PaintGui(Paint::ptr paint) : _paint(paint) @@ -236,4 +236,4 @@ void VideoGui::setValue(QString propertyName, QVariant value) TextureGui::setValue(propertyName, value); } -MM_END_NAMESPACE +} diff --git a/PaintGui.h b/PaintGui.h index 59befc1..2aafceb 100644 --- a/PaintGui.h +++ b/PaintGui.h @@ -42,7 +42,7 @@ #include "variantmanager.h" #include "variantfactory.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * The view components corresponding to a Paint (which is the model) in the interface. @@ -142,6 +142,6 @@ protected: // QtVariantProperty* _mediaReverseItem; }; -MM_END_NAMESPACE +} #endif /* PAINTGUI_H_ */ diff --git a/Polygon.cpp b/Polygon.cpp index 5959fb0..575484f 100644 --- a/Polygon.cpp +++ b/Polygon.cpp @@ -19,7 +19,7 @@ #include "Polygon.h" -MM_BEGIN_NAMESPACE +namespace mmp { void Polygon::setVertex(int i, const QPointF& v) { @@ -125,4 +125,4 @@ QPolygonF Polygon::toPolygon() const return polygon; } -MM_END_NAMESPACE +} diff --git a/Polygon.h b/Polygon.h index 3f5a734..8b8f98c 100644 --- a/Polygon.h +++ b/Polygon.h @@ -21,7 +21,7 @@ #include "Shape.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * This class represents a simple polygon (ie. the control points are vertices). @@ -58,6 +58,6 @@ protected: static qreal _CONSTRAIN_VERTEX_INTERSECTION_PULLAWAY; }; -MM_END_NAMESPACE +} #endif /* POLYGON_H_ */ diff --git a/PreferenceDialog.cpp b/PreferenceDialog.cpp index 093731b..42459e2 100644 --- a/PreferenceDialog.cpp +++ b/PreferenceDialog.cpp @@ -21,7 +21,7 @@ #include "PreferenceDialog.h" -MM_BEGIN_NAMESPACE +namespace mmp { PreferenceDialog::PreferenceDialog(QWidget* parent) : QDialog(parent) @@ -414,4 +414,4 @@ void PreferenceDialog::createLanguageList() } -MM_END_NAMESPACE +} diff --git a/PreferenceDialog.h b/PreferenceDialog.h index 0143efb..368e6c4 100644 --- a/PreferenceDialog.h +++ b/PreferenceDialog.h @@ -27,7 +27,7 @@ #include "MainWindow.h" -MM_BEGIN_NAMESPACE +namespace mmp { class PreferenceDialog : public QDialog { @@ -119,6 +119,6 @@ private: static const int LIST_ITEM_HEIGHT = 36; }; -MM_END_NAMESPACE +} #endif /* PREFERENCESDIALOG_H_ */ diff --git a/ProjectLabels.cpp b/ProjectLabels.cpp index 8f52035..08ff609 100644 --- a/ProjectLabels.cpp +++ b/ProjectLabels.cpp @@ -19,7 +19,7 @@ #include "ProjectLabels.h" -MM_BEGIN_NAMESPACE +namespace mmp { const char* ProjectLabels::CLASS_NAME = "className"; const char* ProjectLabels::PAINTS = "paints"; @@ -30,4 +30,4 @@ const char* ProjectLabels::NAME = "name"; const char* ProjectLabels::SOURCE = "source"; const char* ProjectLabels::DESTINATION = "destination"; -MM_END_NAMESPACE \ No newline at end of file +} \ No newline at end of file diff --git a/ProjectLabels.h b/ProjectLabels.h index 8b0dcba..28225aa 100644 --- a/ProjectLabels.h +++ b/ProjectLabels.h @@ -22,7 +22,7 @@ #include "MM.h" -MM_BEGIN_NAMESPACE +namespace mmp { class ProjectLabels { public: @@ -38,6 +38,6 @@ public: static const char* SOURCE; }; -MM_END_NAMESPACE +} #endif /* PROJECTLABELS_H_ */ diff --git a/ProjectReader.cpp b/ProjectReader.cpp index a8a673a..ef9f412 100644 --- a/ProjectReader.cpp +++ b/ProjectReader.cpp @@ -22,7 +22,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { ProjectReader::ProjectReader(MainWindow *window) : _window(window) { @@ -171,4 +171,4 @@ Mapping::ptr ProjectReader::parseMapping(const QDomElement& mappingElem) } } -MM_END_NAMESPACE +} diff --git a/ProjectReader.h b/ProjectReader.h index 35495a3..08163de 100644 --- a/ProjectReader.h +++ b/ProjectReader.h @@ -27,7 +27,7 @@ #include "MetaObjectRegistry.h" #include "ProjectLabels.h" -MM_BEGIN_NAMESPACE +namespace mmp { class ProjectReader { @@ -46,4 +46,4 @@ private: MainWindow *_window; }; -MM_END_NAMESPACE +} diff --git a/ProjectWriter.cpp b/ProjectWriter.cpp index 1988f77..afad045 100644 --- a/ProjectWriter.cpp +++ b/ProjectWriter.cpp @@ -20,7 +20,7 @@ #include "ProjectWriter.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { ProjectWriter::ProjectWriter(MainWindow *window) : _window(window) @@ -65,4 +65,4 @@ bool ProjectWriter::writeFile(QIODevice *device) return true; } -MM_END_NAMESPACE \ No newline at end of file +} \ No newline at end of file diff --git a/ProjectWriter.h b/ProjectWriter.h index 2938c3e..1224ddc 100644 --- a/ProjectWriter.h +++ b/ProjectWriter.h @@ -30,7 +30,7 @@ #include "Shapes.h" -MM_BEGIN_NAMESPACE +namespace mmp { class ProjectWriter { @@ -43,5 +43,5 @@ public: MainWindow *_window; }; -MM_END_NAMESPACE +} #endif diff --git a/Quad.h b/Quad.h index 06e64e3..3a0871a 100644 --- a/Quad.h +++ b/Quad.h @@ -23,7 +23,7 @@ #include "Polygon.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * Four-vertex shape. @@ -53,6 +53,6 @@ protected: }; -MM_END_NAMESPACE +} #endif /* QUAD_H_ */ diff --git a/Serializable.cpp b/Serializable.cpp index 095fb09..2010313 100644 --- a/Serializable.cpp +++ b/Serializable.cpp @@ -19,7 +19,7 @@ #include "Serializable.h" -MM_BEGIN_NAMESPACE +namespace mmp { QString Serializable::cleanClassName() const { @@ -147,4 +147,4 @@ void Serializable::_writeNode(QDomElement& obj, const QString& nodeName, const Q -MM_END_NAMESPACE +} diff --git a/Serializable.h b/Serializable.h index 59fb66e..981be9f 100644 --- a/Serializable.h +++ b/Serializable.h @@ -27,7 +27,7 @@ #include "ProjectLabels.h" -MM_BEGIN_NAMESPACE +namespace mmp { class Serializable : public QObject { Q_OBJECT @@ -61,6 +61,6 @@ protected: void _writeNode(QDomElement& obj, const QString& nodeName, const QString& nodeValue); }; -MM_END_NAMESPACE +} #endif /* SERIALIZABLE_H_ */ diff --git a/Shape.cpp b/Shape.cpp index 08a302a..ccddb90 100644 --- a/Shape.cpp +++ b/Shape.cpp @@ -19,7 +19,7 @@ #include "Shape.h" -MM_BEGIN_NAMESPACE +namespace mmp { MShape::MShape(const QVector& vertices_) : _isLocked(false) { setVertices(vertices_); @@ -89,4 +89,4 @@ void MShape::write(QDomElement& obj) obj.appendChild(verticesObj); } -MM_END_NAMESPACE +} diff --git a/Shape.h b/Shape.h index 5583f37..b1b6f33 100644 --- a/Shape.h +++ b/Shape.h @@ -40,7 +40,7 @@ #include "Maths.h" #include "Serializable.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * Shape represented by a series of control points. @@ -137,6 +137,6 @@ protected: }; -MM_END_NAMESPACE +} #endif /* SHAPE_H_ */ diff --git a/ShapeControlPainter.cpp b/ShapeControlPainter.cpp index d62825e..038a5f0 100644 --- a/ShapeControlPainter.cpp +++ b/ShapeControlPainter.cpp @@ -20,7 +20,7 @@ #include "ShapeControlPainter.h" -MM_BEGIN_NAMESPACE +namespace mmp { ShapeControlPainter::ShapeControlPainter(ShapeGraphicsItem* shapeItem) @@ -108,4 +108,4 @@ void MeshControlPainter::paintShape(QPainter *painter, MapperGLCanvas* canvas, b painter->drawPolygon(_shapeItem->mapFromScene(mesh->toPolygon())); } -MM_END_NAMESPACE +} diff --git a/ShapeControlPainter.h b/ShapeControlPainter.h index 6f53881..eee65c8 100644 --- a/ShapeControlPainter.h +++ b/ShapeControlPainter.h @@ -27,7 +27,7 @@ #include "MapperGLCanvas.h" #include "ShapeGraphicsItem.h" -MM_BEGIN_NAMESPACE +namespace mmp { class ShapeGraphicsItem; class MapperGLCanvas; @@ -87,6 +87,6 @@ public: virtual void paintShape(QPainter *painter, MapperGLCanvas* canvas, bool selected=true); }; -MM_END_NAMESPACE +} #endif diff --git a/ShapeGraphicsItem.cpp b/ShapeGraphicsItem.cpp index 6bfeeee..1ca9bfc 100644 --- a/ShapeGraphicsItem.cpp +++ b/ShapeGraphicsItem.cpp @@ -23,7 +23,7 @@ #include "MainWindow.h" -MM_BEGIN_NAMESPACE +namespace mmp { ShapeGraphicsItem::ShapeGraphicsItem(Mapping::ptr mapping, bool output) : _mapping(mapping), _output(output) @@ -632,4 +632,4 @@ void EllipseTextureGraphicsItem::_doDrawOutput(QPainter* painter) } } -MM_END_NAMESPACE +} diff --git a/ShapeGraphicsItem.h b/ShapeGraphicsItem.h index 1ee23df..b263c22 100644 --- a/ShapeGraphicsItem.h +++ b/ShapeGraphicsItem.h @@ -38,7 +38,7 @@ #include "Mapping.h" #include "MapperGLCanvas.h" -MM_BEGIN_NAMESPACE +namespace mmp { class MapperGLCanvas; class ShapeControlPainter; @@ -290,6 +290,6 @@ public: static void _setPointOfEllipseAtAngle(QPointF& point, const QPointF& center, float hRadius, float vRadius, float rotation, float circularAngle); }; -MM_END_NAMESPACE +} #endif diff --git a/Triangle.h b/Triangle.h index 05f67f0..17508ba 100644 --- a/Triangle.h +++ b/Triangle.h @@ -23,7 +23,7 @@ #include "Polygon.h" -MM_BEGIN_NAMESPACE +namespace mmp { /** * Triangle shape. @@ -49,6 +49,6 @@ protected: }; -MM_END_NAMESPACE +} #endif /* TRIANGLE_H_ */ diff --git a/UidAllocator.cpp b/UidAllocator.cpp index 22f01a3..0fe4b33 100644 --- a/UidAllocator.cpp +++ b/UidAllocator.cpp @@ -23,7 +23,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { uid UidAllocator::allocate() { @@ -67,4 +67,4 @@ bool UidAllocator::exists(uid id) const return ( std::find(_ids.begin(), _ids.end(), id) != _ids.end() ); } -MM_END_NAMESPACE +} diff --git a/UidAllocator.h b/UidAllocator.h index d52691a..777833f 100644 --- a/UidAllocator.h +++ b/UidAllocator.h @@ -36,7 +36,7 @@ typedef int uid; /// Represents a UID that does not refer to any entity. #define NULL_UID (0) -MM_BEGIN_NAMESPACE +namespace mmp { /** * Allocates uids for instances by appending an incremental number to a given string. @@ -55,6 +55,6 @@ private: std::vector _ids; }; -MM_END_NAMESPACE +} #endif // ifndef diff --git a/Util.cpp b/Util.cpp index e736ac1..fbe3538 100644 --- a/Util.cpp +++ b/Util.cpp @@ -26,7 +26,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { namespace Util { @@ -217,4 +217,4 @@ bool isNumeric(const QString& text) } // end of namespace -MM_END_NAMESPACE +} diff --git a/Util.h b/Util.h index c7de410..c41ddc6 100644 --- a/Util.h +++ b/Util.h @@ -32,7 +32,7 @@ #include "Paint.h" #include -MM_BEGIN_NAMESPACE +namespace mmp { /** * @namespace Util Useful functions. @@ -95,6 +95,6 @@ bool isNumeric(const QString& text); } // end of namespace -MM_END_NAMESPACE +} #endif /* UTIL_H_ */ diff --git a/VideoImpl.cpp b/VideoImpl.cpp index b0ea47c..4ecb3e4 100644 --- a/VideoImpl.cpp +++ b/VideoImpl.cpp @@ -25,7 +25,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { // -------- private implementation of VideoImpl ------- @@ -795,4 +795,4 @@ bool VideoImpl::waitForNextBits(int timeout, const uchar** bits) return false; } -MM_END_NAMESPACE +} diff --git a/VideoImpl.h b/VideoImpl.h index f7a2907..1df147c 100644 --- a/VideoImpl.h +++ b/VideoImpl.h @@ -43,7 +43,7 @@ #include #endif -MM_BEGIN_NAMESPACE +namespace mmp { /** * Private declaration of the video player. @@ -276,6 +276,6 @@ private: static const int MAX_SAMPLES_IN_BUFFER_QUEUES = 30; }; -MM_END_NAMESPACE +} #endif /* ifndef */ diff --git a/VideoShmSrcImpl.cpp b/VideoShmSrcImpl.cpp index 7319066..01a778c 100644 --- a/VideoShmSrcImpl.cpp +++ b/VideoShmSrcImpl.cpp @@ -26,7 +26,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { VideoShmSrcImpl::VideoShmSrcImpl() : _shmsrc0(NULL), @@ -115,4 +115,4 @@ VideoShmSrcImpl::~VideoShmSrcImpl() } } -MM_END_NAMESPACE +} diff --git a/VideoShmSrcImpl.h b/VideoShmSrcImpl.h index 9246273..1916122 100644 --- a/VideoShmSrcImpl.h +++ b/VideoShmSrcImpl.h @@ -46,7 +46,7 @@ #include "VideoImpl.h" -MM_BEGIN_NAMESPACE +namespace mmp { class VideoShmSrcImpl : public VideoImpl { @@ -69,5 +69,5 @@ class VideoShmSrcImpl : public VideoImpl bool _attached; }; -MM_END_NAMESPACE +} #endif /* ifndef */ diff --git a/VideoUriDecodeBinImpl.cpp b/VideoUriDecodeBinImpl.cpp index 95aaaec..4a8dd59 100644 --- a/VideoUriDecodeBinImpl.cpp +++ b/VideoUriDecodeBinImpl.cpp @@ -26,7 +26,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { VideoUriDecodeBinImpl::VideoUriDecodeBinImpl() : _uridecodebin0(NULL) @@ -270,4 +270,4 @@ VideoUriDecodeBinImpl::~VideoUriDecodeBinImpl() { } -MM_END_NAMESPACE +} diff --git a/VideoUriDecodeBinImpl.h b/VideoUriDecodeBinImpl.h index 750fced..397c00f 100644 --- a/VideoUriDecodeBinImpl.h +++ b/VideoUriDecodeBinImpl.h @@ -45,7 +45,7 @@ #include "VideoImpl.h" -MM_BEGIN_NAMESPACE +namespace mmp { class VideoUriDecodeBinImpl : public VideoImpl { @@ -61,6 +61,6 @@ class VideoUriDecodeBinImpl : public VideoImpl //bool _videoIsConnected; }; -MM_END_NAMESPACE +} #endif /* ifndef */ diff --git a/VideoV4l2SrcImpl.cpp b/VideoV4l2SrcImpl.cpp index 146794b..f68a20a 100644 --- a/VideoV4l2SrcImpl.cpp +++ b/VideoV4l2SrcImpl.cpp @@ -26,7 +26,7 @@ #include #include -MM_BEGIN_NAMESPACE +namespace mmp { VideoV4l2SrcImpl::VideoV4l2SrcImpl() : _v4l2src0(NULL) @@ -77,4 +77,4 @@ bool VideoV4l2SrcImpl::loadMovie(const QString& path) { VideoV4l2SrcImpl::~VideoV4l2SrcImpl() { } -MM_END_NAMESPACE +} diff --git a/VideoV4l2SrcImpl.h b/VideoV4l2SrcImpl.h index 1a218e8..fd4d1f9 100644 --- a/VideoV4l2SrcImpl.h +++ b/VideoV4l2SrcImpl.h @@ -46,7 +46,7 @@ #include "VideoImpl.h" -MM_BEGIN_NAMESPACE +namespace mmp { class VideoV4l2SrcImpl : public VideoImpl { @@ -60,6 +60,6 @@ class VideoV4l2SrcImpl : public VideoImpl GstElement *_v4l2src0; }; -MM_END_NAMESPACE +} #endif /* ifndef */