您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ zValue函数代码示例

51自学网 2021-06-03 11:55:17
  C++
这篇教程C++ zValue函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中zValue函数的典型用法代码示例。如果您正苦于以下问题:C++ zValue函数的具体用法?C++ zValue怎么用?C++ zValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了zValue函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GvbWidget

AbstractScrollArea::AbstractScrollArea(QGraphicsWidget *parent)    : GvbWidget(parent)    , m_viewport(0)    , m_horizontalScrollBar(0)    , m_verticalScrollBar(0)    , m_prevHorizontalValue(0.0)    , m_prevVerticalValue(0.0){    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);    setContentsMargins(0, 0, 0, 0);         m_horizontalScrollBar = new ScrollBar(Qt::Horizontal, this);    m_horizontalScrollBar->hide();    m_horizontalScrollBar->setContentsMargins(0, 0, 0, 0);     m_horizontalScrollBarPolicy = Qt::ScrollBarAsNeeded;    m_horizontalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top    m_horizontalScrollBar->setVisible(false);    connect(m_horizontalScrollBar, SIGNAL(sliderPositionChange(qreal)),            this, SLOT(horizontalScroll(qreal)));    connect(m_horizontalScrollBar, SIGNAL(sliderPressed()),            this, SLOT(horizontalScrollStart()));    m_verticalScrollBar = new ScrollBar(Qt::Vertical, this);    m_verticalScrollBar->hide();    m_verticalScrollBar->setContentsMargins(0, 0, 0, 0);     m_verticalScrollBarPolicy = Qt::ScrollBarAsNeeded;    m_verticalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top    m_verticalScrollBar->setVisible(false);    connect(m_verticalScrollBar, SIGNAL(sliderPositionChange(qreal)),            this, SLOT(verticalScroll(qreal)));    connect(m_verticalScrollBar, SIGNAL(sliderPressed()),            this, SLOT(verticalScrollStart()));    QGraphicsWidget *viewport = new QGraphicsWidget;    setViewport(viewport);}
开发者ID:Suneal,项目名称:qt,代码行数:38,


示例2: brush

  void CreatorItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* , QWidget* )  {    QPen pen;    if (zValue() < depth_)      pen.setStyle(Qt::DotLine);    painter->setPen(pen);    QBrush brush(color_);    if (zValue() < depth_)      brush.setStyle(Qt::Dense4Pattern);    painter->setBrush(brush);    painter->drawRect(0, 0, 9, 9);  }
开发者ID:nelbok,项目名称:srp-creator,代码行数:14,


示例3: addPropertyAsAttribute

void KoReportDesignerItemChart::buildXML(QDomDocument & doc, QDomElement & parent){    QDomElement entity = doc.createElement("report:chart");    // properties    addPropertyAsAttribute(&entity, m_name);    addPropertyAsAttribute(&entity, m_dataSource);    addPropertyAsAttribute(&entity, m_chartType);    addPropertyAsAttribute(&entity, m_chartSubType);    addPropertyAsAttribute(&entity, m_threeD);    addPropertyAsAttribute(&entity, m_colorScheme);    addPropertyAsAttribute(&entity, m_aa);    addPropertyAsAttribute(&entity, m_xTitle);    addPropertyAsAttribute(&entity, m_yTitle);    addPropertyAsAttribute(&entity, m_backgroundColor);    addPropertyAsAttribute(&entity, m_displayLegend);    addPropertyAsAttribute(&entity, m_legendPosition);    addPropertyAsAttribute(&entity, m_legendOrientation);    addPropertyAsAttribute(&entity, m_linkChild);    addPropertyAsAttribute(&entity, m_linkMaster);    entity.setAttribute("report:z-index", zValue());    // bounding rect    buildXMLRect(doc, entity, &m_pos, &m_size);    parent.appendChild(entity);}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:27,


示例4: updatePosition

 void InputTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {   if(pos() != position_change) {     //d->getNoticeWindow()->write("Pos change");     updatePosition(d, Vec3D(pos().x(), pos().y(), zValue()));   }   QGraphicsTextItem::mouseReleaseEvent(event); }
开发者ID:ptierney,项目名称:Kaleidoscope,代码行数:7,


示例5: rect

void ActivityContainerCanvas::force_inside(DiagramItem * di, QGraphicsItem * ci,        BooL & need_sub_upper){    QRect r = rect();    QRect sr = di->rect();    int dx = 0;    int dy = 0;    if (sr.left() < r.left()) {        if (sr.right() <= r.right())            dx = r.left() - sr.left();    }    else if (sr.right() > r.right())        dx = r.right() - sr.right();    if (sr.top() < r.top()) {        if (sr.bottom() <= r.bottom())            dy = r.top() - sr.top();    }    else if (sr.bottom() > r.bottom())        dy = r.bottom() - sr.bottom();    if ((dx != 0) || (dy != 0))        ci->moveBy(dx, dy);    need_sub_upper |= (ci->zValue() <= zValue());}
开发者ID:ErickCastellanos,项目名称:douml,代码行数:27,


示例6: valueEditingStarted

void GraphicsContinuousControlItem::mousePressEvent(QGraphicsSceneMouseEvent * event){    if (minValue != maxValue) {        GraphicsLabelItem::mousePressEvent(event);        if (event->isAccepted()) {            valueEditingStarted();            positionBeforeEdit = pos();            rectBeforeEdit = rect();            waitingForMouseReleaseEvent = true;            valueBeforeEdit = currentValue;            // create label items marking the minimum and maximum value:            setZValue(zValue() + 2);            double absolutePositionBeforeEdit = (orientation == HORIZONTAL ? positionBeforeEdit.x() : -positionBeforeEdit.y());            double relativePositionBeforeEdit = size * (valueBeforeEdit - minValue) / (maxValue - minValue);            double minPos = absolutePositionBeforeEdit - relativePositionBeforeEdit;            double maxPos = minPos + size;            backgroundRect->setVisible(true);            minLabel->setVisible(true);            maxLabel->setVisible(true);            if (orientation == HORIZONTAL) {                minLabel->setPos(QPointF(minPos, positionBeforeEdit.y()));                maxLabel->setPos(QPointF(maxPos, positionBeforeEdit.y()));            } else {                minLabel->setPos(QPointF(alignX(minLabel->rect(), rectBeforeEdit.translated(positionBeforeEdit)), -minPos));                maxLabel->setPos(QPointF(alignX(maxLabel->rect(), rectBeforeEdit.translated(positionBeforeEdit)), -maxPos));            }            backgroundRect->setRect((minLabel->rect().translated(minLabel->pos()) | maxLabel->rect().translated(maxLabel->pos())));//.adjusted(-1, -1, 1, 1));            setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);        }    }}
开发者ID:elektrokokke,项目名称:elektrocillin,代码行数:31,


示例7: AppletToolbarBase

Context::AppletToolbarConfigItem::AppletToolbarConfigItem( QGraphicsItem* parent )    : AppletToolbarBase( parent )    , m_iconPadding( 2 )    , m_icon( 0 ){    QAction* listAdd = new QAction( i18n( "Configure Applets..." ), this );    listAdd->setIcon( KIcon( "configure" ) );    listAdd->setVisible( true );    listAdd->setEnabled( true );        connect( listAdd, SIGNAL(triggered()), this, SIGNAL(triggered()) );        m_icon = new Plasma::IconWidget( this );    m_icon->setAction( listAdd );    m_icon->setText( QString() );    m_icon->setToolTip( listAdd->text() );    m_icon->setDrawBackground( false );    m_icon->setOrientation( Qt::Horizontal );    QSizeF iconSize = m_icon->sizeFromIconSize( 22 );    m_icon->setMinimumSize( iconSize );    m_icon->setMaximumSize( iconSize );    m_icon->resize( iconSize );    m_icon->setZValue( zValue() + 1 );    setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );    }
开发者ID:cancamilo,项目名称:amarok,代码行数:28,


示例8: State

Character* Character::clone(){    Character* p=new Character;    p->setName(name);    p->setViewReceiver(receiver);    p->setStateTotal(stateTotal);    p->setDragable(dragable);    p->setShowRect(showRect);    for(int i=0;i<stateTotal;i++)    {        State* state=new State(stateBox[i]);        state->setSprite(p);        p->getStateBox().push_back(state);    }    p->init();    p->setZValue(zValue());    p->setWeight(weight);    p->setHP(HP);    p->setMP(MP);    p->setHPMax(HPMax);    p->setMPMax(MPMax);    p->setType(type);    return p;}
开发者ID:qwertylevel3,项目名称:WorldCreator,代码行数:30,


示例9: get_ident

void CodDirsCanvas::save(QTextStream & st, bool ref, QString & warning) const{    if (ref)        st << "dirscanvas_ref " << get_ident();    else {        nl_indent(st);        st << "dirscanvas " << get_ident() << " z " << zValue() << " ";        link->save(st, TRUE, warning);        indent(+1);        settings.save_msg(st);        if (label != 0) {            nl_indent(st);            st << "forward_label ";            save_string(label->get_name().toLatin1().constData(), st);            save_xyz(st, label, " xyz");        }        if (backward_label != 0) {            nl_indent(st);            st << "backward_label ";            save_string(backward_label->get_name().toLatin1().constData(), st);            save_xyz(st, backward_label, " xyz");        }        indent(-1);    }}
开发者ID:kennyams,项目名称:douml,代码行数:30,


示例10: ScanItem

void TextButton::setupScanItem(){    if (Colors::useButtonBalls){        ScanItem *scanItem = new ScanItem(0, this);        scanItem->setZValue(zValue() + 1);        this->scanAnim = new DemoItemAnimation(scanItem);        this->scanAnim->timeline->setLoopCount(1);        float x = 1;        float y = 1.5f;        float stop = BUTTON_WIDTH - scanItem->boundingRect().width() - x;        if (this->alignment == LEFT){            this->scanAnim->setDuration(2500);            this->scanAnim->setPosAt(0.0, QPointF(x, y));            this->scanAnim->setPosAt(0.5, QPointF(x, y));            this->scanAnim->setPosAt(0.7, QPointF(stop, y));            this->scanAnim->setPosAt(1.0, QPointF(x, y));            scanItem->setPos(QPointF(x, y));        }        else {            this->scanAnim->setPosAt(0.0, QPointF(stop, y));            this->scanAnim->setPosAt(0.5, QPointF(x, y));            this->scanAnim->setPosAt(1.0, QPointF(stop, y));            scanItem->setPos(QPointF(stop, y));        }    }}
开发者ID:BGmot,项目名称:Qt,代码行数:28,


示例11: addOutputConnection

void OperatorItem::addOutputConnection(unsigned int id, ConnectionItem* connection){    m_outputs[id]->addConnection(connection);        // move the output connection slightly in front of the operator    connection->setZValue(zValue() + m_outputs.count() * CONNECTION_Z_OFFSET);}
开发者ID:uboot,项目名称:stromx-studio,代码行数:7,


示例12: ArrowPointCanvas

ArrowPointCanvas * CodLinkCanvas::brk(const QPoint & p){    ArrowPointCanvas * ap =            new ArrowPointCanvas(the_canvas(), p.x(), p.y());    ap->setZValue(zValue() + 1);    CodLinkCanvas * other =            new CodLinkCanvas(the_canvas(), ap, end, 0, decenter_begin, decenter_end);    ap->add_line(this);    end->remove_line(this, TRUE);    end = ap;    //update_pos();    ap->show();    other->show();    if (dirs &&            ((p - beginp).manhattanLength() < (p - endp).manhattanLength())) {        other->dirs = dirs;        dirs = 0;        other->dirs->set_link(other);        other->dirs->update_pos(other->beginp, other->endp);    }    modified();    other->modified();    return ap;}
开发者ID:kennyams,项目名称:douml,代码行数:32,


示例13: return

Quasi::Ordering Entity::order() const{#if QT_VERSION >= 0x050000    return (Quasi::Ordering)z();#else    return (Quasi::Ordering)zValue();#endif}
开发者ID:qrwteyrutiyoup,项目名称:Quasi-Engine,代码行数:8,


示例14: history_save

void LabelCanvas::history_save(QBuffer & b) const{    ::save(this, b);    ::save(center_x_scale100, b);    ::save(center_y_scale100, b);    ::save(x(), b);    ::save(y(), b);    ::save(zValue(), b);}
开发者ID:javrillon,项目名称:douml,代码行数:9,


示例15: DemoTextItem

void TextButton::setupHoverText(){    if (this->buttonLabel.isEmpty())        return;    DemoTextItem *textItem = new DemoTextItem(this->buttonLabel, Colors::buttonFont(), Colors::buttonText, -1, this->scene(), this);    textItem->setZValue(zValue() + 2);    textItem->setPos(16, 0);}
开发者ID:BGmot,项目名称:Qt,代码行数:9,


示例16: itemChange

QVariant AbstractFigure::itemChange(GraphicsItemChange change, const QVariant &value) {    if (change == ItemSelectedChange && value.toBool()) {        if (zValue() < maxZOrder) {            maxZOrder += 0.1;            setZValue(maxZOrder);        }    }    return QGraphicsItem::itemChange(change, value);}
开发者ID:nothingelsematters7,项目名称:TP_Task1,代码行数:9,


示例17: setZ

void Entity::setOrder(Quasi::Ordering order){#if QT_VERSION >= 0x050000    if (z() != order)        setZ(order);#else    if (zValue() != order)        setZValue(order);#endif}
开发者ID:qrwteyrutiyoup,项目名称:Quasi-Engine,代码行数:10,


示例18: foreach

	foreach (QGraphicsItem *item, collidingItems()){		if (item->zValue() == zValue() - 1){			QString kind = item->data(0).toString();			if ((kind == "Object") || (kind == "Robot")){				hide();				m_bulletTime->stop();				emit bulletCollision(item);			}		}	}
开发者ID:rodrigogolive,项目名称:KWarBots,代码行数:12,


示例19: kDebug

void ReportEntityLabel::buildXML(QDomDocument & doc, QDomElement & parent){    kDebug();    //kdDebug() << "ReportEntityLabel::buildXML()");    QDomElement entity = doc.createElement("label");    // bounding rect    buildXMLRect(doc, entity, pointRect());    // name    QDomElement n = doc.createElement("name");    n.appendChild(doc.createTextNode(entityName()));    entity.appendChild(n);    // z    QDomElement z = doc.createElement("zvalue");    z.appendChild(doc.createTextNode(QString::number(zValue())));    entity.appendChild(z);    // font info    //buildXMLFont ( doc,entity,font() );    //text style info    buildXMLTextStyle(doc, entity, textStyle());    //Line Style    buildXMLLineStyle(doc, entity, lineStyle());    // text alignment    int align = textFlags();    // horizontal    if ((align & Qt::AlignRight) == Qt::AlignRight)        entity.appendChild(doc.createElement("right"));    else if ((align & Qt::AlignHCenter) == Qt::AlignHCenter)        entity.appendChild(doc.createElement("hcenter"));    else // Qt::AlignLeft        entity.appendChild(doc.createElement("left"));    // vertical    if ((align & Qt::AlignBottom) == Qt::AlignBottom)        entity.appendChild(doc.createElement("bottom"));    else if ((align & Qt::AlignVCenter) == Qt::AlignVCenter)        entity.appendChild(doc.createElement("vcenter"));    else // Qt::AlignTop        entity.appendChild(doc.createElement("top"));    // the text string    QDomElement string = doc.createElement("string");    string.appendChild(doc.createTextNode(text()));    entity.appendChild(string);    parent.appendChild(entity);}
开发者ID:JeremiasE,项目名称:KFormula,代码行数:52,


示例20: scene

QVariant AbstractContent::itemChange(GraphicsItemChange change, const QVariant & value){    // keep the AbstractContent's center inside the scene rect..    if (change == ItemPositionChange && scene()) {        QPointF newPos = value.toPointF();        QRectF sceneRect = scene()->sceneRect();        if (!sceneRect.contains(newPos) && sceneRect.width() > 100 && sceneRect.height() > 100) {            newPos.setX(qBound(sceneRect.left(), newPos.x(), sceneRect.right()));            newPos.setY(qBound(sceneRect.top(), newPos.y(), sceneRect.bottom()));            return newPos;        }    }    // tell subclasses about selection changes    if (change == ItemSelectedHasChanged)        selectionChanged(value.toBool());    // changes that affect the mirror item    if (m_mirrorItem) {        switch (change) {            // notify about setPos            case ItemPositionHasChanged:                m_mirrorItem->sourceMoved();                break;            // notify about graphics changes            //case ItemMatrixChange:            //case ItemTransformChange:            case ItemTransformHasChanged:            case ItemEnabledHasChanged:            case ItemSelectedHasChanged:            case ItemParentHasChanged:            case ItemOpacityHasChanged:                GFX_CHANGED();                break;            case ItemZValueHasChanged:                m_mirrorItem->setZValue(zValue());                break;            case ItemVisibleHasChanged:                m_mirrorItem->setVisible(isVisible());                break;            default:                break;        }    }    // ..or just apply the value    return QGraphicsItem::itemChange(change, value);}
开发者ID:AndySardina,项目名称:fotowall,代码行数:52,


示例21: poly

voiddmz::QtCanvasLink::set_arrow_state (const Boolean State) {   if (State) {      if (!_arrow1) { _arrow1 = new QGraphicsPolygonItem (this); }      if (!_arrow2) { _arrow2 = new QGraphicsPolygonItem (this); }      QPolygon poly (4);      poly.putPoints (0, 4,         0, -9 * _arrowSizeMultiplier,         9 * _arrowSizeMultiplier, 5 * _arrowSizeMultiplier,         0, 0,         -9 * _arrowSizeMultiplier, 5 * _arrowSizeMultiplier);      if (_arrow1) {         _arrow1->setPolygon (poly);         _arrow1->setZValue (zValue () - 1.0f);         _arrow1->setBrush (QBrush (Qt::SolidPattern));      }      if (_arrow2) {         _arrow2->setPolygon (poly);         _arrow2->setZValue (zValue () - 1.0f);         _arrow2->setBrush (QBrush (Qt::SolidPattern));      }      setColorAll (pen ());      _set_arrow_transform ();   }   else {      if (_arrow1) { delete _arrow1; _arrow1 = 0; }      if (_arrow2) { delete _arrow2; _arrow2 = 0; }   }}
开发者ID:ben-sangster,项目名称:dmz,代码行数:39,


示例22: antiScale

QRectF UBGraphicsProtractor::resizeButtonRect () const{    qreal antiSc = antiScale();    if (buttonSizeReference().width() * antiSc <=  buttonSizeReference().width() * 15)        return QRectF(buttonSizeReference().width() * 8, -buttonSizeReference().height() * antiSc / 2,                      buttonSizeReference().width() * antiSc, buttonSizeReference().height() * antiSc);    else    {        mResizeSvgItem->setZValue(zValue()+10);        return QRectF(-buttonSizeReference().width() * antiSc / 2, -buttonSizeReference().height() * antiSc / 2,                      buttonSizeReference().width() * antiSc, buttonSizeReference().height() * antiSc);    }}
开发者ID:xxbastekxx,项目名称:Sankore-3.1,代码行数:14,


示例23: connect

void QDeclarativeGeoMapObject::setMapObject(QGeoMapObject *object){    if (!object)        return;    object_ = object;    object_->setVisible(visible_);    connect(this,            SIGNAL(zChanged()),            this,            SLOT(parentZChanged()));    object_->setZValue(zValue());}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:15,


示例24: scene

QVariant AbstractContent::itemChange(GraphicsItemChange change, const QVariant & value){    // keep the AbstractContent's center inside the scene rect..    if (change == ItemPositionChange && scene()) {        QPointF newPos = value.toPointF();        QRectF rect = scene()->sceneRect();        if (!rect.contains(newPos)) {            newPos.setX(qBound(rect.left(), newPos.x(), rect.right()));            newPos.setY(qBound(rect.top(), newPos.y(), rect.bottom()));            return newPos;        }    }    // changes that affect the mirror item    if (m_mirrorItem) {        switch (change) {            // notify about setPos            case ItemPositionHasChanged:                m_mirrorItem->sourceMoved();                break;            // notify about graphics changes            case ItemTransformHasChanged:            case ItemEnabledHasChanged:            case ItemSelectedHasChanged:            case ItemParentHasChanged:#if QT_VERSION >= 0x040500            case ItemOpacityHasChanged:#endif                GFX_CHANGED();                break;            case ItemZValueHasChanged:                m_mirrorItem->setZValue(zValue());                break;            case ItemVisibleHasChanged:                m_mirrorItem->setVisible(isVisible());                break;            default:                break;        }    }    // ..or just apply the value    return QGraphicsItem::itemChange(change, value);}
开发者ID:madjar,项目名称:fotowall,代码行数:48,


示例25: addPropertyAsAttribute

void KoReportDesignerItemLine::buildXML(QDomDocument & doc, QDomElement & parent){    QDomElement entity = doc.createElement("report:line");    // properties    addPropertyAsAttribute(&entity, m_name);    entity.setAttribute("report:z-index", zValue());    KRUtils::setAttribute(entity, "svg:x1", m_start.toPoint().x());    KRUtils::setAttribute(entity, "svg:y1", m_start.toPoint().y());    KRUtils::setAttribute(entity, "svg:x2", m_end.toPoint().x());    KRUtils::setAttribute(entity, "svg:y2", m_end.toPoint().y());    buildXMLLineStyle(doc, entity, lineStyle());    parent.appendChild(entity);}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:16,


示例26: typeName

void KReportDesignerItemLine::buildXML(QDomDocument *doc, QDomElement *parent){    QDomElement entity = doc->createElement(QLatin1String("report:") + typeName());    // properties    addPropertyAsAttribute(&entity, nameProperty());    entity.setAttribute(QLatin1String("report:z-index"), zValue());    KReportUtils::setAttribute(&entity, QLatin1String("svg:x1"), m_start->value().toPointF().x());    KReportUtils::setAttribute(&entity, QLatin1String("svg:y1"), m_start->value().toPointF().y());    KReportUtils::setAttribute(&entity, QLatin1String("svg:x2"), m_end->value().toPointF().x());    KReportUtils::setAttribute(&entity, QLatin1String("svg:y2"), m_end->value().toPointF().y());    buildXMLLineStyle(doc, &entity, lineStyle());    parent->appendChild(entity);}
开发者ID:KDE,项目名称:kreport,代码行数:16,


示例27: setFlag

void GraphicsContinuousControlItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * event){    GraphicsLabelItem::mouseReleaseEvent(event);    if (waitingForMouseReleaseEvent) {        waitingForMouseReleaseEvent = false;        setFlag(QGraphicsItem::ItemSendsGeometryChanges, false);        setSelected(false);        // remove the minimum/maximum labels:        setZValue(zValue() - 2);        backgroundRect->setVisible(false);        minLabel->setVisible(false);        maxLabel->setVisible(false);        // change our position back to the original position:        setPos(alignX(rect(), rectBeforeEdit.translated(positionBeforeEdit)), positionBeforeEdit.y());        valueEditingStopped(currentValue);    }}
开发者ID:elektrokokke,项目名称:elektrocillin,代码行数:17,


示例28: get_bn

// update sub nodes to be upper this, recursivelyvoid ActivityContainerCanvas::force_sub_upper(QList<QGraphicsItem*> & all){    QList<QGraphicsItem*>::Iterator cit;    BrowserNode * browser_node = get_bn();    for (cit = all.begin(); cit != all.end(); ++cit) {        if ((*cit)->isVisible()) {            DiagramItem * di = QCanvasItemToDiagramItem(*cit);            if ((di != 0) &&                (di->get_bn() != 0) &&                (((BrowserNode *) di->get_bn())->parent() == browser_node)) {                // must look at the type because some canvas items have browser_node                // attr equals to the diagram and the parent of the diagram is the activity                switch (di->typeUmlCode()) {                case UmlActivityObject:                case UmlActivityAction:                case UmlActivityPartition:                case UmlExpansionRegion:                case UmlInterruptibleActivityRegion:                case InitialAN:                case FlowFinalAN:                case ActivityFinalAN:                case DecisionAN:                case MergeAN:                case ForkAN:                case JoinAN:                    if ((*cit)->zValue() <= zValue())                        ((DiagramCanvas *) di)->upper();                    {                        ActivityContainerCanvas * cntr =                            dynamic_cast<ActivityContainerCanvas *>(di);                        if (cntr != 0)                            cntr->force_sub_upper(all);                    }                    break;                default:                    break;                }            }        }    }}
开发者ID:ErickCastellanos,项目名称:douml,代码行数:47,


示例29: AppletToolbarBase

Context::AppletToolbarAddItem::AppletToolbarAddItem( QGraphicsItem* parent, Context::Containment* cont, bool fixedAdd )    : AppletToolbarBase( parent )    , m_iconPadding( 0 )    , m_fixedAdd( fixedAdd )    , m_showingAppletExplorer( false )    , m_cont( cont )    , m_icon( 0 )    , m_label( 0 ){    QAction* listAdd = new QAction( i18n( "Add Applets..." ), this );    listAdd->setIcon( KIcon( "list-add" ) );    listAdd->setVisible( true );    listAdd->setEnabled( true );        connect( listAdd, SIGNAL( triggered() ), this, SLOT( iconClicked() ) );        m_icon = new Plasma::IconWidget( this );    m_icon->setAction( listAdd );    m_icon->setText( QString() );    m_icon->setToolTip( listAdd->text() );    m_icon->setDrawBackground( false );    m_icon->setOrientation( Qt::Horizontal );    QSizeF iconSize;    if( m_fixedAdd )        iconSize = m_icon->sizeFromIconSize( 22 );    else        iconSize = m_icon->sizeFromIconSize( 11 );    m_icon->setMinimumSize( iconSize );    m_icon->setMaximumSize( iconSize );    m_icon->resize( iconSize );    m_icon->setZValue( zValue() + 1 );        m_label = new QGraphicsSimpleTextItem( i18n( "Add Applet..." ), this );    m_label->hide();        if( m_cont )        connect( m_cont->view(), SIGNAL( appletExplorerHid() ), this, SLOT( appletExplorerHid() ) );    if( m_fixedAdd )        setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );    else        setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );  //  resize( QSizeF( 18, 24 ) );}
开发者ID:ErrAza,项目名称:amarok,代码行数:45,


示例30: QPoint

void SceneWidgetContainer::setProxy(QGraphicsProxyWidget *child){    childproxy = child;    child->setFlag(ItemIsSelectable, false);    QWidget *childwidget = child->widget();    child->setParentItem(this);    closepos = QPoint(childwidget->width(), -30);    close.setParent(this);    close.setPos((QPointF)closepos);    setZValue(zValue()+0.5);    setFlag(ItemIsMovable, true);    QGraphicsDropShadowEffect drop;    drop.setBlurRadius(10);    drop.setOffset(5);    drop.setColor(QColor(10, 10, 10, 200));    setGraphicsEffect(&drop);}
开发者ID:github11,项目名称:MindTree,代码行数:18,



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


C++ z_abs函数代码示例
C++ zError函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。