def __init__(self, parent): ''' Delegate for custom_column bool data. ''' QStyledItemDelegate.__init__(self, parent) self.disallow_edit = gprefs[ 'edit_metadata_templates_only_F2_on_booklist']
def __init__(self, parent, tweak_name='gui_timestamp_display_format', default_format='dd MMM yyyy'): QStyledItemDelegate.__init__(self, parent) self.table_widget = parent self.tweak_name = tweak_name self.format = tweaks[self.tweak_name] if self.format is None: self.format = default_format
def __init__(self, parent): ''' Delegate for text data. If auto_complete_function needs to return a list of text items to auto-complete with. If the function is None no auto-complete will be used. ''' QStyledItemDelegate.__init__(self, parent) self.table_widget = parent self.auto_complete_function = None
def __init__(self, *args, **kwargs): QStyledItemDelegate.__init__(self, *args) self.is_half_star = kwargs.get('is_half_star', False) self.table_widget = args[0] self.rf = QFont(rating_font()) self.em = Qt.TextElideMode.ElideMiddle delta = 0 if iswindows and sys.getwindowsversion().major >= 6: delta = 2 self.rf.setPointSize(QFontInfo(QApplication.font()).pointSize()+delta)
def __init__(self, parent=None): QStyledItemDelegate.__init__(self, parent)
def __init__(self, parent): ''' Delegate for custom_column bool data. ''' QStyledItemDelegate.__init__(self, parent) self.table_widget = parent
def __init__(self, parent): QStyledItemDelegate.__init__(self, parent) self.document = QTextDocument()
def __init__(self, parent): QStyledItemDelegate.__init__(self, parent) self.table_widget = parent self.longest_text = ''
def __init__(self, parent): QStyledItemDelegate.__init__(self, parent) self.table_widget = parent
def __init__(self, parent, sep, items_func_name, space_before_sep=False): QStyledItemDelegate.__init__(self, parent) self.sep = sep self.items_func_name = items_func_name self.space_before_sep = space_before_sep self.table_widget = parent
def __init__(self, *args, **kwargs): QStyledItemDelegate.__init__(self, *args, **kwargs) self.format = tweaks['gui_pubdate_display_format'] self.table_widget = args[0] if self.format is None: self.format = 'MMM yyyy'
def __init__(self, parent=None): QStyledItemDelegate.__init__(self, parent) self.item_size = QSize(32, 32) self.np_pat = re.compile(r'(sp|j|nj|ss|fs|ds)$')
def __init__(self, view): QStyledItemDelegate.__init__(self, view) self.view = view
def __init__(self, parent=None): QStyledItemDelegate.__init__(self, parent) self.editing_indices = {} self.closeEditor.connect(self.editing_done)
def __init__(self, parent): QStyledItemDelegate.__init__(self, parent) self.animator = SpinAnimator(self) self.animator.updated.connect(self.needs_redraw) self.color = parent.palette().color(QPalette.ColorRole.WindowText) self.spinner_width = 64
def __init__(self, parent=None, max_width=160): QStyledItemDelegate.__init__(self, parent) self.max_width = max_width self.dummy_model = QStringListModel([' '], self) self.dummy_index = self.dummy_model.index(0)
def __init__(self, all_authors, parent): QStyledItemDelegate.__init__(self, parent) self.all_authors = all_authors