diff --git a/MainWindow.cpp b/MainWindow.cpp index 63c25f2..771cf7d 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -209,12 +209,29 @@ void MainWindow::addTriangle() void MainWindow::about() { - QMessageBox::about(this, tr("About Libremapping"), - tr("

Libremapping " + QMessageBox::about(this, tr("About LibreMapping"), + tr("

LibreMapping " LIBREMAPPING_VERSION "

" - "

Copyright © 2013 Office International de la Francophonie" - "

Libremapping is a free software for video mapping.")); + "

Copyright © 2013 Organisation internationale de la Francophonie" + + "

Copyright © 2013 Sofian Audry" + "

Copyright © 2013 Alexandre Quessy" + "

Copyright © 2013 Vasilis Liaskovitis" + "

Copyright © 2013 Sylvain Cormier" + "

Libremapping is a free software for video mapping. " + "

Projection mapping, also known as video mapping and spatial augmented reality, " + "is a projection technology used to turn objects, often irregularly shaped, into " + "a display surface for video projection. These objects may be complex industrial " + "landscapes, such as buildings. By using specialized software, a two or three " + "dimensional object is spatially mapped on the virtual program which mimics the " + "real environment it is to be projected on. The software can interact with a " + "projector to fit any desired image onto the surface of that object. This " + "technique is used by artists and advertisers alike who can add extra dimensions, " + "optical illusions, and notions of movement onto previously static objects. The " + "video is commonly combined with, or triggered by, audio to create an " + "audio-visual narrative." + )); } void MainWindow::updateStatusBar() @@ -543,14 +560,14 @@ void MainWindow::setCurrentFile(const QString &fileName) shownName = strippedName(curFile); } - setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Spreadsheet"))); + setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("LibreMapping Project"))); } bool MainWindow::importFile(const QString &fileName) { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { - QMessageBox::warning(this, tr("Spreadsheet"), + QMessageBox::warning(this, tr("LibreMapping Project"), tr("Cannot read file %1:\n%2.") .arg(file.fileName()) .arg(file.errorString())); diff --git a/Mapper.h b/Mapper.h index b59fc2d..0ce24cc 100644 --- a/Mapper.h +++ b/Mapper.h @@ -24,8 +24,13 @@ #include -#include +#if __APPLE__ +#include +#else #include +#endif + +#include #include #include diff --git a/Paint.h b/Paint.h index 9c0640f..c16c054 100644 --- a/Paint.h +++ b/Paint.h @@ -25,7 +25,13 @@ #include #include #include + +#if __APPLE__ +#include +#else #include +#endif + #include /** diff --git a/Util.h b/Util.h index 893e9cf..4dbdd93 100644 --- a/Util.h +++ b/Util.h @@ -20,7 +20,11 @@ #ifndef UTIL_H_ #define UTIL_H_ +#if __APPLE__ +#include +#else #include +#endif #include "Shape.h" #include "Paint.h" diff --git a/libremapping.pro b/libremapping.pro index 7355232..9a71e25 100644 --- a/libremapping.pro +++ b/libremapping.pro @@ -3,10 +3,15 @@ TEMPLATE = app HEADERS = MainWindow.h Util.h MapperGLCanvas.h SourceGLCanvas.h DestinationGLCanvas.h Mapper.h Mapping.h Shape.h Paint.h MappingManager.h SOURCES = main.cpp MainWindow.cpp Util.cpp Mapper.cpp MapperGLCanvas.cpp SourceGLCanvas.cpp DestinationGLCanvas.cpp MappingManager.cpp QT += gui opengl -LIBS += -lglut -lGLU RESOURCES = libremapping.qrc docs.depends = $(HEADERS) $(SOURCES) docs.commands = (cat Doxyfile; echo "INPUT = $?") | doxygen - QMAKE_EXTRA_TARGETS += docs +# mac +macx:LIBS += -framework OpenGL -framework GLUT +macx:QMAKE_CXXFLAGS += -D__MACOSX_CORE__ + +# not mac +!macx:LIBS += -lglut -lGLU diff --git a/prototypes/properties/README b/prototypes/properties/README new file mode 100644 index 0000000..18e1661 --- /dev/null +++ b/prototypes/properties/README @@ -0,0 +1,2 @@ +Doesn't work yet, but that is how properties work in Qt4. + diff --git a/prototypes/properties/build.sh b/prototypes/properties/build.sh new file mode 100755 index 0000000..c8d7791 --- /dev/null +++ b/prototypes/properties/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# qt4-default qt4-qmake +qmake-qt4 +make diff --git a/prototypes/properties/hello.pro b/prototypes/properties/hello.pro new file mode 100644 index 0000000..31f56c8 --- /dev/null +++ b/prototypes/properties/hello.pro @@ -0,0 +1,11 @@ +CONFIG += qt debug +TEMPLATE = app +HEADERS = +SOURCES = main.cpp +QT += gui +RESOURCES = + +docs.depends = $(HEADERS) $(SOURCES) +docs.commands = (cat Doxyfile; echo "INPUT = $?") | doxygen - +QMAKE_EXTRA_TARGETS += docs + diff --git a/prototypes/properties/main.cpp b/prototypes/properties/main.cpp new file mode 100644 index 0000000..433871d --- /dev/null +++ b/prototypes/properties/main.cpp @@ -0,0 +1,66 @@ +#include +#include +#include +#include + +class MyClass : public QObject + { + Q_OBJECT + Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged) + Q_ENUMS(Priority) + Q_CLASSINFO("Version", "3.0.0") + public: + MyClass() {} + //MyClass(QObject *parent = 0); + ~MyClass(); + + enum Priority { High, Low, VeryHigh, VeryLow }; + + void setPriority(Priority priority) + { + m_priority = priority; + emit priorityChanged(priority); + } + Priority priority() const + { return m_priority; } + + signals: + void priorityChanged(Priority); + + private: + Priority m_priority; + }; + + +void MyClass::priorityChanged(Priority) +{ + // pass +} +void dump (QObject *object) +{ + std::cout << "object: " << std::endl; + const QMetaObject *metaobject = object->metaObject(); + int count = metaobject->propertyCount(); + for (int i=0; iproperty(i); + const char *name = metaproperty.name(); + QVariant value = object->property(name); + std::cout << " * " << name << " = " << value.toString().toStdString() << std::endl; + } +} + +int main(int /* argc */, char ** /* argv */) +{ + MyClass *myinstance = new MyClass(); + //QObject *object = myinstance; + + myinstance->setPriority(MyClass::VeryHigh); + //object->setProperty("priority", "VeryHigh"); + + dump ((QObject *) myinstance); + + delete myinstance; + + return 0; +} diff --git a/prototypes/ui/index.html b/prototypes/ui/index.html new file mode 100644 index 0000000..b8a4f1d --- /dev/null +++ b/prototypes/ui/index.html @@ -0,0 +1,150 @@ + + + +Maquette 01 pour LibreMapping - Logiciel libre de vid�o mapping + + + + + + + + +

Sources

+ +
+

+type=movie +
+name=movie1 +
+playing= +
+uri= +
+Some are OSC-only: seek +
+

+
+ +

Layers

+

Layer 1

+
+
+ + + + + +
+shape=quad +visible= +
+solo= +
+lock= +
+opacity= +
+z-index= + + +
+ +name= + + +src= + + +
+Dynamic attributes selon le type de shape: +
+x1= +y1= +x2= +y2= +x3= +y3= +x4= +y4= +
+
+
+
+
+ +

+Légende OSC: + +

+/lmap/layer/layer1/opacity ,f
+/lmap/layer/layer1/visible ,b
+/lmap/layer/layer1/solo ,b
+/lmap/layer/layer1/lock ,b
+
+/lmap/src/movie1/uri ,s
+/lmap/src/movie1/seek ,f
+/lmap/src/movie1/playing ,b
+
+/lmap/dst/rect1/x1 ,i
+/lmap/dst/rect1/y1 ,i
+/lmap/dst/rect1/x2 ,i
+/lmap/dst/rect1/y2 ,i
+/lmap/dst/rect1/x3 ,i
+/lmap/dst/rect1/y3 ,i
+/lmap/dst/rect1/x4 ,i
+/lmap/dst/rect1/y4 ,i
+/lmap/dst/rect1/src ,s
+/lmap/dst/rect1/shape ,s
+/lmap/dst/rect1/layer ,s
+/lmap/dst/rect1/opacity ,f
+/lmap/dst/rect1/lock ,b
+/lmap/dst/rect1/solo ,b
+/lmap/dst/rect1/visible ,b
+
+

+ + + +