def __init__(self, node, parent, parameter_str, interface): """Constructor :Parameters: - `node` (Node) - node that own the widget - `parent` (QWidget) - parent widget - `parameter_str` (str) - the parameter key the widget is associated to - `interface` (Ismth) - instance of interface object """ QtGui.QMainWindow.__init__(self, parent) IInterfaceWidget.__init__(self, node, parent, parameter_str, interface) self.setMinimumSize(100, 50) #ui self._lab = ScalableLabel() self.setCentralWidget(self._lab) self._bot_toolbar = QtGui.QToolBar("slider") self._img_slider = QtGui.QSlider(QtCore.Qt.Horizontal) self._img_slider.setEnabled(False) QtCore.QObject.connect(self._img_slider, QtCore.SIGNAL("valueChanged(int)"), self.slice_changed) self._bot_toolbar.addWidget(self._img_slider) self.addToolBar(QtCore.Qt.BottomToolBarArea, self._bot_toolbar) self._bot_toolbar.hide() #update self.notify(node, ("input_modified", self.param_str))
def __init__(self, node, parent, parameter_str, interface): """Constructor :Parameters: - `node` (Node) - node that own the widget - `parent` (QWidget) - parent widget - `parameter_str` (str) - the parameter key the widget is associated to - `interface` (Ismth) - instance of interface object """ QtGui.QMainWindow.__init__(self,parent) IInterfaceWidget.__init__(self,node,parent,parameter_str,interface) self.setMinimumSize(100,50) #ui self._lab = ScalableLabel() self.setCentralWidget(self._lab) self._bot_toolbar = QtGui.QToolBar("slider") self._img_slider = QtGui.QSlider(QtCore.Qt.Horizontal) self._img_slider.setEnabled(False) QtCore.QObject.connect(self._img_slider, QtCore.SIGNAL("valueChanged(int)"), self.slice_changed) self._bot_toolbar.addWidget(self._img_slider) self.addToolBar(QtCore.Qt.BottomToolBarArea,self._bot_toolbar) self._bot_toolbar.hide() #update self.notify(node,("input_modified",self.param_str) )
def __init__(self, node, parent, parameter_str, interface): """Constructor :Parameters: - `node` (Node) - node that own the widget - `parent` (QWidget) - parent widget - `parameter_str` (str) - the parameter key the widget is associated to - `interface` (Ismth) - instance of interface object """ QtGui.QPushButton.__init__(self, parent) IInterfaceWidget.__init__(self, node, parent, parameter_str, interface) self.setMinimumSize(64, 64) self._color = (0, 0, 0) self._brush = QtGui.QBrush(QtGui.QColor(*self._color[:3])) QtCore.QObject.connect(self, QtCore.SIGNAL("clicked(bool)"), self.open_color_dialog) self.notify(node, ("input_modified", self.param_str))