| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstylehelper.cpp | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | __attribute__((visibility("default"))) int qt_defaultDpiX(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | namespace QStyleHelper { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | QString tmp = key % HexString<uint>(option->state) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | % HexString<uint>(option->direction) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | % HexString<uint>(size.width()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | % HexString<uint>(size.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 |     if (const
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | tmp = tmp % HexString<uint>(spinBox->buttonSymbols) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | % HexString<uint>(spinBox->stepEnabled) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | % QLatin1Char(spinBox->frame ? '1' : '0'); ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 |     if (option->palette != QGuiApplication::palette()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | tmp.append(QLatin1Char('P')); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | QByteArray key; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | key.reserve(5120); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | QDataStream str(&key, QIODevice::WriteOnly); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | str << option->palette; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | const QByteArray sha1 = QCryptographicHash::hash(key, QCryptographicHash::Sha1).toHex(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | tmp.append(QString::fromLatin1(sha1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 |     return never executed:   tmp;return tmp;never executed:  return tmp; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | qreal dpiScaled(qreal value) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | static const qreal scale = qreal(qt_defaultDpiX()) / 96.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 |     return never executed:   value * scale;return value * scale;never executed:  return value * scale; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | bool isInstanceOf(QObject *obj, QAccessible::Role role) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | bool match = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 |     match = iface
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 |     return never executed:   match;return match;never executed:  return match; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | bool hasAncestor(QObject *obj, QAccessible::Role role) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | bool found = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 |     QObject *parent = obj
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 |     while (parent
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 |         if (isInstanceOf(parent, role)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 |             found = true; never executed:  found = true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | parent = parent->parent(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 |     return never executed:   found;return found;never executed:  return found; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | int calcBigLineSize(int radius) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | int bigLineSize = radius / 6; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 |     if (bigLineSize < 4
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 |         bigLineSize = 4; never executed:  bigLineSize = 4; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 |     if (bigLineSize > radius / 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 |         bigLineSize = radius / 2; never executed:  bigLineSize = radius / 2; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 |     return never executed:   bigLineSize;return bigLineSize;never executed:  return bigLineSize; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | static QPointF calcRadialPos(const QStyleOptionSlider *dial, qreal offset) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | const int width = dial->rect.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | const int height = dial->rect.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | const int r = qMin(width, height) / 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 |     const int currentSliderPosition = dial->upsideDown
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | qreal a = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 |     if (dial->maximum == dial->minimum
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 |         a = Q_PI / 2; never executed:  a = Q_PI / 2; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 |     else if (dial->dialWrapping
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 |         a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI never executed:  a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 |             / (dial->maximum - dial->minimum); never executed:  a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI / (dial->maximum - dial->minimum); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 |         a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI never executed:  a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 |             / (dial->maximum - dial->minimum)) / 6; never executed:  a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI / (dial->maximum - dial->minimum)) / 6; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | qreal xc = width / 2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | qreal yc = height / 2.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | qreal len = r - QStyleHelper::calcBigLineSize(r) - 3; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | qreal back = offset * len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | QPointF pos(QPointF(xc + back * qCos(a), yc - back * qSin(a))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 |     return never executed:   pos;return pos;never executed:  return pos; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | qreal angle(const QPointF &p1, const QPointF &p2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | static const qreal rad_factor = 180 / Q_PI; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | qreal _angle = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 |     if (p1.x() == p2.x()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 |         if (p1.y() < p2.y()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 |             _angle = 270; never executed:  _angle = 270; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 |             _angle = 90; never executed:  _angle = 90; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | qreal x1, x2, y1, y2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 |         if (p1.x() <= p2.x()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | x1 = p1.x(); y1 = p1.y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | x2 = p2.x(); y2 = p2.y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | x2 = p1.x(); y2 = p1.y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | x1 = p2.x(); y1 = p2.y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | qreal m = -(y2 - y1) / (x2 - x1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | _angle = qAtan(m) * rad_factor; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 |         if (p1.x() < p2.x()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 |             _angle = 180 - _angle; never executed:  _angle = 180 - _angle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 |             _angle = -_angle; never executed:  _angle = -_angle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 |     return never executed:   _angle;return _angle;never executed:  return _angle; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | QPolygonF calcLines(const QStyleOptionSlider *dial) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | QPolygonF poly; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | int width = dial->rect.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | int height = dial->rect.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | qreal r = qMin(width, height) / 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | int bigLineSize = calcBigLineSize(int(r)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | qreal xc = width / 2 + 0.5; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | qreal yc = height / 2 + 0.5; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | const int ns = dial->tickInterval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 |     if (!ns
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 |         return never executed:   poly;return poly;never executed:  return poly; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | int notches = (dial->maximum + ns - 1 - dial->minimum) / ns; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 |     if (notches <= 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 |         return never executed:   poly;return poly;never executed:  return poly; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 |     if (dial->maximum < dial->minimum
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | int maximum = dial->minimum + 1000; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | notches = (maximum + ns - 1 - dial->minimum) / ns; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | poly.resize(2 + 2 * notches); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | int smallLineSize = bigLineSize / 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 |     for (int i = 0; i <= notches
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 |         qreal angle = dial->dialWrapping
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | : (Q_PI * 8 - i * 10 * Q_PI / notches) / 6; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | qreal s = qSin(angle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | qreal c = qCos(angle); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 |         if (i == 0
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | poly[2 * i] = QPointF(xc + (r - bigLineSize) * c, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | yc - (r - bigLineSize) * s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | poly[2 * i + 1] = QPointF(xc + r * c, yc - r * s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | poly[2 * i] = QPointF(xc + (r - 1 - smallLineSize) * c, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | yc - (r - 1 - smallLineSize) * s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | poly[2 * i + 1] = QPointF(xc + (r - 1) * c, yc -(r - 1) * s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 |     return never executed:   poly;return poly;never executed:  return poly; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | void drawDial(const QStyleOptionSlider *option, QPainter *painter) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | QPalette pal = option->palette; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | QColor buttonColor = pal.button().color(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | const int width = option->rect.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | const int height = option->rect.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | const bool enabled = option->state & QStyle::State_Enabled; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | qreal r = qMin(width, height) / 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | r -= r/50; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | const qreal penSize = r/20.0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | painter->save(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | painter->setRenderHint(QPainter::Antialiasing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 |     if (option->subControls & QStyle::SC_DialTickmarks
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | painter->setPen(option->palette.dark().color().darker(120)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | painter->drawLines(QStyleHelper::calcLines(option)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 |     QRect rect = option->rect; QPixmap internalPixmapCache; QImage imageCache; QPainter *p = painter; QString unique = QStyleHelper::uniqueName((QString::fromLatin1("qdial")), option, option->rect.size()); int txType = painter->deviceTransform().type() | painter->worldTransform().type(); bool doPixmapCache = (
 
 
 
 
 
 
 
 never executed:   else { if (doPixmapCacheend of block
 never executed:  ;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | p->setRenderHint(QPainter::Antialiasing); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | const qreal d_ = r / 6; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | const qreal dx = option->rect.x() + d_ + (width - 2 * r) / 2 + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | const qreal dy = option->rect.y() + d_ + (height - 2 * r) / 2 + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | QRectF br = QRectF(dx + 0.5, dy + 0.5, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | int(r * 2 - 2 * d_ - 2), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | int(r * 2 - 2 * d_ - 2)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | buttonColor.setHsv(buttonColor .hue(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | qMin(140, buttonColor .saturation()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | qMax(180, buttonColor.value())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | QColor shadowColor(0, 0, 0, 20); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 |     if (enabled
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | qreal shadowSize = qMax(1.0, penSize/2.0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | QRectF shadowRect= br.adjusted(-2*shadowSize, -2*shadowSize, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 2*shadowSize, 2*shadowSize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | QRadialGradient shadowGradient(shadowRect.center().x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | shadowRect.center().y(), shadowRect.width()/2.0, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | shadowRect.center().x(), shadowRect.center().y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | shadowGradient.setColorAt(qreal(0.91), QColor(0, 0, 0, 40)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | shadowGradient.setColorAt(qreal(1.0), Qt::transparent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | p->setBrush(shadowGradient); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | p->setPen(Qt::NoPen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | p->translate(shadowSize, shadowSize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | p->drawEllipse(shadowRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | p->translate(-shadowSize, -shadowSize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | QRadialGradient gradient(br.center().x() - br.width()/3, dy, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | br.width()*1.3, br.center().x(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | br.center().y() - br.height()/2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | gradient.setColorAt(0, buttonColor.lighter(110)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | gradient.setColorAt(qreal(0.5), buttonColor); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | gradient.setColorAt(qreal(0.501), buttonColor.darker(102)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | gradient.setColorAt(1, buttonColor.darker(115)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | p->setBrush(gradient); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | p->setBrush(Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | p->setPen(QPen(buttonColor.darker(280))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | p->drawEllipse(br); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | p->setBrush(Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | p->setPen(buttonColor.lighter(110)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | p->drawEllipse(br.adjusted(1, 1, -1, -1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 |     if (option->state & QStyle::State_HasFocus
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | QColor highlight = pal.highlight().color(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | highlight.setHsv(highlight.hue(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | qMin(160, highlight.saturation()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | qMax(230, highlight.value())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | highlight.setAlpha(127); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | p->setPen(QPen(highlight, 2.0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | p->setBrush(Qt::NoBrush); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | p->drawEllipse(br.adjusted(-1, -1, 1, 1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 |     if (doPixmapCache
 never executed:   }end of blocknever executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | QPointF dp = calcRadialPos(option, qreal(0.70)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | buttonColor = buttonColor.lighter(104); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | buttonColor.setAlphaF(qreal(0.8)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | const qreal ds = r/qreal(7.0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | QRectF dialRect(dp.x() - ds, dp.y() - ds, 2*ds, 2*ds); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | QRadialGradient dialGradient(dialRect.center().x() + dialRect.width()/2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | dialRect.center().y() + dialRect.width(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | dialRect.width()*2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | dialRect.center().x(), dialRect.center().y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | dialGradient.setColorAt(1, buttonColor.darker(140)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | dialGradient.setColorAt(qreal(0.4), buttonColor.darker(120)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | dialGradient.setColorAt(0, buttonColor.darker(110)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 |     if (penSize > 3.0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | painter->setPen(QPen(QColor(0, 0, 0, 25), penSize)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | painter->drawLine(calcRadialPos(option, qreal(0.90)), calcRadialPos(option, qreal(0.96))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | painter->setBrush(dialGradient); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | painter->setPen(QColor(255, 255, 255, 150)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | painter->drawEllipse(dialRect.adjusted(-1, -1, 1, 1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | painter->setPen(QColor(0, 0, 0, 80)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | painter->drawEllipse(dialRect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | painter->restore(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | int left, int top, int right, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | int bottom) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | QSize size = pixmap.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 |     if (top > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | painter->drawPixmap(QRect(rect.left() + left, rect.top(), rect.width() -right - left, top), pixmap, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | QRect(left, 0, size.width() -right - left, top)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 |         if(left > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 |             painter->drawPixmap(QRect(rect.left(), rect.top(), left, top), pixmap, never executed:  painter->drawPixmap(QRect(rect.left(), rect.top(), left, top), pixmap, QRect(0, 0, left, top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 |                                 QRect(0, 0, left, top)); never executed:  painter->drawPixmap(QRect(rect.left(), rect.top(), left, top), pixmap, QRect(0, 0, left, top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 |         if (right > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 |             painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top(), right, top), pixmap, never executed:  painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top(), right, top), pixmap, QRect(size.width() - right, 0, right, top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 |                                 QRect(size.width() - right, 0, right, top)); never executed:  painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top(), right, top), pixmap, QRect(size.width() - right, 0, right, top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 |     if (left > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 |         painter->drawPixmap(QRect(rect.left(), rect.top()+top, left, rect.height() - top - bottom), pixmap, never executed:  painter->drawPixmap(QRect(rect.left(), rect.top()+top, left, rect.height() - top - bottom), pixmap, QRect(0, top, left, size.height() - bottom - top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 |                             QRect(0, top, left, size.height() - bottom - top)); never executed:  painter->drawPixmap(QRect(rect.left(), rect.top()+top, left, rect.height() - top - bottom), pixmap, QRect(0, top, left, size.height() - bottom - top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | painter->drawPixmap(QRect(rect.left() + left, rect.top()+top, rect.width() -right - left, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | rect.height() - bottom - top), pixmap, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | QRect(left, top, size.width() -right -left, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | size.height() - bottom - top)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 |     if (right > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 |         painter->drawPixmap(QRect(rect.left() +rect.width() - right, rect.top()+top, right, rect.height() - top - bottom), pixmap, never executed:  painter->drawPixmap(QRect(rect.left() +rect.width() - right, rect.top()+top, right, rect.height() - top - bottom), pixmap, QRect(size.width() - right, top, right, size.height() - bottom - top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 |                             QRect(size.width() - right, top, right, size.height() - bottom - top)); never executed:  painter->drawPixmap(QRect(rect.left() +rect.width() - right, rect.top()+top, right, rect.height() - top - bottom), pixmap, QRect(size.width() - right, top, right, size.height() - bottom - top)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 |     if (bottom > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | painter->drawPixmap(QRect(rect.left() +left, rect.top() + rect.height() - bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | rect.width() - right - left, bottom), pixmap, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | QRect(left, size.height() - bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | size.width() - right - left, bottom)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 |         if (left > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 |             painter->drawPixmap(QRect(rect.left(), rect.top() + rect.height() - bottom, left, bottom), pixmap, never executed:  painter->drawPixmap(QRect(rect.left(), rect.top() + rect.height() - bottom, left, bottom), pixmap, QRect(0, size.height() - bottom, left, bottom)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 |                                 QRect(0, size.height() - bottom, left, bottom)); never executed:  painter->drawPixmap(QRect(rect.left(), rect.top() + rect.height() - bottom, left, bottom), pixmap, QRect(0, size.height() - bottom, left, bottom)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 |         if (right > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 |             painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), pixmap, never executed:  painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), pixmap, QRect(size.width() - right, size.height() - bottom, right, bottom)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 |                                 QRect(size.width() - right, size.height() - bottom, right, bottom)); never executed:  painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), pixmap, QRect(size.width() - right, size.height() - bottom, right, bottom)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | QColor backgroundColor(const QPalette &pal, const QWidget* widget) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 |     if (qobject_cast<const QScrollBar *>(widget)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 |             qobject_cast<const QAbstractScrollArea *>(widget->parent()->parent())
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 |         return never executed:   widget->parentWidget()->parentWidget()->palette().color(QPalette::Base);return widget->parentWidget()->parentWidget()->palette().color(QPalette::Base);never executed:  return widget->parentWidget()->parentWidget()->palette().color(QPalette::Base); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 |     return never executed:   pal.color(QPalette::Base);return pal.color(QPalette::Base);never executed:  return pal.color(QPalette::Base); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | QWindow *styleObjectWindow(QObject *so) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 |     if (so
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 |         return never executed:   so->property("_q_styleObjectWindow").value<QWindow *>();return so->property("_q_styleObjectWindow").value<QWindow *>();never executed:  return so->property("_q_styleObjectWindow").value<QWindow *>(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |