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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Etienne Schmitt
CGoGN
Commits
54603ff0
Commit
54603ff0
authored
Jan 28, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: add some slots / import return mapHandler
parent
261883ed
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35 additions
and
6 deletions
+35
-6
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+1
-0
SCHNApps/Plugins/importSurface/importSurface.cpp
SCHNApps/Plugins/importSurface/importSurface.cpp
+2
-1
SCHNApps/Plugins/importSurface/importSurface.h
SCHNApps/Plugins/importSurface/importSurface.h
+1
-1
SCHNApps/Plugins/importVolume/importVolume.cpp
SCHNApps/Plugins/importVolume/importVolume.cpp
+2
-1
SCHNApps/Plugins/importVolume/importVolume.h
SCHNApps/Plugins/importVolume/importVolume.h
+1
-1
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+1
-0
SCHNApps/bin/init.py
SCHNApps/bin/init.py
+10
-0
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+4
-0
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+5
-1
SCHNApps/include/view.h
SCHNApps/include/view.h
+4
-0
SCHNApps/src/main.cpp
SCHNApps/src/main.cpp
+4
-1
No files found.
SCHNApps/Debug/CMakeLists.txt
View file @
54603ff0
...
...
@@ -38,6 +38,7 @@ SET(SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/mapHandler.h
${
SCHNApps_ROOT_DIR
}
/include/plugin.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/camerasDialog.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/pluginsDialog.h
...
...
SCHNApps/Plugins/importSurface/importSurface.cpp
View file @
54603ff0
...
...
@@ -15,7 +15,7 @@ bool ImportSurfacePlugin::enable()
return
true
;
}
void
ImportSurfacePlugin
::
importFromFile
(
const
QString
&
fileName
)
MapHandlerGen
*
ImportSurfacePlugin
::
importFromFile
(
const
QString
&
fileName
)
{
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
...
...
@@ -43,6 +43,7 @@ void ImportSurfacePlugin::importFromFile(const QString& fileName)
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
return
mhg
;
}
}
...
...
SCHNApps/Plugins/importSurface/importSurface.h
View file @
54603ff0
...
...
@@ -35,7 +35,7 @@ public:
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
public
slots
:
void
importFromFile
(
const
QString
&
fileName
);
MapHandlerGen
*
importFromFile
(
const
QString
&
fileName
);
void
importFromFileDialog
();
private:
...
...
SCHNApps/Plugins/importVolume/importVolume.cpp
View file @
54603ff0
...
...
@@ -15,7 +15,7 @@ bool ImportVolumePlugin::enable()
return
true
;
}
void
ImportVolumePlugin
::
importFromFile
(
const
QString
&
fileName
)
MapHandlerGen
*
ImportVolumePlugin
::
importFromFile
(
const
QString
&
fileName
)
{
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
...
...
@@ -43,6 +43,7 @@ void ImportVolumePlugin::importFromFile(const QString& fileName)
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
return
mhg
;
}
}
...
...
SCHNApps/Plugins/importVolume/importVolume.h
View file @
54603ff0
...
...
@@ -35,7 +35,7 @@ public:
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
public
slots
:
void
importFromFile
(
const
QString
&
fileName
);
MapHandlerGen
*
importFromFile
(
const
QString
&
fileName
);
void
importFromFileDialog
();
private:
...
...
SCHNApps/Release/CMakeLists.txt
View file @
54603ff0
...
...
@@ -37,6 +37,7 @@ file(
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/mapHandler.h
${
SCHNApps_ROOT_DIR
}
/include/plugin.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/dialogs/camerasDialog.h
...
...
SCHNApps/bin/init.py
0 → 100644
View file @
54603ff0
importPlugin
=
schnapps
.
loadPlugin
(
"ImportSurfacePlugin"
);
differentialPropertiesPlugin
=
schnapps
.
loadPlugin
(
"DifferentialPropertiesPlugin"
);
renderPlugin
=
schnapps
.
loadPlugin
(
"RenderPlugin"
);
hand
=
importPlugin
.
importFromFile
(
"/home/kraemer/Media/Data/surface/midRes/handman_12k.off"
);
v
=
schnapps
.
getView
(
"view_0"
);
schnapps
.
linkViewAndPlugin
(
v
.
getName
(),
renderPlugin
.
getName
());
schnapps
.
linkViewAndMap
(
v
.
getName
(),
hand
.
getName
());
SCHNApps/include/mapHandler.h
View file @
54603ff0
...
...
@@ -29,6 +29,9 @@ public:
virtual
~
MapHandlerGen
();
const
QString
&
getName
()
const
{
return
m_name
;
}
public
slots
:
QString
getName
()
{
return
m_name
;
}
void
setName
(
const
QString
&
name
)
{
m_name
=
name
;
}
Window
*
getWindow
()
const
{
return
m_window
;
}
...
...
@@ -42,6 +45,7 @@ public:
bool
isUsed
()
const
{
return
!
l_views
.
empty
();
}
public:
void
draw
(
Utils
::
GLSLShader
*
shader
,
int
primitive
)
{
m_render
->
draw
(
shader
,
primitive
);
}
/*********************************************************
...
...
SCHNApps/include/plugin.h
View file @
54603ff0
...
...
@@ -16,12 +16,16 @@ class Window;
class
Plugin
:
public
QObject
{
Q_OBJECT
public:
Plugin
();
virtual
~
Plugin
();
const
QString
&
getName
()
const
{
return
m_name
;
}
public
slots
:
const
QString
&
getName
()
{
return
m_name
;
}
QString
getName
()
{
return
m_name
;
}
void
setName
(
const
QString
&
name
)
{
m_name
=
name
;
}
const
QString
&
getFilePath
()
{
return
m_filePath
;
}
...
...
SCHNApps/include/view.h
View file @
54603ff0
...
...
@@ -32,6 +32,9 @@ public:
~
View
();
const
QString
&
getName
()
const
{
return
m_name
;
}
public
slots
:
QString
getName
()
{
return
m_name
;
}
void
setName
(
const
QString
&
name
)
{
m_name
=
name
;
}
Window
*
getWindow
()
const
{
return
m_window
;
}
...
...
@@ -39,6 +42,7 @@ public:
bool
isCurrentView
()
const
{
return
m_window
->
getCurrentView
()
==
this
;
}
public:
virtual
void
init
();
virtual
void
preDraw
();
virtual
void
draw
();
...
...
SCHNApps/src/main.cpp
View file @
54603ff0
#include <QSplashScreen>
#include <QFileInfo>
#include "PythonQt/PythonQt.h"
#include "PythonQt/gui/PythonQtScriptingConsole.h"
#include "window.h"
...
...
@@ -29,7 +30,9 @@ int main(int argc, char* argv[])
schnapps
.
show
();
pythonContext
.
addObject
(
"schnapps"
,
&
schnapps
);
pythonContext
.
evalFile
(
app
.
applicationDirPath
()
+
QString
(
"/init.py"
));
QFileInfo
fi
(
app
.
applicationDirPath
()
+
QString
(
"/init.py"
));
if
(
fi
.
exists
())
pythonContext
.
evalFile
(
fi
.
filePath
());
splash
->
finish
(
&
schnapps
);
delete
splash
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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