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
KennethVanhoey
CGoGN
Commits
bc80b422
Commit
bc80b422
authored
Feb 19, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding missing files
parent
07b8b23d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
159 additions
and
0 deletions
+159
-0
SCHNApps/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h
...gins/renderTopoSurface/include/renderTopoSurfaceDockTab.h
+42
-0
SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp
...lugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp
+117
-0
No files found.
SCHNApps/Plugins/renderTopoSurface/include/renderTopoSurfaceDockTab.h
0 → 100644
View file @
bc80b422
#ifndef _RENDER_TOPO_DOCK_TAB_H_
#define _RENDER_TOPO_DOCK_TAB_H_
#include "ui_renderTopoSurface.h"
namespace
CGoGN
{
namespace
SCHNApps
{
class
Window
;
class
RenderTopoSurfacePlugin
;
struct
ParameterSet
;
class
RenderTopoSurfaceDockTab
:
public
QWidget
,
public
Ui
::
RenderTopoSurfaceDockWidget
{
Q_OBJECT
public:
RenderTopoSurfaceDockTab
(
Window
*
w
,
RenderTopoSurfacePlugin
*
p
);
private:
Window
*
m_window
;
RenderTopoSurfacePlugin
*
m_plugin
;
ParameterSet
*
m_currentParams
;
bool
b_refreshingUI
;
public
slots
:
void
refreshUI
(
ParameterSet
*
params
);
void
selectedMapChanged
();
void
positionAttributeChanged
(
int
index
);
void
edgesScaleFactorChanged
(
int
i
);
void
facesScaleFactorChanged
(
int
i
);
};
}
// namespace SCHNApps
}
// namespace CGoGN
#endif
SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp
0 → 100644
View file @
bc80b422
#include "renderTopoSurfaceDockTab.h"
#include "renderTopoSurface.h"
#include "window.h"
#include "mapHandler.h"
namespace
CGoGN
{
namespace
SCHNApps
{
RenderTopoSurfaceDockTab
::
RenderTopoSurfaceDockTab
(
Window
*
w
,
RenderTopoSurfacePlugin
*
p
)
:
m_window
(
w
),
m_plugin
(
p
),
b_refreshingUI
(
false
)
{
setupUi
(
this
);
connect
(
mapList
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
selectedMapChanged
()));
connect
(
combo_positionAttribute
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
positionAttributeChanged
(
int
)));
connect
(
slider_edgesScaleFactor
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
edgesScaleFactorChanged
(
int
)));
connect
(
slider_facesScaleFactor
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
facesScaleFactorChanged
(
int
)));
}
void
RenderTopoSurfaceDockTab
::
refreshUI
(
ParameterSet
*
params
)
{
m_currentParams
=
params
;
b_refreshingUI
=
true
;
mapList
->
clear
();
combo_positionAttribute
->
clear
();
MapHandlerGen
*
mh
=
params
->
selectedMap
;
QHash
<
QString
,
PerMapParameterSet
*>::
const_iterator
i
=
params
->
perMap
.
constBegin
();
while
(
i
!=
params
->
perMap
.
constEnd
())
{
mapList
->
addItem
(
i
.
key
());
if
(
mh
!=
NULL
&&
i
.
key
()
==
mh
->
getName
())
{
QList
<
QListWidgetItem
*>
item
=
mapList
->
findItems
(
mh
->
getName
(),
Qt
::
MatchExactly
);
item
[
0
]
->
setSelected
(
true
);
PerMapParameterSet
*
p
=
params
->
perMap
[
mh
->
getName
()];
QString
vec3TypeName
=
QString
::
fromStdString
(
nameOfType
(
PFP2
::
VEC3
()));
unsigned
int
j
=
0
;
const
AttributeHash
&
attribs
=
mh
->
getAttributesList
(
VERTEX
);
for
(
AttributeHash
::
const_iterator
i
=
attribs
.
constBegin
();
i
!=
attribs
.
constEnd
();
++
i
)
{
if
(
i
.
value
()
==
vec3TypeName
)
{
combo_positionAttribute
->
addItem
(
i
.
key
());
if
(
i
.
key
()
==
QString
::
fromStdString
(
p
->
positionAttribute
.
name
()))
combo_positionAttribute
->
setCurrentIndex
(
j
);
++
j
;
}
}
slider_edgesScaleFactor
->
setSliderPosition
(
p
->
edgesScaleFactor
*
50.0
);
slider_facesScaleFactor
->
setSliderPosition
(
p
->
facesScaleFactor
*
50.0
);
}
++
i
;
}
b_refreshingUI
=
false
;
}
void
RenderTopoSurfaceDockTab
::
selectedMapChanged
()
{
if
(
!
b_refreshingUI
)
{
QList
<
QListWidgetItem
*>
currentItems
=
mapList
->
selectedItems
();
if
(
!
currentItems
.
empty
())
m_plugin
->
changeSelectedMap
(
m_window
->
getCurrentView
(),
m_window
->
getMap
(
currentItems
[
0
]
->
text
()),
true
);
}
}
void
RenderTopoSurfaceDockTab
::
positionAttributeChanged
(
int
index
)
{
if
(
!
b_refreshingUI
)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changePositionAttribute
(
view
,
map
,
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
combo_positionAttribute
->
currentText
()),
true
);
}
}
void
RenderTopoSurfaceDockTab
::
facesScaleFactorChanged
(
int
i
)
{
if
(
!
b_refreshingUI
)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changeEdgesScaleFactor
(
view
,
map
,
i
,
true
);
}
}
void
RenderTopoSurfaceDockTab
::
edgesScaleFactorChanged
(
int
i
)
{
if
(
!
b_refreshingUI
)
{
View
*
view
=
m_window
->
getCurrentView
();
MapHandlerGen
*
map
=
m_currentParams
->
selectedMap
;
m_plugin
->
changeFacesScaleFactor
(
view
,
map
,
i
,
true
);
}
}
}
// namespace SCHNApps
}
// namespace CGoGN
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