def __init__(self, parent=None): """ QParameterExplorationTable(parent: QWidget) -> QParameterExplorationTable Create an grid layout and accept drops """ QPromptWidget.__init__(self, parent) self.pipeline = None self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) self.setPromptText('Drag aliases/parameters here for a parameter ' 'exploration') self.showPrompt() vLayout = QtGui.QVBoxLayout(self) vLayout.setSpacing(0) vLayout.setMargin(0) vLayout.setAlignment(QtCore.Qt.AlignTop) self.setLayout(vLayout) self.label = QDimensionLabel() for labelIcon in self.label.labelIcons: self.connect(labelIcon.countWidget, QtCore.SIGNAL('editingFinished()'), self.updateWidgets) vLayout.addWidget(self.label) for i in xrange(2): hBar = QtGui.QFrame() hBar.setFrameStyle(QtGui.QFrame.HLine | QtGui.QFrame.Sunken) vLayout.addWidget(hBar) self._parameterCount = 0
def __init__(self, parent=None): """ QVerticalWidget(parent: QWidget) -> QVerticalWidget Initialize with a vertical layout """ QPromptWidget.__init__(self, parent) self.setPromptText("Drag a constant from the Modules panel to create a variable") self.setLayout(QtGui.QVBoxLayout()) self.layout().setMargin(0) self.layout().setSpacing(5) self.layout().setAlignment(QtCore.Qt.AlignTop) self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) self.setMinimumHeight(20) self._variable_widgets = []