本文整理汇总了Python中PyQt5.QtCore.Qt.darkRed方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.darkRed方法的具体用法?Python Qt.darkRed怎么用?Python Qt.darkRed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.darkRed方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mark_poi
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import darkRed [as 别名]
def mark_poi(self, times=None):
"""Mark selected signal, from list of start and end times.
Parameters
----------
times : list of tuple of float
start and end times, in sec form rec start
"""
y_pos = BARS['quality']['pos0']
height = 5
for rect in self.idx_poi:
self.scene.removeItem(rect)
self.idx_poi = []
if not times:
return
for beg, end in times:
rect = QGraphicsRectItem(beg, y_pos, end - beg, height)
rect.setPen(NoPen)
rect.setBrush(Qt.darkRed)
self.scene.addItem(rect)
self.idx_poi.append(rect)
示例2: paint_drop_indicator
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import darkRed [as 别名]
def paint_drop_indicator(self, painter):
if self.drag_active:
opt = QStyleOption()
opt.initFrom(self)
opt.rect = self.drop_indicator_rect
rect = opt.rect
brush = QBrush(QColor(Qt.darkRed))
if rect.height() == 0:
pen = QPen(brush, 2, Qt.SolidLine)
painter.setPen(pen)
painter.drawLine(rect.topLeft(), rect.topRight())
else:
pen = QPen(brush, 2, Qt.SolidLine)
painter.setPen(pen)
painter.drawRect(rect)
示例3: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import darkRed [as 别名]
def __init__(self, ui):
super().__init__(ui)
self.food_coordinates = None
self.wlabC = {
WLAB['U']: Qt.white,
WLAB['WORM']: Qt.green,
WLAB['WORMS']: Qt.blue,
WLAB['BAD']: Qt.darkRed,
WLAB['GOOD_SKE']: Qt.darkCyan
}
self.ui.checkBox_showFood.stateChanged.connect(self.updateImage)
self.ui.checkBox_showFood.setEnabled(False)
self.ui.checkBox_showFood.setChecked(True)
示例4: paint_drop_indicator
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import darkRed [as 别名]
def paint_drop_indicator(self, painter):
brush = QBrush(QColor(Qt.darkRed))
pen = QPen(brush, 2, Qt.SolidLine)
painter.setPen(pen)
rect = self.boundingRect()
if self.drop_indicator_position == QAbstractItemView.AboveItem:
painter.drawLine(QLineF(rect.topLeft(), rect.topRight()))
else:
painter.drawLine(QLineF(rect.bottomLeft(), rect.bottomRight()))
示例5: paint_drop_indicator
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import darkRed [as 别名]
def paint_drop_indicator(self, painter):
painter.setPen(QPen(Qt.darkRed, 2, Qt.SolidLine))
painter.setBrush(Qt.NoBrush)
rect = self.boundingRect()
if self.drop_indicator_position == QAbstractItemView.AboveItem:
painter.drawLine(QLineF(rect.topLeft(), rect.topRight()))
elif self.drop_indicator_position == QAbstractItemView.OnItem:
painter.drawRect(rect)
else:
painter.drawLine(QLineF(rect.bottomLeft(), rect.bottomRight()))