| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/graphicsview/qgraphicslinearlayout.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | - | |||||||||||||
| 9 | class QGraphicsLinearLayoutPrivate : public QGraphicsLayoutPrivate | - | ||||||||||||
| 10 | { | - | ||||||||||||
| 11 | public: | - | ||||||||||||
| 12 | QGraphicsLinearLayoutPrivate(Qt::Orientation orientation) | - | ||||||||||||
| 13 | : orientation(orientation) | - | ||||||||||||
| 14 | { } never executed: end of block | 0 | ||||||||||||
| 15 | - | |||||||||||||
| 16 | void removeGridItem(QGridLayoutItem *gridItem); | - | ||||||||||||
| 17 | QGraphicsLayoutStyleInfo *styleInfo() const; | - | ||||||||||||
| 18 | void fixIndex(int *index) const; | - | ||||||||||||
| 19 | int gridRow(int index) const; | - | ||||||||||||
| 20 | int gridColumn(int index) const; | - | ||||||||||||
| 21 | - | |||||||||||||
| 22 | Qt::Orientation orientation; | - | ||||||||||||
| 23 | mutable QScopedPointer<QGraphicsLayoutStyleInfo> m_styleInfo; | - | ||||||||||||
| 24 | QGraphicsGridLayoutEngine engine; | - | ||||||||||||
| 25 | }; | - | ||||||||||||
| 26 | - | |||||||||||||
| 27 | void QGraphicsLinearLayoutPrivate::removeGridItem(QGridLayoutItem *gridItem) | - | ||||||||||||
| 28 | { | - | ||||||||||||
| 29 | int index = gridItem->firstRow(orientation); | - | ||||||||||||
| 30 | engine.removeItem(gridItem); | - | ||||||||||||
| 31 | engine.removeRows(index, 1, orientation); | - | ||||||||||||
| 32 | } never executed: end of block | 0 | ||||||||||||
| 33 | - | |||||||||||||
| 34 | void QGraphicsLinearLayoutPrivate::fixIndex(int *index) const | - | ||||||||||||
| 35 | { | - | ||||||||||||
| 36 | int count = engine.rowCount(orientation); | - | ||||||||||||
| 37 | if (uint(*index) > uint(count)
| 0 | ||||||||||||
| 38 | * never executed: index = count;*index = count;never executed: *index = count; | 0 | ||||||||||||
| 39 | } never executed: end of block | 0 | ||||||||||||
| 40 | - | |||||||||||||
| 41 | int QGraphicsLinearLayoutPrivate::gridRow(int index) const | - | ||||||||||||
| 42 | { | - | ||||||||||||
| 43 | if (orientation == Qt::Horizontal
| 0 | ||||||||||||
| 44 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 45 | return never executed: int(qMin(uint(index), uint(engine.rowCount())));return int(qMin(uint(index), uint(engine.rowCount())));never executed: return int(qMin(uint(index), uint(engine.rowCount()))); | 0 | ||||||||||||
| 46 | } | - | ||||||||||||
| 47 | - | |||||||||||||
| 48 | int QGraphicsLinearLayoutPrivate::gridColumn(int index) const | - | ||||||||||||
| 49 | { | - | ||||||||||||
| 50 | if (orientation == Qt::Vertical
| 0 | ||||||||||||
| 51 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 52 | return never executed: int(qMin(uint(index), uint(engine.columnCount())));return int(qMin(uint(index), uint(engine.columnCount())));never executed: return int(qMin(uint(index), uint(engine.columnCount()))); | 0 | ||||||||||||
| 53 | } | - | ||||||||||||
| 54 | - | |||||||||||||
| 55 | QGraphicsLayoutStyleInfo *QGraphicsLinearLayoutPrivate::styleInfo() const | - | ||||||||||||
| 56 | { | - | ||||||||||||
| 57 | if (!m_styleInfo
| 0 | ||||||||||||
| 58 | m_styleInfo.reset(new QGraphicsLayoutStyleInfo(this)); never executed: m_styleInfo.reset(new QGraphicsLayoutStyleInfo(this)); | 0 | ||||||||||||
| 59 | return never executed: m_styleInfo.data();return m_styleInfo.data();never executed: return m_styleInfo.data(); | 0 | ||||||||||||
| 60 | } | - | ||||||||||||
| 61 | - | |||||||||||||
| 62 | - | |||||||||||||
| 63 | - | |||||||||||||
| 64 | - | |||||||||||||
| 65 | - | |||||||||||||
| 66 | - | |||||||||||||
| 67 | QGraphicsLinearLayout::QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem *parent) | - | ||||||||||||
| 68 | : QGraphicsLayout(*new QGraphicsLinearLayoutPrivate(orientation), parent) | - | ||||||||||||
| 69 | { | - | ||||||||||||
| 70 | } never executed: end of block | 0 | ||||||||||||
| 71 | - | |||||||||||||
| 72 | - | |||||||||||||
| 73 | - | |||||||||||||
| 74 | - | |||||||||||||
| 75 | - | |||||||||||||
| 76 | QGraphicsLinearLayout::QGraphicsLinearLayout(QGraphicsLayoutItem *parent) | - | ||||||||||||
| 77 | : QGraphicsLayout(*new QGraphicsLinearLayoutPrivate(Qt::Horizontal), parent) | - | ||||||||||||
| 78 | { | - | ||||||||||||
| 79 | } never executed: end of block | 0 | ||||||||||||
| 80 | - | |||||||||||||
| 81 | - | |||||||||||||
| 82 | - | |||||||||||||
| 83 | - | |||||||||||||
| 84 | QGraphicsLinearLayout::~QGraphicsLinearLayout() | - | ||||||||||||
| 85 | { | - | ||||||||||||
| 86 | for (int i = count() - 1; i >= 0
| 0 | ||||||||||||
| 87 | QGraphicsLayoutItem *item = itemAt(i); | - | ||||||||||||
| 88 | - | |||||||||||||
| 89 | - | |||||||||||||
| 90 | - | |||||||||||||
| 91 | removeAt(i); | - | ||||||||||||
| 92 | if (item
| 0 | ||||||||||||
| 93 | item->setParentLayoutItem(0); | - | ||||||||||||
| 94 | if (item->ownedByLayout()
| 0 | ||||||||||||
| 95 | delete item; never executed: delete item; | 0 | ||||||||||||
| 96 | } never executed: end of block | 0 | ||||||||||||
| 97 | } never executed: end of block | 0 | ||||||||||||
| 98 | } never executed: end of block | 0 | ||||||||||||
| 99 | - | |||||||||||||
| 100 | - | |||||||||||||
| 101 | - | |||||||||||||
| 102 | - | |||||||||||||
| 103 | - | |||||||||||||
| 104 | - | |||||||||||||
| 105 | - | |||||||||||||
| 106 | void QGraphicsLinearLayout::setOrientation(Qt::Orientation orientation) | - | ||||||||||||
| 107 | { | - | ||||||||||||
| 108 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 109 | if (orientation != d->orientation
| 0 | ||||||||||||
| 110 | d->engine.transpose(); | - | ||||||||||||
| 111 | d->orientation = orientation; | - | ||||||||||||
| 112 | invalidate(); | - | ||||||||||||
| 113 | } never executed: end of block | 0 | ||||||||||||
| 114 | } never executed: end of block | 0 | ||||||||||||
| 115 | - | |||||||||||||
| 116 | - | |||||||||||||
| 117 | - | |||||||||||||
| 118 | - | |||||||||||||
| 119 | - | |||||||||||||
| 120 | Qt::Orientation QGraphicsLinearLayout::orientation() const | - | ||||||||||||
| 121 | { | - | ||||||||||||
| 122 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 123 | return never executed: d->orientation;return d->orientation;never executed: return d->orientation; | 0 | ||||||||||||
| 124 | } | - | ||||||||||||
| 125 | void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item) | - | ||||||||||||
| 126 | { | - | ||||||||||||
| 127 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 128 | if (!item
| 0 | ||||||||||||
| 129 | QMessageLogger(__FILE__, 273, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::insertItem: cannot insert null item"); | - | ||||||||||||
| 130 | return; never executed: return; | 0 | ||||||||||||
| 131 | } | - | ||||||||||||
| 132 | if (item == this
| 0 | ||||||||||||
| 133 | QMessageLogger(__FILE__, 277, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::insertItem: cannot insert itself"); | - | ||||||||||||
| 134 | return; never executed: return; | 0 | ||||||||||||
| 135 | } | - | ||||||||||||
| 136 | d->addChildLayoutItem(item); | - | ||||||||||||
| 137 | - | |||||||||||||
| 138 | ((!(item)) ? qt_assert("item",__FILE__,282) : qt_noop()); | - | ||||||||||||
| 139 | d->fixIndex(&index); | - | ||||||||||||
| 140 | d->engine.insertRow(index, d->orientation); | - | ||||||||||||
| 141 | QGraphicsGridLayoutEngineItem *gridEngineItem = new QGraphicsGridLayoutEngineItem(item, d->gridRow(index), d->gridColumn(index), 1, 1, 0); | - | ||||||||||||
| 142 | d->engine.insertItem(gridEngineItem, index); | - | ||||||||||||
| 143 | invalidate(); | - | ||||||||||||
| 144 | } never executed: end of block | 0 | ||||||||||||
| 145 | - | |||||||||||||
| 146 | - | |||||||||||||
| 147 | - | |||||||||||||
| 148 | - | |||||||||||||
| 149 | - | |||||||||||||
| 150 | - | |||||||||||||
| 151 | - | |||||||||||||
| 152 | void QGraphicsLinearLayout::insertStretch(int index, int stretch) | - | ||||||||||||
| 153 | { | - | ||||||||||||
| 154 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 155 | d->fixIndex(&index); | - | ||||||||||||
| 156 | d->engine.insertRow(index, d->orientation); | - | ||||||||||||
| 157 | d->engine.setRowStretchFactor(index, stretch, d->orientation); | - | ||||||||||||
| 158 | invalidate(); | - | ||||||||||||
| 159 | } never executed: end of block | 0 | ||||||||||||
| 160 | - | |||||||||||||
| 161 | - | |||||||||||||
| 162 | - | |||||||||||||
| 163 | - | |||||||||||||
| 164 | - | |||||||||||||
| 165 | - | |||||||||||||
| 166 | - | |||||||||||||
| 167 | void QGraphicsLinearLayout::removeItem(QGraphicsLayoutItem *item) | - | ||||||||||||
| 168 | { | - | ||||||||||||
| 169 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 170 | if (QGraphicsGridLayoutEngineItem *gridItem = d->engine.findLayoutItem(item)
| 0 | ||||||||||||
| 171 | item->setParentLayoutItem(0); | - | ||||||||||||
| 172 | d->removeGridItem(gridItem); | - | ||||||||||||
| 173 | delete gridItem; | - | ||||||||||||
| 174 | invalidate(); | - | ||||||||||||
| 175 | } never executed: end of block | 0 | ||||||||||||
| 176 | } never executed: end of block | 0 | ||||||||||||
| 177 | - | |||||||||||||
| 178 | - | |||||||||||||
| 179 | - | |||||||||||||
| 180 | - | |||||||||||||
| 181 | - | |||||||||||||
| 182 | - | |||||||||||||
| 183 | - | |||||||||||||
| 184 | void QGraphicsLinearLayout::removeAt(int index) | - | ||||||||||||
| 185 | { | - | ||||||||||||
| 186 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 187 | if (index < 0
| 0 | ||||||||||||
| 188 | QMessageLogger(__FILE__, 332, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::removeAt: invalid index %d", index); | - | ||||||||||||
| 189 | return; never executed: return; | 0 | ||||||||||||
| 190 | } | - | ||||||||||||
| 191 | - | |||||||||||||
| 192 | if (QGraphicsGridLayoutEngineItem *gridItem = static_cast<QGraphicsGridLayoutEngineItem*>(d->engine.itemAt(index))
| 0 | ||||||||||||
| 193 | if (QGraphicsLayoutItem *layoutItem = gridItem->layoutItem()
| 0 | ||||||||||||
| 194 | layoutItem->setParentLayoutItem(0); never executed: layoutItem->setParentLayoutItem(0); | 0 | ||||||||||||
| 195 | d->removeGridItem(gridItem); | - | ||||||||||||
| 196 | delete gridItem; | - | ||||||||||||
| 197 | invalidate(); | - | ||||||||||||
| 198 | } never executed: end of block | 0 | ||||||||||||
| 199 | } never executed: end of block | 0 | ||||||||||||
| 200 | - | |||||||||||||
| 201 | - | |||||||||||||
| 202 | - | |||||||||||||
| 203 | - | |||||||||||||
| 204 | - | |||||||||||||
| 205 | - | |||||||||||||
| 206 | - | |||||||||||||
| 207 | void QGraphicsLinearLayout::setSpacing(qreal spacing) | - | ||||||||||||
| 208 | { | - | ||||||||||||
| 209 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 210 | if (spacing < 0
| 0 | ||||||||||||
| 211 | QMessageLogger(__FILE__, 355, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::setSpacing: invalid spacing %g", spacing); | - | ||||||||||||
| 212 | return; never executed: return; | 0 | ||||||||||||
| 213 | } | - | ||||||||||||
| 214 | d->engine.setSpacing(spacing, Qt::Horizontal | Qt::Vertical); | - | ||||||||||||
| 215 | invalidate(); | - | ||||||||||||
| 216 | } never executed: end of block | 0 | ||||||||||||
| 217 | - | |||||||||||||
| 218 | - | |||||||||||||
| 219 | - | |||||||||||||
| 220 | - | |||||||||||||
| 221 | - | |||||||||||||
| 222 | - | |||||||||||||
| 223 | - | |||||||||||||
| 224 | qreal QGraphicsLinearLayout::spacing() const | - | ||||||||||||
| 225 | { | - | ||||||||||||
| 226 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 227 | return never executed: d->engine.spacing(d->orientation, d->styleInfo());return d->engine.spacing(d->orientation, d->styleInfo());never executed: return d->engine.spacing(d->orientation, d->styleInfo()); | 0 | ||||||||||||
| 228 | } | - | ||||||||||||
| 229 | - | |||||||||||||
| 230 | - | |||||||||||||
| 231 | - | |||||||||||||
| 232 | - | |||||||||||||
| 233 | void QGraphicsLinearLayout::setItemSpacing(int index, qreal spacing) | - | ||||||||||||
| 234 | { | - | ||||||||||||
| 235 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 236 | d->engine.setRowSpacing(index, spacing, d->orientation); | - | ||||||||||||
| 237 | invalidate(); | - | ||||||||||||
| 238 | } never executed: end of block | 0 | ||||||||||||
| 239 | - | |||||||||||||
| 240 | - | |||||||||||||
| 241 | - | |||||||||||||
| 242 | qreal QGraphicsLinearLayout::itemSpacing(int index) const | - | ||||||||||||
| 243 | { | - | ||||||||||||
| 244 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 245 | return never executed: d->engine.rowSpacing(index, d->orientation);return d->engine.rowSpacing(index, d->orientation);never executed: return d->engine.rowSpacing(index, d->orientation); | 0 | ||||||||||||
| 246 | } | - | ||||||||||||
| 247 | void QGraphicsLinearLayout::setStretchFactor(QGraphicsLayoutItem *item, int stretch) | - | ||||||||||||
| 248 | { | - | ||||||||||||
| 249 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 250 | if (!item
| 0 | ||||||||||||
| 251 | QMessageLogger(__FILE__, 405, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::setStretchFactor: cannot assign" | - | ||||||||||||
| 252 | " a stretch factor to a null item"); | - | ||||||||||||
| 253 | return; never executed: return; | 0 | ||||||||||||
| 254 | } | - | ||||||||||||
| 255 | if (stretchFactor(item) == stretch
| 0 | ||||||||||||
| 256 | return; never executed: return; | 0 | ||||||||||||
| 257 | d->engine.setStretchFactor(item, stretch, d->orientation); | - | ||||||||||||
| 258 | invalidate(); | - | ||||||||||||
| 259 | } never executed: end of block | 0 | ||||||||||||
| 260 | - | |||||||||||||
| 261 | - | |||||||||||||
| 262 | - | |||||||||||||
| 263 | - | |||||||||||||
| 264 | - | |||||||||||||
| 265 | - | |||||||||||||
| 266 | - | |||||||||||||
| 267 | int QGraphicsLinearLayout::stretchFactor(QGraphicsLayoutItem *item) const | - | ||||||||||||
| 268 | { | - | ||||||||||||
| 269 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 270 | if (!item
| 0 | ||||||||||||
| 271 | QMessageLogger(__FILE__, 425, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::setStretchFactor: cannot return" | - | ||||||||||||
| 272 | " a stretch factor for a null item"); | - | ||||||||||||
| 273 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 274 | } | - | ||||||||||||
| 275 | return never executed: d->engine.stretchFactor(item, d->orientation);return d->engine.stretchFactor(item, d->orientation);never executed: return d->engine.stretchFactor(item, d->orientation); | 0 | ||||||||||||
| 276 | } | - | ||||||||||||
| 277 | - | |||||||||||||
| 278 | - | |||||||||||||
| 279 | - | |||||||||||||
| 280 | - | |||||||||||||
| 281 | - | |||||||||||||
| 282 | - | |||||||||||||
| 283 | - | |||||||||||||
| 284 | void QGraphicsLinearLayout::setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) | - | ||||||||||||
| 285 | { | - | ||||||||||||
| 286 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 287 | if (this->alignment(item) == alignment
| 0 | ||||||||||||
| 288 | return; never executed: return; | 0 | ||||||||||||
| 289 | d->engine.setAlignment(item, alignment); | - | ||||||||||||
| 290 | invalidate(); | - | ||||||||||||
| 291 | } never executed: end of block | 0 | ||||||||||||
| 292 | Qt::Alignment QGraphicsLinearLayout::alignment(QGraphicsLayoutItem *item) const | - | ||||||||||||
| 293 | { | - | ||||||||||||
| 294 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 295 | return never executed: d->engine.alignment(item);return d->engine.alignment(item);never executed: return d->engine.alignment(item); | 0 | ||||||||||||
| 296 | } | - | ||||||||||||
| 297 | int QGraphicsLinearLayout::count() const | - | ||||||||||||
| 298 | { | - | ||||||||||||
| 299 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 300 | return never executed: d->engine.itemCount();return d->engine.itemCount();never executed: return d->engine.itemCount(); | 0 | ||||||||||||
| 301 | } | - | ||||||||||||
| 302 | - | |||||||||||||
| 303 | - | |||||||||||||
| 304 | - | |||||||||||||
| 305 | - | |||||||||||||
| 306 | - | |||||||||||||
| 307 | QGraphicsLayoutItem *QGraphicsLinearLayout::itemAt(int index) const | - | ||||||||||||
| 308 | { | - | ||||||||||||
| 309 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 310 | if (index < 0
| 0 | ||||||||||||
| 311 | QMessageLogger(__FILE__, 487, __PRETTY_FUNCTION__).warning("QGraphicsLinearLayout::itemAt: invalid index %d", index); | - | ||||||||||||
| 312 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 313 | } | - | ||||||||||||
| 314 | QGraphicsLayoutItem *item = 0; | - | ||||||||||||
| 315 | if (QGraphicsGridLayoutEngineItem *gridItem = static_cast<QGraphicsGridLayoutEngineItem *>(d->engine.itemAt(index))
| 0 | ||||||||||||
| 316 | item = gridItem->layoutItem(); never executed: item = gridItem->layoutItem(); | 0 | ||||||||||||
| 317 | return never executed: item;return item;never executed: return item; | 0 | ||||||||||||
| 318 | } | - | ||||||||||||
| 319 | - | |||||||||||||
| 320 | - | |||||||||||||
| 321 | - | |||||||||||||
| 322 | - | |||||||||||||
| 323 | void QGraphicsLinearLayout::setGeometry(const QRectF &rect) | - | ||||||||||||
| 324 | { | - | ||||||||||||
| 325 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 326 | QGraphicsLayout::setGeometry(rect); | - | ||||||||||||
| 327 | QRectF effectiveRect = geometry(); | - | ||||||||||||
| 328 | qreal left, top, right, bottom; | - | ||||||||||||
| 329 | getContentsMargins(&left, &top, &right, &bottom); | - | ||||||||||||
| 330 | Qt::LayoutDirection visualDir = d->visualDirection(); | - | ||||||||||||
| 331 | d->engine.setVisualDirection(visualDir); | - | ||||||||||||
| 332 | if (visualDir == Qt::RightToLeft
| 0 | ||||||||||||
| 333 | qSwap(left, right); never executed: qSwap(left, right); | 0 | ||||||||||||
| 334 | effectiveRect.adjust(+left, +top, -right, -bottom); | - | ||||||||||||
| 335 | - | |||||||||||||
| 336 | - | |||||||||||||
| 337 | - | |||||||||||||
| 338 | - | |||||||||||||
| 339 | - | |||||||||||||
| 340 | - | |||||||||||||
| 341 | - | |||||||||||||
| 342 | d->engine.setGeometries(effectiveRect, d->styleInfo()); | - | ||||||||||||
| 343 | - | |||||||||||||
| 344 | - | |||||||||||||
| 345 | - | |||||||||||||
| 346 | - | |||||||||||||
| 347 | - | |||||||||||||
| 348 | - | |||||||||||||
| 349 | } never executed: end of block | 0 | ||||||||||||
| 350 | - | |||||||||||||
| 351 | - | |||||||||||||
| 352 | - | |||||||||||||
| 353 | - | |||||||||||||
| 354 | QSizeF QGraphicsLinearLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const | - | ||||||||||||
| 355 | { | - | ||||||||||||
| 356 | const QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 357 | qreal left, top, right, bottom; | - | ||||||||||||
| 358 | getContentsMargins(&left, &top, &right, &bottom); | - | ||||||||||||
| 359 | const QSizeF extraMargins(left + right, top + bottom); | - | ||||||||||||
| 360 | return never executed: d->engine.sizeHint(which , constraint - extraMargins, d->styleInfo()) + extraMargins;return d->engine.sizeHint(which , constraint - extraMargins, d->styleInfo()) + extraMargins;never executed: return d->engine.sizeHint(which , constraint - extraMargins, d->styleInfo()) + extraMargins; | 0 | ||||||||||||
| 361 | } | - | ||||||||||||
| 362 | - | |||||||||||||
| 363 | - | |||||||||||||
| 364 | - | |||||||||||||
| 365 | - | |||||||||||||
| 366 | void QGraphicsLinearLayout::invalidate() | - | ||||||||||||
| 367 | { | - | ||||||||||||
| 368 | QGraphicsLinearLayoutPrivate * const d = d_func(); | - | ||||||||||||
| 369 | d->engine.invalidate(); | - | ||||||||||||
| 370 | if (d->m_styleInfo
| 0 | ||||||||||||
| 371 | d->m_styleInfo->invalidate(); never executed: d->m_styleInfo->invalidate(); | 0 | ||||||||||||
| 372 | QGraphicsLayout::invalidate(); | - | ||||||||||||
| 373 | } never executed: end of block | 0 | ||||||||||||
| 374 | - | |||||||||||||
| 375 | - | |||||||||||||
| 376 | - | |||||||||||||
| 377 | - | |||||||||||||
| 378 | void QGraphicsLinearLayout::dump(int indent) const | - | ||||||||||||
| 379 | { | - | ||||||||||||
| 380 | (void)indent;; | - | ||||||||||||
| 381 | - | |||||||||||||
| 382 | } never executed: end of block | 0 | ||||||||||||
| 383 | - | |||||||||||||
| 384 | - | |||||||||||||
| Switch to Source code | Preprocessed file |