예제 #1
0
    def __init__(self, parent, init):
        ListSyncModel.__init__(self,
            ["Level", "Source", "Time", "Message"],
            parent, init)
        self.fixed_font = QtGui.QFont()
        self.fixed_font.setFamily("Monospace")

        self.white = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        self.black = QtGui.QBrush(QtGui.QColor(0, 0, 0))
        self.debug_fg = QtGui.QBrush(QtGui.QColor(55, 55, 55))
        self.warning_bg = QtGui.QBrush(QtGui.QColor(255, 255, 180))
        self.error_bg = QtGui.QBrush(QtGui.QColor(255, 150, 150))
예제 #2
0
 def _get_group(self, name):
     if name in self._groups:
         return self._groups[name]
     group = QtGui.QTreeWidgetItem([name, ""])
     for c in 0, 1:
         group.setBackground(c, QtGui.QBrush(QtGui.QColor(100, 100, 100)))
         group.setForeground(c, QtGui.QBrush(QtGui.QColor(220, 220, 255)))
         font = group.font(c)
         font.setBold(True)
         group.setFont(c, font)
     self.addTopLevelItem(group)
     self._groups[name] = group
     return group