Commit 236ada28 authored by Sylvain Thery's avatar Sylvain Thery

SCHNApps windows ...

parent 1011a584
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library 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 Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
\ No newline at end of file
......@@ -45,15 +45,7 @@
#include <thread>
#include <mutex>
#ifdef WIN32
//#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
//#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
......
......@@ -27,15 +27,8 @@
#include "Topology/generic/genericmap.h"
#ifdef WIN32
//#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
//#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -27,15 +27,7 @@
#include "Topology/generic/genericmap.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -28,15 +28,7 @@
#include "Topology/gmap/gmap2.h"
#include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API //__declspec(dllexport)
#else
#define CGoGN_TOPO_API //__declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -28,15 +28,8 @@
#include "Topology/gmap/gmap3.h"
#include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API //__declspec(dllexport)
#else
#define CGoGN_TOPO_API //__declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -27,15 +27,7 @@
#include "Topology/map/embeddedMap2.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -27,15 +27,8 @@
#include "Topology/map/embeddedMap3.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -28,15 +28,8 @@
#include "Topology/map/map2.h"
#include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
//#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
//#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -28,15 +28,8 @@
#include "Topology/map/map2.h"
#include "Topology/generic/mapImpl/mapMulti.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API //__declspec(dllexport)
#else
#define CGoGN_TOPO_API //__declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -28,15 +28,8 @@
#include "Topology/map/map3.h"
#include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -40,12 +40,14 @@
namespace CGoGN { namespace Utils { class GLSLShader; } }
#ifdef WIN32
#ifndef CGoGN_UTILS_API
#if defined CGoGN_QT_DLL_EXPORT
#define CGoGN_UTILS_API __declspec(dllexport)
#else
#define CGoGN_UTILS_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN
{
......
......@@ -37,7 +37,7 @@ void VBO::updateData(std::vector<T>& data)
return;
}
m_data_size = sizeof(T) / sizeof(float);
m_nbElts = data.size();
m_nbElts = uint32(data.size());
glBindBuffer(GL_ARRAY_BUFFER, *m_id);
glBufferData(GL_ARRAY_BUFFER, m_nbElts * sizeof(T), &(data[0]), GL_STREAM_DRAW);
......
......@@ -29,9 +29,7 @@
#include "glm/gtc/type_precision.hpp"
#include "Utils/GLSLShader.h"
#ifdef MAC_OSX
#include "Utils/Qt/macgl3.h"
#endif
namespace CGoGN
{
......
......@@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 2.8)
project(SCHNApps)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11")
SET( CGoGN_SLOT_DEBUG_MODE OFF CACHE BOOL "build with slot debugging mode" )
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
IF(WIN32)
......@@ -22,17 +20,15 @@ SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps)
IF(WIN32)
IF (CGoGN_WITH_QTCREATOR)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ENDIF()
# file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
# \#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
# file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
# \#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF()
......@@ -90,15 +86,20 @@ FILE(STRINGS ${CGoGN_SRC_DIR}/include/cgogn_ext_libs.h EXT_LIBS)
LIST(APPEND EXT_LIBS PythonQt ${PYTHON_LIBRARIES})
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
endif(CMAKE_COMPILER_IS_GNUCXX)
LIST(APPEND CMAKE_CXX_FLAGS "-Wno-unused-local-typedefs")
endif()
if(WIN32)
LIST(APPEND CMAKE_CXX_FLAGS "/W3")
else()
LIST(APPEND CMAKE_CXX_FLAGS "-Wall -fPIC -std=c++11")
if(APPLE)
LIST(APPEND CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-overloaded-virtual")
endif()
endif()
......@@ -107,11 +108,11 @@ INCLUDE_DIRECTORIES(
${CGoGN_ROOT_DIR}/ThirdParty/PythonQt/src/
${SCHNApps_ROOT_DIR}/include
${EXT_INCLUDES}
# ${CMAKE_CURRENT_SOURCE_DIR}
# ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/Plugins/schnapps/
${CMAKE_CURRENT_BINARY_DIR}/SCHNAppsLib
)
ADD_SUBDIRECTORY(${SCHNApps_ROOT_DIR}/Plugins/schnapps/ SCHNAppsLib)
ADD_SUBDIRECTORY(${SCHNApps_ROOT_DIR}/Plugins Plugins)
INCLUDE_DIRECTORIES(
......@@ -124,8 +125,6 @@ file(
GLOB_RECURSE
SCHNApps_FILES
${SCHNApps_ROOT_DIR}/src/main.cpp
# ${SCHNApps_ROOT_DIR}/include/*.h
# ${SCHNApps_ROOT_DIR}/include/*.hpp
)
ADD_EXECUTABLE( SCHNApps
......
cmake_minimum_required(VERSION 2.8)
ADD_SUBDIRECTORY(schnapps)
ADD_SUBDIRECTORY(surface_import)
ADD_SUBDIRECTORY(surface_render)
ADD_SUBDIRECTORY(surface_renderVector)
......
......@@ -7,6 +7,12 @@ if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
endif()
IF(WIN32 AND (NOT(CGoGN_WITH_QTCREATOR)))
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
ADD_LIBRARY( ${PLUGIN_NAME} SHARED
${PLUGIN_FILES}
${PLUGIN_UIC_FILES}
......@@ -19,7 +25,5 @@ TARGET_LINK_LIBRARIES( ${PLUGIN_NAME}
${EXT_LIBS}
)
#ADD_DEPENDENCIES( ${PLUGIN_NAME} SCHNAppsLib )
cmake_minimum_required(VERSION 2.8)
IF(WIN32)
project(SCHNAppsLib)
IF(WIN32 AND (NOT (CGoGN_WITH_QTCREATOR)))
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/${ConfigurationName}\" )
ELSE()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
ENDIF()
# SCHNApps files to compile in a lib for dll access from plugins
file(
GLOB_RECURSE
......
......@@ -69,11 +69,11 @@ public:
virtual void drawMap(View* view, MapHandlerGen* map) {}
virtual void keyPress(View* view, QKeyEvent* event);
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void mousePress(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* , QMouseEvent* ) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* view, QMouseEvent* event);
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -51,12 +51,12 @@ public:
virtual void draw(View *view);
virtual void drawMap(View* view, MapHandlerGen* map);
virtual void keyPress(View* view, QKeyEvent* event) {}
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void keyPress(View* , QKeyEvent* ) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* view, QMouseEvent* event);
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseMove(View* view, QMouseEvent* event) {}
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* , QMouseEvent* ) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -74,12 +74,12 @@ private:
virtual void draw(View *view) {}
virtual void drawMap(View* view, MapHandlerGen* map);
virtual void keyPress(View* view, QKeyEvent* event) {}
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void mousePress(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseMove(View* view, QMouseEvent* event) {}
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void keyPress(View* , QKeyEvent* ) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* , QMouseEvent* ) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* , QMouseEvent* ) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -57,12 +57,12 @@ public:
virtual void draw(View *view) {}
virtual void drawMap(View* view, MapHandlerGen* map);
virtual void keyPress(View* view, QKeyEvent* event) {}
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void mousePress(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseMove(View* view, QMouseEvent* event) {}
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void keyPress(View* , QKeyEvent* ) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* , QMouseEvent* ) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* , QMouseEvent* ) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -71,12 +71,12 @@ public:
virtual void draw(View *view) {}
virtual void drawMap(View* view, MapHandlerGen* map);
virtual void keyPress(View* view, QKeyEvent* event) {}
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void mousePress(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseMove(View* view, QMouseEvent* event) {}
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void keyPress(View* , QKeyEvent* ) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* , QMouseEvent* ) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* , QMouseEvent* ) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -44,12 +44,12 @@ public:
virtual void draw(View *view) {}
virtual void drawMap(View* view, MapHandlerGen* map);
virtual void keyPress(View* view, QKeyEvent* event) {}
virtual void keyRelease(View* view, QKeyEvent* event) {}
virtual void mousePress(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseMove(View* view, QMouseEvent* event) {}
virtual void wheelEvent(View* view, QWheelEvent* event) {}
virtual void keyPress(View* , QKeyEvent* ) {}
virtual void keyRelease(View* , QKeyEvent* ) {}
virtual void mousePress(View* , QMouseEvent* ) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* , QMouseEvent* ) {}
virtual void wheelEvent(View* , QWheelEvent* ) {}
virtual void viewLinked(View *view) {}
virtual void viewUnlinked(View *view) {}
......
......@@ -53,7 +53,7 @@ public:
virtual void keyPress(View* view, QKeyEvent* event);
virtual void keyRelease(View* view, QKeyEvent* event);
virtual void mousePress(View* view, QMouseEvent* event);
virtual void mouseRelease(View* view, QMouseEvent* event) {}
virtual void mouseRelease(View* , QMouseEvent* ) {}
virtual void mouseMove(View* view, QMouseEvent* event);
virtual void wheelEvent(View* view, QWheelEvent* event);
......
......@@ -90,7 +90,7 @@ public:
inline const std::vector<CELL>& getSelectedCells() { return m_cells; }
inline unsigned int getNbSelectedCells() const { return m_cells.size(); }
inline unsigned int getNbSelectedCells() const { return (unsigned int)(m_cells.size()); }
inline void select(CELL c, bool emitSignal = true)
{
......
......@@ -661,17 +661,17 @@ void View::selectedMapChanged(MapHandlerGen* prev, MapHandlerGen* cur)
updateGL();
}
void View::ui_verticalSplitView(int x, int y, int globalX, int globalY)
void View::ui_verticalSplitView(int x, int y, int /*globalX*/, int /*globalY*/)
{
m_schnapps->splitView(m_name, Qt::Horizontal);
}
void View::ui_horizontalSplitView(int x, int y, int globalX, int globalY)
void View::ui_horizontalSplitView(int x, int y, int /*globalX*/, int /*globalY*/)
{
m_schnapps->splitView(m_name, Qt::Vertical);
}
void View::ui_closeView(int x, int y, int globalX, int globalY)
void View::ui_closeView(int x, int y, int /*globalX*/, int /*globalY*/)
{
m_schnapps->removeView(m_name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment