Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Hurstel
CGoGN
Commits
b1faeed4
Commit
b1faeed4
authored
Jan 28, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: more signal/slot connection for plugins
parent
4f88ae92
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
76 additions
and
74 deletions
+76
-74
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
...s/differentialProperties/include/differentialProperties.h
+0
-4
SCHNApps/Plugins/importSurface/importSurface.h
SCHNApps/Plugins/importSurface/importSurface.h
+0
-4
SCHNApps/Plugins/importVolume/importVolume.h
SCHNApps/Plugins/importVolume/importVolume.h
+0
-4
SCHNApps/Plugins/render/render.cpp
SCHNApps/Plugins/render/render.cpp
+32
-20
SCHNApps/Plugins/render/render.h
SCHNApps/Plugins/render/render.h
+5
-4
SCHNApps/Plugins/renderVector/renderVector.cpp
SCHNApps/Plugins/renderVector/renderVector.cpp
+30
-20
SCHNApps/Plugins/renderVector/renderVector.h
SCHNApps/Plugins/renderVector/renderVector.h
+5
-4
SCHNApps/Plugins/subdivideSurface/include/subdivideSurface.h
SCHNApps/Plugins/subdivideSurface/include/subdivideSurface.h
+0
-4
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+3
-3
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+1
-7
No files found.
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
View file @
b1faeed4
...
...
@@ -37,10 +37,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
public
slots
:
void
openComputeNormalDialog
();
void
openComputeCurvatureDialog
();
...
...
SCHNApps/Plugins/importSurface/importSurface.h
View file @
b1faeed4
...
...
@@ -34,10 +34,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
public
slots
:
void
importFromFile
(
const
QString
&
fileName
);
void
importFromFileDialog
();
...
...
SCHNApps/Plugins/importVolume/importVolume.h
View file @
b1faeed4
...
...
@@ -34,10 +34,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
public
slots
:
void
importFromFile
(
const
QString
&
fileName
);
void
importFromFileDialog
();
...
...
SCHNApps/Plugins/render/render.cpp
View file @
b1faeed4
...
...
@@ -66,6 +66,10 @@ bool RenderPlugin::enable()
connect
(
m_dockTab
->
check_renderFaces
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
cb_renderFacesChanged
(
bool
)));
connect
(
m_dockTab
->
group_faceShading
,
SIGNAL
(
buttonClicked
(
QAbstractButton
*
)),
this
,
SLOT
(
cb_faceStyleChanged
(
QAbstractButton
*
)));
connect
(
m_window
,
SIGNAL
(
viewAndPluginLinked
(
View
*
,
Plugin
*
)),
this
,
SLOT
(
viewLinked
(
View
*
,
Plugin
*
)));
connect
(
m_window
,
SIGNAL
(
viewAndPluginUnlinked
(
View
*
,
Plugin
*
)),
this
,
SLOT
(
viewUnlinked
(
View
*
,
Plugin
*
)));
connect
(
m_window
,
SIGNAL
(
currentViewChanged
(
View
*
)),
this
,
SLOT
(
currentViewChanged
(
View
*
)));
return
true
;
}
...
...
@@ -128,8 +132,10 @@ void RenderPlugin::redraw(View* view)
}
}
void
RenderPlugin
::
viewLinked
(
View
*
view
)
void
RenderPlugin
::
viewLinked
(
View
*
view
,
Plugin
*
plugin
)
{
if
(
plugin
==
this
)
{
ParameterSet
*
params
=
new
ParameterSet
();
h_viewParams
.
insert
(
view
,
params
);
const
QList
<
MapHandlerGen
*>&
maps
=
view
->
getLinkedMaps
();
...
...
@@ -146,19 +152,23 @@ void RenderPlugin::viewLinked(View* view)
if
(
view
->
isCurrentView
())
m_dockTab
->
refreshUI
(
params
);
}
}
void
RenderPlugin
::
viewUnlinked
(
View
*
view
)
void
RenderPlugin
::
viewUnlinked
(
View
*
view
,
Plugin
*
plugin
)
{
if
(
plugin
==
this
)
{
h_viewParams
.
remove
(
view
);
disconnect
(
view
,
SIGNAL
(
mapLinked
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapLinked
(
MapHandlerGen
*
)));
disconnect
(
view
,
SIGNAL
(
mapUnlinked
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapUnlinked
(
MapHandlerGen
*
)));
}
}
void
RenderPlugin
::
currentViewChanged
(
View
*
view
)
{
assert
(
isLinkedToView
(
view
))
;
if
(
isLinkedToView
(
view
))
m_dockTab
->
refreshUI
(
h_viewParams
[
view
]);
}
...
...
@@ -210,6 +220,8 @@ void RenderPlugin::vboRemoved(Utils::VBO* vbo)
changePositionVBO
(
view
,
map
,
NULL
);
if
(
params
->
perMap
[
map
->
getName
()].
normalVBO
==
vbo
)
changeNormalVBO
(
view
,
map
,
NULL
);
m_dockTab
->
refreshUI
(
h_viewParams
[
view
]);
}
void
RenderPlugin
::
changeSelectedMap
(
View
*
view
,
MapHandlerGen
*
map
)
...
...
SCHNApps/Plugins/render/render.h
View file @
b1faeed4
...
...
@@ -96,10 +96,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
);
virtual
void
viewUnlinked
(
View
*
view
);
virtual
void
currentViewChanged
(
View
*
view
);
void
setRefreshingUI
(
bool
b
)
{
b_refreshingUI
=
b
;
}
protected:
...
...
@@ -114,8 +110,13 @@ protected:
bool
b_refreshingUI
;
public
slots
:
void
viewLinked
(
View
*
view
,
Plugin
*
plugin
);
void
viewUnlinked
(
View
*
view
,
Plugin
*
plugin
);
void
currentViewChanged
(
View
*
view
);
void
mapLinked
(
MapHandlerGen
*
m
);
void
mapUnlinked
(
MapHandlerGen
*
m
);
void
vboAdded
(
Utils
::
VBO
*
vbo
);
void
vboRemoved
(
Utils
::
VBO
*
vbo
);
...
...
SCHNApps/Plugins/renderVector/renderVector.cpp
View file @
b1faeed4
...
...
@@ -36,6 +36,10 @@ bool RenderVectorPlugin::enable()
connect
(
m_dockTab
->
list_vectorVBO
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
cb_selectedVectorsVBOChanged
()));
connect
(
m_dockTab
->
slider_vectorsScaleFactor
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
cb_vectorsScaleFactorChanged
(
int
)));
connect
(
m_window
,
SIGNAL
(
viewAndPluginLinked
(
View
*
,
Plugin
*
)),
this
,
SLOT
(
viewLinked
(
View
*
,
Plugin
*
)));
connect
(
m_window
,
SIGNAL
(
viewAndPluginUnlinked
(
View
*
,
Plugin
*
)),
this
,
SLOT
(
viewUnlinked
(
View
*
,
Plugin
*
)));
connect
(
m_window
,
SIGNAL
(
currentViewChanged
(
View
*
)),
this
,
SLOT
(
currentViewChanged
(
View
*
)));
return
true
;
}
...
...
@@ -66,8 +70,10 @@ void RenderVectorPlugin::redraw(View* view)
}
}
void
RenderVectorPlugin
::
viewLinked
(
View
*
view
)
void
RenderVectorPlugin
::
viewLinked
(
View
*
view
,
Plugin
*
plugin
)
{
if
(
plugin
==
this
)
{
ParameterSet
*
params
=
new
ParameterSet
();
h_viewParams
.
insert
(
view
,
params
);
const
QList
<
MapHandlerGen
*>&
maps
=
view
->
getLinkedMaps
();
...
...
@@ -84,19 +90,23 @@ void RenderVectorPlugin::viewLinked(View* view)
if
(
view
->
isCurrentView
())
m_dockTab
->
refreshUI
(
params
);
}
}
void
RenderVectorPlugin
::
viewUnlinked
(
View
*
view
)
void
RenderVectorPlugin
::
viewUnlinked
(
View
*
view
,
Plugin
*
plugin
)
{
if
(
plugin
==
this
)
{
h_viewParams
.
remove
(
view
);
disconnect
(
view
,
SIGNAL
(
mapLinked
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapLinked
(
MapHandlerGen
*
)));
disconnect
(
view
,
SIGNAL
(
mapUnlinked
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapUnlinked
(
MapHandlerGen
*
)));
}
}
void
RenderVectorPlugin
::
currentViewChanged
(
View
*
view
)
{
assert
(
isLinkedToView
(
view
))
;
if
(
isLinkedToView
(
view
))
m_dockTab
->
refreshUI
(
h_viewParams
[
view
]);
}
...
...
SCHNApps/Plugins/renderVector/renderVector.h
View file @
b1faeed4
...
...
@@ -78,10 +78,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
);
virtual
void
viewUnlinked
(
View
*
view
);
virtual
void
currentViewChanged
(
View
*
view
);
void
setRefreshingUI
(
bool
b
)
{
b_refreshingUI
=
b
;
}
protected:
...
...
@@ -93,8 +89,13 @@ protected:
bool
b_refreshingUI
;
public
slots
:
void
viewLinked
(
View
*
view
,
Plugin
*
plugin
);
void
viewUnlinked
(
View
*
view
,
Plugin
*
plugin
);
void
currentViewChanged
(
View
*
view
);
void
mapLinked
(
MapHandlerGen
*
m
);
void
mapUnlinked
(
MapHandlerGen
*
m
);
void
vboAdded
(
Utils
::
VBO
*
vbo
);
void
vboRemoved
(
Utils
::
VBO
*
vbo
);
...
...
SCHNApps/Plugins/subdivideSurface/include/subdivideSurface.h
View file @
b1faeed4
...
...
@@ -36,10 +36,6 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
{}
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
{}
virtual
void
viewLinked
(
View
*
view
)
{}
virtual
void
viewUnlinked
(
View
*
view
)
{}
virtual
void
currentViewChanged
(
View
*
view
)
{}
public
slots
:
void
openSubdivideSurfaceDialog
();
void
subdivideSurface
();
...
...
SCHNApps/include/plugin.h
View file @
b1faeed4
...
...
@@ -46,9 +46,9 @@ public:
virtual
void
mouseMove
(
View
*
view
,
int
buttons
,
int
x
,
int
y
)
=
0
;
virtual
void
wheelEvent
(
View
*
view
,
int
delta
,
int
x
,
int
y
)
=
0
;
virtual
void
viewLinked
(
View
*
view
)
=
0
;
virtual
void
viewUnlinked
(
View
*
view
)
=
0
;
virtual
void
currentViewChanged
(
View
*
view
)
=
0
;
//
virtual void viewLinked(View* view) = 0;
//
virtual void viewUnlinked(View* view) = 0;
//
virtual void currentViewChanged(View* view) = 0;
/*********************************************************
* MANAGE LINKED VIEWS
...
...
SCHNApps/src/window.cpp
View file @
b1faeed4
...
...
@@ -382,10 +382,7 @@ void Window::setCurrentView(View* view)
const
QList
<
Plugin
*>&
newPlugins
=
m_currentView
->
getLinkedPlugins
();
foreach
(
Plugin
*
p
,
newPlugins
)
{
enablePluginTabWidgets
(
p
);
p
->
currentViewChanged
(
m_currentView
);
}
connect
(
m_currentView
,
SIGNAL
(
pluginLinked
(
Plugin
*
)),
this
,
SLOT
(
enablePluginTabWidgets
(
Plugin
*
)));
...
...
@@ -592,8 +589,6 @@ void Window::linkViewAndPlugin(View* v, Plugin* p)
p
->
linkView
(
v
);
emit
(
viewAndPluginLinked
(
v
,
p
));
p
->
viewLinked
(
v
);
}
void
Window
::
unlinkViewAndPlugin
(
View
*
v
,
Plugin
*
p
)
...
...
@@ -602,8 +597,6 @@ void Window::unlinkViewAndPlugin(View* v, Plugin* p)
p
->
unlinkView
(
v
);
emit
(
viewAndPluginUnlinked
(
v
,
p
));
p
->
viewUnlinked
(
v
);
}
void
Window
::
linkViewAndMap
(
View
*
v
,
MapHandlerGen
*
m
)
...
...
@@ -629,6 +622,7 @@ void Window::linkViewAndCamera(View* v, Camera* c)
emit
(
viewAndCameraUnlinked
(
v
,
current
));
v
->
setCurrentCamera
(
c
);
c
->
linkView
(
v
);
emit
(
viewAndCameraLinked
(
v
,
c
));
}
...
...
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