Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
2ce6196a
Commit
2ce6196a
authored
Mar 25, 2014
by
Luke Campagnola
Browse files
Fixed Parameter.sigValueChanging
parent
00c9c1e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
2ce6196a
...
...
@@ -77,6 +77,7 @@ pyqtgraph-0.9.9 [unreleased]
- MeshData can generate edges from face-indexed vertexes
- Fixed multiprocess deadlocks on windows
- Fixed GLGridItem.setSize
- Fixed parametertree.Parameter.sigValueChanging
pyqtgraph-0.9.8 2013-11-24
...
...
examples/parametertree.py
View file @
2ce6196a
...
...
@@ -123,6 +123,17 @@ def change(param, changes):
p
.
sigTreeStateChanged
.
connect
(
change
)
def
valueChanging
(
param
,
value
):
print
"Value changing (not finalized):"
,
param
,
value
# Too lazy for recursion:
for
child
in
p
.
children
():
child
.
sigValueChanging
.
connect
(
valueChanging
)
for
ch2
in
child
.
children
():
ch2
.
sigValueChanging
.
connect
(
valueChanging
)
def
save
():
global
state
state
=
p
.
saveState
()
...
...
pyqtgraph/parametertree/parameterTypes.py
View file @
2ce6196a
...
...
@@ -208,12 +208,14 @@ class WidgetParameterItem(ParameterItem):
val
=
self
.
widget
.
value
()
newVal
=
self
.
param
.
setValue
(
val
)
def
widgetValueChanging
(
self
):
def
widgetValueChanging
(
self
,
*
args
):
"""
Called when the widget's value is changing, but not finalized.
For example: editing text before pressing enter or changing focus.
"""
pass
# This is a bit sketchy: assume the last argument of each signal is
# the value..
self
.
param
.
sigValueChanging
.
emit
(
self
.
param
,
args
[
-
1
])
def
selected
(
self
,
sel
):
"""Called when this item has been selected (sel=True) OR deselected (sel=False)"""
...
...
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