| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquicktextmetrics.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | QQuickTextMetrics::QQuickTextMetrics(QObject *parent) : | - | ||||||
| 5 | QObject(parent), | - | ||||||
| 6 | m_metrics(m_font), | - | ||||||
| 7 | m_elide(Qt::ElideNone), | - | ||||||
| 8 | m_elideWidth(0) | - | ||||||
| 9 | { | - | ||||||
| 10 | } never executed: end of block | 0 | ||||||
| 11 | - | |||||||
| 12 | QQuickTextMetrics::~QQuickTextMetrics() | - | ||||||
| 13 | { | - | ||||||
| 14 | } | - | ||||||
| 15 | - | |||||||
| 16 | - | |||||||
| 17 | - | |||||||
| 18 | - | |||||||
| 19 | - | |||||||
| 20 | - | |||||||
| 21 | QFont QQuickTextMetrics::font() const | - | ||||||
| 22 | { | - | ||||||
| 23 | return never executed: m_font;return m_font;never executed: return m_font; | 0 | ||||||
| 24 | } | - | ||||||
| 25 | - | |||||||
| 26 | void QQuickTextMetrics::setFont(const QFont &font) | - | ||||||
| 27 | { | - | ||||||
| 28 | if (m_font != font
| 0 | ||||||
| 29 | m_font = font; | - | ||||||
| 30 | m_metrics = QFontMetricsF(m_font); | - | ||||||
| 31 | fontChanged(); | - | ||||||
| 32 | metricsChanged(); | - | ||||||
| 33 | } never executed: end of block | 0 | ||||||
| 34 | } never executed: end of block | 0 | ||||||
| 35 | - | |||||||
| 36 | - | |||||||
| 37 | - | |||||||
| 38 | - | |||||||
| 39 | - | |||||||
| 40 | - | |||||||
| 41 | QString QQuickTextMetrics::text() const | - | ||||||
| 42 | { | - | ||||||
| 43 | return never executed: m_text;return m_text;never executed: return m_text; | 0 | ||||||
| 44 | } | - | ||||||
| 45 | - | |||||||
| 46 | void QQuickTextMetrics::setText(const QString &text) | - | ||||||
| 47 | { | - | ||||||
| 48 | if (m_text != text
| 0 | ||||||
| 49 | m_text = text; | - | ||||||
| 50 | textChanged(); | - | ||||||
| 51 | metricsChanged(); | - | ||||||
| 52 | } never executed: end of block | 0 | ||||||
| 53 | } never executed: end of block | 0 | ||||||
| 54 | Qt::TextElideMode QQuickTextMetrics::elide() const | - | ||||||
| 55 | { | - | ||||||
| 56 | return never executed: m_elide;return m_elide;never executed: return m_elide; | 0 | ||||||
| 57 | } | - | ||||||
| 58 | - | |||||||
| 59 | void QQuickTextMetrics::setElide(Qt::TextElideMode elide) | - | ||||||
| 60 | { | - | ||||||
| 61 | if (m_elide != elide
| 0 | ||||||
| 62 | m_elide = elide; | - | ||||||
| 63 | elideChanged(); | - | ||||||
| 64 | metricsChanged(); | - | ||||||
| 65 | } never executed: end of block | 0 | ||||||
| 66 | } never executed: end of block | 0 | ||||||
| 67 | qreal QQuickTextMetrics::elideWidth() const | - | ||||||
| 68 | { | - | ||||||
| 69 | return never executed: m_elideWidth;return m_elideWidth;never executed: return m_elideWidth; | 0 | ||||||
| 70 | } | - | ||||||
| 71 | - | |||||||
| 72 | void QQuickTextMetrics::setElideWidth(qreal elideWidth) | - | ||||||
| 73 | { | - | ||||||
| 74 | if (m_elideWidth != elideWidth
| 0 | ||||||
| 75 | m_elideWidth = elideWidth; | - | ||||||
| 76 | elideWidthChanged(); | - | ||||||
| 77 | metricsChanged(); | - | ||||||
| 78 | } never executed: end of block | 0 | ||||||
| 79 | } never executed: end of block | 0 | ||||||
| 80 | qreal QQuickTextMetrics::advanceWidth() const | - | ||||||
| 81 | { | - | ||||||
| 82 | return never executed: m_metrics.width(m_text);return m_metrics.width(m_text);never executed: return m_metrics.width(m_text); | 0 | ||||||
| 83 | } | - | ||||||
| 84 | QRectF QQuickTextMetrics::boundingRect() const | - | ||||||
| 85 | { | - | ||||||
| 86 | return never executed: m_metrics.boundingRect(m_text);return m_metrics.boundingRect(m_text);never executed: return m_metrics.boundingRect(m_text); | 0 | ||||||
| 87 | } | - | ||||||
| 88 | qreal QQuickTextMetrics::width() const | - | ||||||
| 89 | { | - | ||||||
| 90 | return never executed: boundingRect().width();return boundingRect().width();never executed: return boundingRect().width(); | 0 | ||||||
| 91 | } | - | ||||||
| 92 | qreal QQuickTextMetrics::height() const | - | ||||||
| 93 | { | - | ||||||
| 94 | return never executed: boundingRect().height();return boundingRect().height();never executed: return boundingRect().height(); | 0 | ||||||
| 95 | } | - | ||||||
| 96 | QRectF QQuickTextMetrics::tightBoundingRect() const | - | ||||||
| 97 | { | - | ||||||
| 98 | return never executed: m_metrics.tightBoundingRect(m_text);return m_metrics.tightBoundingRect(m_text);never executed: return m_metrics.tightBoundingRect(m_text); | 0 | ||||||
| 99 | } | - | ||||||
| 100 | QString QQuickTextMetrics::elidedText() const | - | ||||||
| 101 | { | - | ||||||
| 102 | return never executed: m_metrics.elidedText(m_text, m_elide, m_elideWidth);return m_metrics.elidedText(m_text, m_elide, m_elideWidth);never executed: return m_metrics.elidedText(m_text, m_elide, m_elideWidth); | 0 | ||||||
| 103 | } | - | ||||||
| 104 | - | |||||||
| 105 | - | |||||||
| 106 | - | |||||||
| Switch to Source code | Preprocessed file |