Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
11eb2e3d
Commit
11eb2e3d
authored
Jan 21, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PythonSCHNApps is coming..
parent
170fedde
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
52 additions
and
178 deletions
+52
-178
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+6
-0
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+4
-1
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
+0
-2
SCHNApps/Plugins/importSurface/CMakeLists.txt
SCHNApps/Plugins/importSurface/CMakeLists.txt
+0
-2
SCHNApps/Plugins/render/CMakeLists.txt
SCHNApps/Plugins/render/CMakeLists.txt
+0
-2
SCHNApps/Plugins/renderVector/CMakeLists.txt
SCHNApps/Plugins/renderVector/CMakeLists.txt
+0
-2
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
+0
-2
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+4
-1
SCHNApps/build/python/setup.py
SCHNApps/build/python/setup.py
+0
-16
SCHNApps/build/python/window_py.cpp
SCHNApps/build/python/window_py.cpp
+0
-17
SCHNApps/deprecated/system.cpp
SCHNApps/deprecated/system.cpp
+0
-25
SCHNApps/deprecated/system.h
SCHNApps/deprecated/system.h
+0
-29
SCHNApps/deprecated/vboHandler.cpp
SCHNApps/deprecated/vboHandler.cpp
+0
-0
SCHNApps/deprecated/vboHandler.h
SCHNApps/deprecated/vboHandler.h
+0
-29
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+2
-2
SCHNApps/include/types.h
SCHNApps/include/types.h
+3
-3
SCHNApps/include/window.h
SCHNApps/include/window.h
+7
-10
SCHNApps/main.py
SCHNApps/main.py
+0
-14
SCHNApps/src/dialogs/pluginsDialog.cpp
SCHNApps/src/dialogs/pluginsDialog.cpp
+2
-2
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+20
-7
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+4
-12
No files found.
SCHNApps/CMakeLists.txt
View file @
11eb2e3d
...
@@ -21,8 +21,14 @@ find_package(Qt4 REQUIRED)
...
@@ -21,8 +21,14 @@ find_package(Qt4 REQUIRED)
find_package
(
QGLViewer REQUIRED
)
find_package
(
QGLViewer REQUIRED
)
#=======Python=========#
find_package
(
PythonLibs REQUIRED
)
#======SCHNApps=======#
#======SCHNApps=======#
SET
(
SCHNApps_ROOT_DIR
${
CGoGN_ROOT_DIR
}
/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
)
SET
(
LIBRARY_OUTPUT_PATH
${
SCHNApps_ROOT_DIR
}
/lib
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Release Release
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/Release Release
)
...
...
SCHNApps/Debug/CMakeLists.txt
View file @
11eb2e3d
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
PYTHON_INCLUDE_DIRS
}
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/include
)
)
file
(
file
(
GLOB
GLOB
SCHNApps_SRC_FILES
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
)
)
ADD_
LIBRARY
(
SCHNAppsD SHARE
D
ADD_
EXECUTABLE
(
SCHNApps
D
${
SCHNApps_SRC_FILES
}
${
SCHNApps_SRC_FILES
}
${
UI_H_FILES
}
${
UI_H_FILES
}
${
MOC_FILES
}
${
MOC_FILES
}
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNAppsD
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNAppsD
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
PythonQt
)
)
...
...
SCHNApps/Plugins/differentialProperties/CMakeLists.txt
View file @
11eb2e3d
...
@@ -43,7 +43,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -43,7 +43,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPluginD
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
@@ -71,7 +70,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -71,7 +70,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPlugin
TARGET_LINK_LIBRARIES
(
DifferentialPropertiesPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/importSurface/CMakeLists.txt
View file @
11eb2e3d
...
@@ -34,7 +34,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -34,7 +34,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
ImportSurfacePluginD
TARGET_LINK_LIBRARIES
(
ImportSurfacePluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
@@ -62,7 +61,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -62,7 +61,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
ImportSurfacePlugin
TARGET_LINK_LIBRARIES
(
ImportSurfacePlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/render/CMakeLists.txt
View file @
11eb2e3d
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
RenderPluginD
TARGET_LINK_LIBRARIES
(
RenderPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
RenderPlugin
TARGET_LINK_LIBRARIES
(
RenderPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/renderVector/CMakeLists.txt
View file @
11eb2e3d
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
RenderVectorPluginD
TARGET_LINK_LIBRARIES
(
RenderVectorPluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
RenderVectorPlugin
TARGET_LINK_LIBRARIES
(
RenderVectorPlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Plugins/subdivideSurface/CMakeLists.txt
View file @
11eb2e3d
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -38,7 +38,6 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePluginD
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePluginD
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_D
}
${
CGoGN_LIBS_D
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
...
@@ -66,7 +65,6 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
)
)
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePlugin
TARGET_LINK_LIBRARIES
(
SubdivideSurfacePlugin
${
LIBRARY_OUTPUT_PATH
}
/libSCHNApps.so
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
QGLVIEWER_LIBRARIES
}
...
...
SCHNApps/Release/CMakeLists.txt
View file @
11eb2e3d
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
...
@@ -14,12 +14,14 @@ INCLUDE_DIRECTORIES(
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
QGLVIEWER_INCLUDE_DIR
}
${
PYTHON_INCLUDE_DIRS
}
${
SCHNApps_ROOT_DIR
}
/include
${
SCHNApps_ROOT_DIR
}
/include
)
)
file
(
file
(
GLOB
GLOB
SCHNApps_SRC_FILES
SCHNApps_SRC_FILES
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/camera.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
...
@@ -68,7 +70,7 @@ QT4_ADD_RESOURCES( RCC_FILES
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
${
SCHNApps_ROOT_DIR
}
/resources/resources.qrc
)
)
ADD_
LIBRARY
(
SCHNApps SHARED
ADD_
EXECUTABLE
(
SCHNApps
${
SCHNApps_SRC_FILES
}
${
SCHNApps_SRC_FILES
}
${
UI_H_FILES
}
${
UI_H_FILES
}
${
MOC_FILES
}
${
MOC_FILES
}
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNApps
...
@@ -79,6 +81,7 @@ TARGET_LINK_LIBRARIES( SCHNApps
${
CGoGN_LIBS_R
}
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
COMMON_LIBS
}
${
QGLVIEWER_LIBRARIES
}
${
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_
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
#define _PLUGIN_H_
#include <Qt
Core/Qt
Plugin>
#include <QtPlugin>
#include <Q
tGui/Q
Action>
#include <QAction>
#include "types.h"
#include "types.h"
...
...
SCHNApps/include/types.h
View file @
11eb2e3d
#ifndef _TYPES_H_
#ifndef _TYPES_H_
#define _TYPES_H_
#define _TYPES_H_
#include <Q
tCore/Q
Hash>
#include <QHash>
#include <Q
tCore/Q
Map>
#include <QMap>
#include <Q
tCore/Q
String>
#include <QString>
#include "Topology/generic/parameters.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap2.h"
...
...
SCHNApps/include/window.h
View file @
11eb2e3d
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include "ui_window.h"
#include "ui_window.h"
#include "PythonQt/PythonQt.h"
#include "types.h"
#include "types.h"
class
QVBoxLayout
;
class
QVBoxLayout
;
...
@@ -29,9 +30,7 @@ public:
...
@@ -29,9 +30,7 @@ public:
* \fn Window()
* \fn Window()
* \brief Constructor
* \brief Constructor
*/
*/
Window
();
Window
(
const
QString
&
appPath
,
PythonQtObjectPtr
&
pythonContext
);
Window
(
const
Window
&
w
);
/**
/**
* \fn ~Window()
* \fn ~Window()
...
@@ -39,11 +38,6 @@ public:
...
@@ -39,11 +38,6 @@ public:
*/
*/
~
Window
();
~
Window
();
void
launch
()
{
this
->
QMainWindow
::
show
();
}
const
QString
&
getAppPath
()
{
return
m_appPath
;
}
const
QString
&
getAppPath
()
{
return
m_appPath
;
}
/*********************************************************
/*********************************************************
...
@@ -206,8 +200,7 @@ public:
...
@@ -206,8 +200,7 @@ public:
* \see getPlugins()
* \see getPlugins()
* \see Plugin::enable()
* \see Plugin::enable()
*/
*/
Plugin
*
loadPlugin
(
const
QString
&
pluginFilePath
);
// Plugin* loadPlugin(const QString& pluginFilePath);
void
loadPlugin_py
(
std
::
string
path
);
/**
/**
* \fn void unloadPlugin(QString pluginName)
* \fn void unloadPlugin(QString pluginName)
...
@@ -274,6 +267,7 @@ public:
...
@@ -274,6 +267,7 @@ public:
protected:
protected:
QString
m_appPath
;
QString
m_appPath
;
PythonQtObjectPtr
&
m_pythonContext
;
bool
m_initialization
;
bool
m_initialization
;
...
@@ -299,6 +293,9 @@ protected:
...
@@ -299,6 +293,9 @@ protected:
MapsDialog
*
m_mapsDialog
;
MapsDialog
*
m_mapsDialog
;
public
slots
:
public
slots
:
Plugin
*
loadPlugin
(
const
QString
&
pluginFilePath
);
/**
/**
* \fn void cb_about_SCHNApps();
* \fn void cb_about_SCHNApps();
* \brief function that is called when the "about SCHNApps" menu action is triggered
* \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) :
...
@@ -43,7 +43,7 @@ PluginsDialog::PluginsDialog(Window* window) :
// restoreState();
// restoreState();
addPluginsDirectory
(
m_window
->
getAppPath
()
+
QString
(
"/lib/"
));
addPluginsDirectory
(
m_window
->
getAppPath
()
+
QString
(
"
..
/lib/"
));
init
=
false
;
init
=
false
;
}
}
...
@@ -231,7 +231,7 @@ void PluginsDialog::cb_addPluginsDirectory()
...
@@ -231,7 +231,7 @@ void PluginsDialog::cb_addPluginsDirectory()
QString
dir
=
QFileDialog
::
getExistingDirectory
(
QString
dir
=
QFileDialog
::
getExistingDirectory
(
this
,
this
,
tr
(
"Select a directory"
),
tr
(
"Select a directory"
),
m_window
->
getAppPath
()
+
QString
(
"/lib/"
),
m_window
->
getAppPath
()
+
QString
(
"
..
/lib/"
),
QFileDialog
::
ShowDirsOnly
|
QFileDialog
::
DontResolveSymlinks
QFileDialog
::
ShowDirsOnly
|
QFileDialog
::
DontResolveSymlinks
);
);
...
...
SCHNApps/src/main.cpp
View file @
11eb2e3d
#include <QSplashScreen>
#include <QSplashScreen>
#include "PythonQt/PythonQt.h"
#include "PythonQt/PythonQtScriptingConsole.h"
#include "window.h"
#include "window.h"
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
QApplication
app
(
argc
,
argv
);
QApplication
app
(
argc
,
argv
);
//
QSplashScreen* splash = new QSplashScreen(QPixmap(":splash/cgogn/splash.png"));
QSplashScreen
*
splash
=
new
QSplashScreen
(
QPixmap
(
":splash/cgogn/splash.png"
));
//
splash->show();
splash
->
show
();
//
splash->showMessage("Welcome to SCHNApps", Qt::AlignBottom | Qt::AlignCenter);
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
();
window
.
show
();
// splash->finish(&window);
pythonContext
.
addObject
(
"window"
,
&
window
);
// delete splash;
splash
->
finish
(
&
window
);
delete
splash
;
PythonQtScriptingConsole
pythonConsole
(
NULL
,
pythonContext
);
pythonConsole
.
show
();
return
app
.
exec
();
return
app
.
exec
();
}
}
SCHNApps/src/window.cpp
View file @
11eb2e3d
...
@@ -26,9 +26,10 @@ namespace CGoGN
...
@@ -26,9 +26,10 @@ namespace CGoGN
namespace
SCHNApps
namespace
SCHNApps
{
{
Window
::
Window
()
:
Window
::
Window
(
const
QString
&
appPath
,
PythonQtObjectPtr
&
pythonContext
)
:
QMainWindow
(),
QMainWindow
(),
m_appPath
(
"/home/kraemer/Dev/CGoGN/SCHNApps"
),
m_appPath
(
appPath
),
m_pythonContext
(
pythonContext
),
m_firstView
(
NULL
),
m_firstView
(
NULL
),
m_currentView
(
NULL
)
m_currentView
(
NULL
)
{
{
...
@@ -80,11 +81,8 @@ Window::Window() :
...
@@ -80,11 +81,8 @@ Window::Window() :
// program in its initialization phase
// program in its initialization phase
m_initialization
=
false
;
m_initialization
=
false
;
}
Window
::
Window
(
const
Window
&
w
)
m_pythonContext
.
addObject
(
"dock"
,
m_dock
);
{
std
::
cout
<<
"hiohoihoih"
<<
std
::
endl
;
}
}
Window
::~
Window
()
Window
::~
Window
()
...
@@ -466,12 +464,6 @@ Plugin* Window::loadPlugin(const QString& pluginFilePath)
...
@@ -466,12 +464,6 @@ Plugin* Window::loadPlugin(const QString& pluginFilePath)
}
}
}
}
void
Window
::
loadPlugin_py
(
std
::
string
path
)
{