当前位置: 首页>>代码示例>>Python>>正文


Python Qt.darkRed方法代码示例

本文整理汇总了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) 
开发者ID:wonambi-python,项目名称:wonambi,代码行数:26,代码来源:overview.py

示例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) 
开发者ID:jopohl,项目名称:urh,代码行数:19,代码来源:GeneratorTableView.py

示例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) 
开发者ID:ver228,项目名称:tierpsy-tracker,代码行数:16,代码来源:MWTrackerViewer.py

示例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())) 
开发者ID:jopohl,项目名称:urh,代码行数:12,代码来源:GraphicsItem.py

示例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())) 
开发者ID:jopohl,项目名称:urh,代码行数:13,代码来源:RuleItem.py


注:本文中的PyQt5.QtCore.Qt.darkRed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。