mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Add Facade.h
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Common.cpp
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
*
|
||||
* 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 "MappingManager.h"
|
||||
|
||||
/**
|
||||
* Facade to control the application.
|
||||
*/
|
||||
class Facade
|
||||
{
|
||||
public:
|
||||
Facade(MappingManager *manager);
|
||||
/**
|
||||
* Clears all mappings and paints.
|
||||
*/
|
||||
bool clearProject();
|
||||
/**
|
||||
* Create an image paint.
|
||||
*/
|
||||
bool createImagePaint(const char *paint_id, const char *uri);
|
||||
/**
|
||||
* Sets the image file to use in an image paint.
|
||||
*/
|
||||
bool updateImagePaintUri(const char *paint_id, const char *uri);
|
||||
/**
|
||||
* Creates a textured mesh.
|
||||
*/
|
||||
bool createMeshTextureMapping(const char *mapping_id, const char *paint_id,
|
||||
int n_rows, int n_cols,
|
||||
const QList<QPointF> &src, const QList<QPointF> &dst);
|
||||
/**
|
||||
* Creates a textured triangle.
|
||||
*/
|
||||
bool createTriangleTextureMapping(const char *mapping_id, const char *paint_id,
|
||||
const QList<QPointF> &src, const QList<QPointF> &dst);
|
||||
|
||||
// TODO:
|
||||
// bool loadProject(const char *project_file);
|
||||
// bool saveProject(const char *project_file);
|
||||
// bool quit();
|
||||
private:
|
||||
MappingManager *_manager;
|
||||
};
|
||||
+38
-4
@@ -1,7 +1,36 @@
|
||||
CONFIG += qt debug
|
||||
TEMPLATE = app
|
||||
HEADERS = MainWindow.h Util.h MapperGLCanvas.h SourceGLCanvas.h DestinationGLCanvas.h Mapper.h Mapping.h Shape.h Paint.h MappingManager.h ProjectWriter.h NameAllocator.h ProjectReader.h
|
||||
SOURCES = main.cpp MainWindow.cpp Util.cpp Mapper.cpp MapperGLCanvas.cpp SourceGLCanvas.cpp DestinationGLCanvas.cpp MappingManager.cpp ProjectWriter.cpp NameAllocator.cpp ProjectReader.cpp Controller.cpp
|
||||
HEADERS = \
|
||||
DestinationGLCanvas.h \
|
||||
Facade.h \
|
||||
MainWindow.h \
|
||||
Mapper.h \
|
||||
MapperGLCanvas.h \
|
||||
Mapping.h \
|
||||
MappingManager.h \
|
||||
NameAllocator.h \
|
||||
Paint.h \
|
||||
ProjectReader.h \
|
||||
ProjectWriter.h \
|
||||
Shape.h \
|
||||
SourceGLCanvas.h \
|
||||
Util.h
|
||||
|
||||
SOURCES = \
|
||||
Controller.cpp \
|
||||
DestinationGLCanvas.cpp \
|
||||
Facade.cpp \
|
||||
MainWindow.cpp \
|
||||
Mapper.cpp \
|
||||
MapperGLCanvas.cpp \
|
||||
MappingManager.cpp \
|
||||
NameAllocator.cpp \
|
||||
ProjectReader.cpp \
|
||||
ProjectWriter.cpp \
|
||||
SourceGLCanvas.cpp \
|
||||
Util.cpp \
|
||||
main.cpp
|
||||
|
||||
QT += gui opengl xml
|
||||
RESOURCES = libremapping.qrc
|
||||
|
||||
@@ -22,6 +51,11 @@ system(pkg-config --exists liblo) {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += liblo
|
||||
DEFINES += HAVE_OSC
|
||||
SOURCES += OscInterface.cpp OscReceiver.cpp
|
||||
HEADERS += OscInterface.h OscReceiver.h concurrentqueue.h
|
||||
SOURCES += \
|
||||
OscInterface.cpp \
|
||||
OscReceiver.cpp
|
||||
HEADERS += \
|
||||
OscInterface.h \
|
||||
OscReceiver.h \
|
||||
concurrentqueue.h
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user