def __init__(self, parent, editable=True, icons=default_icons, **kwargs): CustomDelegate.__init__(self, parent=parent, editable=editable, icons=icons, **kwargs) self.icons_by_name = dict(icons)
def __init__(self, parent=None, editable=True, maximum=5, **kwargs): CustomDelegate.__init__(self, parent=parent, editable=editable, maximum=maximum, **kwargs) self.maximum = maximum
def __init__( self, parent=None, length=20, editable=True, translate_content=False, **kw ): CustomDelegate.__init__(self, parent, editable, length=length, **kw) self.length = length self.editable = editable self._translate_content = translate_content
def __init__(self, parent=None, unicode_format = None, **kwargs): CustomDelegate.__init__(self, parent=parent, **kwargs) self.unicode_format = unicode_format self.locale = QtCore.QLocale()
def __init__( self, parent = None, length = DEFAULT_COLUMN_WIDTH, translate_content=False, **kw ): CustomDelegate.__init__( self, parent, length = length, **kw ) self._translate_content = translate_content char_width = self._font_metrics.averageCharWidth() self._width = char_width * min( DEFAULT_COLUMN_WIDTH, length or DEFAULT_COLUMN_WIDTH )
def __init__(self, parent=None, length=20, editable=True, translate_content=False, **kw): CustomDelegate.__init__(self, parent, editable, length=length, **kw) self.length = length self.editable = editable self._translate_content = translate_content
def __init__(self, minimum=constants.camelot_minint, maximum=constants.camelot_maxint, parent=None, unicode_format = None, **kwargs): CustomDelegate.__init__(self, parent=parent, minimum=minimum, maximum=maximum, **kwargs) self.minimum = minimum self.maximum = maximum self.unicode_format = unicode_format
def __init__(self, parent=None, admin=None, editable=True, **kwargs): logger.debug('create many2onecolumn delegate') assert admin != None CustomDelegate.__init__(self, parent, editable, **kwargs) self.admin = admin self._kwargs = kwargs self._width = self._width * 2
def __init__(self, parent=None, precision=2, reverse=False, neutral=False, unicode_format=None, **kwargs ): CustomDelegate.__init__(self, parent=parent, reverse=reverse, neutral=neutral, precision=precision, unicode_format=unicode_format, **kwargs ) self.precision = precision self.reverse = reverse self.neutral = neutral self.unicode_format = unicode_format self._locale = QtCore.QLocale()
def __init__(self, parent=None, editable=True, yes='Yes', no='No', color_yes=None, color_no=None, **kwargs): CustomDelegate.__init__(self, parent, editable, **kwargs) self.yes = yes self.no = no self.color_no = color_no self.color_yes = color_yes
def __init__( self, minimum=constants.camelot_minfloat, maximum=constants.camelot_maxfloat, parent=None, unicode_format=None, **kwargs ): CustomDelegate.__init__(self, parent=parent, minimum=minimum, maximum=maximum, **kwargs ) self.minimum = minimum self.maximum = maximum self.unicode_format = unicode_format self._locale = QtCore.QLocale()
def __init__(self, minimum=constants.camelot_minfloat, maximum=constants.camelot_maxfloat, parent=None, unicode_format=None, **kwargs): CustomDelegate.__init__(self, parent=parent, minimum=minimum, maximum=maximum, **kwargs) self.minimum = minimum self.maximum = maximum self.unicode_format = unicode_format self._locale = QtCore.QLocale()
def __init__(self, minimum=constants.camelot_minint, maximum=constants.camelot_maxint, parent=None, unicode_format=None, **kwargs): CustomDelegate.__init__(self, parent=parent, minimum=minimum, maximum=maximum, **kwargs) self.minimum = minimum self.maximum = maximum self.unicode_format = unicode_format
def __init__(self, parent=None, minimum=-1e15, maximum=1e15, precision=2, editable=True, reverse=False, neutral=False, unicode_format=None, **kwargs ): CustomDelegate.__init__(self, parent=parent, editable=editable, minimum=minimum, maximum=maximum, reverse=reverse, neutral=neutral, precision=precision, unicode_format=unicode_format, **kwargs ) self.minimum = minimum self.maximum = maximum self.precision = precision self.editable = editable self.reverse = reverse self.neutral = neutral self.unicode_format = unicode_format
def __init__(self, parent=None, precision=2, reverse=False, neutral=False, unicode_format=None, **kwargs): CustomDelegate.__init__(self, parent=parent, reverse=reverse, neutral=neutral, precision=precision, unicode_format=unicode_format, **kwargs) self.precision = precision self.reverse = reverse self.neutral = neutral self.unicode_format = unicode_format self._locale = QtCore.QLocale()
def __init__( self, minimum=constants.camelot_minfloat, maximum=constants.camelot_maxfloat, precision=2, parent=None, unicode_format=None, **kwargs ): """ :param precision: The number of digits after the decimal point displayed. This defaults to the precision specified in the definition of the Field. """ CustomDelegate.__init__(self, parent=parent, precision=precision, minimum=minimum, maximum=maximum, **kwargs ) self.minimum = minimum self.maximum = maximum self.precision = precision self.unicode_format = unicode_format
def __init__(self, minimum=constants.camelot_minfloat, maximum=constants.camelot_maxfloat, precision=2, parent=None, unicode_format=None, **kwargs): """ :param precision: The number of digits after the decimal point displayed. This defaults to the precision specified in the definition of the Field. """ CustomDelegate.__init__(self, parent=parent, precision=precision, minimum=minimum, maximum=maximum, **kwargs) self.minimum = minimum self.maximum = maximum self.precision = precision self.unicode_format = unicode_format
def __init__(self, parent=None, parts=[], separator=u'.', **kwargs): CustomDelegate.__init__(self, parent=parent, parts=parts, **kwargs) self.parts = parts self.separator = separator
def __init__(self, parent=None, editable=True, **kwargs): CustomDelegate.__init__(self, parent, editable) locale = QtCore.QLocale() self.time_format = locale.timeFormat(locale.ShortFormat)
def __init__(self, parent=None, editable=True, **kwargs): CustomDelegate.__init__(self, parent, editable) self.editable = editable self._height = self._height * 10 self._width = self._width * 3
def __init__(self, parent=None, **kwargs): CustomDelegate.__init__(self, parent, **kwargs)
def __init__(self, parent=None, **kwargs): CustomDelegate.__init__(self, parent, **kwargs) self.date_format = local_date_format() self._width = self._font_metrics.averageCharWidth() * (len(self.date_format) + 2) + (camelot_small_icon_width*2)
def __init__(self, parent=None, choices=[], editable=True, **kwargs): CustomDelegate.__init__(self, parent, editable=editable, **kwargs) self.choices = choices self._choices_dict = dict(choices)
if stop(): break thingy.waitForNotifications(1) print('- sensor loop stopping') stop_thread = False sensorLoopThread = threading.Thread(target=sensorLoopMethod, args=(id, lambda: stop_thread)) deviceAddress = "CA:9E:A7:DB:F4:D0" thingy = Thingy52(deviceAddress) print('Initializing device...') try: thingy.setDelegate(CustomDelegate()) thingy.ui.enable() thingy.ui.set_btn_notification(True) sensorLoopThread.start() print('Waiting user action') cfg.inactivityTimer = time.time() # initialize inactivity timer while (time.time() - cfg.inactivityTimer) < 10: time.sleep(1.0) print(str(int(time.time() - cfg.inactivityTimer))) print('Timeout received.') stop_thread = True # stopping thread sensorLoopThread.join() # waiting thread to stop
def __init__( self, parent=None, **kw ): CustomDelegate.__init__(self, parent, **kw)
def __init__(self, parent, editable=True, **kwargs): CustomDelegate.__init__(self, parent=parent, editable=editable, maximum=1, **kwargs)
def __init__(self, parent=None, unicode_format=None, **kwargs): CustomDelegate.__init__(self, parent=parent, **kwargs) self.unicode_format = unicode_format self.locale = QtCore.QLocale()