| Line | Source Code | Coverage |
|---|
| 1 | /**************************************************************************** | - |
| 2 | ** | - |
| 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | - |
| 4 | ** Contact: http://www.qt-project.org/legal | - |
| 5 | ** | - |
| 6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
| 7 | ** | - |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
| 9 | ** Commercial License Usage | - |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
| 11 | ** accordance with the commercial license agreement provided with the | - |
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - |
| 13 | ** a written agreement between you and Digia. For licensing terms and | - |
| 14 | ** conditions see http://qt.digia.com/licensing. For further information | - |
| 15 | ** use the contact form at http://qt.digia.com/contact-us. | - |
| 16 | ** | - |
| 17 | ** GNU Lesser General Public License Usage | - |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
| 19 | ** General Public License version 2.1 as published by the Free Software | - |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | - |
| 21 | ** packaging of this file. Please review the following information to | - |
| 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | - |
| 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
| 24 | ** | - |
| 25 | ** In addition, as a special exception, Digia gives you certain additional | - |
| 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | - |
| 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
| 28 | ** | - |
| 29 | ** GNU General Public License Usage | - |
| 30 | ** Alternatively, this file may be used under the terms of the GNU | - |
| 31 | ** General Public License version 3.0 as published by the Free Software | - |
| 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | - |
| 33 | ** packaging of this file. Please review the following information to | - |
| 34 | ** ensure the GNU General Public License version 3.0 requirements will be | - |
| 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | - |
| 36 | ** | - |
| 37 | ** | - |
| 38 | ** $QT_END_LICENSE$ | - |
| 39 | ** | - |
| 40 | ****************************************************************************/ | - |
| 41 | | - |
| 42 | #include <qstyle.h> | - |
| 43 | #include <private/qproxystyle_p.h> | - |
| 44 | #include <private/qapplication_p.h> | - |
| 45 | #include "qproxystyle.h" | - |
| 46 | #include "qstylefactory.h" | - |
| 47 | #include <private/qstyle_p.h> | - |
| 48 | | - |
| 49 | #if !defined(QT_NO_STYLE_PROXY) || defined(QT_PLUGIN) | - |
| 50 | | - |
| 51 | QT_BEGIN_NAMESPACE | - |
| 52 | | - |
| 53 | /*! | - |
| 54 | \class QProxyStyle | - |
| 55 | | - |
| 56 | \brief The QProxyStyle class is a convenience class that simplifies | - |
| 57 | dynamically overriding QStyle elements. | - |
| 58 | | - |
| 59 | \since 4.6 | - |
| 60 | | - |
| 61 | \inmodule QtWidgets | - |
| 62 | | - |
| 63 | A QProxyStyle wraps a QStyle (usually the default system style) for the | - |
| 64 | purpose of dynamically overriding painting or other specific style behavior. | - |
| 65 | | - |
| 66 | The following example shows how to override the shortcut underline | - |
| 67 | behavior on any platform: | - |
| 68 | | - |
| 69 | \snippet code/src_gui_qproxystyle.cpp 1 | - |
| 70 | | - |
| 71 | Warning: The \l {QCommonStyle} {common styles} provided by Qt will | - |
| 72 | respect this hint, because they call QStyle::proxy(), but there is | - |
| 73 | no guarantee that QStyle::proxy() will be called for user defined | - |
| 74 | or system controlled styles. It would not work on a Mac, for | - |
| 75 | example, where menus are handled by the operating system. | - |
| 76 | | - |
| 77 | \sa QStyle | - |
| 78 | */ | - |
| 79 | | - |
| 80 | void QProxyStylePrivate::ensureBaseStyle() const | - |
| 81 | { | - |
| 82 | Q_Q(const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStyle * const q = q_func(); | - |
| 83 | | - |
| 84 | if (baseStyle) evaluated: baseStyle| yes Evaluation Count:24398 | yes Evaluation Count:5 |
| 5-24398 |
| 85 | return; executed: return;Execution Count:24398 | 24398 |
| 86 | | - |
| 87 | if (!baseStyle && !QApplicationPrivate::styleOverride.isEmpty()) { partially evaluated: !baseStyle| yes Evaluation Count:5 | no Evaluation Count:0 |
partially evaluated: !QApplicationPrivate::styleOverride.isEmpty()| no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
| 88 | baseStyle = QStyleFactory::create(QApplicationPrivate::styleOverride); never executed (the execution status of this line is deduced): baseStyle = QStyleFactory::create(QApplicationPrivate::styleOverride); | - |
| 89 | if (baseStyle) { never evaluated: baseStyle | 0 |
| 90 | // If baseStyle is an instance of the same proxyStyle | - |
| 91 | // we destroy it and fall back to the desktop style | - |
| 92 | if (qstrcmp(baseStyle->metaObject()->className(), never evaluated: qstrcmp(baseStyle->metaObject()->className(), q->metaObject()->className()) == 0 | 0 |
| 93 | q->metaObject()->className()) == 0) { never evaluated: qstrcmp(baseStyle->metaObject()->className(), q->metaObject()->className()) == 0 | 0 |
| 94 | delete baseStyle; never executed (the execution status of this line is deduced): delete baseStyle; | - |
| 95 | baseStyle = 0; never executed (the execution status of this line is deduced): baseStyle = 0; | - |
| 96 | } | 0 |
| 97 | } | 0 |
| 98 | } | 0 |
| 99 | | - |
| 100 | if (!baseStyle) // Use application desktop style partially evaluated: !baseStyle| yes Evaluation Count:5 | no Evaluation Count:0 |
| 0-5 |
| 101 | baseStyle = QStyleFactory::create(QApplicationPrivate::desktopStyleKey()); executed: baseStyle = QStyleFactory::create(QApplicationPrivate::desktopStyleKey());Execution Count:5 | 5 |
| 102 | | - |
| 103 | if (!baseStyle) // Fallback to windows style partially evaluated: !baseStyle| no Evaluation Count:0 | yes Evaluation Count:5 |
| 0-5 |
| 104 | baseStyle = QStyleFactory::create(QLatin1String("windows")); never executed: baseStyle = QStyleFactory::create(QLatin1String("windows")); | 0 |
| 105 | | - |
| 106 | baseStyle->setProxy(const_cast<QProxyStyle*>(q)); executed (the execution status of this line is deduced): baseStyle->setProxy(const_cast<QProxyStyle*>(q)); | - |
| 107 | baseStyle->setParent(const_cast<QProxyStyle*>(q)); // Take ownership executed (the execution status of this line is deduced): baseStyle->setParent(const_cast<QProxyStyle*>(q)); | - |
| 108 | } executed: }Execution Count:5 | 5 |
| 109 | | - |
| 110 | /*! | - |
| 111 | Constructs a QProxyStyle object for overriding behavior in \a style | - |
| 112 | or in the current application \l{QStyle}{style} if \a style is 0 | - |
| 113 | (default). Normally \a style is 0, because you want to override | - |
| 114 | behavior in the system style. | - |
| 115 | | - |
| 116 | Ownership of \a style is transferred to QProxyStyle. | - |
| 117 | */ | - |
| 118 | QProxyStyle::QProxyStyle(QStyle *style) : | - |
| 119 | QCommonStyle(*new QProxyStylePrivate()) | - |
| 120 | { | - |
| 121 | Q_D(QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 122 | if (style) { evaluated: style| yes Evaluation Count:61 | yes Evaluation Count:4 |
| 4-61 |
| 123 | d->baseStyle = style; executed (the execution status of this line is deduced): d->baseStyle = style; | - |
| 124 | style->setProxy(this); executed (the execution status of this line is deduced): style->setProxy(this); | - |
| 125 | style->setParent(this); // Take ownership executed (the execution status of this line is deduced): style->setParent(this); | - |
| 126 | } executed: }Execution Count:61 | 61 |
| 127 | } executed: }Execution Count:65 | 65 |
| 128 | | - |
| 129 | /*! | - |
| 130 | Destroys the QProxyStyle object. | - |
| 131 | */ | - |
| 132 | QProxyStyle::~QProxyStyle() | - |
| 133 | { | - |
| 134 | } | - |
| 135 | | - |
| 136 | /*! | - |
| 137 | Returns the proxy base style object. If no base style | - |
| 138 | is set on the proxy style, QProxyStyle will create | - |
| 139 | an instance of the application style instead. | - |
| 140 | | - |
| 141 | \sa setBaseStyle(), QStyle | - |
| 142 | */ | - |
| 143 | QStyle *QProxyStyle::baseStyle() const | - |
| 144 | { | - |
| 145 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 146 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 147 | return d->baseStyle; executed: return d->baseStyle;Execution Count:3 | 3 |
| 148 | } | - |
| 149 | | - |
| 150 | /*! | - |
| 151 | Sets the base style that should be proxied. | - |
| 152 | | - |
| 153 | Ownership of \a style is transferred to QProxyStyle. | - |
| 154 | | - |
| 155 | If style is zero, a desktop-dependant style will be | - |
| 156 | assigned automatically. | - |
| 157 | */ | - |
| 158 | void QProxyStyle::setBaseStyle(QStyle *style) | - |
| 159 | { | - |
| 160 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 161 | | - |
| 162 | if (d->baseStyle && d->baseStyle->parent() == this) evaluated: d->baseStyle| yes Evaluation Count:2 | yes Evaluation Count:2 |
partially evaluated: d->baseStyle->parent() == this| yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-2 |
| 163 | d->baseStyle->deleteLater(); executed: d->baseStyle->deleteLater();Execution Count:2 | 2 |
| 164 | | - |
| 165 | d->baseStyle = style; executed (the execution status of this line is deduced): d->baseStyle = style; | - |
| 166 | | - |
| 167 | if (d->baseStyle) { evaluated: d->baseStyle| yes Evaluation Count:1 | yes Evaluation Count:3 |
| 1-3 |
| 168 | d->baseStyle->setProxy(this); executed (the execution status of this line is deduced): d->baseStyle->setProxy(this); | - |
| 169 | d->baseStyle->setParent(this); executed (the execution status of this line is deduced): d->baseStyle->setParent(this); | - |
| 170 | } executed: }Execution Count:1 | 1 |
| 171 | } executed: }Execution Count:4 | 4 |
| 172 | | - |
| 173 | /*! \reimp | - |
| 174 | */ | - |
| 175 | void QProxyStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const | - |
| 176 | { | - |
| 177 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 178 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 179 | d->baseStyle->drawPrimitive(element, option, painter, widget); executed (the execution status of this line is deduced): d->baseStyle->drawPrimitive(element, option, painter, widget); | - |
| 180 | } executed: }Execution Count:238 | 238 |
| 181 | | - |
| 182 | /*! | - |
| 183 | \reimp | - |
| 184 | */ | - |
| 185 | void QProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const | - |
| 186 | { | - |
| 187 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 188 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 189 | d->baseStyle->drawControl(element, option, painter, widget); executed (the execution status of this line is deduced): d->baseStyle->drawControl(element, option, painter, widget); | - |
| 190 | } executed: }Execution Count:818 | 818 |
| 191 | | - |
| 192 | /*! \reimp | - |
| 193 | */ | - |
| 194 | void QProxyStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const | - |
| 195 | { | - |
| 196 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 197 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 198 | d->baseStyle->drawComplexControl(control, option, painter, widget); executed (the execution status of this line is deduced): d->baseStyle->drawComplexControl(control, option, painter, widget); | - |
| 199 | } executed: }Execution Count:29 | 29 |
| 200 | | - |
| 201 | /*! \reimp | - |
| 202 | */ | - |
| 203 | void QProxyStyle::drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, | - |
| 204 | const QString &text, QPalette::ColorRole textRole) const | - |
| 205 | { | - |
| 206 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 207 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 208 | d->baseStyle->drawItemText(painter, rect, flags, pal, enabled, text, textRole); executed (the execution status of this line is deduced): d->baseStyle->drawItemText(painter, rect, flags, pal, enabled, text, textRole); | - |
| 209 | } executed: }Execution Count:357 | 357 |
| 210 | | - |
| 211 | /*! \reimp | - |
| 212 | */ | - |
| 213 | void QProxyStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const | - |
| 214 | { | - |
| 215 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 216 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 217 | d->baseStyle->drawItemPixmap(painter, rect, alignment, pixmap); executed (the execution status of this line is deduced): d->baseStyle->drawItemPixmap(painter, rect, alignment, pixmap); | - |
| 218 | } executed: }Execution Count:2 | 2 |
| 219 | | - |
| 220 | /*! \reimp | - |
| 221 | */ | - |
| 222 | QSize QProxyStyle::sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const | - |
| 223 | { | - |
| 224 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 225 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 226 | return d->baseStyle->sizeFromContents(type, option, size, widget); executed: return d->baseStyle->sizeFromContents(type, option, size, widget);Execution Count:231 | 231 |
| 227 | } | - |
| 228 | | - |
| 229 | /*! \reimp | - |
| 230 | */ | - |
| 231 | QRect QProxyStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const | - |
| 232 | { | - |
| 233 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 234 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 235 | return d->baseStyle->subElementRect(element, option, widget); executed: return d->baseStyle->subElementRect(element, option, widget);Execution Count:3256 | 3256 |
| 236 | } | - |
| 237 | | - |
| 238 | /*! \reimp | - |
| 239 | */ | - |
| 240 | QRect QProxyStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *option, SubControl sc, const QWidget *widget) const | - |
| 241 | { | - |
| 242 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 243 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 244 | return d->baseStyle->subControlRect(cc, option, sc, widget); executed: return d->baseStyle->subControlRect(cc, option, sc, widget);Execution Count:83 | 83 |
| 245 | } | - |
| 246 | | - |
| 247 | /*! \reimp | - |
| 248 | */ | - |
| 249 | QRect QProxyStyle::itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const | - |
| 250 | { | - |
| 251 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 252 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 253 | return d->baseStyle->itemTextRect(fm, r, flags, enabled, text); executed: return d->baseStyle->itemTextRect(fm, r, flags, enabled, text);Execution Count:13 | 13 |
| 254 | } | - |
| 255 | | - |
| 256 | /*! \reimp | - |
| 257 | */ | - |
| 258 | QRect QProxyStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const | - |
| 259 | { | - |
| 260 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 261 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 262 | return d->baseStyle->itemPixmapRect(r, flags, pixmap); executed: return d->baseStyle->itemPixmapRect(r, flags, pixmap);Execution Count:3 | 3 |
| 263 | } | - |
| 264 | | - |
| 265 | /*! \reimp | - |
| 266 | */ | - |
| 267 | QStyle::SubControl QProxyStyle::hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget) const | - |
| 268 | { | - |
| 269 | Q_D (const QProxyStyle); never executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 270 | d->ensureBaseStyle(); never executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 271 | return d->baseStyle->hitTestComplexControl(control, option, pos, widget); never executed: return d->baseStyle->hitTestComplexControl(control, option, pos, widget); | 0 |
| 272 | } | - |
| 273 | | - |
| 274 | /*! \reimp | - |
| 275 | */ | - |
| 276 | int QProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const | - |
| 277 | { | - |
| 278 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 279 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 280 | return d->baseStyle->styleHint(hint, option, widget, returnData); executed: return d->baseStyle->styleHint(hint, option, widget, returnData);Execution Count:7337 | 7337 |
| 281 | } | - |
| 282 | | - |
| 283 | /*! \reimp | - |
| 284 | */ | - |
| 285 | int QProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const | - |
| 286 | { | - |
| 287 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 288 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 289 | return d->baseStyle->pixelMetric(metric, option, widget); executed: return d->baseStyle->pixelMetric(metric, option, widget);Execution Count:5300 | 5300 |
| 290 | } | - |
| 291 | | - |
| 292 | /*! \reimp | - |
| 293 | */ | - |
| 294 | QPixmap QProxyStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const | - |
| 295 | { | - |
| 296 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 297 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 298 | return d->baseStyle->standardPixmap(standardPixmap, opt, widget); executed: return d->baseStyle->standardPixmap(standardPixmap, opt, widget);Execution Count:131 | 131 |
| 299 | } | - |
| 300 | | - |
| 301 | /*! \reimp | - |
| 302 | */ | - |
| 303 | QPixmap QProxyStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const | - |
| 304 | { | - |
| 305 | Q_D (const QProxyStyle); never executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 306 | d->ensureBaseStyle(); never executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 307 | return d->baseStyle->generatedIconPixmap(iconMode, pixmap, opt); never executed: return d->baseStyle->generatedIconPixmap(iconMode, pixmap, opt); | 0 |
| 308 | } | - |
| 309 | | - |
| 310 | /*! \reimp | - |
| 311 | */ | - |
| 312 | QPalette QProxyStyle::standardPalette() const | - |
| 313 | { | - |
| 314 | Q_D (const QProxyStyle); never executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 315 | d->ensureBaseStyle(); never executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 316 | return d->baseStyle->standardPalette(); never executed: return d->baseStyle->standardPalette(); | 0 |
| 317 | } | - |
| 318 | | - |
| 319 | /*! \reimp | - |
| 320 | */ | - |
| 321 | void QProxyStyle::polish(QWidget *widget) | - |
| 322 | { | - |
| 323 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 324 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 325 | d->baseStyle->polish(widget); executed (the execution status of this line is deduced): d->baseStyle->polish(widget); | - |
| 326 | } executed: }Execution Count:3300 | 3300 |
| 327 | | - |
| 328 | /*! \reimp | - |
| 329 | */ | - |
| 330 | void QProxyStyle::polish(QPalette &pal) | - |
| 331 | { | - |
| 332 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 333 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 334 | d->baseStyle->polish(pal); executed (the execution status of this line is deduced): d->baseStyle->polish(pal); | - |
| 335 | } executed: }Execution Count:53 | 53 |
| 336 | | - |
| 337 | /*! \reimp | - |
| 338 | */ | - |
| 339 | void QProxyStyle::polish(QApplication *app) | - |
| 340 | { | - |
| 341 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 342 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 343 | d->baseStyle->polish(app); executed (the execution status of this line is deduced): d->baseStyle->polish(app); | - |
| 344 | } executed: }Execution Count:53 | 53 |
| 345 | | - |
| 346 | /*! \reimp | - |
| 347 | */ | - |
| 348 | void QProxyStyle::unpolish(QWidget *widget) | - |
| 349 | { | - |
| 350 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 351 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 352 | d->baseStyle->unpolish(widget); executed (the execution status of this line is deduced): d->baseStyle->unpolish(widget); | - |
| 353 | } executed: }Execution Count:2922 | 2922 |
| 354 | | - |
| 355 | /*! \reimp | - |
| 356 | */ | - |
| 357 | void QProxyStyle::unpolish(QApplication *app) | - |
| 358 | { | - |
| 359 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 360 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 361 | d->baseStyle->unpolish(app); executed (the execution status of this line is deduced): d->baseStyle->unpolish(app); | - |
| 362 | } executed: }Execution Count:51 | 51 |
| 363 | | - |
| 364 | /*! \reimp | - |
| 365 | */ | - |
| 366 | bool QProxyStyle::event(QEvent *e) | - |
| 367 | { | - |
| 368 | Q_D (QProxyStyle); executed (the execution status of this line is deduced): QProxyStylePrivate * const d = d_func(); | - |
| 369 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 370 | return d->baseStyle->event(e); executed: return d->baseStyle->event(e);Execution Count:138 | 138 |
| 371 | } | - |
| 372 | | - |
| 373 | /*! | - |
| 374 | Returns an icon for the given \a standardIcon. | - |
| 375 | | - |
| 376 | Reimplement this slot to provide your own icons in a QStyle | - |
| 377 | subclass. The \a option argument can be used to pass extra | - |
| 378 | information required to find the appropriate icon. The \a widget | - |
| 379 | argument is optional and can also be used to help find the icon. | - |
| 380 | */ | - |
| 381 | QIcon QProxyStyle::standardIcon(StandardPixmap standardIcon, | - |
| 382 | const QStyleOption *option, | - |
| 383 | const QWidget *widget) const | - |
| 384 | { | - |
| 385 | Q_D (const QProxyStyle); executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 386 | d->ensureBaseStyle(); executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 387 | return d->baseStyle->standardIcon(standardIcon, option, widget); executed: return d->baseStyle->standardIcon(standardIcon, option, widget);Execution Count:85 | 85 |
| 388 | } | - |
| 389 | | - |
| 390 | /*! | - |
| 391 | This slot is called by layoutSpacing() to determine the spacing that | - |
| 392 | should be used between \a control1 and \a control2 in a layout. \a | - |
| 393 | orientation specifies whether the controls are laid out side by side | - |
| 394 | or stacked vertically. The \a option parameter can be used to pass | - |
| 395 | extra information about the parent widget. The \a widget parameter | - |
| 396 | is optional and can also be used if \a option is 0. | - |
| 397 | | - |
| 398 | The default implementation returns -1. | - |
| 399 | | - |
| 400 | \sa combinedLayoutSpacing() | - |
| 401 | */ | - |
| 402 | int QProxyStyle::layoutSpacing(QSizePolicy::ControlType control1, | - |
| 403 | QSizePolicy::ControlType control2, | - |
| 404 | Qt::Orientation orientation, | - |
| 405 | const QStyleOption *option, | - |
| 406 | const QWidget *widget) const | - |
| 407 | { | - |
| 408 | Q_D (const QProxyStyle); never executed (the execution status of this line is deduced): const QProxyStylePrivate * const d = d_func(); | - |
| 409 | d->ensureBaseStyle(); never executed (the execution status of this line is deduced): d->ensureBaseStyle(); | - |
| 410 | return d->baseStyle->layoutSpacing(control1, control2, orientation, option, widget); never executed: return d->baseStyle->layoutSpacing(control1, control2, orientation, option, widget); | 0 |
| 411 | } | - |
| 412 | | - |
| 413 | QT_END_NAMESPACE | - |
| 414 | | - |
| 415 | #endif // QT_NO_STYLE_PROXY | - |
| 416 | | - |
| | |