本文整理汇总了C++中BasicBox::isConditioned方法的典型用法代码示例。如果您正苦于以下问题:C++ BasicBox::isConditioned方法的具体用法?C++ BasicBox::isConditioned怎么用?C++ BasicBox::isConditioned使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicBox
的用法示例。
在下文中一共展示了BasicBox::isConditioned方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: penBlue
void
TriggerPoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
QRectF rect = boundingRect();
painter->save();
BasicBox *box = nullptr;
if (_abstract->boxID() != NO_ID) {
if ((box = _scene->getBox(_abstract->boxID())) != nullptr) {
QPen pen = painter->pen();
QBrush brush = painter->brush();
// selection
if (isSelected()) {
QPen penBlue(QColor(60,60,255)); // same blue as box selected
penBlue.setWidth(BasicBox::LINE_WIDTH);
painter->setPen(penBlue);
QPainterPath path;
path = shape();
painter->drawPath(path);
}
pen.setColor(box->color().darker());
pen.setWidth(BasicBox::LINE_WIDTH / 2);
painter->setPen(pen);
if (_scene->playing()) {
if (!isWaiting()) {
drawFlag(painter, QColor("red"));
}
else {
if(!_scene->triggersQueueList()->isEmpty())
{
if (_scene->triggersQueueList()->first() == this && !box->isConditioned()) {
drawFlag(painter, QColor("green"));
this->setFocus();
}
else {
drawFlag(painter, QColor("orange"));
}
}
}
if (_abstract->waiting()) {
BasicBox *box = _scene->getBox(_abstract->boxID());
box->update();
switch (_abstract->boxExtremity()) {
case BOX_START:
painter->drawText(rect.topRight() + QPointF(0, rect.height() / 2), QString::fromStdString(_abstract->message()));
break;
case BOX_END:
painter->drawText(rect.topLeft() + QPointF(-QString::fromStdString(_abstract->message()).length() * 7, rect.height() / 2), QString::fromStdString(_abstract->message()));
break;
default:
break;
}
}
}
else {
drawFlag(painter, QColor(Qt::darkGray));
}
}
}
painter->restore();
}