Commit 16ece449 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps : reorganize compilation and inclusion / no plugin available yet

parent 89373f2c
...@@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 2.8) ...@@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 2.8)
project(SCHNApps) project(SCHNApps)
SET( QT_USE_QTXML TRUE ) SET( QT_USE_QTXML TRUE )
SET (QT_USE_QTDESIGNER TRUE) SET( QT_USE_QTDESIGNER TRUE )
SET (QT_USE_QTGUI TRUE) SET( QT_USE_QTGUI TRUE )
SET(QT_USE_QTPLUGIN TRUE) SET( QT_USE_QTPLUGIN TRUE )
#========CGoGN========# #========CGoGN========#
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir") SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
...@@ -16,14 +16,8 @@ INCLUDE(${CGoGN_ROOT_DIR}/apps_cmake.txt) ...@@ -16,14 +16,8 @@ INCLUDE(${CGoGN_ROOT_DIR}/apps_cmake.txt)
find_package(QGLViewer REQUIRED) find_package(QGLViewer REQUIRED)
#======Directories=======# #======SCHNApps=======#
SET(INC_DIR ${CMAKE_SOURCE_DIR}/include) SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps)
SET(SRC_DIR ${CMAKE_SOURCE_DIR}/src)
SET(FORMS_DIR ${CMAKE_SOURCE_DIR}/forms)
SET(RESOURCES_DIR ${CMAKE_SOURCE_DIR}/resources)
SET(PLUGIN_DIR ${CMAKE_SOURCE_DIR}/Plugins)
SET(PLUGIN_COMPILE_DIR ${EXECUTABLE_OUTPUT_PATH}/plugins)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release)
IF (NOT WIN32) IF (NOT WIN32)
...@@ -33,6 +27,10 @@ ENDIF (NOT WIN32) ...@@ -33,6 +27,10 @@ ENDIF (NOT WIN32)
configure_file(${CMAKE_SOURCE_DIR}/settings/state_save.xml ${EXECUTABLE_OUTPUT_PATH}/state_save.xml @ONLY) configure_file(${CMAKE_SOURCE_DIR}/settings/state_save.xml ${EXECUTABLE_OUTPUT_PATH}/state_save.xml @ONLY)
#======Plugins=======#
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Plugins)
#======Documentation=======# #======Documentation=======#
find_package(Doxygen) find_package(Doxygen)
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
......
...@@ -14,95 +14,61 @@ INCLUDE_DIRECTORIES( ...@@ -14,95 +14,61 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${QGLVIEWER_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR}
${SCHNApps_ROOT_DIR}/include
) )
SET(SRC_FILES file(
${SRC_DIR}/main.cpp GLOB
${SRC_DIR}/interface/window.cpp SCHNApps_SRC_FILES
${SRC_DIR}/interface/system.cpp ${SCHNApps_ROOT_DIR}/src/main.cpp
${SRC_DIR}/interface/stateHandler.cpp ${SCHNApps_ROOT_DIR}/src/interface/*.cpp
${SRC_DIR}/visualization/view.cpp ${SCHNApps_ROOT_DIR}/src/visualization/*.cpp
${SRC_DIR}/visualization/scene.cpp ${SCHNApps_ROOT_DIR}/src/dialogs/*.cpp
${SRC_DIR}/visualization/camera.cpp
${SRC_DIR}/interface/splitArea.cpp
${SRC_DIR}/dialogs/newSceneDialog.cpp
${SRC_DIR}/dialogs/sceneSelector.cpp
${SRC_DIR}/interface/viewButtonArea.cpp
${SRC_DIR}/dialogs/cameraViewDialog.cpp
${SRC_DIR}/dialogs/cameraOptionDialog.cpp
${SRC_DIR}/dialogs/cameraSceneDialog.cpp
${SRC_DIR}/dialogs/globalCameraDialog.cpp
${SRC_DIR}/dialogs/pluginDialog.cpp
${SRC_DIR}/dialogs/linkViewDialog.cpp
${SRC_DIR}/visualization/vboHandler.cpp
${SRC_DIR}/visualization/mapHandler.cpp
${SRC_DIR}/visualization/context.cpp
${SRC_DIR}/dialogs/mapPluginDialog.cpp
) )
SET(H_OBJECT_FILES SET(SCHNApps_H_OBJECT_FILES
${INC_DIR}/interface/window.h ${SCHNApps_ROOT_DIR}/include/interface/window.h
${INC_DIR}/interface/system.h ${SCHNApps_ROOT_DIR}/include/interface/system.h
${INC_DIR}/visualization/view.h ${SCHNApps_ROOT_DIR}/include/interface/viewButtonArea.h
${INC_DIR}/visualization/scene.h ${SCHNApps_ROOT_DIR}/include/interface/splitArea.h
${INC_DIR}/interface/splitArea.h ${SCHNApps_ROOT_DIR}/include/visualization/view.h
${INC_DIR}/dialogs/newSceneDialog.h ${SCHNApps_ROOT_DIR}/include/visualization/scene.h
${INC_DIR}/dialogs/sceneSelector.h ${SCHNApps_ROOT_DIR}/include/dialogs/newSceneDialog.h
${INC_DIR}/interface/viewButtonArea.h ${SCHNApps_ROOT_DIR}/include/dialogs/sceneSelector.h
${INC_DIR}/dialogs/cameraViewDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraViewDialog.h
${INC_DIR}/dialogs/cameraOptionDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraOptionDialog.h
${INC_DIR}/dialogs/cameraSceneDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraSceneDialog.h
${INC_DIR}/dialogs/globalCameraDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/globalCameraDialog.h
${INC_DIR}/dialogs/pluginDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/pluginDialog.h
${INC_DIR}/dialogs/linkViewDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/linkViewDialog.h
${INC_DIR}/dialogs/mapPluginDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/mapPluginDialog.h
) )
SET(FORMS_FILES file(
${FORMS_DIR}/window.ui GLOB
${FORMS_DIR}/questionSessionDialog.ui SCHNApps_FORM_FILES
${FORMS_DIR}/infoDialog.ui ${SCHNApps_ROOT_DIR}/forms/*.ui
${FORMS_DIR}/newSceneDialog.ui
${FORMS_DIR}/cameraViewDialog.ui
${FORMS_DIR}/cameraOptionDialog.ui
${FORMS_DIR}/cameraSceneDialog.ui
${FORMS_DIR}/globalCameraDialog.ui
${FORMS_DIR}/pluginDialog.ui
${FORMS_DIR}/linkViewDialog.ui
${FORMS_DIR}/mapPluginDialog.ui
) )
QT4_WRAP_UI(UI_H_FILES QT4_WRAP_UI( UI_H_FILES
${FORMS_FILES} ${SCHNApps_FORM_FILES}
) )
QT4_WRAP_CPP(MOC_FILES QT4_WRAP_CPP( MOC_FILES
${H_OBJECT_FILES} ${SCHNApps_H_OBJECT_FILES}
) )
QT4_ADD_RESOURCES(RCC_FILES QT4_ADD_RESOURCES( RCC_FILES
${RESOURCES_DIR}/resources.qrc ${SCHNApps_ROOT_DIR}/resources/resources.qrc
) )
INCLUDE_DIRECTORIES( ADD_EXECUTABLE( SCHNappsD
${FORMS} ${SCHNApps_SRC_FILES}
${INC_DIR}
${INC_DIR}/interface
${INC_DIR}/visualization
${INC_DIR}/dialogs
${INC_DIR}/plugins
)
ADD_EXECUTABLE(CGoGN_plugD
${SRC_FILES}
${UI_H_FILES} ${UI_H_FILES}
${MOC_FILES} ${MOC_FILES}
${RCC_FILES} ${RCC_FILES}
) )
TARGET_LINK_LIBRARIES(CGoGN_plugD TARGET_LINK_LIBRARIES( SCHNappsD
${CGoGN_LIBS_D} ${CGoGN_LIBS_D}
${COMMON_LIBS} ${COMMON_LIBS}
${QGLVIEWER_LIBRARIES} ${QGLVIEWER_LIBRARIES}
) )
#ADD_SUBDIRECTORY(${PLUGIN_DIR} plugins)
...@@ -16,95 +16,61 @@ INCLUDE_DIRECTORIES( ...@@ -16,95 +16,61 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${QGLVIEWER_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR}
${SCHNApps_ROOT_DIR}/include
) )
SET(SRC_FILES file(
${SRC_DIR}/main.cpp GLOB
${SRC_DIR}/interface/window.cpp SCHNApps_SRC_FILES
${SRC_DIR}/interface/system.cpp ${SCHNApps_ROOT_DIR}/src/main.cpp
${SRC_DIR}/interface/stateHandler.cpp ${SCHNApps_ROOT_DIR}/src/interface/*.cpp
${SRC_DIR}/visualization/view.cpp ${SCHNApps_ROOT_DIR}/src/visualization/*.cpp
${SRC_DIR}/visualization/scene.cpp ${SCHNApps_ROOT_DIR}/src/dialogs/*.cpp
${SRC_DIR}/visualization/camera.cpp
${SRC_DIR}/interface/splitArea.cpp
${SRC_DIR}/dialogs/newSceneDialog.cpp
${SRC_DIR}/dialogs/sceneSelector.cpp
${SRC_DIR}/interface/viewButtonArea.cpp
${SRC_DIR}/dialogs/cameraViewDialog.cpp
${SRC_DIR}/dialogs/cameraOptionDialog.cpp
${SRC_DIR}/dialogs/cameraSceneDialog.cpp
${SRC_DIR}/dialogs/globalCameraDialog.cpp
${SRC_DIR}/dialogs/pluginDialog.cpp
${SRC_DIR}/dialogs/linkViewDialog.cpp
${SRC_DIR}/visualization/vboHandler.cpp
${SRC_DIR}/visualization/mapHandler.cpp
${SRC_DIR}/visualization/context.cpp
${SRC_DIR}/dialogs/mapPluginDialog.cpp
) )
SET(H_OBJECT_FILES SET(SCHNApps_H_OBJECT_FILES
${INC_DIR}/interface/window.h ${SCHNApps_ROOT_DIR}/include/interface/window.h
${INC_DIR}/interface/system.h ${SCHNApps_ROOT_DIR}/include/interface/system.h
${INC_DIR}/visualization/view.h ${SCHNApps_ROOT_DIR}/include/interface/viewButtonArea.h
${INC_DIR}/visualization/scene.h ${SCHNApps_ROOT_DIR}/include/interface/splitArea.h
${INC_DIR}/interface/splitArea.h ${SCHNApps_ROOT_DIR}/include/visualization/view.h
${INC_DIR}/dialogs/newSceneDialog.h ${SCHNApps_ROOT_DIR}/include/visualization/scene.h
${INC_DIR}/dialogs/sceneSelector.h ${SCHNApps_ROOT_DIR}/include/dialogs/newSceneDialog.h
${INC_DIR}/interface/viewButtonArea.h ${SCHNApps_ROOT_DIR}/include/dialogs/sceneSelector.h
${INC_DIR}/dialogs/cameraViewDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraViewDialog.h
${INC_DIR}/dialogs/cameraOptionDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraOptionDialog.h
${INC_DIR}/dialogs/cameraSceneDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/cameraSceneDialog.h
${INC_DIR}/dialogs/globalCameraDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/globalCameraDialog.h
${INC_DIR}/dialogs/pluginDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/pluginDialog.h
${INC_DIR}/dialogs/linkViewDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/linkViewDialog.h
${INC_DIR}/dialogs/mapPluginDialog.h ${SCHNApps_ROOT_DIR}/include/dialogs/mapPluginDialog.h
) )
SET(FORMS_FILES file(
${FORMS_DIR}/window.ui GLOB
${FORMS_DIR}/questionSessionDialog.ui SCHNApps_FORM_FILES
${FORMS_DIR}/infoDialog.ui ${SCHNApps_ROOT_DIR}/forms/*.ui
${FORMS_DIR}/newSceneDialog.ui
${FORMS_DIR}/cameraViewDialog.ui
${FORMS_DIR}/cameraOptionDialog.ui
${FORMS_DIR}/cameraSceneDialog.ui
${FORMS_DIR}/globalCameraDialog.ui
${FORMS_DIR}/pluginDialog.ui
${FORMS_DIR}/linkViewDialog.ui
${FORMS_DIR}/mapPluginDialog.ui
) )
QT4_WRAP_UI(UI_H_FILES QT4_WRAP_UI( UI_H_FILES
${FORMS_FILES} ${SCHNApps_FORM_FILES}
) )
QT4_WRAP_CPP(MOC_FILES QT4_WRAP_CPP( MOC_FILES
${H_OBJECT_FILES} ${SCHNApps_H_OBJECT_FILES}
) )
QT4_ADD_RESOURCES(RCC_FILES QT4_ADD_RESOURCES( RCC_FILES
${RESOURCES_DIR}/resources.qrc ${SCHNApps_ROOT_DIR}/resources/resources.qrc
) )
INCLUDE_DIRECTORIES( ADD_EXECUTABLE( SCHNapps
${FORMS} ${SCHNApps_SRC_FILES}
${INC_DIR}
${INC_DIR}/interface
${INC_DIR}/visualization
${INC_DIR}/dialogs
${INC_DIR}/plugins
)
ADD_EXECUTABLE(CGoGN_plug
${SRC_FILES}
${UI_H_FILES} ${UI_H_FILES}
${MOC_FILES} ${MOC_FILES}
${RCC_FILES} ${RCC_FILES}
) )
TARGET_LINK_LIBRARIES(CGoGN_plug TARGET_LINK_LIBRARIES( SCHNapps
${CGoGN_LIBS_R} ${CGoGN_LIBS_R}
${COMMON_LIBS} ${COMMON_LIBS}
${QGLVIEWER_LIBRARIES} ${QGLVIEWER_LIBRARIES}
) )
#ADD_SUBDIRECTORY(${PLUGIN_DIR} plugins)
#ifndef _GLOBALCAMERADIALOG_H_ #ifndef _GLOBALCAMERADIALOG_H_
#define _GLOBALCAMERADIALOG_H_ #define _GLOBALCAMERADIALOG_H_
#include "ui_globalCameraDialog.h" #include "ui_globalCameraDialog.h"
#include <QListWidget> #include <QListWidget>
#include <QTreeWidget> #include <QTreeWidget>
#include <QVariant> #include <QVariant>
#include <QMenu> #include <QMenu>
#include "visualization/camera.h"
#include "camera.h" #include "visualization/view.h"
#include "view.h"
class Window; class Window;
......
#ifndef _NEWSCENEDIALOG_H_ #ifndef _NEWSCENEDIALOG_H_
#define _NEWSCENEDIALOG_H_ #define _NEWSCENEDIALOG_H_
#include "ui_newSceneDialog.h" #include "ui_newSceneDialog.h"
#include <QListWidget> #include <QListWidget>
namespace myListCameraTypes{ namespace myListCameraTypes{
enum type {view, camera,scene}; enum type {view, camera,scene};
} }
class Window; class Window;
class NewSceneDialog : public QDialog, Ui::NSDialog{ class NewSceneDialog : public QDialog, Ui::NSDialog{
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "types.h" #include "types.h"
class Plugin; class Plugin;
class Window; class Window;
......
#ifndef _SCENESELECTOR_H_ #ifndef _SCENESELECTOR_H_
#define _SCENESELECTOR_H_ #define _SCENESELECTOR_H_
#include "visualization/view.h"
#include "view.h"
#include <QDialog> #include <QDialog>
#include <QRect> #include <QRect>
class SplitArea; class SplitArea;
struct PixElem
{
struct PixElem{
View* view; View* view;
QRect rect; QRect rect;
QColor color; QColor color;
...@@ -30,12 +28,12 @@ struct PixElem{ ...@@ -30,12 +28,12 @@ struct PixElem{
}; };
class ViewPixMaps : public QList<QList<PixElem> >{ class ViewPixMaps : public QList<QList<PixElem> >
{
public: public:
typedef ViewPixMaps::iterator y_iterator; typedef ViewPixMaps::iterator y_iterator;
typedef QList<PixElem>::iterator x_iterator; typedef QList<PixElem>::iterator x_iterator;
ViewPixMaps(); ViewPixMaps();
~ViewPixMaps(); ~ViewPixMaps();
...@@ -53,7 +51,6 @@ public: ...@@ -53,7 +51,6 @@ public:
x_iterator x_begin(y_iterator y_it){return y_it->begin();} x_iterator x_begin(y_iterator y_it){return y_it->begin();}
x_iterator x_end(y_iterator y_it){return y_it->end();} x_iterator x_end(y_iterator y_it){return y_it->end();}
void beginMove(int x, int y); void beginMove(int x, int y);
void moveTmp(int x, int y); void moveTmp(int x, int y);
void confirmMove(); void confirmMove();
...@@ -80,7 +77,8 @@ protected: ...@@ -80,7 +77,8 @@ protected:
void computeSize(); void computeSize();
}; };
class ViewSelector : public QDialog { class ViewSelector : public QDialog
{
Q_OBJECT Q_OBJECT
public: public:
enum SelectorDialogType {MOVE,SELECT}; enum SelectorDialogType {MOVE,SELECT};
...@@ -98,7 +96,6 @@ public: ...@@ -98,7 +96,6 @@ public:
bool keys[3]; bool keys[3];
protected: protected:
ViewPixMaps viewPixMap; ViewPixMaps viewPixMap;
...@@ -124,6 +121,4 @@ private: ...@@ -124,6 +121,4 @@ private:
QPoint mouseToIndice(); QPoint mouseToIndice();
}; };
#endif #endif
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <QWidget> #include <QWidget>
#include <QSplashScreen> #include <QSplashScreen>
#include <unistd.h> #include <unistd.h>
#include <stdarg.h> #include <stdarg.h>
#include <iostream> #include <iostream>
...@@ -14,7 +13,6 @@ ...@@ -14,7 +13,6 @@
#include "ui_questionSessionDialog.h" #include "ui_questionSessionDialog.h"
#include "ui_infoDialog.h" #include "ui_infoDialog.h"
class Window; class Window;
class SplitArea; class SplitArea;
...@@ -53,8 +51,6 @@ namespace System{ ...@@ -53,8 +51,6 @@ namespace System{
static ERROR_CODE code; static ERROR_CODE code;
static ERROR_CODE BAD_PLUGIN_PATH_IN_FILE_f(QString file); static ERROR_CODE BAD_PLUGIN_PATH_IN_FILE_f(QString file);
static ERROR_CODE NO_PLUGIN_IN_DIR_f(QString dir); static ERROR_CODE NO_PLUGIN_IN_DIR_f(QString dir);
static ERROR_CODE PLUGIN_EXISTS_f(QString plugin); static ERROR_CODE PLUGIN_EXISTS_f(QString plugin);
...@@ -73,7 +69,6 @@ namespace System{ ...@@ -73,7 +69,6 @@ namespace System{
static ERROR_CODE OPEN_FILE_ERROR_f(QString filepath); static ERROR_CODE OPEN_FILE_ERROR_f(QString filepath);
static ERROR_CODE BAD_XML_FILE_f(QString filepath); static ERROR_CODE BAD_XML_FILE_f(QString filepath);
static void showError(QWidget* parent=0); static void showError(QWidget* parent=0);
}; };
...@@ -102,14 +97,11 @@ namespace System{ ...@@ -102,14 +97,11 @@ namespace System{
static bool savePluginsInfo(Window* window, PluginHash* pluginHash, QStringList paths); static bool savePluginsInfo(Window* window, PluginHash* pluginHash, QStringList paths);
}; };
typedef enum{GLVIEWER_IN_DOCK, SIMPLE_GLVIEWER} QGLV_CREATE_SETTINGS; typedef enum{GLVIEWER_IN_DOCK, SIMPLE_GLVIEWER} QGLV_CREATE_SETTINGS;
extern QString app_path; extern QString app_path;
extern QSplashScreen* splash; extern QSplashScreen* splash;
} }
#endif #endif
#ifndef _WINDOW_H_ #ifndef _WINDOW_H_
#define _WINDOW_H_ #define _WINDOW_H_
#include "ui_window.h" #include "ui_window.h"
#include <QVBoxLayout> #include <QVBoxLayout>
#include "mapHandler.h"
#include "Topology/generic/genericmap.h" #include "Topology/generic/genericmap.h"
#include "types.h" #include "types.h"
#include "visualization/mapHandler.h"
#include "splitArea.h" #include "interface/splitArea.h"
#include "interface/system.h"
#include "system.h"
class Scene; class Scene;
class View; class View;
...@@ -24,7 +18,6 @@ class Plugin; ...@@ -24,7 +18,6 @@ class Plugin;
class Context; class Context;
class MapHandler; class MapHandler;
class Window : public QMainWindow, Ui::Window{ class Window : public QMainWindow, Ui::Window{
Q_OBJECT Q_OBJECT
public: