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
Hurstel
CGoGN
Commits
88b0df6d
Commit
88b0df6d
authored
Oct 01, 2013
by
Pierre Kraemer
Browse files
mutually exclusive selectors OK & surface deformation OK
parent
1803052b
Changes
6
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/surface_deformation/include/surface_deformation.h
View file @
88b0df6d
...
...
@@ -88,7 +88,7 @@ private slots:
void
attributeAdded
(
unsigned
int
orbit
,
const
QString
&
name
);
void
cellSelectorAdded
(
unsigned
int
orbit
,
const
QString
&
name
);
void
cellSelectorRemoved
(
unsigned
int
orbit
,
const
QString
&
name
);
void
selectedCellsChanged
();
void
selectedCellsChanged
(
CellSelectorGen
*
cs
);
public
slots
:
// slots for Python calls
...
...
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
View file @
88b0df6d
...
...
@@ -232,6 +232,7 @@ void Surface_Deformation_Plugin::mapAdded(MapHandlerGen* map)
connect
(
map
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
attributeAdded
(
unsigned
int
,
const
QString
&
)));
connect
(
map
,
SIGNAL
(
cellSelectorAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
cellSelectorAdded
(
unsigned
int
,
const
QString
&
)));
connect
(
map
,
SIGNAL
(
cellSelectorRemoved
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
cellSelectorRemoved
(
unsigned
int
,
const
QString
&
)));
connect
(
map
,
SIGNAL
(
selectedCellsChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
selectedCellsChanged
(
CellSelectorGen
*
)));
}
void
Surface_Deformation_Plugin
::
mapRemoved
(
MapHandlerGen
*
map
)
...
...
@@ -239,6 +240,7 @@ void Surface_Deformation_Plugin::mapRemoved(MapHandlerGen* map)
disconnect
(
map
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
attributeAdded
(
unsigned
int
,
const
QString
&
)));
disconnect
(
map
,
SIGNAL
(
cellSelectorAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
cellSelectorAdded
(
unsigned
int
,
const
QString
&
)));
disconnect
(
map
,
SIGNAL
(
cellSelectorRemoved
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
cellSelectorRemoved
(
unsigned
int
,
const
QString
&
)));
disconnect
(
map
,
SIGNAL
(
selectedCellsChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
selectedCellsChanged
(
CellSelectorGen
*
)));
}
...
...
@@ -284,10 +286,15 @@ void Surface_Deformation_Plugin::cellSelectorRemoved(unsigned int orbit, const Q
}
}
void
Surface_Deformation_Plugin
::
selectedCellsChanged
()
void
Surface_Deformation_Plugin
::
selectedCellsChanged
(
CellSelectorGen
*
cs
)
{
// nlMakeCurrent(perMap->nlContext) ;
// nlReset(NL_FALSE) ;
MapHandlerGen
*
map
=
static_cast
<
MapHandlerGen
*>
(
QObject
::
sender
());
MapParameters
&
p
=
h_parameterSet
[
map
];
if
(
p
.
initialized
&&
(
p
.
handleSelector
==
cs
||
p
.
freeSelector
==
cs
))
{
nlMakeCurrent
(
p
.
nlContext
)
;
nlReset
(
NL_FALSE
)
;
}
}
...
...
SCHNApps/Plugins/surface_differentialProperties/src/surface_differentialProperties.cpp
View file @
88b0df6d
...
...
@@ -34,6 +34,9 @@ bool Surface_DifferentialProperties_Plugin::enable()
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
mapAdded
(
map
);
return
true
;
}
...
...
SCHNApps/include/mapHandler.h
View file @
88b0df6d
...
...
@@ -148,6 +148,8 @@ public slots:
CellSelectorGen
*
getCellSelector
(
unsigned
int
orbit
,
const
QString
&
name
)
const
;
const
CellSelectorSet
&
getCellSelectorSet
(
unsigned
int
orbit
)
const
{
return
m_cellSelectors
[
orbit
];
}
void
selectedCellsChanged
();
public:
template
<
unsigned
int
ORBIT
>
CellSelector
<
ORBIT
>*
getCellSelector
(
const
QString
&
name
)
const
;
...
...
@@ -177,7 +179,7 @@ signals:
void
cellSelectorAdded
(
unsigned
int
orbit
,
const
QString
&
name
);
void
cellSelectorRemoved
(
unsigned
int
orbit
,
const
QString
&
name
);
void
selectedCellsChanged
();
void
selectedCellsChanged
(
CellSelectorGen
*
cs
);
protected:
QString
m_name
;
...
...
SCHNApps/src/mapHandler.cpp
View file @
88b0df6d
...
...
@@ -129,7 +129,7 @@ CellSelectorGen* MapHandlerGen::addCellSelector(unsigned int orbit, const QStrin
m_cellSelectors
[
orbit
].
insert
(
name
,
cs
);
emit
(
cellSelectorAdded
(
orbit
,
name
));
connect
(
cs
,
SIGNAL
(
selectedCellsChanged
()),
this
,
S
IGNAL
(
selectedCellsChanged
()));
connect
(
cs
,
SIGNAL
(
selectedCellsChanged
()),
this
,
S
LOT
(
selectedCellsChanged
()));
return
cs
;
}
...
...
@@ -156,6 +156,12 @@ CellSelectorGen* MapHandlerGen::getCellSelector(unsigned int orbit, const QStrin
return
NULL
;
}
void
MapHandlerGen
::
selectedCellsChanged
()
{
CellSelectorGen
*
cs
=
static_cast
<
CellSelectorGen
*>
(
QObject
::
sender
());
emit
(
selectedCellsChanged
(
cs
));
}
void
MapHandlerGen
::
updateMutuallyExclusiveSelectors
(
unsigned
int
orbit
)
{
QList
<
CellSelectorGen
*>
mex
;
...
...
SCHNApps/src/view.cpp
View file @
88b0df6d
...
...
@@ -137,7 +137,7 @@ void View::linkMap(MapHandlerGen* map)
updateGL
();
connect
(
map
->
getFrame
(),
SIGNAL
(
modified
()),
this
,
SLOT
(
updateGL
()));
connect
(
map
,
SIGNAL
(
selectedCellsChanged
()),
this
,
SLOT
(
updateGL
()));
connect
(
map
,
SIGNAL
(
selectedCellsChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
updateGL
()));
if
(
map
->
isSelectedMap
())
setManipulatedFrame
(
map
->
getFrame
());
...
...
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