| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | struct QTextOptionPrivate | - |
| 5 | { | - |
| 6 | QList<QTextOption::Tab> tabStops; | - |
| 7 | }; | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | QTextOption::QTextOption() | - |
| 16 | : align(Qt::AlignLeft), | - |
| 17 | wordWrap(QTextOption::WordWrap), | - |
| 18 | design(false), | - |
| 19 | unused(0), | - |
| 20 | unused2(0), | - |
| 21 | f(0), | - |
| 22 | tab(-1), | - |
| 23 | d(0) | - |
| 24 | { | - |
| 25 | direction = Qt::LayoutDirectionAuto; | - |
| 26 | } | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | QTextOption::QTextOption(Qt::Alignment alignment) | - |
| 34 | : align(alignment), | - |
| 35 | wordWrap(QTextOption::WordWrap), | - |
| 36 | design(false), | - |
| 37 | unused(0), | - |
| 38 | unused2(0), | - |
| 39 | f(0), | - |
| 40 | tab(-1), | - |
| 41 | d(0) | - |
| 42 | { | - |
| 43 | direction = QGuiApplication::layoutDirection(); | - |
| 44 | } | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | | - |
| 49 | QTextOption::~QTextOption() | - |
| 50 | { | - |
| 51 | delete d; | - |
| 52 | } | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | QTextOption::QTextOption(const QTextOption &o) | - |
| 60 | : align(o.align), | - |
| 61 | wordWrap(o.wordWrap), | - |
| 62 | design(o.design), | - |
| 63 | direction(o.direction), | - |
| 64 | unused(o.unused), | - |
| 65 | unused2(o.unused2), | - |
| 66 | f(o.f), | - |
| 67 | tab(o.tab), | - |
| 68 | d(0) | - |
| 69 | { | - |
| 70 | if (o.d) | - |
| 71 | d = new QTextOptionPrivate(*o.d); | - |
| 72 | } | - |
| 73 | | - |
| 74 | | - |
| 75 | | - |
| 76 | | - |
| 77 | | - |
| 78 | | - |
| 79 | | - |
| 80 | QTextOption &QTextOption::operator=(const QTextOption &o) | - |
| 81 | { | - |
| 82 | if (this == &o) | - |
| 83 | return *this; | - |
| 84 | | - |
| 85 | QTextOptionPrivate* dNew = 0; | - |
| 86 | if (o.d) | - |
| 87 | dNew = new QTextOptionPrivate(*o.d); | - |
| 88 | delete d; | - |
| 89 | d = dNew; | - |
| 90 | | - |
| 91 | align = o.align; | - |
| 92 | wordWrap = o.wordWrap; | - |
| 93 | design = o.design; | - |
| 94 | direction = o.direction; | - |
| 95 | unused = o.unused; | - |
| 96 | f = o.f; | - |
| 97 | tab = o.tab; | - |
| 98 | return *this; | - |
| 99 | } | - |
| 100 | | - |
| 101 | | - |
| 102 | | - |
| 103 | | - |
| 104 | | - |
| 105 | | - |
| 106 | | - |
| 107 | void QTextOption::setTabArray(const QList<qreal> &tabStops) | - |
| 108 | { | - |
| 109 | if (!d| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 110 | d = new QTextOptionPrivate; never executed: d = new QTextOptionPrivate; | 0 |
| 111 | QList<QTextOption::Tab> tabs; | - |
| 112 | QTextOption::Tab tab; | - |
| 113 | tabs.reserve(tabStops.count()); | - |
| 114 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(tabStops)>::type> _container_((tabStops)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (qreal pos = *_container_.i; _container_.control; _container_.control = 0: tabStops) { | - |
| 115 | tab.position = pos; | - |
| 116 | tabs.append(tab); | - |
| 117 | } never executed: end of block | 0 |
| 118 | d->tabStops = tabs; | - |
| 119 | } never executed: end of block | 0 |
| 120 | void QTextOption::setTabs(const QList<QTextOption::Tab> &tabStops) | - |
| 121 | { | - |
| 122 | if (!d) | - |
| 123 | d = new QTextOptionPrivate; | - |
| 124 | d->tabStops = tabStops; | - |
| 125 | } | - |
| 126 | | - |
| 127 | | - |
| 128 | | - |
| 129 | | - |
| 130 | | - |
| 131 | | - |
| 132 | QList<qreal> QTextOption::tabArray() const | - |
| 133 | { | - |
| 134 | QList<qreal> answer; | - |
| 135 | if (!d) | - |
| 136 | return answer; | - |
| 137 | | - |
| 138 | answer.reserve(d->tabStops.count()); | - |
| 139 | QList<QTextOption::Tab>::ConstIterator iter = d->tabStops.constBegin(); | - |
| 140 | while(iter != d->tabStops.constEnd()) { | - |
| 141 | answer.append( (*iter).position); | - |
| 142 | ++iter; | - |
| 143 | } | - |
| 144 | return answer; | - |
| 145 | } | - |
| 146 | | - |
| 147 | | - |
| 148 | QList<QTextOption::Tab> QTextOption::tabs() const | - |
| 149 | { | - |
| 150 | if (!d) | - |
| 151 | return QList<QTextOption::Tab>(); | - |
| 152 | return d->tabStops; | - |
| 153 | } | - |
| 154 | | - |
| | |