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
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
e97af1d7
Commit
e97af1d7
authored
Mar 26, 2013
by
Stefan Philips
Browse files
[MERGE]
parents
de22c555
b568e138
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
20 deletions
+18
-20
src/qt4gui/controlPanel/WQtColormapper.cpp
src/qt4gui/controlPanel/WQtColormapper.cpp
+8
-13
src/qt4gui/controlPanel/WQtColormapper.h
src/qt4gui/controlPanel/WQtColormapper.h
+0
-5
src/qt4gui/guiElements/WQtMenuFiltered.cpp
src/qt4gui/guiElements/WQtMenuFiltered.cpp
+10
-2
No files found.
src/qt4gui/controlPanel/WQtColormapper.cpp
View file @
e97af1d7
...
...
@@ -124,7 +124,7 @@ WQtColormapper::~WQtColormapper()
m_sortConnection
.
disconnect
();
}
WQtColormapper
::
WQtTextureListItem
::
WQtTextureListItem
(
const
osg
::
ref_ptr
<
WGETexture3D
>
texture
,
WQtColormapper
*
cmapper
,
QListWidget
*
parent
)
:
WQtColormapper
::
WQtTextureListItem
::
WQtTextureListItem
(
const
osg
::
ref_ptr
<
WGETexture3D
>
texture
,
WQtColormapper
*
/*
cmapper
*/
,
QListWidget
*
parent
)
:
QListWidgetItem
(
parent
),
m_texture
(
texture
),
m_parent
(
parent
)
...
...
@@ -151,10 +151,10 @@ WQtColormapper::WQtTextureListItem::WQtTextureListItem( const osg::ref_ptr< WGET
QHBoxLayout
*
labelContainerLayout
=
new
QHBoxLayout
();
labelContainer
->
setLayout
(
labelContainerLayout
);
W
Scal
eLabel
*
l
=
new
W
ScaleLabel
(
QString
::
fromStdString
(
m_texture
->
name
()
->
get
()
),
5
,
labelContainer
);
l
->
setTextInteractionFlags
(
Qt
::
NoTextInteraction
);
l
->
setToolTip
(
"The name of this texture. This usually is the name of the file it was loaded from."
);
labelContainerLayout
->
addWidget
(
l
);
W
PropertyStringWidget
*
nam
eLabel
=
new
W
PropertyStringWidget
(
m_texture
->
name
(),
NULL
,
m_itemWidget
);
nameLabel
->
setToolTip
(
"The name of this texture. This usually is the name of the file it was loaded from."
);
labelContainerLayout
->
addWidget
(
nameLabe
l
);
// alpha property
WPropertyDoubleWidget
*
alpha
=
new
WPropertyDoubleWidget
(
m_texture
->
alpha
(),
NULL
,
m_itemWidget
);
...
...
@@ -207,7 +207,7 @@ WQtColormapper::WQtTextureListItem::WQtTextureListItem( const osg::ref_ptr< WGET
propActionBtn
->
setStyleSheet
(
"background-color:"
+
propertyCol
.
name
()
+
";"
);
active
->
setStyleSheet
(
"background-color:"
+
labelCol
.
name
()
+
";"
);
alpha
->
setStyleSheet
(
"#ControlPanelPropertyWidget{ background-color:"
+
propertyCol
.
name
()
+
";}"
);
l
->
setStyleSheet
(
"background-color:"
+
labelCol
.
name
()
+
";"
);
nameLabe
l
->
setStyleSheet
(
"background-color:"
+
labelCol
.
name
()
+
";
border:none;
"
);
labelContainer
->
setStyleSheet
(
"background-color:"
+
labelCol
.
name
()
+
";"
);
// fill layout
...
...
@@ -232,16 +232,11 @@ WQtColormapper::WQtTextureListItem::WQtTextureListItem( const osg::ref_ptr< WGET
// widget size constraints and policies
m_itemWidget
->
setSizePolicy
(
QSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Preferred
)
);
// we need to know the name of the texture
m_nameConnection
=
m_texture
->
name
()
->
getUpdateCondition
()
->
subscribeSignal
(
boost
::
bind
(
&
WQtColormapper
::
pushUpdateEvent
,
cmapper
)
);
}
WQtColormapper
::
WQtTextureListItem
::~
WQtTextureListItem
()
{
m_nameConnection
.
disconnect
();
// cleanup
}
const
osg
::
ref_ptr
<
WGETexture3D
>
WQtColormapper
::
WQtTextureListItem
::
getTexture
()
const
...
...
@@ -257,7 +252,7 @@ QWidget* WQtColormapper::WQtTextureListItem::getWidget() const
void
WQtColormapper
::
pushUpdateEvent
()
{
// create a new event for this and insert it into event queue
QCoreApplication
::
postEvent
(
this
,
new
WUpdateTextureSorterEvent
()
);
QCoreApplication
::
postEvent
(
this
,
new
WUpdateTextureSorterEvent
()
);
}
bool
WQtColormapper
::
event
(
QEvent
*
event
)
...
...
src/qt4gui/controlPanel/WQtColormapper.h
View file @
e97af1d7
...
...
@@ -164,11 +164,6 @@ private:
*/
const
osg
::
ref_ptr
<
WGETexture3D
>
m_texture
;
/**
* Connection for the texture's name property
*/
boost
::
signals2
::
connection
m_nameConnection
;
/**
* Parent list.
*/
...
...
src/qt4gui/guiElements/WQtMenuFiltered.cpp
View file @
e97af1d7
...
...
@@ -143,13 +143,21 @@ void WQtMenuFiltered::filterUpdate()
// match value against filter
if
(
match
)
{
(
*
a
)
->
setVisible
(
true
);
#ifdef __APPLE__
(
*
a
)
->
setDisabled
(
false
);
#else
(
*
a
)
->
setVisible
(
true
);
#endif
nbLeft
++
;
lastVisibleAction
=
*
a
;
}
else
{
(
*
a
)
->
setVisible
(
false
);
#ifdef __APPLE__
(
*
a
)
->
setDisabled
(
true
);
#else
(
*
a
)
->
setVisible
(
false
);
#endif
}
}
}
...
...
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