예제 #1
0
    def __init__(self, parent=None):
        if isinstance(parent, QWidget):
            self._font = parent.font()
        else:
            self._font = None

        QStyledItemDelegate.__init__(self, parent)
예제 #2
0
 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()		
예제 #4
0
 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)
예제 #5
0
    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()
예제 #6
0
    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
예제 #7
0
파일: column.py 프로젝트: Bouska/Turpial
 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
예제 #8
0
파일: column.py 프로젝트: urkh/Turpial
 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
예제 #9
0
    def __init__(self, controller, model, parent=None):
        """
        Constructor.
        """

        QStyledItemDelegate.__init__(self, parent)
        self._controller = controller
        self._model = model
예제 #10
0
 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 = []
예제 #11
0
    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)
예제 #12
0
	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
예제 #13
0
 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)
예제 #15
0
 def __init__(self):
     QStyledItemDelegate.__init__(self)
     self.prop = MaeMoneyProperties.instance()
     self.portraitSpecificDelegate = PortraitSpecificDelegate(self)
     self.landscapeSpecificDelegate = LandscapeSpecificDelegate(self)
예제 #16
0
 def __init__(self, sortingModel, parent):
     QStyledItemDelegate.__init__(self, parent)
     self.sortingModel = sortingModel
예제 #17
0
 def __init__(self):
     QStyledItemDelegate.__init__(self)
     self.columnWidths = {}
     self.columnWidths[StockMatchTableModel.COL_TICKER] = 150
     self.columnWidths[StockMatchTableModel.COL_NAME] = 400
예제 #18
0
 def __init__(self, parent=None, *args):
     QStyledItemDelegate.__init__(self, parent, *args)
예제 #19
0
 def __init__(self, mainloop, titles, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.mainloop = mainloop
     self.titles = titles
     self.editors = {}
예제 #20
0
 def __init__(self, parent=None, items_pair=[[], []]):
     QStyledItemDelegate.__init__(self, parent)
     self._items_pair = items_pair
예제 #21
0
 def __init__(self, mainloop, terminals, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.mainloop = mainloop
     self.terminals = terminals
     self.editors = {}
예제 #22
0
 def __init__(self, delta):
     QStyledItemDelegate.__init__(self)
     self.delta = delta
     self.lastHeight = 0
     return
예제 #23
0
 def __init__(self, typeCaptions, parent = None):
     QStyledItemDelegate.__init__(self, parent)
     self.typeCaptions = typeCaptions
예제 #24
0
    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
예제 #25
0
 def __init__(self):
     QStyledItemDelegate.__init__(self)
 def ListItemDelegate(self, parent):
     QStyledItemDelegate.__init__(parent)
예제 #27
0
파일: gui.py 프로젝트: jianlins/lpfw
 def __init__ (self):
     QStyledItemDelegate.__init__(self)
예제 #28
0
 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 = [[], []]
예제 #29
0
 def __init__(self, parent, html_column):
     self._html_column = html_column
     QStyledItemDelegate.__init__(self, parent)
예제 #30
0
 def __init__(self, sortingModel, parent):
     QStyledItemDelegate.__init__(self, parent)
     self.sortingModel = sortingModel
예제 #31
0
 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
예제 #33
0
 def __init__(self, inputType, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.inputType = inputType
예제 #34
0
 def __init__( self, delta ):
     QStyledItemDelegate.__init__( self )
     self.delta = delta
     self.lastHeight = 0
     return
예제 #35
0
 def __init__(self, viewWidget):
     QStyledItemDelegate.__init__(self)
     self.viewWidget = viewWidget
     self.counter = 0
예제 #36
0
 def __init__(self, parent=None):
     QStyledItemDelegate.__init__(self, parent)
예제 #37
0
 def __init__(self, *args, **kwargs):
     QStyledItemDelegate.__init__(self, *args, **kwargs)
     self._display_text = True