Ejemplo n.º 1
0
    def __init__(self, parent):
        QAbstractSpinBox.__init__(self, parent)

        self._minimum = 0.0
        self._maximum = 1.0
        self._default = 0.0
        self._value = None
        self._step = 0.0
        self._step_small = 0.0
        self._step_large = 0.0

        self._read_only = False
        self._scalepoints = None
        self._have_scalepoints = False

        self.bar = ParamProgressBar(self)
        self.bar.setContextMenuPolicy(Qt.NoContextMenu)
        self.bar.show()

        self.lineEdit().setVisible(False)

        self.connect(self.bar, SIGNAL("valueChangedFromBar(double)"), self.handleValueChangedFromBar)
        self.connect(self, SIGNAL("customContextMenuRequested(QPoint)"), self.showCustomMenu)

        QTimer.singleShot(0, self, SLOT("slot_updateBarGeometry()"))
Ejemplo n.º 2
0
    def __init__(self, parent):
        QAbstractSpinBox.__init__(self, parent)

        self.fMinimum = 0.0
        self.fMaximum = 1.0
        self.fDefault = 0.0
        self.fValue   = None
        self.fStep    = 0.0
        self.fStepSmall = 0.0
        self.fStepLarge = 0.0

        self.fReadOnly = False
        self.fScalePoints = None
        self.fHaveScalePoints = False

        self.fBar = ParamProgressBar(self)
        self.fBar.setContextMenuPolicy(Qt.NoContextMenu)
        self.fBar.show()

        self.fName = ""

        self.lineEdit().setVisible(False)

        self.connect(self, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_showCustomMenu()"))
        self.connect(self.fBar, SIGNAL("valueChanged(double)"), SLOT("slot_progressBarValueChanged(double)"))

        QTimer.singleShot(0, self, SLOT("slot_updateProgressBarGeometry()"))
Ejemplo n.º 3
0
 def __init__(self, *args):
     QAbstractSpinBox.__init__(self, *args)
     regexp = QtCore.QRegExp('^0x[0-9A-Fa-f]{1,10}$')
     self.validator = QtGui.QRegExpValidator(regexp)
     self._value = 0
 def __init__(self, *args):
     QAbstractSpinBox.__init__(self, *args)
     regexp = QtCore.QRegExp('^0x[0-9A-Fa-f]{1,10}$')
     self.validator = QtGui.QRegExpValidator(regexp)
     self._value = 0
Ejemplo n.º 5
0
 def resizeEvent(self, event):
     QTimer.singleShot(0, self, SLOT("slot_updateBarGeometry()"))
     QAbstractSpinBox.resizeEvent(self, event)
Ejemplo n.º 6
0
 def setReadOnly(self, yesNo):
     self.setButtonSymbols(QAbstractSpinBox.UpDownArrows if yesNo else QAbstractSpinBox.NoButtons)
     self.fReadOnly = yesNo
     QAbstractSpinBox.setReadOnly(self, yesNo)