def getSpinRemoveAreaPixels(wgt, value): sp = QSpinBox(wgt) sp.setRange(0, 1000) sp.setSingleStep(1) sp.setSuffix(' pixels') sp.setValue(value) return sp
def getSpinRemoveAreaPixels(wgt, value): sp = QSpinBox( wgt) sp.setRange(0, 1000) sp.setSingleStep(1) sp.setSuffix(' pixels') sp.setValue(value) return sp
def getSpinBoxAzimuth(wgt, value): sp = QSpinBox( wgt) sp.setRange(0, 45) sp.setSingleStep(1) sp.setSuffix(' degrees') sp.setValue(value) msg = QCoreApplication.translate('GimpSelectionFeature', 'Degrees of azimuth between vertexs') sp.setToolTip( msg ) return sp
def getSpinBoxAzimuth(wgt, value): sp = QSpinBox(wgt) sp.setRange(0, 45) sp.setSingleStep(1) sp.setSuffix(' degrees') sp.setValue(value) msg = QCoreApplication.translate( 'GimpSelectionFeature', 'Degrees of azimuth between vertexs') sp.setToolTip(msg) return sp
def getSpinBoxIteration(wgt, value): sp = QSpinBox(wgt) sp.setRange(0, 3) sp.setSingleStep(1) sp.setValue(value) return sp
elif no == 2: self._angle2 = -9999.9 else: self._angle = -9999.9 self._angle2 = -9999.9 self.update() if __name__ == "__main__": from qgis.PyQt.Qt import QApplication app = QApplication(sys.argv) window = QWidget() compass = CompassWidget() spinBox = QSpinBox() spinBox.setRange(0, 719) spinBox.valueChanged.connect(compass.setAngle) spinBox2 = QSpinBox() spinBox2.setRange(0, 719) spinBox2.valueChanged.connect(compass.setAngle2) layout = QVBoxLayout() layout.addWidget(compass) layout.addWidget(spinBox) layout.addWidget(spinBox2) window.setLayout(layout) window.show() sys.exit(app.exec_())
def getSpinBoxIteration(wgt, value): sp = QSpinBox( wgt) sp.setRange(0, 3) sp.setSingleStep(1) sp.setValue(value) return sp