Exemplo n.º 1
0
    def __init__(self, parent=None):
        QStyledItemDelegate.__init__(self, parent)

        self.timestamp_delegate = TimestampDelegate()
        self.float_delegate = FloatDelegate(2)
        self.default = QStyledItemDelegate()

        self.delegates = {}
Exemplo n.º 2
0
 def __init__(self, key_field, value_field, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self._key = key_field
     self._value = value_field
     self.types = {
         AssetData.RegistrationCode: (self.tr("reg.code"), "str"),
         AssetData.ExpiryDate: (self.tr("expiry"), "date"),
         AssetData.PrincipalValue: (self.tr("principal"), "float")
     }
Exemplo n.º 3
0
 def __init__(self,
              tolerance=None,
              allow_tail=True,
              colors=False,
              parent=None):
     self._parent = parent
     QStyledItemDelegate.__init__(self, parent)
     try:
         self._tolerance = int(tolerance)
     except (ValueError, TypeError):
         self._tolerance = self.DEFAULT_TOLERANCE
     self._allow_tail = allow_tail
     self._colors = colors
     self._color = None
     self._validator = QDoubleValidator()
     self._validator.setLocale(QLocale().system())
Exemplo n.º 4
0
 def __init__(self, parent=None):
     self._view = parent
     QStyledItemDelegate.__init__(self, parent)
Exemplo n.º 5
0
 def __init__(self, parent=None):
     QStyledItemDelegate.__init__(self, parent)
Exemplo n.º 6
0
 def __init__(self, display_format='%d/%m/%Y %H:%M:%S', parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self._format = display_format