Commit 21a894d8 authored by Martin Drechsler's avatar Martin Drechsler

very small changes in param tree

parent f3bdebab
...@@ -8,16 +8,11 @@ as well as some customized parameter types ...@@ -8,16 +8,11 @@ as well as some customized parameter types
""" """
import pyqtgraph as pg import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.parametertree.parameterTypes as pTypes import pyqtgraph.parametertree.parameterTypes as pTypes
from pyqtgraph.parametertree import Parameter, ParameterTree, ParameterItem, registerParameterType from pyqtgraph.parametertree import Parameter, ParameterTree, ParameterItem, registerParameterType
app = QtGui.QApplication([])
## test subclassing parameters
## This parameter automatically generates two child parameters which are always reciprocals of each other
class BasicAcquisitonParameters(pTypes.GroupParameter): class BasicAcquisitonParameters(pTypes.GroupParameter):
...@@ -85,6 +80,8 @@ class CameraParameterTree(ParameterTree): ...@@ -85,6 +80,8 @@ class CameraParameterTree(ParameterTree):
self.t.setParameters(self.p, showTop=False) self.t.setParameters(self.p, showTop=False)
self.t.setWindowTitle('Parameter Tree') self.t.setWindowTitle('Parameter Tree')
self.save()
def change(self, param, changes): def change(self, param, changes):
print("tree changes:") print("tree changes:")
for param, change, data in changes: for param, change, data in changes:
...@@ -107,6 +104,8 @@ class CameraParameterTree(ParameterTree): ...@@ -107,6 +104,8 @@ class CameraParameterTree(ParameterTree):
## Start Qt event loop unless running in interactive mode or using pyside. ## Start Qt event loop unless running in interactive mode or using pyside.
if __name__ == '__main__': if __name__ == '__main__':
app = QtGui.QApplication([])
import sys import sys
param_tree = CameraParameterTree() param_tree = CameraParameterTree()
win = QtGui.QWidget() win = QtGui.QWidget()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment