def setupUi(self): self.form.items = self.widget(QtGui.QListWidget, "items") self.form.x = self.widget(QtGui.QDoubleSpinBox, "x") self.form.y = self.widget(QtGui.QDoubleSpinBox, "y") self.form.s = self.widget(QtGui.QDoubleSpinBox, "size") self.retranslateUi() self.updateUI() QtCore.QObject.connect( self.form.items, QtCore.SIGNAL("currentRowChanged(int)"), self.onItem) QtCore.QObject.connect( self.form.x, QtCore.SIGNAL("valueChanged(double)"), self.onData) QtCore.QObject.connect( self.form.y, QtCore.SIGNAL("valueChanged(double)"), self.onData) QtCore.QObject.connect( self.form.s, QtCore.SIGNAL("valueChanged(double)"), self.onData) QtCore.QObject.connect( Plot.getMdiArea(), QtCore.SIGNAL("subWindowActivated(QMdiSubWindow*)"), self.onMdiArea) return False
def setupUi(self): self.form.path = self.widget(QtGui.QLineEdit, "path") self.form.pathButton = self.widget(QtGui.QPushButton, "pathButton") self.form.sizeX = self.widget(QtGui.QDoubleSpinBox, "sizeX") self.form.sizeY = self.widget(QtGui.QDoubleSpinBox, "sizeY") self.form.dpi = self.widget(QtGui.QSpinBox, "dpi") self.retranslateUi() home = os.getenv('USERPROFILE') or os.getenv('HOME') self.form.path.setText(os.path.join(home, "plot.png")) self.updateUI() QtCore.QObject.connect(self.form.pathButton, QtCore.SIGNAL("pressed()"), self.onPathButton) QtCore.QObject.connect( Plot.getMdiArea(), QtCore.SIGNAL("subWindowActivated(QMdiSubWindow*)"), self.onMdiArea) return False
def setupUi(self): self.form.axId = self.widget(QtGui.QSpinBox, "axesIndex") self.form.title = self.widget(QtGui.QLineEdit, "title") self.form.titleSize = self.widget(QtGui.QSpinBox, "titleSize") self.form.xLabel = self.widget(QtGui.QLineEdit, "titleX") self.form.xSize = self.widget(QtGui.QSpinBox, "xSize") self.form.yLabel = self.widget(QtGui.QLineEdit, "titleY") self.form.ySize = self.widget(QtGui.QSpinBox, "ySize") self.retranslateUi() # Look for active axes if can axId = 0 plt = Plot.getPlot() if plt: while plt.axes != plt.axesList[axId]: axId = axId + 1 self.form.axId.setValue(axId) self.updateUI() QtCore.QObject.connect(self.form.axId, QtCore.SIGNAL('valueChanged(int)'), self.onAxesId) QtCore.QObject.connect(self.form.title, QtCore.SIGNAL("editingFinished()"), self.onLabels) QtCore.QObject.connect(self.form.xLabel, QtCore.SIGNAL("editingFinished()"), self.onLabels) QtCore.QObject.connect(self.form.yLabel, QtCore.SIGNAL("editingFinished()"), self.onLabels) QtCore.QObject.connect(self.form.titleSize, QtCore.SIGNAL("valueChanged(int)"), self.onFontSizes) QtCore.QObject.connect(self.form.xSize, QtCore.SIGNAL("valueChanged(int)"), self.onFontSizes) QtCore.QObject.connect(self.form.ySize, QtCore.SIGNAL("valueChanged(int)"), self.onFontSizes) QtCore.QObject.connect( Plot.getMdiArea(), QtCore.SIGNAL("subWindowActivated(QMdiSubWindow*)"), self.onMdiArea) return False
def setupUi(self): self.form.items = self.widget(QtGui.QListWidget, "items") self.form.label = self.widget(QtGui.QLineEdit, "label") self.form.isLabel = self.widget(QtGui.QCheckBox, "isLabel") self.form.style = self.widget(QtGui.QComboBox, "lineStyle") self.form.marker = self.widget(QtGui.QComboBox, "markers") self.form.width = self.widget(QtGui.QDoubleSpinBox, "lineWidth") self.form.size = self.widget(QtGui.QSpinBox, "markerSize") self.form.color = self.widget(QtGui.QPushButton, "color") self.form.remove = self.widget(QtGui.QPushButton, "remove") self.retranslateUi() self.fillStyles() self.updateUI() QtCore.QObject.connect(self.form.items, QtCore.SIGNAL("currentRowChanged(int)"), self.onItem) QtCore.QObject.connect(self.form.label, QtCore.SIGNAL("editingFinished()"), self.onData) QtCore.QObject.connect(self.form.isLabel, QtCore.SIGNAL("stateChanged(int)"), self.onData) QtCore.QObject.connect(self.form.style, QtCore.SIGNAL("currentIndexChanged(int)"), self.onData) QtCore.QObject.connect(self.form.marker, QtCore.SIGNAL("currentIndexChanged(int)"), self.onData) QtCore.QObject.connect(self.form.width, QtCore.SIGNAL("valueChanged(double)"), self.onData) QtCore.QObject.connect(self.form.size, QtCore.SIGNAL("valueChanged(int)"), self.onData) QtCore.QObject.connect(self.form.color, QtCore.SIGNAL("pressed()"), self.onColor) QtCore.QObject.connect(self.form.remove, QtCore.SIGNAL("pressed()"), self.onRemove) QtCore.QObject.connect( Plot.getMdiArea(), QtCore.SIGNAL("subWindowActivated(QMdiSubWindow*)"), self.onMdiArea) return False
def setupUi(self): self.form.axId = self.widget(QtGui.QSpinBox, "axesIndex") self.form.new = self.widget(QtGui.QPushButton, "newAxesButton") self.form.remove = self.widget(QtGui.QPushButton, "delAxesButton") self.form.all = self.widget(QtGui.QCheckBox, "allAxes") self.form.xMin = self.widget(QtGui.QSlider, "posXMin") self.form.xMax = self.widget(QtGui.QSlider, "posXMax") self.form.yMin = self.widget(QtGui.QSlider, "posYMin") self.form.yMax = self.widget(QtGui.QSlider, "posYMax") self.form.xAlign = self.widget(QtGui.QComboBox, "xAlign") self.form.yAlign = self.widget(QtGui.QComboBox, "yAlign") self.form.xOffset = self.widget(QtGui.QSpinBox, "xOffset") self.form.yOffset = self.widget(QtGui.QSpinBox, "yOffset") self.form.xAuto = self.widget(QtGui.QCheckBox, "xAuto") self.form.yAuto = self.widget(QtGui.QCheckBox, "yAuto") self.form.xSMin = self.widget(QtGui.QLineEdit, "xMin") self.form.xSMax = self.widget(QtGui.QLineEdit, "xMax") self.form.ySMin = self.widget(QtGui.QLineEdit, "yMin") self.form.ySMax = self.widget(QtGui.QLineEdit, "yMax") self.retranslateUi() # Look for active axes if can axId = 0 plt = Plot.getPlot() if plt: while plt.axes != plt.axesList[axId]: axId = axId + 1 self.form.axId.setValue(axId) self.updateUI() QtCore.QObject.connect(self.form.axId, QtCore.SIGNAL('valueChanged(int)'), self.onAxesId) QtCore.QObject.connect(self.form.new, QtCore.SIGNAL("pressed()"), self.onNew) QtCore.QObject.connect(self.form.remove, QtCore.SIGNAL("pressed()"), self.onRemove) QtCore.QObject.connect(self.form.xMin, QtCore.SIGNAL("valueChanged(int)"), self.onDims) QtCore.QObject.connect(self.form.xMax, QtCore.SIGNAL("valueChanged(int)"), self.onDims) QtCore.QObject.connect(self.form.yMin, QtCore.SIGNAL("valueChanged(int)"), self.onDims) QtCore.QObject.connect(self.form.yMax, QtCore.SIGNAL("valueChanged(int)"), self.onDims) QtCore.QObject.connect(self.form.xAlign, QtCore.SIGNAL("currentIndexChanged(int)"), self.onAlign) QtCore.QObject.connect(self.form.yAlign, QtCore.SIGNAL("currentIndexChanged(int)"), self.onAlign) QtCore.QObject.connect(self.form.xOffset, QtCore.SIGNAL("valueChanged(int)"), self.onOffset) QtCore.QObject.connect(self.form.yOffset, QtCore.SIGNAL("valueChanged(int)"), self.onOffset) QtCore.QObject.connect(self.form.xAuto, QtCore.SIGNAL("stateChanged(int)"), self.onScales) QtCore.QObject.connect(self.form.yAuto, QtCore.SIGNAL("stateChanged(int)"), self.onScales) QtCore.QObject.connect(self.form.xSMin, QtCore.SIGNAL("editingFinished()"), self.onScales) QtCore.QObject.connect(self.form.xSMax, QtCore.SIGNAL("editingFinished()"), self.onScales) QtCore.QObject.connect(self.form.ySMin, QtCore.SIGNAL("editingFinished()"), self.onScales) QtCore.QObject.connect(self.form.ySMax, QtCore.SIGNAL("editingFinished()"), self.onScales) QtCore.QObject.connect( Plot.getMdiArea(), QtCore.SIGNAL("subWindowActivated(QMdiSubWindow*)"), self.onMdiArea) return False