Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Cazier
CGoGN
Commits
11eb2e3d
Commit
11eb2e3d
authored
Jan 21, 2013
by
Pierre Kraemer
Browse files
PythonSCHNApps is coming..
parent
170fedde
Changes
21
Hide whitespace changes
Inline
Side-by-side
SCHNApps/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -21,8 +21,14 @@ find_package(Qt4 REQUIRED)
find_package
(
QGLViewer REQUIRED
)
#=======Python=========#
find_package
(
PythonLibs REQUIRED
)
#======SCHNApps=======#
SET
(
SCHNApps_ROOT_DIR
${
CGoGN_ROOT_DIR
}
/SCHNApps
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
SCHNApps_ROOT_DIR
}
/bin
)
SET
(
LIBRARY_OUTPUT_PATH
${
SCHNApps_ROOT_DIR
}
/lib
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Release Release
)
...
...
SCHNApps/Debug/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
PYTHON_INCLUDE_DIRS
}
${
SCHNApps_ROOT_DIR
}
/include
)
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
...
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
)
ADD_
LIBRARY
(
SCHNAppsD
SHARED
ADD_
EXECUTABLE
(
SCHNAppsD
${
SCHNApps_SRC_FILES
}
${
UI_H_FILES
}
${
MOC_FILES
}
...
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNAppsD
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
PythonQt
)
...
...
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -43,7 +43,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
@@ -71,7 +70,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/importSurface/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -34,7 +34,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
ImportSurfacePluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
@@ -62,7 +61,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
ImportSurfacePlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/render/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
RenderPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
RenderPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/renderVector/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
RenderVectorPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
RenderVectorPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Release/CMakeLists.txt
View file @
11eb2e3d
...
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
PYTHON_INCLUDE_DIRS
}
${
SCHNApps_ROOT_DIR
}
/include
)
file
(
GLOB
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
...
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
)
ADD_
LIBRARY
(
SCHNApps
SHARED
ADD_
EXECUTABLE
(
SCHNApps
${
SCHNApps_SRC_FILES
}
${
UI_H_FILES
}
${
MOC_FILES
}
...
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNApps
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
PythonQt
)
...
...
SCHNApps/build/python/setup.py
deleted
100644 → 0
View file @
170fedde
from
distutils.core
import
setup
,
Extension
ext
=
Extension
(
'PySCHNApps'
,
library_dirs
=
[
'/usr/lib'
,
'usr/local/lib'
,
'../../lib'
],
libraries
=
[
'python2.7'
,
'boost_python-py27'
,
'SCHNApps'
],
include_dirs
=
[
'../../include'
,
'../../build/Release'
,
'../../../include'
,
'/usr/include/qt4'
,
'/usr/include/libxml2'
],
sources
=
[
'window_py.cpp'
]
)
setup
(
name
=
'PySCHNApps'
,
version
=
'1.0'
,
description
=
'SCHNApps from Python'
,
ext_modules
=
[
ext
]
)
SCHNApps/build/python/window_py.cpp
deleted
100644 → 0
View file @
170fedde
#include
<boost/python.hpp>
#include
<boost/python/module.hpp>
#include
<boost/python/def.hpp>
#include
"plugin.h"
#include
"window.h"
using
namespace
boost
::
python
;
BOOST_PYTHON_MODULE
(
PySCHNApps
)
{
class_
<
CGoGN
::
SCHNApps
::
Window
>
(
"Window"
)
.
def
(
init
<>
())
.
def
(
"launch"
,
&
CGoGN
::
SCHNApps
::
Window
::
launch
)
.
def
(
"loadPlugin"
,
&
CGoGN
::
SCHNApps
::
Window
::
loadPlugin_py
)
;
}
SCHNApps/deprecated/system.cpp
deleted
100644 → 0
View file @
170fedde
#include
"system.h"
#include
<QErrorMessage>
#include
<QMessageBox>
#include
<QFileInfo>
#include
<QUrl>
#include
<QVBoxLayout>
#include
<QTextBrowser>
namespace
CGoGN
{
namespace
SCHNApps
{
namespace
System
{
}
// namespace System
}
// namespace SCHNApps
}
// namespace CGoGN
SCHNApps/deprecated/system.h
deleted
100644 → 0
View file @
170fedde
#ifndef _SYSTEM_H_
#define _SYSTEM_H_
#include
<QWidget>
#include
<QSplashScreen>
#include
"types.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
SplitArea
;
namespace
System
{
}
// namespace System
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/deprecated/vboHandler.cpp
deleted
100644 → 0
View file @
170fedde
SCHNApps/deprecated/vboHandler.h
deleted
100644 → 0
View file @
170fedde
#ifndef _VBOHANDLER_H_
#define _VBOHANDLER_H_
#include
"Utils/vbo.h"
class
VBOHandler
{
public:
VBOHandler
(
const
QString
&
name
,
CGoGN
::
Utils
::
VBO
*
vbo
)
:
m_name
(
name
),
m_vbo
(
vbo
)
{}
~
VBOHandler
()
{
delete
m_vbo
;
}
const
QString
&
getName
()
{
return
m_name
;
}
void
setName
(
const
QString
&
name
)
{
m_name
=
name
;
}
CGoGN
::
Utils
::
VBO
*
getVBO
()
{
return
m_vbo
;
}
protected:
QString
m_name
;
CGoGN
::
Utils
::
VBO
*
m_vbo
;
};
#endif
SCHNApps/include/plugin.h
View file @
11eb2e3d
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
#include
<
QtCore/
QtPlugin>
#include
<
QtGui/
QAction>
#include
<QtPlugin>
#include
<QAction>
#include
"types.h"
...
...
SCHNApps/include/types.h
View file @
11eb2e3d
#ifndef _TYPES_H_
#define _TYPES_H_
#include
<
QtCore/
QHash>
#include
<
QtCore/
QMap>
#include
<
QtCore/
QString>
#include
<QHash>
#include
<QMap>
#include
<QString>
#include
"Topology/generic/parameters.h"
#include
"Topology/map/embeddedMap2.h"
...
...
SCHNApps/include/window.h
View file @
11eb2e3d
...
...
@@ -3,6 +3,7 @@
#include
"ui_window.h"
#include
"PythonQt/PythonQt.h"
#include
"types.h"
class
QVBoxLayout
;
...
...
@@ -29,9 +30,7 @@ public:
* \fn Window()
* \brief Constructor
*/
Window
();
Window
(
const
Window
&
w
);
Window
(
const
QString
&
appPath
,
PythonQtObjectPtr
&
pythonContext
);
/**
* \fn ~Window()
...
...
@@ -39,11 +38,6 @@ public:
*/
~
Window
();
void
launch
()
{
this
->
QMainWindow
::
show
();
}
const
QString
&
getAppPath
()
{
return
m_appPath
;
}
/*********************************************************
...
...
@@ -206,8 +200,7 @@ public:
* \see getPlugins()
* \see Plugin::enable()
*/
Plugin
*
loadPlugin
(
const
QString
&
pluginFilePath
);
void
loadPlugin_py
(
std
::
string
path
);
// Plugin* loadPlugin(const QString& pluginFilePath);
/**
* \fn void unloadPlugin(QString pluginName)
...
...
@@ -274,6 +267,7 @@ public:
protected:
QString
m_appPath
;
PythonQtObjectPtr
&
m_pythonContext
;
bool
m_initialization
;
...
...
@@ -299,6 +293,9 @@ protected:
MapsDialog
*
m_mapsDialog
;
public
slots
:
Plugin
*
loadPlugin
(
const
QString
&
pluginFilePath
);
/**
* \fn void cb_about_SCHNApps();
* \brief function that is called when the "about SCHNApps" menu action is triggered
...
...
SCHNApps/main.py
deleted
100644 → 0
View file @
170fedde
import
sys
from
PyQt4
import
QtGui
import
PySCHNApps
if
__name__
==
'__main__'
:
app
=
QtGui
.
QApplication
(
sys
.
argv
)
window
=
PySCHNApps
.
Window
()
window
.
launch
()
# window.loadPlugin("/home/kraemer/Dev/CGoGN/SCHNApps/lib/libRenderPlugin.so")
sys
.
exit
(
app
.
exec_
())
SCHNApps/src/dialogs/pluginsDialog.cpp
View file @
11eb2e3d
...
...
@@ -43,7 +43,7 @@ PluginsDialog::PluginsDialog(Window* window) :
// restoreState();
addPluginsDirectory
(
m_window
->
getAppPath
()
+
QString
(
"/lib/"
));
addPluginsDirectory
(
m_window
->
getAppPath
()
+
QString
(
"
..
/lib/"
));
init
=
false
;
}
...
...
@@ -231,7 +231,7 @@ void PluginsDialog::cb_addPluginsDirectory()
QString
dir
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Select a directory"
),
m_window
->
getAppPath
()
+
QString
(
"/lib/"
),
m_window
->
getAppPath
()
+
QString
(
"
..
/lib/"
),
QFileDialog
::
ShowDirsOnly
|
QFileDialog
::
DontResolveSymlinks
);
...
...
SCHNApps/src/main.cpp
View file @
11eb2e3d
#include
<QSplashScreen>
#include
"PythonQt/PythonQt.h"
#include
"PythonQt/PythonQtScriptingConsole.h"
#include
"window.h"
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
app
(
argc
,
argv
);
//
QSplashScreen* splash = new QSplashScreen(QPixmap(":splash/cgogn/splash.png"));
//
splash->show();
//
splash->showMessage("Welcome to SCHNApps", Qt::AlignBottom | Qt::AlignCenter);
QSplashScreen
*
splash
=
new
QSplashScreen
(
QPixmap
(
":splash/cgogn/splash.png"
));
splash
->
show
();
splash
->
showMessage
(
"Welcome to SCHNApps"
,
Qt
::
AlignBottom
|
Qt
::
AlignCenter
);
CGoGN
::
SCHNApps
::
Window
window
(
app
.
applicationDirPath
());
// init PythonQt and Python itself
PythonQt
::
init
();
// get a smart pointer to the __main__ module of the Python interpreter
PythonQtObjectPtr
pythonContext
=
PythonQt
::
self
()
->
getMainModule
();
CGoGN
::
SCHNApps
::
Window
window
(
app
.
applicationDirPath
(),
pythonContext
);
window
.
show
();
// splash->finish(&window);
// delete splash;
pythonContext
.
addObject
(
"window"
,
&
window
);
splash
->
finish
(
&
window
);
delete
splash
;
PythonQtScriptingConsole
pythonConsole
(
NULL
,
pythonContext
);
pythonConsole
.
show
();
return
app
.
exec
();
}
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment