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

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

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

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

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

示例1: switch

int ZLTextView::ViewStyle::elementHeight(const ZLTextElement &element) const {	switch (element.kind()) {		case ZLTextElement::WORD_ELEMENT:			if (myWordHeight == -1) {				myWordHeight = context().stringHeight() * textStyle()->lineSpacePercent() / 100 + textStyle()->verticalShift();			}			return myWordHeight;		case ZLTextElement::IMAGE_ELEMENT:			return				context().imageHeight(((const ZLTextImageElement&)element).image()) +				std::max(context().stringHeight() * (textStyle()->lineSpacePercent() - 100) / 100, 3);		case ZLTextElement::BEFORE_PARAGRAPH_ELEMENT:			return - textStyle()->spaceAfter();		case ZLTextElement::AFTER_PARAGRAPH_ELEMENT:			return - textStyle()->spaceBefore();		case ZLTextElement::EMPTY_LINE_ELEMENT:			return context().stringHeight();		case ZLTextElement::INDENT_ELEMENT:		case ZLTextElement::HSPACE_ELEMENT:		case ZLTextElement::NB_HSPACE_ELEMENT:		case ZLTextElement::FORCED_CONTROL_ELEMENT:		case ZLTextElement::CONTROL_ELEMENT:		case ZLTextElement::FIXED_HSPACE_ELEMENT:			return 0;	}	return 0;}
开发者ID:justsoso8,项目名称:fbreader-0.8.17,代码行数:27,


示例2: textStyle

void Text::setUnstyledText(const QString& s)      {      Align align = textStyle().align();      _doc->clear();      QTextCursor c(_doc);      c.setVisualNavigation(true);      c.movePosition(QTextCursor::Start);      Qt::Alignment a;      if (align & ALIGN_HCENTER)            a = Qt::AlignHCenter;      else if (align & ALIGN_RIGHT)            a = Qt::AlignRight;      else            a = Qt::AlignLeft;      QTextBlockFormat bf = c.blockFormat();      bf.setAlignment(a);      c.setBlockFormat(bf);      QTextCharFormat tf = c.charFormat();      tf.setFont(textStyle().font(spatium()));      c.setBlockCharFormat(tf);      c.insertText(s);      textChanged();      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:25,


示例3: parent

void Text::layout()      {      if (styled() && !_editMode) {            SimpleText::layout();            }      else {            _doc->setDefaultFont(textStyle().font(spatium()));            qreal w = -1.0;            qreal x = 0.0;            qreal y = 0.0;            if (parent() && layoutToParentWidth()) {                  w = parent()->width();                  if (parent()->type() == HBOX || parent()->type() == VBOX || parent()->type() == TBOX) {                        Box* box = static_cast<Box*>(parent());                        x += box->leftMargin() * MScore::DPMM;                        y += box->topMargin() * MScore::DPMM;                        w = box->width()   - ((box->leftMargin() + box->rightMargin()) * MScore::DPMM);                        }                  }            QTextOption to = _doc->defaultTextOption();            to.setUseDesignMetrics(true);            to.setWrapMode(w <= 0.0 ? QTextOption::NoWrap : QTextOption::WrapAtWordBoundaryOrAnywhere);            _doc->setDefaultTextOption(to);            if (w < 0.0)                  w = _doc->idealWidth();            _doc->setTextWidth(w);            setbbox(QRectF(QPointF(0.0, 0.0), _doc->size()));            if (hasFrame())                  layoutFrame();            _doc->setModified(false);            textStyle().layout(this);      // process alignment#if 0 // TODO  TEXT_STYLE_TEXTLINE            if ((textStyle().align() & ALIGN_VCENTER) && (textStyle() == TEXT_STYLE_TEXTLINE)) {                  // special case: vertically centered text with TextLine needs to                  // take into account the line width                  TextLineSegment* tls = static_cast<TextLineSegment*>(parent());                  TextLine* tl = tls->textLine();                  if (tl) {                        qreal textlineLineWidth = point(tl->lineWidth());                        rypos() -= textlineLineWidth * .5;                        }                  }#endif            rxpos() += x;            rypos() += y;            }      if (parent() && parent()->type() == SEGMENT) {            Segment* s = static_cast<Segment*>(parent());            rypos() += s ? s->measure()->system()->staff(staffIdx())->y() : 0.0;            }      adjustReadPos();      }
开发者ID:guifre2,项目名称:MuseScore,代码行数:56,


示例4: setPos

void Marker::layout()      {      setPos(textStyle().offset(spatium()));      Text::layout1();      // although normally laid out to parent (measure) width,      // force to center over barline if left-aligned      if (layoutToParentWidth() && !(textStyle().align() & (AlignmentFlags::RIGHT|AlignmentFlags::HCENTER)))            rxpos() -= width() * 0.5;      adjustReadPos();      }
开发者ID:ArminBra,项目名称:MuseScore,代码行数:10,


示例5: drawFrame

void SimpleText::drawFrame(QPainter* painter) const      {      if (!textStyle().hasFrame())            return;      QColor color(frameColor());      if (!visible())            color = Qt::gray;      else if (selected())            color = Qt::blue;      if (frameWidth().val() != 0.0) {            QPen pen(color, frameWidth().val() * spatium());            painter->setPen(pen);            }      else            painter->setPen(Qt::NoPen);      QColor bg(backgroundColor());      painter->setBrush(bg.alpha() ? QBrush(bg) : Qt::NoBrush);      if (circle())            painter->drawArc(frame, 0, 5760);      else {            int r2 = frameRound() * lrint((frame.width() / frame.height()));            if (r2 > 99)                  r2 = 99;            painter->drawRoundRect(frame, frameRound(), r2);            }      }
开发者ID:parinporecha,项目名称:MuseScore,代码行数:27,


示例6: setUserOff

void RehearsalMark::layout()      {      if (autoplace())            setUserOff(QPointF());      setPos(textStyle().offset(spatium()));      Text::layout1();      Segment* s = segment();      if (s) {            if (!s->rtick()) {                  // first CR of measure, decide whether to align to barline                  if (!s->prev() && align() & AlignmentFlags::CENTER) {                        // measure with no clef / keysig / timesig                        rxpos() -= s->x();                        }                  else if (align() & AlignmentFlags::RIGHT) {                        // measure with clef / keysig / timesig, rehearsal mark right aligned                        // align left edge of rehearsal to barline if that is further to left                        qreal leftX = bbox().x();                        qreal barlineX = -s->x();                        rxpos() += qMin(leftX, barlineX) + width();                        }                  }            if (autoplace()) {                  Shape s1 = s->staffShape(staffIdx()).translated(s->pos());                  Shape s2 = shape().translated(s->pos());                  qreal d  = s2.minVerticalDistance(s1);                  if (d > 0)                        setUserOff(QPointF(0.0, -d));                  }            }      }
开发者ID:Angeldude,项目名称:MuseScore,代码行数:31,


示例7: setReadPos

void Dynamic::layout()      {      if (!readPos().isNull()) {            if (score()->mscVersion() <= 114) {                  setReadPos(QPointF());                  // hack: 1.2 boundingBoxes are a bit wider which results                  // in symbols moved right                  setUserXoffset(userOff().x() - spatium() * .6);                  }            }      setPos(textStyle().offset(spatium()));      Text::layout1();      Segment* s = segment();      if (!s)            return;      for (int voice = 0; voice < VOICES; ++voice) {            int t = (track() & ~0x3) + voice;            Chord* c = static_cast<Chord*>(s->element(t));            if (!c)                  continue;            if (c->type() == Element::Type::CHORD) {                  qreal noteHeadWidth = score()->noteHeadWidth() * c->mag();                  if (c->stem() && !c->up())  // stem down                        rxpos() += noteHeadWidth * .25;  // center on stem + optical correction                  else                        rxpos() += noteHeadWidth * .5;   // center on notehead                  }            else                  rxpos() += c->width() * .5;            break;            }      adjustReadPos();      }
开发者ID:NupurMalpani,项目名称:MuseScore,代码行数:34,


示例8: textStyle

void EllipsisBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty){    GraphicsContext* context = paintInfo.context;    RenderStyle* style = m_object->style(m_firstLine);    if (style->font() != context->font())        context->setFont(style->font());    Color textColor = style->color();    if (textColor != context->fillColor())        context->setFillColor(textColor);    bool setShadow = false;    if (style->textShadow()) {        context->setShadow(IntSize(style->textShadow()->x, style->textShadow()->y),                           style->textShadow()->blur, style->textShadow()->color);        setShadow = true;    }    const String& str = m_str;    TextStyle textStyle(0, 0, 0, false, style->visuallyOrdered());    context->drawText(TextRun(str.impl()), IntPoint(m_x + tx, m_y + ty + m_baseline), textStyle);    if (setShadow)        context->clearShadow();    if (m_markupBox) {        // Paint the markup box        tx += m_x + m_width - m_markupBox->xPos();        ty += m_y + m_baseline - (m_markupBox->yPos() + m_markupBox->baseline());        m_markupBox->paint(paintInfo, tx, ty);    }}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:31,


示例9: setUserOff

void StaffText::layout()      {      if (autoplace())            setUserOff(QPointF());      QPointF p(textStyle().offset(spatium()));      if (placement() == Element::Placement::BELOW)            p.ry() =  - p.ry() + lineHeight();      setPos(p);      Text::layout1();      if (!parent()) // palette & clone trick          return;      if (autoplace() && segment()) {            qreal minDistance = score()->styleP(StyleIdx::dynamicsMinDistance);  // TODO            Shape s1          = segment()->staffShape(staffIdx()).translated(segment()->pos());            Shape s2          = shape().translated(segment()->pos());            if (placement() == Element::Placement::ABOVE) {                  qreal d = s2.minVerticalDistance(s1);                  if (d > -minDistance)                        rUserYoffset() = -d - minDistance;                  }            else {                  qreal d = s1.minVerticalDistance(s2);                  if (d > -minDistance)                        rUserYoffset() = d + minDistance;                  }            }      adjustReadPos();      }
开发者ID:AntonioBL,项目名称:MuseScore,代码行数:30,


示例10: drawFrame

void SimpleText::draw(QPainter* p) const      {      drawFrame(p);      p->setFont(textStyle().fontPx(spatium()));      p->setBrush(Qt::NoBrush);      p->setPen(textColor());      foreach(const TLine& t, _text)            p->drawText(t.pos, t.text);      }
开发者ID:aiena,项目名称:MuseScore,代码行数:9,


示例11: textStyle

QColor SimpleText::textColor() const      {      if (!score()->printing()) {            QColor color;            if (selected())                  return MScore::selectColor[0];            if (!visible())                  return Qt::gray;            }      return textStyle().foregroundColor();      }
开发者ID:parinporecha,项目名称:MuseScore,代码行数:11,


示例12: setPos

void RehearsalMark::layout()      {      setPos(textStyle().offset(spatium()));      Text::layout1();      Segment* s = segment();      if (s && !s->rtick()) {            // first CR of measure, decide whether to align to barline            if (!s->prev()) {                  // measure with no clef / keysig / timesig                  rxpos() -= s->x();                  }            else if (textStyle().align() & AlignmentFlags::RIGHT) {                  // measure with clef / keysig / timesig, rehearsal mark right aligned                  // align left edge of rehearsal to barline if that is further to left                  qreal leftX = bbox().x();                  qreal barlineX = -s->x();                  rxpos() += qMin(leftX, barlineX) + width();                  }            }      adjustReadPos();      }
开发者ID:HerbertYu,项目名称:MuseScore,代码行数:21,


示例13: 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,


示例14: QTextDocument

void Text::createDoc()      {      _doc = new QTextDocument(0);      _doc->setDocumentMargin(-2.0);      _doc->setUseDesignMetrics(true);      _doc->setUndoRedoEnabled(true);      _doc->documentLayout()->setProperty("cursorWidth", QVariant(2));      QTextOption to = _doc->defaultTextOption();      to.setUseDesignMetrics(true);      to.setWrapMode(QTextOption::NoWrap);      _doc->setDefaultTextOption(to);      _doc->setDefaultFont(textStyle().font(spatium()));      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:13,


示例15: setTextStyle

bool Text::readProperties(XmlReader* r)      {      MString8 tag = r->tag();      QString val;      int i;      qreal d;      Color color;      if (r->readString("style", &val)) {            setTextStyle(score()->style().textStyleType(val));            if (textStyle() != TEXT_STYLE_INVALID)                  _styled = true;            }      else if (r->readInt("spatiumSizeDependent", &i)) {            setSizeIsSpatiumDependent(i);            _styled = false;            }      else if (r->readInt("frame", &i)) {            setHasFrame(i);            _styled = false;            }      else if (r->readString("text", &val))            setText(val);      else if (tag == "frameWidth") {            setFrameWidth(val.toDouble());            setHasFrame(true);            _styled = false;            }      else if (r->readReal("paddingWidth", &d)) {            setPaddingWidth(d);            _styled = false;            }      else if (r->readColor("frameColor", &color)) {//            setFrameColor(readColor(e));            _styled = false;            }      else if (r->readInt("frameRound", &i)) {            setFrameRound(i);            _styled = false;            }      else if (r->readInt("circle", &i)) {            setCircle(i);            _styled = false;            }      else if (_localStyle.readProperties(r))            _styled = false;      else if (!Element::readProperties(r))            return false;      return true;      }
开发者ID:SSMN,项目名称:MuseScore,代码行数:50,


示例16: userOff

void Marker::adjustReadPos()      {      if (!readPos().isNull()) {            QPointF uo;            if (score()->mscVersion() <= 114) {                  // rebase from Measure to Segment                  uo = userOff();                  uo.rx() -= segment()->pos().x();                  // 1.2 is always HCENTER aligned                  if ((textStyle().align() & ALIGN_HMASK) == 0)    // ALIGN_LEFT                        uo.rx() -= bbox().width() * .5;                  }            else                  uo = readPos() - ipos();            setUserOff(uo);            setReadPos(QPointF());            }      }
开发者ID:Igevorse,项目名称:MuseScore,代码行数:18,


示例17: loop

void loop() {// clears the screen and select font size and style  char instr1[] = {    clearScreen(),    defaultSize(),    selectSize(), // tall    selectSize(), // wide    selectSize(), // big    textStyle(),    NULL  };  const char message[] = "Hi GLO!";  Serial1.print(instr1);  // print message according to prior instructions  Serial1.print(message);}
开发者ID:firmread,项目名称:sparkPlay,代码行数:18,


示例18: Assert

void tGauge::DrawText( QPainter& painter, const QRect& rect, const QString& text, int ptAdjust ){    if( m_OutlineText )    {        int fontSize = painter.font().pixelSize();        Assert( fontSize > 0 );        tTextStyleAttributes textStyle(            (uchar)(fontSize + ptAdjust), painter.pen().color(), palette().base().color(),            Fonts::CENTER_CENTER, painter.font().bold() );        textStyle.m_halo = m_OutlineText;        if (m_InvertedText)            qSwap( textStyle.m_color, textStyle.m_bkgColor );        tRenderText::renderString( text, painter.font().family(), textStyle, rect.center(), painter );    }    else    {        painter.drawText( rect, text );    }}
开发者ID:dulton,项目名称:53_hero,代码行数:20,


示例19: setPos

void TempoText::layout()      {      setPos(textStyle().offset(spatium()));      Text::layout1();      // tempo text on first chordrest of measure should align over time sig if present      //      Segment* s = segment();      if (s && !s->rtick()) {            Segment* p = segment()->prev(Segment::Type::TimeSig);            if (p) {                  rxpos() -= s->x() - p->x();                  Element* e = p->element(staffIdx() * VOICES);                  if (e)                        rxpos() += e->x();                  }            }      if (placement() == Element::Placement::BELOW)            rypos() = -rypos() + 4 * spatium();      adjustReadPos();      }
开发者ID:xiaojianwu,项目名称:MuseScore,代码行数:22,


示例20: addPropertyAsAttribute

void KoReportDesignerItemText::buildXML(QDomDocument & doc, QDomElement & parent){    //kdDebug() << "ReportEntityText::buildXML()");    QDomElement entity = doc.createElement("report:text");    // properties    addPropertyAsAttribute(&entity, m_name);    addPropertyAsAttribute(&entity, m_controlSource);    addPropertyAsAttribute(&entity, m_verticalAlignment);    addPropertyAsAttribute(&entity, m_horizontalAlignment);    entity.setAttribute("report:bottom-padding", m_bottomPadding);    entity.setAttribute("report:z-index", zValue());    // bounding rect    buildXMLRect(doc, entity, &m_pos, &m_size);    //text style info    buildXMLTextStyle(doc, entity, textStyle());    //Line Style    buildXMLLineStyle(doc, entity, lineStyle());    parent.appendChild(entity);}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:24,


示例21: Q_UNUSED

int KReportItemText::renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset,                                       const QVariant &data, KReportScriptHandler *script){    Q_UNUSED(script);    QString qstrValue;    QString cs = itemDataSource();    if (!cs.isEmpty()) {        if (cs.left(1) == QLatin1String("$")) { //Everything past $ is treated as a string            qstrValue = cs.mid(1);        } else {            qstrValue = data.toString();        }    } else {        qstrValue = m_itemValue->value().toString();    }    QPointF pos = m_pos.toScene();    QSizeF size = m_size.toScene();    pos += offset;    QRectF trf(pos, size);    qreal intStretch = trf.top() - offset.y();    if (qstrValue.length()) {        QRectF rect = trf;        int pos = 0;        QChar separator;        QRegExp re(QLatin1String("//s"));        QPrinter prnt(QPrinter::HighResolution);        QFontMetrics fm(font(), &prnt);        // int   intRectWidth    = (int)(trf.width() * prnt.resolution()) - 10;        int     intRectWidth    = (int)((m_size.toPoint().width() / 72) * prnt.resolution());        int     intLineCounter  = 0;        qreal   intBaseTop      = trf.top();        qreal   intRectHeight   = trf.height();        while (qstrValue.length()) {            int idx = re.indexIn(qstrValue, pos);            if (idx == -1) {                idx = qstrValue.length();                separator = QLatin1Char('/n');            } else                separator = qstrValue.at(idx);            if (fm.boundingRect(qstrValue.left(idx)).width() < intRectWidth || pos == 0) {                pos = idx + 1;                if (separator == QLatin1Char('/n')) {                    QString line = qstrValue.left(idx);                    qstrValue.remove(0, idx + 1);                    pos = 0;                    rect.setTop(intBaseTop + (intLineCounter * intRectHeight));                    rect.setBottom(rect.top() + intRectHeight);                    OROTextBox * tb = new OROTextBox();                    tb->setPosition(rect.topLeft());                    tb->setSize(rect.size());                    tb->setFont(font());                    tb->setText(line);                    tb->setFlags(textFlags());                    tb->setTextStyle(textStyle());                    tb->setLineStyle(lineStyle());                    if (page) {                        page->addPrimitive(tb);                    }                    if (section) {                        OROTextBox *tb2 = dynamic_cast<OROTextBox*>(tb->clone());                        tb2->setPosition(m_pos.toPoint());                        section->addPrimitive(tb2);                    }                    if (!page) {                        delete tb;                    }                    intStretch += intRectHeight;                    intLineCounter++;                }            } else {                QString line = qstrValue.left(pos - 1);                qstrValue.remove(0, pos);                pos = 0;                rect.setTop(intBaseTop + (intLineCounter * intRectHeight));                rect.setBottom(rect.top() + intRectHeight);                OROTextBox * tb = new OROTextBox();                tb->setPosition(rect.topLeft());                tb->setSize(rect.size());                tb->setFont(font());//.........这里部分代码省略.........
开发者ID:nimxor,项目名称:kreport,代码行数:101,


示例22: QFontMetricsF

qreal Text::lineHeight() const      {      return QFontMetricsF(textStyle().font(spatium())).height();      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:4,


示例23: o

void Text::layout1()      {      if (styled() && !_editMode)            SimpleText::layout();      else {            _doc->setDefaultFont(textStyle().font(spatium()));            qreal w = -1.0;            QPointF o(textStyle().offset(spatium()));            if (parent() && layoutToParentWidth()) {                  Element* e = parent();                  w = e->width();                  if (e->type() == HBOX || e->type() == VBOX || e->type() == TBOX) {                        Box* b = static_cast<Box*>(e);                        w -= ((b->leftMargin() + b->rightMargin()) * MScore::DPMM);                        }                  }            QTextOption to = _doc->defaultTextOption();            to.setUseDesignMetrics(true);            to.setWrapMode(w <= 0.0 ? QTextOption::NoWrap : QTextOption::WrapAtWordBoundaryOrAnywhere);            _doc->setDefaultTextOption(to);            if (w <= 0.0)                  w = _doc->idealWidth();            _doc->setTextWidth(w);            QSizeF size(_doc->size());            if (align() & ALIGN_BOTTOM)                  o.ry() -= size.height();            else if (align() & ALIGN_VCENTER)                  o.ry() -= (size.height() * .5);            else if (align() & ALIGN_BASELINE)                  o.ry() -= baseLine();            if (align() & ALIGN_RIGHT)                  o.rx() -= size.width();            else if (align() & ALIGN_HCENTER)                  o.rx() -= (size.width() * .5);            setbbox(QRectF(QPointF(0.0, 0.0), size));            _doc->setModified(false);            setPos(o);            }      if (parent()) {            Element* e = parent();            qreal w, h, xo, yo;            if (layoutToParentWidth()) {                  if (e->type() == HBOX || e->type() == VBOX || e->type() == TBOX) {                        // consider inner margins of frame                        Box* b = static_cast<Box*>(e);                        xo = b->leftMargin() * MScore::DPMM;                        yo = b->topMargin()  * MScore::DPMM;                        w  = b->width()  - xo - b->rightMargin() * MScore::DPMM;                        h  = b->height() - yo - b->bottomMargin()   * MScore::DPMM;                        }                  else {                        w  = e->width();                        h  = e->height();                        xo = 0.0;                        yo = 0.0;                        }                  QPointF ro(_textStyle.reloff() * .01);                  rxpos() += xo + ro.x() * w;                  rypos() += yo + ro.y() * h;                  }            if (e->type() == SEGMENT) {                  Segment* s = static_cast<Segment*>(e);                  rypos() += s->measure()->system()->staff(staffIdx())->y();                  }            }      if (hasFrame())            layoutFrame();      }
开发者ID:aeliot,项目名称:MuseScore,代码行数:76,



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


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