def __init__(self, parent=None): if isinstance(parent, QWidget): self._font = parent.font() else: self._font = None QStyledItemDelegate.__init__(self, parent)
def __init__(self, layersView, listModel, parent = None): QStyledItemDelegate.__init__(self, parent=parent) self.currentIndex = -1 self._view = layersView self._w = LayerItemWidget() self._listModel = listModel self._listModel.rowsAboutToBeRemoved.connect(self.handleRemovedRows)
def __init__(self, qnotero): """ Constructor Arguments: qnotero -- a Qnotero instance """ QStyledItemDelegate.__init__(self, qnotero) self.qnotero = qnotero self.boldFont = QFont() self.boldFont.setBold(True) self.regularFont = QFont() self.italicFont = QFont() self.italicFont.setItalic(True) self.tagFont = QFont() self.tagFont.setBold(True) self.tagFont.setPointSize(self.boldFont.pointSize() - 2) self.dy = QFontMetrics(self.boldFont) \ .size(Qt.TextSingleLine, "Dummy").height() \ *self.qnotero.theme.lineHeight() self.margin = 0.5*self.dy self._margin = 0.1*self.dy self.height = 5*self.dy+self._margin self.noPdfPixmap = self.qnotero.theme.pixmap("nopdf") self.pdfPixmap = self.qnotero.theme.pixmap("pdf") self.aboutPixmap = self.qnotero.theme.pixmap("about") self.notePixmap = self.qnotero.theme.pixmap("note") self.pixmapSize = self.pdfPixmap.height()+0.5*self.dy self.roundness = self.qnotero.theme.roundness()
def __init__(self, layersView, listModel, parent=None): QStyledItemDelegate.__init__(self, parent=parent) self.currentIndex = -1 self._view = layersView self._w = LayerItemWidget() self._listModel = listModel self._listModel.rowsAboutToBeRemoved.connect(self.handleRemovedRows)
def __init__(self, qnotero): """ Constructor Arguments: qnotero -- a Qnotero instance """ QStyledItemDelegate.__init__(self, qnotero) self.qnotero = qnotero self.boldFont = QFont() self.boldFont.setBold(True) self.regularFont = QFont() self.italicFont = QFont() self.italicFont.setItalic(True) self.tagFont = QFont() self.tagFont.setBold(True) self.tagFont.setPointSize(self.boldFont.pointSize() - 2) self.dy = QFontMetrics(self.boldFont) \ .size(Qt.TextSingleLine, u"Dummy").height() \ *self.qnotero.theme.lineHeight() self.margin = 0.5 * self.dy self._margin = 0.1 * self.dy self.height = 5 * self.dy + self._margin self.noPdfPixmap = self.qnotero.theme.pixmap(u"nopdf") self.pdfPixmap = self.qnotero.theme.pixmap(u"pdf") self.aboutPixmap = self.qnotero.theme.pixmap(u"about") self.notePixmap = self.qnotero.theme.pixmap(u"note") self.pixmapSize = self.pdfPixmap.height() + 0.5 * self.dy self.roundness = self.qnotero.theme.roundness()
def __init__(self, layersView, parent = None): QStyledItemDelegate.__init__(self, parent) self.currentIndex = -1 self._view = layersView self._layerPainter = LayerPainter() #whether to draw all layers expanded self.expandAll = True
def __init__(self, base): QStyledItemDelegate.__init__(self) self.favorite_icon = base.load_image('mark-favorite.png', True) self.verified_icon = base.load_image('mark-verified.png', True) self.protected_icon = base.load_image('mark-protected.png', True) self.repeated_icon = base.load_image('mark-repeated.png', True) self.reposted_icon = base.load_image('mark-reposted.png', True) self.avatar = None
def __init__(self, controller, model, parent=None): """ Constructor. """ QStyledItemDelegate.__init__(self, parent) self._controller = controller self._model = model
def __init__( self, query, showTable = False ): QStyledItemDelegate.__init__( self ) self.accounts = QSqlQueryModel() self.accounts.setQuery( query ) self.proxymodel = QSortFilterProxyModel() self.proxymodel.setFilterKeyColumn( 0 ) self.proxymodel.setSourceModel( self.accounts ) self.showTable = showTable self.filtrados = []
def __init__(self, layersView, listModel, parent = None): QStyledItemDelegate.__init__(self, parent) self.currentIndex = -1 self._view = layersView self._editors = {} self._listModel = listModel #whether to draw all layers expanded self.expandAll = True self._listModel.rowsAboutToBeRemoved.connect(self.handleRemovedRows)
def __init__(self, parent=None, style=None, highlightColor=None, hoverColor=None, backgroundColor=None, highlightBackgroundColor=None, hoverBackgroundColor=None): """ Initializes the class. :param parent: Widget parent. :type parent: QObject :param style: Style. :type style: Style """ LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__)) QStyledItemDelegate.__init__(self, parent) # --- Setting class attributes. --- self.__indent = 5 self.__label = QLabel() self.__label.setIndent(self.__indent) self.__label.setTextFormat(Qt.RichText) self.__defaultStyle = Style(default=\ """ QLabel, QLabel link { background-color: rgb(32, 32, 32); color: rgb(192, 192, 192); } """, hover=\ """ QLabel, QLabel link { background-color: rgb(64, 64, 64); color: rgb(192, 192, 192); } """, highlight=\ """ QLabel, QLabel link { background-color: rgb(128, 128, 128); color: rgb(224, 224, 224); } """) self.__style = self.__defaultStyle self.style = style or self.__style
def __init__(self, layersView, listModel, parent = None): QStyledItemDelegate.__init__(self, parent=parent) self.currentIndex = -1 self._view = layersView self._w = LayerItemWidget() self._listModel = listModel self._listModel.rowsAboutToBeRemoved.connect(self.handleRemovedRows) # We keep a dict of all open editors for easy access. # Note that the LayerWidget uses persistent editors. # (This is for convenience of testing.) # This is also why we don't need to override the paint() method here. self._editors = {}
def __init__(self, parent=None, *args): QStyledItemDelegate.__init__(self, parent, *args)
def __init__(self): QStyledItemDelegate.__init__(self) self.prop = MaeMoneyProperties.instance() self.portraitSpecificDelegate = PortraitSpecificDelegate(self) self.landscapeSpecificDelegate = LandscapeSpecificDelegate(self)
def __init__(self, sortingModel, parent): QStyledItemDelegate.__init__(self, parent) self.sortingModel = sortingModel
def __init__(self): QStyledItemDelegate.__init__(self) self.columnWidths = {} self.columnWidths[StockMatchTableModel.COL_TICKER] = 150 self.columnWidths[StockMatchTableModel.COL_NAME] = 400
def __init__(self, mainloop, titles, parent=None): QStyledItemDelegate.__init__(self, parent) self.mainloop = mainloop self.titles = titles self.editors = {}
def __init__(self, parent=None, items_pair=[[], []]): QStyledItemDelegate.__init__(self, parent) self._items_pair = items_pair
def __init__(self, mainloop, terminals, parent=None): QStyledItemDelegate.__init__(self, parent) self.mainloop = mainloop self.terminals = terminals self.editors = {}
def __init__(self, delta): QStyledItemDelegate.__init__(self) self.delta = delta self.lastHeight = 0 return
def __init__(self, typeCaptions, parent = None): QStyledItemDelegate.__init__(self, parent) self.typeCaptions = typeCaptions
def __init__(self, parent, editor, grid_color, selection_color): QStyledItemDelegate.__init__(self, parent) self._editor = editor self._grid_color = grid_color self._selection_color = selection_color
def __init__(self): QStyledItemDelegate.__init__(self)
def ListItemDelegate(self, parent): QStyledItemDelegate.__init__(parent)
def __init__ (self): QStyledItemDelegate.__init__(self)
def __init__(self, parent=None, items_pair=None): QStyledItemDelegate.__init__(self, parent) self._items_pair = items_pair if self._items_pair is None: self._items_pair = [[], []]
def __init__(self, parent, html_column): self._html_column = html_column QStyledItemDelegate.__init__(self, parent)
def __init__(self, viewWidget): QStyledItemDelegate.__init__(self) self.viewWidget = viewWidget self.counter = 0
def __init__(self, inputType, parent=None): QStyledItemDelegate.__init__(self, parent) self.inputType = inputType
def __init__( self, delta ): QStyledItemDelegate.__init__( self ) self.delta = delta self.lastHeight = 0 return
def __init__(self, parent=None): QStyledItemDelegate.__init__(self, parent)
def __init__(self, *args, **kwargs): QStyledItemDelegate.__init__(self, *args, **kwargs) self._display_text = True