| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/styles/qstyleoption.cpp |
| Source code | Switch to Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | /**************************************************************************** | - | ||||||
| 2 | ** | - | ||||||
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||
| 4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||
| 5 | ** | - | ||||||
| 6 | ** This file is part of the QtWidgets 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 The Qt Company. For licensing terms | - | ||||||
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||
| 15 | ** information use the contact form at https://www.qt.io/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 3 as published by the Free Software | - | ||||||
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||
| 21 | ** packaging of this file. Please review the following information to | - | ||||||
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||
| 24 | ** | - | ||||||
| 25 | ** GNU General Public License Usage | - | ||||||
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||
| 31 | ** included in the packaging of this file. Please review the following | - | ||||||
| 32 | ** information to ensure the GNU General Public License requirements will | - | ||||||
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||
| 35 | ** | - | ||||||
| 36 | ** $QT_END_LICENSE$ | - | ||||||
| 37 | ** | - | ||||||
| 38 | ****************************************************************************/ | - | ||||||
| 39 | - | |||||||
| 40 | #include "qstyleoption.h" | - | ||||||
| 41 | #include "qapplication.h" | - | ||||||
| 42 | #ifdef Q_OS_MAC | - | ||||||
| 43 | # include "qmacstyle_mac_p.h" | - | ||||||
| 44 | #endif | - | ||||||
| 45 | #include <qdebug.h> | - | ||||||
| 46 | #include <QtCore/qmath.h> | - | ||||||
| 47 | - | |||||||
| 48 | QT_BEGIN_NAMESPACE | - | ||||||
| 49 | - | |||||||
| 50 | /*! | - | ||||||
| 51 | \class QStyleOption | - | ||||||
| 52 | \brief The QStyleOption class stores the parameters used by QStyle functions. | - | ||||||
| 53 | - | |||||||
| 54 | \ingroup appearance | - | ||||||
| 55 | \inmodule QtWidgets | - | ||||||
| 56 | - | |||||||
| 57 | QStyleOption and its subclasses contain all the information that | - | ||||||
| 58 | QStyle functions need to draw a graphical element. | - | ||||||
| 59 | - | |||||||
| 60 | For performance reasons, there are few member functions and the | - | ||||||
| 61 | access to the member variables is direct (i.e., using the \c . or | - | ||||||
| 62 | \c -> operator). This low-level feel makes the structures | - | ||||||
| 63 | straightforward to use and emphasizes that these are simply | - | ||||||
| 64 | parameters used by the style functions. | - | ||||||
| 65 | - | |||||||
| 66 | The caller of a QStyle function usually creates QStyleOption | - | ||||||
| 67 | objects on the stack. This combined with Qt's extensive use of | - | ||||||
| 68 | \l{implicit sharing} for types such as QString, QPalette, and | - | ||||||
| 69 | QColor ensures that no memory allocation needlessly takes place. | - | ||||||
| 70 | - | |||||||
| 71 | The following code snippet shows how to use a specific | - | ||||||
| 72 | QStyleOption subclass to paint a push button: | - | ||||||
| 73 | - | |||||||
| 74 | \snippet qstyleoption/main.cpp 0 | - | ||||||
| 75 | - | |||||||
| 76 | In our example, the control is a QStyle::CE_PushButton, and | - | ||||||
| 77 | according to the QStyle::drawControl() documentation the | - | ||||||
| 78 | corresponding class is QStyleOptionButton. | - | ||||||
| 79 | - | |||||||
| 80 | When reimplementing QStyle functions that take a QStyleOption | - | ||||||
| 81 | parameter, you often need to cast the QStyleOption to a subclass. | - | ||||||
| 82 | For safety, you can use qstyleoption_cast() to ensure that the | - | ||||||
| 83 | pointer type is correct. For example: | - | ||||||
| 84 | - | |||||||
| 85 | \snippet qstyleoption/main.cpp 4 | - | ||||||
| 86 | - | |||||||
| 87 | The qstyleoption_cast() function will return 0 if the object to | - | ||||||
| 88 | which \c option points is not of the correct type. | - | ||||||
| 89 | - | |||||||
| 90 | For an example demonstrating how style options can be used, see | - | ||||||
| 91 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 92 | - | |||||||
| 93 | \sa QStyle, QStylePainter | - | ||||||
| 94 | */ | - | ||||||
| 95 | - | |||||||
| 96 | /*! | - | ||||||
| 97 | \enum QStyleOption::OptionType | - | ||||||
| 98 | - | |||||||
| 99 | This enum is used internally by QStyleOption, its subclasses, and | - | ||||||
| 100 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 101 | general you do not need to worry about this unless you want to | - | ||||||
| 102 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 103 | - | |||||||
| 104 | \value SO_Button \l QStyleOptionButton | - | ||||||
| 105 | \value SO_ComboBox \l QStyleOptionComboBox | - | ||||||
| 106 | \value SO_Complex \l QStyleOptionComplex | - | ||||||
| 107 | \value SO_Default QStyleOption | - | ||||||
| 108 | \value SO_DockWidget \l QStyleOptionDockWidget | - | ||||||
| 109 | \value SO_FocusRect \l QStyleOptionFocusRect | - | ||||||
| 110 | \value SO_Frame \l QStyleOptionFrame | - | ||||||
| 111 | \value SO_GraphicsItem \l QStyleOptionGraphicsItem | - | ||||||
| 112 | \value SO_GroupBox \l QStyleOptionGroupBox | - | ||||||
| 113 | \value SO_Header \l QStyleOptionHeader | - | ||||||
| 114 | \value SO_MenuItem \l QStyleOptionMenuItem | - | ||||||
| 115 | \value SO_ProgressBar \l QStyleOptionProgressBar | - | ||||||
| 116 | \value SO_RubberBand \l QStyleOptionRubberBand | - | ||||||
| 117 | \value SO_SizeGrip \l QStyleOptionSizeGrip | - | ||||||
| 118 | \value SO_Slider \l QStyleOptionSlider | - | ||||||
| 119 | \value SO_SpinBox \l QStyleOptionSpinBox | - | ||||||
| 120 | \value SO_Tab \l QStyleOptionTab | - | ||||||
| 121 | \value SO_TabBarBase \l QStyleOptionTabBarBase | - | ||||||
| 122 | \value SO_TabWidgetFrame \l QStyleOptionTabWidgetFrame | - | ||||||
| 123 | \value SO_TitleBar \l QStyleOptionTitleBar | - | ||||||
| 124 | \value SO_ToolBar \l QStyleOptionToolBar | - | ||||||
| 125 | \value SO_ToolBox \l QStyleOptionToolBox | - | ||||||
| 126 | \value SO_ToolButton \l QStyleOptionToolButton | - | ||||||
| 127 | \value SO_ViewItem \l QStyleOptionViewItem (used in Interviews) | - | ||||||
| 128 | - | |||||||
| 129 | The following values are used for custom controls: | - | ||||||
| 130 | - | |||||||
| 131 | \value SO_CustomBase Reserved for custom QStyleOptions; | - | ||||||
| 132 | all custom controls values must be above this value | - | ||||||
| 133 | \value SO_ComplexCustomBase Reserved for custom QStyleOptions; | - | ||||||
| 134 | all custom complex controls values must be above this value | - | ||||||
| 135 | - | |||||||
| 136 | \sa type | - | ||||||
| 137 | */ | - | ||||||
| 138 | - | |||||||
| 139 | /*! | - | ||||||
| 140 | Constructs a QStyleOption with the specified \a version and \a | - | ||||||
| 141 | type. | - | ||||||
| 142 | - | |||||||
| 143 | The version has no special meaning for QStyleOption; it can be | - | ||||||
| 144 | used by subclasses to distinguish between different version of | - | ||||||
| 145 | the same option type. | - | ||||||
| 146 | - | |||||||
| 147 | The \l state member variable is initialized to | - | ||||||
| 148 | QStyle::State_None. | - | ||||||
| 149 | - | |||||||
| 150 | \sa version, type | - | ||||||
| 151 | */ | - | ||||||
| 152 | - | |||||||
| 153 | QStyleOption::QStyleOption(int version, int type) | - | ||||||
| 154 | : version(version), type(type), state(QStyle::State_None), | - | ||||||
| 155 | direction(QApplication::layoutDirection()), fontMetrics(QFont()), styleObject(0) | - | ||||||
| 156 | { | - | ||||||
| 157 | } never executed: end of block | 0 | ||||||
| 158 | - | |||||||
| 159 | - | |||||||
| 160 | /*! | - | ||||||
| 161 | Destroys this style option object. | - | ||||||
| 162 | */ | - | ||||||
| 163 | QStyleOption::~QStyleOption() | - | ||||||
| 164 | { | - | ||||||
| 165 | } | - | ||||||
| 166 | - | |||||||
| 167 | /*! | - | ||||||
| 168 | \fn void QStyleOption::initFrom(const QWidget *widget) | - | ||||||
| 169 | \since 4.1 | - | ||||||
| 170 | - | |||||||
| 171 | Initializes the \l state, \l direction, \l rect, \l palette, \l fontMetrics | - | ||||||
| 172 | and \l styleObject member variables based on the specified \a widget. | - | ||||||
| 173 | - | |||||||
| 174 | This is a convenience function; the member variables can also be | - | ||||||
| 175 | initialized manually. | - | ||||||
| 176 | - | |||||||
| 177 | \sa QWidget::layoutDirection(), QWidget::rect(), | - | ||||||
| 178 | QWidget::palette(), QWidget::fontMetrics() | - | ||||||
| 179 | */ | - | ||||||
| 180 | - | |||||||
| 181 | /*! | - | ||||||
| 182 | \obsolete | - | ||||||
| 183 | - | |||||||
| 184 | Use initFrom(\a widget) instead. | - | ||||||
| 185 | */ | - | ||||||
| 186 | void QStyleOption::init(const QWidget *widget) | - | ||||||
| 187 | { | - | ||||||
| 188 | QWidget *window = widget->window(); | - | ||||||
| 189 | state = QStyle::State_None; | - | ||||||
| 190 | if (widget->isEnabled())
| 0 | ||||||
| 191 | state |= QStyle::State_Enabled; never executed: state |= QStyle::State_Enabled; | 0 | ||||||
| 192 | if (widget->hasFocus())
| 0 | ||||||
| 193 | state |= QStyle::State_HasFocus; never executed: state |= QStyle::State_HasFocus; | 0 | ||||||
| 194 | if (window->testAttribute(Qt::WA_KeyboardFocusChange))
| 0 | ||||||
| 195 | state |= QStyle::State_KeyboardFocusChange; never executed: state |= QStyle::State_KeyboardFocusChange; | 0 | ||||||
| 196 | if (widget->underMouse())
| 0 | ||||||
| 197 | state |= QStyle::State_MouseOver; never executed: state |= QStyle::State_MouseOver; | 0 | ||||||
| 198 | if (window->isActiveWindow())
| 0 | ||||||
| 199 | state |= QStyle::State_Active; never executed: state |= QStyle::State_Active; | 0 | ||||||
| 200 | if (widget->isWindow())
| 0 | ||||||
| 201 | state |= QStyle::State_Window; never executed: state |= QStyle::State_Window; | 0 | ||||||
| 202 | #ifdef Q_DEAD_CODE_FROM_QT4_MAC | - | ||||||
| 203 | extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp | - | ||||||
| 204 | if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget)) | - | ||||||
| 205 | state &= ~QStyle::State_Enabled; | - | ||||||
| 206 | #endif | - | ||||||
| 207 | #if defined(Q_OS_OSX) && !defined(QT_NO_STYLE_MAC) | - | ||||||
| 208 | switch (QMacStyle::widgetSizePolicy(widget)) { | - | ||||||
| 209 | case QMacStyle::SizeSmall: | - | ||||||
| 210 | state |= QStyle::State_Small; | - | ||||||
| 211 | break; | - | ||||||
| 212 | case QMacStyle::SizeMini: | - | ||||||
| 213 | state |= QStyle::State_Mini; | - | ||||||
| 214 | break; | - | ||||||
| 215 | default: | - | ||||||
| 216 | ; | - | ||||||
| 217 | } | - | ||||||
| 218 | #endif | - | ||||||
| 219 | #ifdef QT_KEYPAD_NAVIGATION | - | ||||||
| 220 | if (widget->hasEditFocus()) | - | ||||||
| 221 | state |= QStyle::State_HasEditFocus; | - | ||||||
| 222 | #endif | - | ||||||
| 223 | - | |||||||
| 224 | direction = widget->layoutDirection(); | - | ||||||
| 225 | rect = widget->rect(); | - | ||||||
| 226 | palette = widget->palette(); | - | ||||||
| 227 | fontMetrics = widget->fontMetrics(); | - | ||||||
| 228 | styleObject = const_cast<QWidget*>(widget); | - | ||||||
| 229 | } never executed: end of block | 0 | ||||||
| 230 | - | |||||||
| 231 | /*! | - | ||||||
| 232 | Constructs a copy of \a other. | - | ||||||
| 233 | */ | - | ||||||
| 234 | QStyleOption::QStyleOption(const QStyleOption &other) | - | ||||||
| 235 | : version(Version), type(Type), state(other.state), | - | ||||||
| 236 | direction(other.direction), rect(other.rect), fontMetrics(other.fontMetrics), | - | ||||||
| 237 | palette(other.palette), styleObject(other.styleObject) | - | ||||||
| 238 | { | - | ||||||
| 239 | } never executed: end of block | 0 | ||||||
| 240 | - | |||||||
| 241 | /*! | - | ||||||
| 242 | Assign \a other to this QStyleOption. | - | ||||||
| 243 | */ | - | ||||||
| 244 | QStyleOption &QStyleOption::operator=(const QStyleOption &other) | - | ||||||
| 245 | { | - | ||||||
| 246 | state = other.state; | - | ||||||
| 247 | direction = other.direction; | - | ||||||
| 248 | rect = other.rect; | - | ||||||
| 249 | fontMetrics = other.fontMetrics; | - | ||||||
| 250 | palette = other.palette; | - | ||||||
| 251 | styleObject = other.styleObject; | - | ||||||
| 252 | return *this; never executed: return *this; | 0 | ||||||
| 253 | } | - | ||||||
| 254 | - | |||||||
| 255 | /*! | - | ||||||
| 256 | \enum QStyleOption::StyleOptionType | - | ||||||
| 257 | - | |||||||
| 258 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 259 | is defined for each QStyleOption subclass. | - | ||||||
| 260 | - | |||||||
| 261 | \value Type The type of style option provided (\l{SO_Default} for | - | ||||||
| 262 | this class). | - | ||||||
| 263 | - | |||||||
| 264 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 265 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 266 | general you do not need to worry about this unless you want to | - | ||||||
| 267 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 268 | - | |||||||
| 269 | \sa StyleOptionVersion | - | ||||||
| 270 | */ | - | ||||||
| 271 | - | |||||||
| 272 | /*! | - | ||||||
| 273 | \enum QStyleOption::StyleOptionVersion | - | ||||||
| 274 | - | |||||||
| 275 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 276 | is defined for each QStyleOption subclass. | - | ||||||
| 277 | - | |||||||
| 278 | \value Version 1 | - | ||||||
| 279 | - | |||||||
| 280 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 281 | extensions without breaking compatibility. If you use | - | ||||||
| 282 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 283 | - | |||||||
| 284 | \sa StyleOptionType | - | ||||||
| 285 | */ | - | ||||||
| 286 | - | |||||||
| 287 | /*! | - | ||||||
| 288 | \variable QStyleOption::palette | - | ||||||
| 289 | \brief the palette that should be used when painting the control | - | ||||||
| 290 | - | |||||||
| 291 | By default, the application's default palette is used. | - | ||||||
| 292 | - | |||||||
| 293 | \sa initFrom() | - | ||||||
| 294 | */ | - | ||||||
| 295 | - | |||||||
| 296 | /*! | - | ||||||
| 297 | \variable QStyleOption::direction | - | ||||||
| 298 | \brief the text layout direction that should be used when drawing text in the control | - | ||||||
| 299 | - | |||||||
| 300 | By default, the layout direction is Qt::LeftToRight. | - | ||||||
| 301 | - | |||||||
| 302 | \sa initFrom() | - | ||||||
| 303 | */ | - | ||||||
| 304 | - | |||||||
| 305 | /*! | - | ||||||
| 306 | \variable QStyleOption::fontMetrics | - | ||||||
| 307 | \brief the font metrics that should be used when drawing text in the control | - | ||||||
| 308 | - | |||||||
| 309 | By default, the application's default font is used. | - | ||||||
| 310 | - | |||||||
| 311 | \sa initFrom() | - | ||||||
| 312 | */ | - | ||||||
| 313 | - | |||||||
| 314 | /*! | - | ||||||
| 315 | \variable QStyleOption::styleObject | - | ||||||
| 316 | \brief the object being styled | - | ||||||
| 317 | - | |||||||
| 318 | The built-in styles support the following types: QWidget, QGraphicsObject and QQuickItem. | - | ||||||
| 319 | - | |||||||
| 320 | \sa initFrom() | - | ||||||
| 321 | */ | - | ||||||
| 322 | - | |||||||
| 323 | /*! | - | ||||||
| 324 | \variable QStyleOption::rect | - | ||||||
| 325 | \brief the area that should be used for various calculations and painting | - | ||||||
| 326 | - | |||||||
| 327 | This can have different meanings for different types of elements. | - | ||||||
| 328 | For example, for a \l QStyle::CE_PushButton element it would be | - | ||||||
| 329 | the rectangle for the entire button, while for a \l | - | ||||||
| 330 | QStyle::CE_PushButtonLabel element it would be just the area for | - | ||||||
| 331 | the push button label. | - | ||||||
| 332 | - | |||||||
| 333 | The default value is a null rectangle, i.e. a rectangle with both | - | ||||||
| 334 | the width and the height set to 0. | - | ||||||
| 335 | - | |||||||
| 336 | \sa initFrom() | - | ||||||
| 337 | */ | - | ||||||
| 338 | - | |||||||
| 339 | /*! | - | ||||||
| 340 | \variable QStyleOption::state | - | ||||||
| 341 | \brief the style flags that are used when drawing the control | - | ||||||
| 342 | - | |||||||
| 343 | The default value is QStyle::State_None. | - | ||||||
| 344 | - | |||||||
| 345 | \sa initFrom(), QStyle::drawPrimitive(), QStyle::drawControl(), | - | ||||||
| 346 | QStyle::drawComplexControl(), QStyle::State | - | ||||||
| 347 | */ | - | ||||||
| 348 | - | |||||||
| 349 | /*! | - | ||||||
| 350 | \variable QStyleOption::type | - | ||||||
| 351 | \brief the option type of the style option | - | ||||||
| 352 | - | |||||||
| 353 | The default value is SO_Default. | - | ||||||
| 354 | - | |||||||
| 355 | \sa OptionType | - | ||||||
| 356 | */ | - | ||||||
| 357 | - | |||||||
| 358 | /*! | - | ||||||
| 359 | \variable QStyleOption::version | - | ||||||
| 360 | \brief the version of the style option | - | ||||||
| 361 | - | |||||||
| 362 | This value can be used by subclasses to implement extensions | - | ||||||
| 363 | without breaking compatibility. If you use the qstyleoption_cast() | - | ||||||
| 364 | function, you normally do not need to check it. | - | ||||||
| 365 | - | |||||||
| 366 | The default value is 1. | - | ||||||
| 367 | */ | - | ||||||
| 368 | - | |||||||
| 369 | /*! | - | ||||||
| 370 | \class QStyleOptionFocusRect | - | ||||||
| 371 | \brief The QStyleOptionFocusRect class is used to describe the | - | ||||||
| 372 | parameters for drawing a focus rectangle with QStyle. | - | ||||||
| 373 | - | |||||||
| 374 | \inmodule QtWidgets | - | ||||||
| 375 | - | |||||||
| 376 | For performance reasons, the access to the member variables is | - | ||||||
| 377 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 378 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 379 | these are simply parameters used by the style functions. | - | ||||||
| 380 | - | |||||||
| 381 | For an example demonstrating how style options can be used, see | - | ||||||
| 382 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 383 | - | |||||||
| 384 | \sa QStyleOption | - | ||||||
| 385 | */ | - | ||||||
| 386 | - | |||||||
| 387 | /*! | - | ||||||
| 388 | Constructs a QStyleOptionFocusRect, initializing the members | - | ||||||
| 389 | variables to their default values. | - | ||||||
| 390 | */ | - | ||||||
| 391 | - | |||||||
| 392 | QStyleOptionFocusRect::QStyleOptionFocusRect() | - | ||||||
| 393 | : QStyleOption(Version, SO_FocusRect) | - | ||||||
| 394 | { | - | ||||||
| 395 | state |= QStyle::State_KeyboardFocusChange; // assume we had one, will be corrected in initFrom() | - | ||||||
| 396 | } never executed: end of block | 0 | ||||||
| 397 | - | |||||||
| 398 | /*! | - | ||||||
| 399 | \internal | - | ||||||
| 400 | */ | - | ||||||
| 401 | QStyleOptionFocusRect::QStyleOptionFocusRect(int version) | - | ||||||
| 402 | : QStyleOption(version, SO_FocusRect) | - | ||||||
| 403 | { | - | ||||||
| 404 | state |= QStyle::State_KeyboardFocusChange; // assume we had one, will be corrected in initFrom() | - | ||||||
| 405 | } never executed: end of block | 0 | ||||||
| 406 | - | |||||||
| 407 | /*! | - | ||||||
| 408 | \enum QStyleOptionFocusRect::StyleOptionType | - | ||||||
| 409 | - | |||||||
| 410 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 411 | is defined for each QStyleOption subclass. | - | ||||||
| 412 | - | |||||||
| 413 | \value Type The type of style option provided (\l{SO_FocusRect} for this class). | - | ||||||
| 414 | - | |||||||
| 415 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 416 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 417 | general you do not need to worry about this unless you want to | - | ||||||
| 418 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 419 | - | |||||||
| 420 | \sa StyleOptionVersion | - | ||||||
| 421 | */ | - | ||||||
| 422 | - | |||||||
| 423 | /*! | - | ||||||
| 424 | \enum QStyleOptionFocusRect::StyleOptionVersion | - | ||||||
| 425 | - | |||||||
| 426 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 427 | is defined for each QStyleOption subclass. | - | ||||||
| 428 | - | |||||||
| 429 | \value Version 1 | - | ||||||
| 430 | - | |||||||
| 431 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 432 | extensions without breaking compatibility. If you use | - | ||||||
| 433 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 434 | - | |||||||
| 435 | \sa StyleOptionType | - | ||||||
| 436 | */ | - | ||||||
| 437 | - | |||||||
| 438 | /*! | - | ||||||
| 439 | \fn QStyleOptionFocusRect::QStyleOptionFocusRect(const QStyleOptionFocusRect &other) | - | ||||||
| 440 | - | |||||||
| 441 | Constructs a copy of the \a other style option. | - | ||||||
| 442 | */ | - | ||||||
| 443 | - | |||||||
| 444 | /*! | - | ||||||
| 445 | \variable QStyleOptionFocusRect::backgroundColor | - | ||||||
| 446 | \brief the background color on which the focus rectangle is being drawn | - | ||||||
| 447 | - | |||||||
| 448 | The default value is an invalid color with the RGB value (0, 0, | - | ||||||
| 449 | 0). An invalid color is a color that is not properly set up for | - | ||||||
| 450 | the underlying window system. | - | ||||||
| 451 | */ | - | ||||||
| 452 | - | |||||||
| 453 | /*! | - | ||||||
| 454 | \class QStyleOptionFrame | - | ||||||
| 455 | \brief The QStyleOptionFrame class is used to describe the | - | ||||||
| 456 | parameters for drawing a frame. | - | ||||||
| 457 | - | |||||||
| 458 | \inmodule QtWidgets | - | ||||||
| 459 | - | |||||||
| 460 | QStyleOptionFrame is used for drawing several built-in Qt widgets, | - | ||||||
| 461 | including QFrame, QGroupBox, QLineEdit, and QMenu. | - | ||||||
| 462 | - | |||||||
| 463 | An instance of the QStyleOptionFrame class has | - | ||||||
| 464 | \l{QStyleOption::type} {type} SO_Frame and \l{QStyleOption::version} | - | ||||||
| 465 | {version} 3. | - | ||||||
| 466 | - | |||||||
| 467 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 468 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 469 | general you do not need to worry about this unless you want to | - | ||||||
| 470 | create your own QStyleOption subclass and your own styles. The | - | ||||||
| 471 | version is used by QStyleOption subclasses to implement extensions | - | ||||||
| 472 | without breaking compatibility. If you use qstyleoption_cast(), | - | ||||||
| 473 | you normally do not need to check it. | - | ||||||
| 474 | - | |||||||
| 475 | For an example demonstrating how style options can be used, see | - | ||||||
| 476 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 477 | - | |||||||
| 478 | \sa QStyleOption | - | ||||||
| 479 | */ | - | ||||||
| 480 | - | |||||||
| 481 | /*! | - | ||||||
| 482 | \typedef QStyleOptionFrameV2 | - | ||||||
| 483 | \relates QStyleOptionFrame | - | ||||||
| 484 | \obsolete | - | ||||||
| 485 | - | |||||||
| 486 | Synonym for QStyleOptionFrame. | - | ||||||
| 487 | */ | - | ||||||
| 488 | - | |||||||
| 489 | /*! | - | ||||||
| 490 | \typedef QStyleOptionFrameV3 | - | ||||||
| 491 | \relates QStyleOptionFrame | - | ||||||
| 492 | \obsolete | - | ||||||
| 493 | - | |||||||
| 494 | Synonym for QStyleOptionFrame. | - | ||||||
| 495 | */ | - | ||||||
| 496 | - | |||||||
| 497 | /*! | - | ||||||
| 498 | Constructs a QStyleOptionFrame, initializing the members | - | ||||||
| 499 | variables to their default values. | - | ||||||
| 500 | */ | - | ||||||
| 501 | - | |||||||
| 502 | QStyleOptionFrame::QStyleOptionFrame() | - | ||||||
| 503 | : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0), | - | ||||||
| 504 | features(None), frameShape(QFrame::NoFrame) | - | ||||||
| 505 | { | - | ||||||
| 506 | } never executed: end of block | 0 | ||||||
| 507 | - | |||||||
| 508 | /*! | - | ||||||
| 509 | \internal | - | ||||||
| 510 | */ | - | ||||||
| 511 | QStyleOptionFrame::QStyleOptionFrame(int version) | - | ||||||
| 512 | : QStyleOption(version, SO_Frame), lineWidth(0), midLineWidth(0), | - | ||||||
| 513 | features(None), frameShape(QFrame::NoFrame) | - | ||||||
| 514 | { | - | ||||||
| 515 | } never executed: end of block | 0 | ||||||
| 516 | - | |||||||
| 517 | /*! | - | ||||||
| 518 | \fn QStyleOptionFrame::QStyleOptionFrame(const QStyleOptionFrame &other) | - | ||||||
| 519 | - | |||||||
| 520 | Constructs a copy of the \a other style option. | - | ||||||
| 521 | */ | - | ||||||
| 522 | - | |||||||
| 523 | /*! | - | ||||||
| 524 | \enum QStyleOptionFrame::StyleOptionType | - | ||||||
| 525 | - | |||||||
| 526 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 527 | is defined for each QStyleOption subclass. | - | ||||||
| 528 | - | |||||||
| 529 | \value Type The type of style option provided (\l{SO_Frame} for this class). | - | ||||||
| 530 | - | |||||||
| 531 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 532 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 533 | general you do not need to worry about this unless you want to | - | ||||||
| 534 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 535 | - | |||||||
| 536 | \sa StyleOptionVersion | - | ||||||
| 537 | */ | - | ||||||
| 538 | - | |||||||
| 539 | /*! | - | ||||||
| 540 | \enum QStyleOptionFrame::StyleOptionVersion | - | ||||||
| 541 | - | |||||||
| 542 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 543 | is defined for each QStyleOption subclass. | - | ||||||
| 544 | - | |||||||
| 545 | \value Version 3 | - | ||||||
| 546 | - | |||||||
| 547 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 548 | extensions without breaking compatibility. If you use | - | ||||||
| 549 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 550 | - | |||||||
| 551 | \sa StyleOptionType | - | ||||||
| 552 | */ | - | ||||||
| 553 | - | |||||||
| 554 | /*! | - | ||||||
| 555 | \variable QStyleOptionFrame::lineWidth | - | ||||||
| 556 | \brief the line width for drawing the frame | - | ||||||
| 557 | - | |||||||
| 558 | The default value is 0. | - | ||||||
| 559 | - | |||||||
| 560 | \sa QFrame::lineWidth | - | ||||||
| 561 | */ | - | ||||||
| 562 | - | |||||||
| 563 | /*! | - | ||||||
| 564 | \variable QStyleOptionFrame::midLineWidth | - | ||||||
| 565 | \brief the mid-line width for drawing the frame | - | ||||||
| 566 | - | |||||||
| 567 | This is usually used in drawing sunken or raised frames. | - | ||||||
| 568 | - | |||||||
| 569 | The default value is 0. | - | ||||||
| 570 | - | |||||||
| 571 | \sa QFrame::midLineWidth | - | ||||||
| 572 | */ | - | ||||||
| 573 | - | |||||||
| 574 | /*! | - | ||||||
| 575 | \enum QStyleOptionFrame::FrameFeature | - | ||||||
| 576 | - | |||||||
| 577 | This enum describes the different types of features a frame can have. | - | ||||||
| 578 | - | |||||||
| 579 | \value None Indicates a normal frame. | - | ||||||
| 580 | \value Flat Indicates a flat frame. | - | ||||||
| 581 | \value Rounded Indicates a rounded frame. | - | ||||||
| 582 | */ | - | ||||||
| 583 | - | |||||||
| 584 | /*! | - | ||||||
| 585 | \variable QStyleOptionFrame::features | - | ||||||
| 586 | \brief a bitwise OR of the features that describe this frame. | - | ||||||
| 587 | - | |||||||
| 588 | \sa FrameFeature | - | ||||||
| 589 | */ | - | ||||||
| 590 | - | |||||||
| 591 | /*! | - | ||||||
| 592 | \variable QStyleOptionFrame::frameShape | - | ||||||
| 593 | \brief This property holds the frame shape value of the frame. | - | ||||||
| 594 | - | |||||||
| 595 | \sa QFrame::frameShape | - | ||||||
| 596 | */ | - | ||||||
| 597 | - | |||||||
| 598 | /*! | - | ||||||
| 599 | \class QStyleOptionGroupBox | - | ||||||
| 600 | \brief The QStyleOptionGroupBox class describes the parameters for | - | ||||||
| 601 | drawing a group box. | - | ||||||
| 602 | - | |||||||
| 603 | \since 4.1 | - | ||||||
| 604 | \inmodule QtWidgets | - | ||||||
| 605 | - | |||||||
| 606 | QStyleOptionButton contains all the information that QStyle | - | ||||||
| 607 | functions need the various graphical elements of a group box. | - | ||||||
| 608 | - | |||||||
| 609 | It holds the lineWidth and the midLineWidth for drawing the panel, | - | ||||||
| 610 | the group box's \l {text}{title} and the title's \l | - | ||||||
| 611 | {textAlignment}{alignment} and \l {textColor}{color}. | - | ||||||
| 612 | - | |||||||
| 613 | For performance reasons, the access to the member variables is | - | ||||||
| 614 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 615 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 616 | these are simply parameters used by the style functions. | - | ||||||
| 617 | - | |||||||
| 618 | For an example demonstrating how style options can be used, see | - | ||||||
| 619 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 620 | - | |||||||
| 621 | \sa QStyleOption, QStyleOptionComplex, QGroupBox | - | ||||||
| 622 | */ | - | ||||||
| 623 | - | |||||||
| 624 | /*! | - | ||||||
| 625 | \enum QStyleOptionGroupBox::StyleOptionType | - | ||||||
| 626 | - | |||||||
| 627 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 628 | is defined for each QStyleOption subclass. | - | ||||||
| 629 | - | |||||||
| 630 | \value Type The type of style option provided (\l{SO_GroupBox} for this class). | - | ||||||
| 631 | - | |||||||
| 632 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 633 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 634 | general you do not need to worry about this unless you want to | - | ||||||
| 635 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 636 | - | |||||||
| 637 | \sa StyleOptionVersion | - | ||||||
| 638 | */ | - | ||||||
| 639 | - | |||||||
| 640 | /*! | - | ||||||
| 641 | \enum QStyleOptionGroupBox::StyleOptionVersion | - | ||||||
| 642 | - | |||||||
| 643 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 644 | is defined for each QStyleOption subclass. | - | ||||||
| 645 | - | |||||||
| 646 | \value Version 1 | - | ||||||
| 647 | - | |||||||
| 648 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 649 | extensions without breaking compatibility. If you use | - | ||||||
| 650 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 651 | - | |||||||
| 652 | \sa StyleOptionType | - | ||||||
| 653 | */ | - | ||||||
| 654 | - | |||||||
| 655 | /*! | - | ||||||
| 656 | \variable QStyleOptionGroupBox::lineWidth | - | ||||||
| 657 | \brief the line width for drawing the panel | - | ||||||
| 658 | - | |||||||
| 659 | The value of this variable is, currently, always 1. | - | ||||||
| 660 | - | |||||||
| 661 | \sa QFrame::lineWidth | - | ||||||
| 662 | */ | - | ||||||
| 663 | - | |||||||
| 664 | /*! | - | ||||||
| 665 | \variable QStyleOptionGroupBox::midLineWidth | - | ||||||
| 666 | \brief the mid-line width for drawing the panel | - | ||||||
| 667 | - | |||||||
| 668 | The mid-line width is usually used when drawing sunken or raised | - | ||||||
| 669 | group box frames. The value of this variable is, currently, always 0. | - | ||||||
| 670 | - | |||||||
| 671 | \sa QFrame::midLineWidth | - | ||||||
| 672 | */ | - | ||||||
| 673 | - | |||||||
| 674 | /*! | - | ||||||
| 675 | \variable QStyleOptionGroupBox::text | - | ||||||
| 676 | \brief the text of the group box | - | ||||||
| 677 | - | |||||||
| 678 | The default value is an empty string. | - | ||||||
| 679 | - | |||||||
| 680 | \sa QGroupBox::title | - | ||||||
| 681 | */ | - | ||||||
| 682 | - | |||||||
| 683 | /*! | - | ||||||
| 684 | \variable QStyleOptionGroupBox::textAlignment | - | ||||||
| 685 | \brief the alignment of the group box title | - | ||||||
| 686 | - | |||||||
| 687 | The default value is Qt::AlignLeft. | - | ||||||
| 688 | - | |||||||
| 689 | \sa QGroupBox::alignment | - | ||||||
| 690 | */ | - | ||||||
| 691 | - | |||||||
| 692 | /*! | - | ||||||
| 693 | \variable QStyleOptionGroupBox::features | - | ||||||
| 694 | \brief the features of the group box frame | - | ||||||
| 695 | - | |||||||
| 696 | The frame is flat by default. | - | ||||||
| 697 | - | |||||||
| 698 | \sa QStyleOptionFrame::FrameFeature | - | ||||||
| 699 | */ | - | ||||||
| 700 | - | |||||||
| 701 | /*! | - | ||||||
| 702 | \variable QStyleOptionGroupBox::textColor | - | ||||||
| 703 | \brief the color of the group box title | - | ||||||
| 704 | - | |||||||
| 705 | The default value is an invalid color with the RGB value (0, 0, | - | ||||||
| 706 | 0). An invalid color is a color that is not properly set up for | - | ||||||
| 707 | the underlying window system. | - | ||||||
| 708 | */ | - | ||||||
| 709 | - | |||||||
| 710 | /*! | - | ||||||
| 711 | Constructs a QStyleOptionGroupBox, initializing the members | - | ||||||
| 712 | variables to their default values. | - | ||||||
| 713 | */ | - | ||||||
| 714 | QStyleOptionGroupBox::QStyleOptionGroupBox() | - | ||||||
| 715 | : QStyleOptionComplex(Version, Type), features(QStyleOptionFrame::None), | - | ||||||
| 716 | textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0) | - | ||||||
| 717 | { | - | ||||||
| 718 | } never executed: end of block | 0 | ||||||
| 719 | - | |||||||
| 720 | /*! | - | ||||||
| 721 | \fn QStyleOptionGroupBox::QStyleOptionGroupBox(const QStyleOptionGroupBox &other) | - | ||||||
| 722 | - | |||||||
| 723 | Constructs a copy of the \a other style option. | - | ||||||
| 724 | */ | - | ||||||
| 725 | - | |||||||
| 726 | /*! | - | ||||||
| 727 | \internal | - | ||||||
| 728 | */ | - | ||||||
| 729 | QStyleOptionGroupBox::QStyleOptionGroupBox(int version) | - | ||||||
| 730 | : QStyleOptionComplex(version, Type), features(QStyleOptionFrame::None), | - | ||||||
| 731 | textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0) | - | ||||||
| 732 | { | - | ||||||
| 733 | } never executed: end of block | 0 | ||||||
| 734 | - | |||||||
| 735 | /*! | - | ||||||
| 736 | \class QStyleOptionHeader | - | ||||||
| 737 | \brief The QStyleOptionHeader class is used to describe the | - | ||||||
| 738 | parameters for drawing a header. | - | ||||||
| 739 | - | |||||||
| 740 | \inmodule QtWidgets | - | ||||||
| 741 | - | |||||||
| 742 | QStyleOptionHeader contains all the information that QStyle | - | ||||||
| 743 | functions need to draw the item views' header pane, header sort | - | ||||||
| 744 | arrow, and header label. | - | ||||||
| 745 | - | |||||||
| 746 | For performance reasons, the access to the member variables is | - | ||||||
| 747 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 748 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 749 | these are simply parameters used by the style functions. | - | ||||||
| 750 | - | |||||||
| 751 | For an example demonstrating how style options can be used, see | - | ||||||
| 752 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 753 | - | |||||||
| 754 | \sa QStyleOption | - | ||||||
| 755 | */ | - | ||||||
| 756 | - | |||||||
| 757 | /*! | - | ||||||
| 758 | Constructs a QStyleOptionHeader, initializing the members | - | ||||||
| 759 | variables to their default values. | - | ||||||
| 760 | */ | - | ||||||
| 761 | - | |||||||
| 762 | QStyleOptionHeader::QStyleOptionHeader() | - | ||||||
| 763 | : QStyleOption(QStyleOptionHeader::Version, SO_Header), | - | ||||||
| 764 | section(0), textAlignment(Qt::AlignLeft), iconAlignment(Qt::AlignLeft), | - | ||||||
| 765 | position(QStyleOptionHeader::Beginning), | - | ||||||
| 766 | selectedPosition(QStyleOptionHeader::NotAdjacent), sortIndicator(None), | - | ||||||
| 767 | orientation(Qt::Horizontal) | - | ||||||
| 768 | { | - | ||||||
| 769 | } never executed: end of block | 0 | ||||||
| 770 | - | |||||||
| 771 | /*! | - | ||||||
| 772 | \internal | - | ||||||
| 773 | */ | - | ||||||
| 774 | QStyleOptionHeader::QStyleOptionHeader(int version) | - | ||||||
| 775 | : QStyleOption(version, SO_Header), | - | ||||||
| 776 | section(0), textAlignment(Qt::AlignLeft), iconAlignment(Qt::AlignLeft), | - | ||||||
| 777 | position(QStyleOptionHeader::Beginning), | - | ||||||
| 778 | selectedPosition(QStyleOptionHeader::NotAdjacent), sortIndicator(None), | - | ||||||
| 779 | orientation(Qt::Horizontal) | - | ||||||
| 780 | { | - | ||||||
| 781 | } never executed: end of block | 0 | ||||||
| 782 | - | |||||||
| 783 | /*! | - | ||||||
| 784 | \variable QStyleOptionHeader::orientation | - | ||||||
| 785 | \brief the header's orientation (horizontal or vertical) | - | ||||||
| 786 | - | |||||||
| 787 | The default orientation is Qt::Horizontal | - | ||||||
| 788 | */ | - | ||||||
| 789 | - | |||||||
| 790 | /*! | - | ||||||
| 791 | \fn QStyleOptionHeader::QStyleOptionHeader(const QStyleOptionHeader &other) | - | ||||||
| 792 | - | |||||||
| 793 | Constructs a copy of the \a other style option. | - | ||||||
| 794 | */ | - | ||||||
| 795 | - | |||||||
| 796 | /*! | - | ||||||
| 797 | \enum QStyleOptionHeader::StyleOptionType | - | ||||||
| 798 | - | |||||||
| 799 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 800 | is defined for each QStyleOption subclass. | - | ||||||
| 801 | - | |||||||
| 802 | \value Type The type of style option provided (\l{SO_Header} for this class). | - | ||||||
| 803 | - | |||||||
| 804 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 805 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 806 | general you do not need to worry about this unless you want to | - | ||||||
| 807 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 808 | - | |||||||
| 809 | \sa StyleOptionVersion | - | ||||||
| 810 | */ | - | ||||||
| 811 | - | |||||||
| 812 | /*! | - | ||||||
| 813 | \enum QStyleOptionHeader::StyleOptionVersion | - | ||||||
| 814 | - | |||||||
| 815 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 816 | is defined for each QStyleOption subclass. | - | ||||||
| 817 | - | |||||||
| 818 | \value Version 1 | - | ||||||
| 819 | - | |||||||
| 820 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 821 | extensions without breaking compatibility. If you use | - | ||||||
| 822 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 823 | - | |||||||
| 824 | \sa StyleOptionType | - | ||||||
| 825 | */ | - | ||||||
| 826 | - | |||||||
| 827 | /*! | - | ||||||
| 828 | \variable QStyleOptionHeader::section | - | ||||||
| 829 | \brief which section of the header is being painted | - | ||||||
| 830 | - | |||||||
| 831 | The default value is 0. | - | ||||||
| 832 | */ | - | ||||||
| 833 | - | |||||||
| 834 | /*! | - | ||||||
| 835 | \variable QStyleOptionHeader::text | - | ||||||
| 836 | \brief the text of the header | - | ||||||
| 837 | - | |||||||
| 838 | The default value is an empty string. | - | ||||||
| 839 | */ | - | ||||||
| 840 | - | |||||||
| 841 | /*! | - | ||||||
| 842 | \variable QStyleOptionHeader::textAlignment | - | ||||||
| 843 | \brief the alignment flags for the text of the header | - | ||||||
| 844 | - | |||||||
| 845 | The default value is Qt::AlignLeft. | - | ||||||
| 846 | */ | - | ||||||
| 847 | - | |||||||
| 848 | /*! | - | ||||||
| 849 | \variable QStyleOptionHeader::icon | - | ||||||
| 850 | \brief the icon of the header | - | ||||||
| 851 | - | |||||||
| 852 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 853 | pixmap nor a filename. | - | ||||||
| 854 | */ | - | ||||||
| 855 | - | |||||||
| 856 | /*! | - | ||||||
| 857 | \variable QStyleOptionHeader::iconAlignment | - | ||||||
| 858 | \brief the alignment flags for the icon of the header | - | ||||||
| 859 | - | |||||||
| 860 | The default value is Qt::AlignLeft. | - | ||||||
| 861 | */ | - | ||||||
| 862 | - | |||||||
| 863 | /*! | - | ||||||
| 864 | \variable QStyleOptionHeader::position | - | ||||||
| 865 | \brief the section's position in relation to the other sections | - | ||||||
| 866 | - | |||||||
| 867 | The default value is QStyleOptionHeader::Beginning. | - | ||||||
| 868 | */ | - | ||||||
| 869 | - | |||||||
| 870 | /*! | - | ||||||
| 871 | \variable QStyleOptionHeader::selectedPosition | - | ||||||
| 872 | \brief the section's position in relation to the selected section | - | ||||||
| 873 | - | |||||||
| 874 | The default value is QStyleOptionHeader::NotAdjacent | - | ||||||
| 875 | */ | - | ||||||
| 876 | - | |||||||
| 877 | /*! | - | ||||||
| 878 | \variable QStyleOptionHeader::sortIndicator | - | ||||||
| 879 | \brief the direction the sort indicator should be drawn | - | ||||||
| 880 | - | |||||||
| 881 | The default value is QStyleOptionHeader::None. | - | ||||||
| 882 | */ | - | ||||||
| 883 | - | |||||||
| 884 | /*! | - | ||||||
| 885 | \enum QStyleOptionHeader::SectionPosition | - | ||||||
| 886 | - | |||||||
| 887 | This enum lets you know where the section's position is in relation to the other sections. | - | ||||||
| 888 | - | |||||||
| 889 | \value Beginning At the beginining of the header | - | ||||||
| 890 | \value Middle In the middle of the header | - | ||||||
| 891 | \value End At the end of the header | - | ||||||
| 892 | \value OnlyOneSection Only one header section | - | ||||||
| 893 | - | |||||||
| 894 | \sa position | - | ||||||
| 895 | */ | - | ||||||
| 896 | - | |||||||
| 897 | /*! | - | ||||||
| 898 | \enum QStyleOptionHeader::SelectedPosition | - | ||||||
| 899 | - | |||||||
| 900 | This enum lets you know where the section's position is in relation to the selected section. | - | ||||||
| 901 | - | |||||||
| 902 | \value NotAdjacent Not adjacent to the selected section | - | ||||||
| 903 | \value NextIsSelected The next section is selected | - | ||||||
| 904 | \value PreviousIsSelected The previous section is selected | - | ||||||
| 905 | \value NextAndPreviousAreSelected Both the next and previous section are selected | - | ||||||
| 906 | - | |||||||
| 907 | \sa selectedPosition | - | ||||||
| 908 | */ | - | ||||||
| 909 | - | |||||||
| 910 | /*! | - | ||||||
| 911 | \enum QStyleOptionHeader::SortIndicator | - | ||||||
| 912 | - | |||||||
| 913 | Indicates which direction the sort indicator should be drawn | - | ||||||
| 914 | - | |||||||
| 915 | \value None No sort indicator is needed | - | ||||||
| 916 | \value SortUp Draw an up indicator | - | ||||||
| 917 | \value SortDown Draw a down indicator | - | ||||||
| 918 | - | |||||||
| 919 | \sa sortIndicator | - | ||||||
| 920 | */ | - | ||||||
| 921 | - | |||||||
| 922 | /*! | - | ||||||
| 923 | \class QStyleOptionButton | - | ||||||
| 924 | \brief The QStyleOptionButton class is used to describe the | - | ||||||
| 925 | parameters for drawing buttons. | - | ||||||
| 926 | - | |||||||
| 927 | \inmodule QtWidgets | - | ||||||
| 928 | - | |||||||
| 929 | QStyleOptionButton contains all the information that QStyle | - | ||||||
| 930 | functions need to draw graphical elements like QPushButton, | - | ||||||
| 931 | QCheckBox, and QRadioButton. | - | ||||||
| 932 | - | |||||||
| 933 | For performance reasons, the access to the member variables is | - | ||||||
| 934 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 935 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 936 | these are simply parameters used by the style functions. | - | ||||||
| 937 | - | |||||||
| 938 | For an example demonstrating how style options can be used, see | - | ||||||
| 939 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 940 | - | |||||||
| 941 | \sa QStyleOption, QStyleOptionToolButton | - | ||||||
| 942 | */ | - | ||||||
| 943 | - | |||||||
| 944 | /*! | - | ||||||
| 945 | \enum QStyleOptionButton::ButtonFeature | - | ||||||
| 946 | - | |||||||
| 947 | This enum describes the different types of features a push button can have. | - | ||||||
| 948 | - | |||||||
| 949 | \value None Indicates a normal push button. | - | ||||||
| 950 | \value Flat Indicates a flat push button. | - | ||||||
| 951 | \value HasMenu Indicates that the button has a drop down menu. | - | ||||||
| 952 | \value DefaultButton Indicates that the button is a default button. | - | ||||||
| 953 | \value AutoDefaultButton Indicates that the button is an auto default button. | - | ||||||
| 954 | \value CommandLinkButton Indicates that the button is a Windows Vista type command link. | - | ||||||
| 955 | - | |||||||
| 956 | \sa features | - | ||||||
| 957 | */ | - | ||||||
| 958 | - | |||||||
| 959 | /*! | - | ||||||
| 960 | Constructs a QStyleOptionButton, initializing the members | - | ||||||
| 961 | variables to their default values. | - | ||||||
| 962 | */ | - | ||||||
| 963 | - | |||||||
| 964 | QStyleOptionButton::QStyleOptionButton() | - | ||||||
| 965 | : QStyleOption(QStyleOptionButton::Version, SO_Button), features(None) | - | ||||||
| 966 | { | - | ||||||
| 967 | } never executed: end of block | 0 | ||||||
| 968 | - | |||||||
| 969 | /*! | - | ||||||
| 970 | \internal | - | ||||||
| 971 | */ | - | ||||||
| 972 | QStyleOptionButton::QStyleOptionButton(int version) | - | ||||||
| 973 | : QStyleOption(version, SO_Button), features(None) | - | ||||||
| 974 | { | - | ||||||
| 975 | } never executed: end of block | 0 | ||||||
| 976 | - | |||||||
| 977 | /*! | - | ||||||
| 978 | \fn QStyleOptionButton::QStyleOptionButton(const QStyleOptionButton &other) | - | ||||||
| 979 | - | |||||||
| 980 | Constructs a copy of the \a other style option. | - | ||||||
| 981 | */ | - | ||||||
| 982 | - | |||||||
| 983 | /*! | - | ||||||
| 984 | \enum QStyleOptionButton::StyleOptionType | - | ||||||
| 985 | - | |||||||
| 986 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 987 | is defined for each QStyleOption subclass. | - | ||||||
| 988 | - | |||||||
| 989 | \value Type The type of style option provided (\l{SO_Button} for this class). | - | ||||||
| 990 | - | |||||||
| 991 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 992 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 993 | general you do not need to worry about this unless you want to | - | ||||||
| 994 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 995 | - | |||||||
| 996 | \sa StyleOptionVersion | - | ||||||
| 997 | */ | - | ||||||
| 998 | - | |||||||
| 999 | /*! | - | ||||||
| 1000 | \enum QStyleOptionButton::StyleOptionVersion | - | ||||||
| 1001 | - | |||||||
| 1002 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 1003 | is defined for each QStyleOption subclass. | - | ||||||
| 1004 | - | |||||||
| 1005 | \value Version 1 | - | ||||||
| 1006 | - | |||||||
| 1007 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1008 | extensions without breaking compatibility. If you use | - | ||||||
| 1009 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1010 | - | |||||||
| 1011 | \sa StyleOptionType | - | ||||||
| 1012 | */ | - | ||||||
| 1013 | - | |||||||
| 1014 | /*! | - | ||||||
| 1015 | \variable QStyleOptionButton::features | - | ||||||
| 1016 | \brief a bitwise OR of the features that describe this button | - | ||||||
| 1017 | - | |||||||
| 1018 | \sa ButtonFeature | - | ||||||
| 1019 | */ | - | ||||||
| 1020 | - | |||||||
| 1021 | /*! | - | ||||||
| 1022 | \variable QStyleOptionButton::text | - | ||||||
| 1023 | \brief the text of the button | - | ||||||
| 1024 | - | |||||||
| 1025 | The default value is an empty string. | - | ||||||
| 1026 | */ | - | ||||||
| 1027 | - | |||||||
| 1028 | /*! | - | ||||||
| 1029 | \variable QStyleOptionButton::icon | - | ||||||
| 1030 | \brief the icon of the button | - | ||||||
| 1031 | - | |||||||
| 1032 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 1033 | pixmap nor a filename. | - | ||||||
| 1034 | - | |||||||
| 1035 | \sa iconSize | - | ||||||
| 1036 | */ | - | ||||||
| 1037 | - | |||||||
| 1038 | /*! | - | ||||||
| 1039 | \variable QStyleOptionButton::iconSize | - | ||||||
| 1040 | \brief the size of the icon for the button | - | ||||||
| 1041 | - | |||||||
| 1042 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 1043 | */ | - | ||||||
| 1044 | - | |||||||
| 1045 | - | |||||||
| 1046 | #ifndef QT_NO_TOOLBAR | - | ||||||
| 1047 | /*! | - | ||||||
| 1048 | \class QStyleOptionToolBar | - | ||||||
| 1049 | \brief The QStyleOptionToolBar class is used to describe the | - | ||||||
| 1050 | parameters for drawing a toolbar. | - | ||||||
| 1051 | - | |||||||
| 1052 | \since 4.1 | - | ||||||
| 1053 | \inmodule QtWidgets | - | ||||||
| 1054 | - | |||||||
| 1055 | QStyleOptionToolBar contains all the information that QStyle | - | ||||||
| 1056 | functions need to draw QToolBar. | - | ||||||
| 1057 | - | |||||||
| 1058 | For performance reasons, the access to the member variables is | - | ||||||
| 1059 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 1060 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 1061 | these are simply parameters used by the style functions. | - | ||||||
| 1062 | - | |||||||
| 1063 | The QStyleOptionToolBar class holds the lineWidth and the | - | ||||||
| 1064 | midLineWidth for drawing the widget. It also stores information | - | ||||||
| 1065 | about which \l {toolBarArea}{area} the toolbar should be located | - | ||||||
| 1066 | in, whether it is movable or not, which position the toolbar line | - | ||||||
| 1067 | should have (positionOfLine), and the toolbar's position within | - | ||||||
| 1068 | the line (positionWithinLine). | - | ||||||
| 1069 | - | |||||||
| 1070 | In addition, the class provides a couple of enums: The | - | ||||||
| 1071 | ToolBarFeature enum is used to describe whether a toolbar is | - | ||||||
| 1072 | movable or not, and the ToolBarPosition enum is used to describe | - | ||||||
| 1073 | the position of a toolbar line, as well as the toolbar's position | - | ||||||
| 1074 | within the line. | - | ||||||
| 1075 | - | |||||||
| 1076 | For an example demonstrating how style options can be used, see | - | ||||||
| 1077 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1078 | - | |||||||
| 1079 | \sa QStyleOption | - | ||||||
| 1080 | */ | - | ||||||
| 1081 | - | |||||||
| 1082 | /*! | - | ||||||
| 1083 | Constructs a QStyleOptionToolBar, initializing the members | - | ||||||
| 1084 | variables to their default values. | - | ||||||
| 1085 | */ | - | ||||||
| 1086 | - | |||||||
| 1087 | QStyleOptionToolBar::QStyleOptionToolBar() | - | ||||||
| 1088 | : QStyleOption(Version, SO_ToolBar), positionOfLine(OnlyOne), positionWithinLine(OnlyOne), | - | ||||||
| 1089 | toolBarArea(Qt::TopToolBarArea), features(None), lineWidth(0), midLineWidth(0) | - | ||||||
| 1090 | { | - | ||||||
| 1091 | } never executed: end of block | 0 | ||||||
| 1092 | - | |||||||
| 1093 | /*! | - | ||||||
| 1094 | \fn QStyleOptionToolBar::QStyleOptionToolBar(const QStyleOptionToolBar &other) | - | ||||||
| 1095 | - | |||||||
| 1096 | Constructs a copy of the \a other style option. | - | ||||||
| 1097 | */ | - | ||||||
| 1098 | - | |||||||
| 1099 | /*! | - | ||||||
| 1100 | \internal | - | ||||||
| 1101 | */ | - | ||||||
| 1102 | QStyleOptionToolBar::QStyleOptionToolBar(int version) | - | ||||||
| 1103 | : QStyleOption(version, SO_ToolBar), positionOfLine(OnlyOne), positionWithinLine(OnlyOne), | - | ||||||
| 1104 | toolBarArea(Qt::TopToolBarArea), features(None), lineWidth(0), midLineWidth(0) | - | ||||||
| 1105 | { | - | ||||||
| 1106 | - | |||||||
| 1107 | } never executed: end of block | 0 | ||||||
| 1108 | - | |||||||
| 1109 | /*! | - | ||||||
| 1110 | \enum QStyleOptionToolBar::ToolBarPosition | - | ||||||
| 1111 | - | |||||||
| 1112 | \image qstyleoptiontoolbar-position.png | - | ||||||
| 1113 | - | |||||||
| 1114 | This enum is used to describe the position of a toolbar line, as | - | ||||||
| 1115 | well as the toolbar's position within the line. | - | ||||||
| 1116 | - | |||||||
| 1117 | The order of the positions within a line starts at the top of a | - | ||||||
| 1118 | vertical line, and from the left within a horizontal line. The | - | ||||||
| 1119 | order of the positions for the lines is always from the | - | ||||||
| 1120 | parent widget's boundary edges. | - | ||||||
| 1121 | - | |||||||
| 1122 | \value Beginning The toolbar is located at the beginning of the line, | - | ||||||
| 1123 | or the toolbar line is the first of several lines. There can | - | ||||||
| 1124 | only be one toolbar (and only one line) with this position. | - | ||||||
| 1125 | \value Middle The toolbar is located in the middle of the line, | - | ||||||
| 1126 | or the toolbar line is in the middle of several lines. There can | - | ||||||
| 1127 | several toolbars (and lines) with this position. | - | ||||||
| 1128 | \value End The toolbar is located at the end of the line, | - | ||||||
| 1129 | or the toolbar line is the last of several lines. There can | - | ||||||
| 1130 | only be one toolbar (and only one line) with this position. | - | ||||||
| 1131 | \value OnlyOne There is only one toolbar or line. This is the default value | - | ||||||
| 1132 | of the positionOfLine and positionWithinLine variables. | - | ||||||
| 1133 | - | |||||||
| 1134 | \sa positionWithinLine, positionOfLine | - | ||||||
| 1135 | */ | - | ||||||
| 1136 | - | |||||||
| 1137 | /*! | - | ||||||
| 1138 | \enum QStyleOptionToolBar::ToolBarFeature | - | ||||||
| 1139 | - | |||||||
| 1140 | This enum is used to describe whether a toolbar is movable or not. | - | ||||||
| 1141 | - | |||||||
| 1142 | \value None The toolbar cannot be moved. The default value. | - | ||||||
| 1143 | \value Movable The toolbar is movable, and a handle will appear when | - | ||||||
| 1144 | holding the cursor over the toolbar's boundary. | - | ||||||
| 1145 | - | |||||||
| 1146 | \sa features, QToolBar::isMovable() | - | ||||||
| 1147 | */ | - | ||||||
| 1148 | - | |||||||
| 1149 | /*! | - | ||||||
| 1150 | \variable QStyleOptionToolBar::positionOfLine | - | ||||||
| 1151 | - | |||||||
| 1152 | This variable holds the position of the toolbar line. | - | ||||||
| 1153 | - | |||||||
| 1154 | The default value is QStyleOptionToolBar::OnlyOne. | - | ||||||
| 1155 | */ | - | ||||||
| 1156 | - | |||||||
| 1157 | /*! | - | ||||||
| 1158 | \variable QStyleOptionToolBar::positionWithinLine | - | ||||||
| 1159 | - | |||||||
| 1160 | This variable holds the position of the toolbar within a line. | - | ||||||
| 1161 | - | |||||||
| 1162 | The default value is QStyleOptionToolBar::OnlyOne. | - | ||||||
| 1163 | */ | - | ||||||
| 1164 | - | |||||||
| 1165 | /*! | - | ||||||
| 1166 | \variable QStyleOptionToolBar::toolBarArea | - | ||||||
| 1167 | - | |||||||
| 1168 | This variable holds the location for drawing the toolbar. | - | ||||||
| 1169 | - | |||||||
| 1170 | The default value is Qt::TopToolBarArea. | - | ||||||
| 1171 | - | |||||||
| 1172 | \sa Qt::ToolBarArea | - | ||||||
| 1173 | */ | - | ||||||
| 1174 | - | |||||||
| 1175 | /*! | - | ||||||
| 1176 | \variable QStyleOptionToolBar::features | - | ||||||
| 1177 | - | |||||||
| 1178 | This variable holds whether the toolbar is movable or not. | - | ||||||
| 1179 | - | |||||||
| 1180 | The default value is \l None. | - | ||||||
| 1181 | */ | - | ||||||
| 1182 | - | |||||||
| 1183 | /*! | - | ||||||
| 1184 | \variable QStyleOptionToolBar::lineWidth | - | ||||||
| 1185 | - | |||||||
| 1186 | This variable holds the line width for drawing the toolbar. | - | ||||||
| 1187 | - | |||||||
| 1188 | The default value is 0. | - | ||||||
| 1189 | */ | - | ||||||
| 1190 | - | |||||||
| 1191 | /*! | - | ||||||
| 1192 | \variable QStyleOptionToolBar::midLineWidth | - | ||||||
| 1193 | - | |||||||
| 1194 | This variable holds the mid-line width for drawing the toolbar. | - | ||||||
| 1195 | - | |||||||
| 1196 | The default value is 0. | - | ||||||
| 1197 | */ | - | ||||||
| 1198 | - | |||||||
| 1199 | /*! | - | ||||||
| 1200 | \enum QStyleOptionToolBar::StyleOptionType | - | ||||||
| 1201 | - | |||||||
| 1202 | This enum is used to hold information about the type of the style | - | ||||||
| 1203 | option, and is defined for each QStyleOption subclass. | - | ||||||
| 1204 | - | |||||||
| 1205 | \value Type The type of style option provided (\l{SO_ToolBar} for | - | ||||||
| 1206 | this class). | - | ||||||
| 1207 | - | |||||||
| 1208 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1209 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1210 | general you do not need to worry about this unless you want to | - | ||||||
| 1211 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 1212 | - | |||||||
| 1213 | \sa StyleOptionVersion | - | ||||||
| 1214 | */ | - | ||||||
| 1215 | - | |||||||
| 1216 | /*! | - | ||||||
| 1217 | \enum QStyleOptionToolBar::StyleOptionVersion | - | ||||||
| 1218 | - | |||||||
| 1219 | This enum is used to hold information about the version of the | - | ||||||
| 1220 | style option, and is defined for each QStyleOption subclass. | - | ||||||
| 1221 | - | |||||||
| 1222 | \value Version 1 | - | ||||||
| 1223 | - | |||||||
| 1224 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1225 | extensions without breaking compatibility. If you use | - | ||||||
| 1226 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1227 | - | |||||||
| 1228 | \sa StyleOptionType | - | ||||||
| 1229 | */ | - | ||||||
| 1230 | - | |||||||
| 1231 | #endif | - | ||||||
| 1232 | - | |||||||
| 1233 | #ifndef QT_NO_TABBAR | - | ||||||
| 1234 | /*! | - | ||||||
| 1235 | \class QStyleOptionTab | - | ||||||
| 1236 | \brief The QStyleOptionTab class is used to describe the | - | ||||||
| 1237 | parameters for drawing a tab bar. | - | ||||||
| 1238 | - | |||||||
| 1239 | \inmodule QtWidgets | - | ||||||
| 1240 | - | |||||||
| 1241 | The QStyleOptionTab class is used for drawing several built-in Qt | - | ||||||
| 1242 | widgets including \l QTabBar and the panel for \l QTabWidget. | - | ||||||
| 1243 | - | |||||||
| 1244 | An instance of the QStyleOptionTab class has | - | ||||||
| 1245 | \l{QStyleOption::type} {type} \l SO_Tab and | - | ||||||
| 1246 | \l{QStyleOption::version} {version} 3. The type is used internally | - | ||||||
| 1247 | by QStyleOption, its subclasses, and qstyleoption_cast() to | - | ||||||
| 1248 | determine the type of style option. In general you do not need to | - | ||||||
| 1249 | worry about this unless you want to create your own QStyleOption | - | ||||||
| 1250 | subclass and your own styles. The version is used by QStyleOption | - | ||||||
| 1251 | subclasses to implement extensions without breaking | - | ||||||
| 1252 | compatibility. If you use qstyleoption_cast(), you normally do not | - | ||||||
| 1253 | need to check it. | - | ||||||
| 1254 | - | |||||||
| 1255 | For an example demonstrating how style options can be used, see | - | ||||||
| 1256 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1257 | - | |||||||
| 1258 | \sa QStyleOption | - | ||||||
| 1259 | */ | - | ||||||
| 1260 | - | |||||||
| 1261 | /*! | - | ||||||
| 1262 | \typedef QStyleOptionTabV2 | - | ||||||
| 1263 | \relates QStyleOptionTab | - | ||||||
| 1264 | \obsolete | - | ||||||
| 1265 | - | |||||||
| 1266 | Synonym for QStyleOptionTab. | - | ||||||
| 1267 | */ | - | ||||||
| 1268 | - | |||||||
| 1269 | /*! | - | ||||||
| 1270 | \typedef QStyleOptionTabV3 | - | ||||||
| 1271 | \relates QStyleOptionTab | - | ||||||
| 1272 | \obsolete | - | ||||||
| 1273 | - | |||||||
| 1274 | Synonym for QStyleOptionTab. | - | ||||||
| 1275 | */ | - | ||||||
| 1276 | - | |||||||
| 1277 | /*! | - | ||||||
| 1278 | Constructs a QStyleOptionTab object, initializing the members | - | ||||||
| 1279 | variables to their default values. | - | ||||||
| 1280 | */ | - | ||||||
| 1281 | - | |||||||
| 1282 | QStyleOptionTab::QStyleOptionTab() | - | ||||||
| 1283 | : QStyleOption(QStyleOptionTab::Version, SO_Tab), | - | ||||||
| 1284 | shape(QTabBar::RoundedNorth), | - | ||||||
| 1285 | row(0), | - | ||||||
| 1286 | position(Beginning), | - | ||||||
| 1287 | selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets), | - | ||||||
| 1288 | documentMode(false), | - | ||||||
| 1289 | features(QStyleOptionTab::None) | - | ||||||
| 1290 | { | - | ||||||
| 1291 | } never executed: end of block | 0 | ||||||
| 1292 | - | |||||||
| 1293 | /*! | - | ||||||
| 1294 | \internal | - | ||||||
| 1295 | */ | - | ||||||
| 1296 | QStyleOptionTab::QStyleOptionTab(int version) | - | ||||||
| 1297 | : QStyleOption(version, SO_Tab), | - | ||||||
| 1298 | shape(QTabBar::RoundedNorth), | - | ||||||
| 1299 | row(0), | - | ||||||
| 1300 | position(Beginning), | - | ||||||
| 1301 | selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets), | - | ||||||
| 1302 | documentMode(false), | - | ||||||
| 1303 | features(QStyleOptionTab::None) | - | ||||||
| 1304 | { | - | ||||||
| 1305 | } never executed: end of block | 0 | ||||||
| 1306 | - | |||||||
| 1307 | /*! | - | ||||||
| 1308 | \fn QStyleOptionTab::QStyleOptionTab(const QStyleOptionTab &other) | - | ||||||
| 1309 | - | |||||||
| 1310 | Constructs a copy of the \a other style option. | - | ||||||
| 1311 | */ | - | ||||||
| 1312 | - | |||||||
| 1313 | /*! | - | ||||||
| 1314 | \enum QStyleOptionTab::StyleOptionType | - | ||||||
| 1315 | - | |||||||
| 1316 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 1317 | is defined for each QStyleOption subclass. | - | ||||||
| 1318 | - | |||||||
| 1319 | \value Type The type of style option provided (\l{SO_Tab} for this class). | - | ||||||
| 1320 | - | |||||||
| 1321 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1322 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1323 | general you do not need to worry about this unless you want to | - | ||||||
| 1324 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 1325 | - | |||||||
| 1326 | \sa StyleOptionVersion | - | ||||||
| 1327 | */ | - | ||||||
| 1328 | - | |||||||
| 1329 | /*! | - | ||||||
| 1330 | \enum QStyleOptionTab::StyleOptionVersion | - | ||||||
| 1331 | - | |||||||
| 1332 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 1333 | is defined for each QStyleOption subclass. | - | ||||||
| 1334 | - | |||||||
| 1335 | \value Version 3 | - | ||||||
| 1336 | - | |||||||
| 1337 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1338 | extensions without breaking compatibility. If you use | - | ||||||
| 1339 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1340 | - | |||||||
| 1341 | \sa StyleOptionType | - | ||||||
| 1342 | */ | - | ||||||
| 1343 | - | |||||||
| 1344 | /*! | - | ||||||
| 1345 | \enum QStyleOptionTab::TabPosition | - | ||||||
| 1346 | - | |||||||
| 1347 | This enum describes the position of the tab. | - | ||||||
| 1348 | - | |||||||
| 1349 | \value Beginning The tab is the first tab in the tab bar. | - | ||||||
| 1350 | \value Middle The tab is neither the first nor the last tab in the tab bar. | - | ||||||
| 1351 | \value End The tab is the last tab in the tab bar. | - | ||||||
| 1352 | \value OnlyOneTab The tab is both the first and the last tab in the tab bar. | - | ||||||
| 1353 | - | |||||||
| 1354 | \sa position | - | ||||||
| 1355 | */ | - | ||||||
| 1356 | - | |||||||
| 1357 | /*! | - | ||||||
| 1358 | \enum QStyleOptionTab::CornerWidget | - | ||||||
| 1359 | - | |||||||
| 1360 | These flags indicate the corner widgets in a tab. | - | ||||||
| 1361 | - | |||||||
| 1362 | \value NoCornerWidgets There are no corner widgets | - | ||||||
| 1363 | \value LeftCornerWidget Left corner widget | - | ||||||
| 1364 | \value RightCornerWidget Right corner widget | - | ||||||
| 1365 | - | |||||||
| 1366 | \sa cornerWidgets | - | ||||||
| 1367 | */ | - | ||||||
| 1368 | - | |||||||
| 1369 | /*! \enum QStyleOptionTab::SelectedPosition | - | ||||||
| 1370 | - | |||||||
| 1371 | This enum describes the position of the selected tab. Some styles | - | ||||||
| 1372 | need to draw a tab differently depending on whether or not it is | - | ||||||
| 1373 | adjacent to the selected tab. | - | ||||||
| 1374 | - | |||||||
| 1375 | \value NotAdjacent The tab is not adjacent to a selected tab (or is the selected tab). | - | ||||||
| 1376 | \value NextIsSelected The next tab (typically the tab on the right) is selected. | - | ||||||
| 1377 | \value PreviousIsSelected The previous tab (typically the tab on the left) is selected. | - | ||||||
| 1378 | - | |||||||
| 1379 | \sa selectedPosition | - | ||||||
| 1380 | */ | - | ||||||
| 1381 | - | |||||||
| 1382 | /*! | - | ||||||
| 1383 | \variable QStyleOptionTab::selectedPosition | - | ||||||
| 1384 | \brief the position of the selected tab in relation to this tab | - | ||||||
| 1385 | - | |||||||
| 1386 | The default value is NotAdjacent, i.e. the tab is not adjacent to | - | ||||||
| 1387 | a selected tab nor is it the selected tab. | - | ||||||
| 1388 | */ | - | ||||||
| 1389 | - | |||||||
| 1390 | /*! | - | ||||||
| 1391 | \variable QStyleOptionTab::cornerWidgets | - | ||||||
| 1392 | \brief an OR combination of CornerWidget values indicating the | - | ||||||
| 1393 | corner widgets of the tab bar | - | ||||||
| 1394 | - | |||||||
| 1395 | The default value is NoCornerWidgets. | - | ||||||
| 1396 | - | |||||||
| 1397 | \sa CornerWidget | - | ||||||
| 1398 | */ | - | ||||||
| 1399 | - | |||||||
| 1400 | - | |||||||
| 1401 | /*! | - | ||||||
| 1402 | \variable QStyleOptionTab::shape | - | ||||||
| 1403 | \brief the tab shape used to draw the tab; by default | - | ||||||
| 1404 | QTabBar::RoundedNorth | - | ||||||
| 1405 | - | |||||||
| 1406 | \sa QTabBar::Shape | - | ||||||
| 1407 | */ | - | ||||||
| 1408 | - | |||||||
| 1409 | /*! | - | ||||||
| 1410 | \variable QStyleOptionTab::text | - | ||||||
| 1411 | \brief the text of the tab | - | ||||||
| 1412 | - | |||||||
| 1413 | The default value is an empty string. | - | ||||||
| 1414 | */ | - | ||||||
| 1415 | - | |||||||
| 1416 | /*! | - | ||||||
| 1417 | \variable QStyleOptionTab::icon | - | ||||||
| 1418 | \brief the icon for the tab | - | ||||||
| 1419 | - | |||||||
| 1420 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 1421 | pixmap nor a filename. | - | ||||||
| 1422 | */ | - | ||||||
| 1423 | - | |||||||
| 1424 | /*! | - | ||||||
| 1425 | \variable QStyleOptionTab::row | - | ||||||
| 1426 | \brief which row the tab is currently in | - | ||||||
| 1427 | - | |||||||
| 1428 | The default value is 0, indicating the front row. Currently this | - | ||||||
| 1429 | property can only be 0. | - | ||||||
| 1430 | */ | - | ||||||
| 1431 | - | |||||||
| 1432 | /*! | - | ||||||
| 1433 | \variable QStyleOptionTab::position | - | ||||||
| 1434 | \brief the position of the tab in the tab bar | - | ||||||
| 1435 | - | |||||||
| 1436 | The default value is \l Beginning, i.e. the tab is the first tab | - | ||||||
| 1437 | in the tab bar. | - | ||||||
| 1438 | */ | - | ||||||
| 1439 | /*! | - | ||||||
| 1440 | \variable QStyleOptionTab::iconSize | - | ||||||
| 1441 | \brief the size for the icons | - | ||||||
| 1442 | - | |||||||
| 1443 | The default value is QSize(-1, -1), i.e. an invalid size; use | - | ||||||
| 1444 | QStyle::pixelMetric() to find the default icon size for tab bars. | - | ||||||
| 1445 | - | |||||||
| 1446 | \sa QTabBar::iconSize() | - | ||||||
| 1447 | */ | - | ||||||
| 1448 | - | |||||||
| 1449 | /*! | - | ||||||
| 1450 | \variable QStyleOptionTab::documentMode | - | ||||||
| 1451 | \brief whether the tabbar is in document mode. | - | ||||||
| 1452 | - | |||||||
| 1453 | The default value is false; | - | ||||||
| 1454 | */ | - | ||||||
| 1455 | - | |||||||
| 1456 | /*! | - | ||||||
| 1457 | \enum QStyleOptionTab::TabFeature | - | ||||||
| 1458 | - | |||||||
| 1459 | Describes the various features that a tab button can have. | - | ||||||
| 1460 | - | |||||||
| 1461 | \value None A normal tab button. | - | ||||||
| 1462 | \value HasFrame The tab button is positioned on a tab frame | - | ||||||
| 1463 | - | |||||||
| 1464 | \sa features | - | ||||||
| 1465 | */ | - | ||||||
| 1466 | - | |||||||
| 1467 | /*! | - | ||||||
| 1468 | \variable QStyleOptionTab::leftButtonSize | - | ||||||
| 1469 | \brief the size for the left widget on the tab. | - | ||||||
| 1470 | - | |||||||
| 1471 | The default value is QSize(-1, -1), i.e. an invalid size; | - | ||||||
| 1472 | */ | - | ||||||
| 1473 | - | |||||||
| 1474 | /*! | - | ||||||
| 1475 | \variable QStyleOptionTab::rightButtonSize | - | ||||||
| 1476 | \brief the size for the right widget on the tab. | - | ||||||
| 1477 | - | |||||||
| 1478 | The default value is QSize(-1, -1), i.e. an invalid size; | - | ||||||
| 1479 | */ | - | ||||||
| 1480 | - | |||||||
| 1481 | #endif // QT_NO_TABBAR | - | ||||||
| 1482 | - | |||||||
| 1483 | /*! | - | ||||||
| 1484 | \class QStyleOptionProgressBar | - | ||||||
| 1485 | \brief The QStyleOptionProgressBar class is used to describe the | - | ||||||
| 1486 | parameters necessary for drawing a progress bar. | - | ||||||
| 1487 | - | |||||||
| 1488 | \inmodule QtWidgets | - | ||||||
| 1489 | - | |||||||
| 1490 | An instance of the QStyleOptionProgressBar class has type | - | ||||||
| 1491 | SO_ProgressBar and version 2. | - | ||||||
| 1492 | - | |||||||
| 1493 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1494 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1495 | general you do not need to worry about this unless you want to | - | ||||||
| 1496 | create your own QStyleOption subclass and your own styles. The | - | ||||||
| 1497 | version is used by QStyleOption subclasses to implement extensions | - | ||||||
| 1498 | without breaking compatibility. If you use qstyleoption_cast(), | - | ||||||
| 1499 | you normally do not need to check it. | - | ||||||
| 1500 | - | |||||||
| 1501 | For an example demonstrating how style options can be used, see | - | ||||||
| 1502 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1503 | - | |||||||
| 1504 | \sa QStyleOption | - | ||||||
| 1505 | */ | - | ||||||
| 1506 | - | |||||||
| 1507 | /*! | - | ||||||
| 1508 | \typedef QStyleOptionProgressBarV2 | - | ||||||
| 1509 | \relates QStyleOptionProgressBar | - | ||||||
| 1510 | \obsolete | - | ||||||
| 1511 | - | |||||||
| 1512 | Synonym for QStyleOptionProgressBar. | - | ||||||
| 1513 | */ | - | ||||||
| 1514 | - | |||||||
| 1515 | /*! | - | ||||||
| 1516 | Constructs a QStyleOptionProgressBar, initializing the members | - | ||||||
| 1517 | variables to their default values. | - | ||||||
| 1518 | */ | - | ||||||
| 1519 | - | |||||||
| 1520 | QStyleOptionProgressBar::QStyleOptionProgressBar() | - | ||||||
| 1521 | : QStyleOption(QStyleOptionProgressBar::Version, SO_ProgressBar), | - | ||||||
| 1522 | minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false), | - | ||||||
| 1523 | orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false) | - | ||||||
| 1524 | { | - | ||||||
| 1525 | } never executed: end of block | 0 | ||||||
| 1526 | - | |||||||
| 1527 | /*! | - | ||||||
| 1528 | \internal | - | ||||||
| 1529 | */ | - | ||||||
| 1530 | QStyleOptionProgressBar::QStyleOptionProgressBar(int version) | - | ||||||
| 1531 | : QStyleOption(version, SO_ProgressBar), | - | ||||||
| 1532 | minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false), | - | ||||||
| 1533 | orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false) | - | ||||||
| 1534 | { | - | ||||||
| 1535 | } never executed: end of block | 0 | ||||||
| 1536 | - | |||||||
| 1537 | /*! | - | ||||||
| 1538 | \fn QStyleOptionProgressBar::QStyleOptionProgressBar(const QStyleOptionProgressBar &other) | - | ||||||
| 1539 | - | |||||||
| 1540 | Constructs a copy of the \a other style option. | - | ||||||
| 1541 | */ | - | ||||||
| 1542 | - | |||||||
| 1543 | /*! | - | ||||||
| 1544 | \enum QStyleOptionProgressBar::StyleOptionType | - | ||||||
| 1545 | - | |||||||
| 1546 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 1547 | is defined for each QStyleOption subclass. | - | ||||||
| 1548 | - | |||||||
| 1549 | \value Type The type of style option provided (\l{SO_ProgressBar} for this class). | - | ||||||
| 1550 | - | |||||||
| 1551 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1552 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1553 | general you do not need to worry about this unless you want to | - | ||||||
| 1554 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 1555 | - | |||||||
| 1556 | \sa StyleOptionVersion | - | ||||||
| 1557 | */ | - | ||||||
| 1558 | - | |||||||
| 1559 | /*! | - | ||||||
| 1560 | \enum QStyleOptionProgressBar::StyleOptionVersion | - | ||||||
| 1561 | - | |||||||
| 1562 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 1563 | is defined for each QStyleOption subclass. | - | ||||||
| 1564 | - | |||||||
| 1565 | \value Version 2 | - | ||||||
| 1566 | - | |||||||
| 1567 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1568 | extensions without breaking compatibility. If you use | - | ||||||
| 1569 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1570 | - | |||||||
| 1571 | \sa StyleOptionType | - | ||||||
| 1572 | */ | - | ||||||
| 1573 | - | |||||||
| 1574 | /*! | - | ||||||
| 1575 | \variable QStyleOptionProgressBar::minimum | - | ||||||
| 1576 | \brief the minimum value for the progress bar | - | ||||||
| 1577 | - | |||||||
| 1578 | This is the minimum value in the progress bar. The default value | - | ||||||
| 1579 | is 0. | - | ||||||
| 1580 | - | |||||||
| 1581 | \sa QProgressBar::minimum | - | ||||||
| 1582 | */ | - | ||||||
| 1583 | - | |||||||
| 1584 | /*! | - | ||||||
| 1585 | \variable QStyleOptionProgressBar::maximum | - | ||||||
| 1586 | \brief the maximum value for the progress bar | - | ||||||
| 1587 | - | |||||||
| 1588 | This is the maximum value in the progress bar. The default value | - | ||||||
| 1589 | is 0. | - | ||||||
| 1590 | - | |||||||
| 1591 | \sa QProgressBar::maximum | - | ||||||
| 1592 | */ | - | ||||||
| 1593 | - | |||||||
| 1594 | /*! | - | ||||||
| 1595 | \variable QStyleOptionProgressBar::text | - | ||||||
| 1596 | \brief the text for the progress bar | - | ||||||
| 1597 | - | |||||||
| 1598 | The progress bar text is usually just the progress expressed as a | - | ||||||
| 1599 | string. An empty string indicates that the progress bar has not | - | ||||||
| 1600 | started yet. The default value is an empty string. | - | ||||||
| 1601 | - | |||||||
| 1602 | \sa QProgressBar::text | - | ||||||
| 1603 | */ | - | ||||||
| 1604 | - | |||||||
| 1605 | /*! | - | ||||||
| 1606 | \variable QStyleOptionProgressBar::textVisible | - | ||||||
| 1607 | \brief a flag indicating whether or not text is visible | - | ||||||
| 1608 | - | |||||||
| 1609 | If this flag is true then the text is visible. Otherwise, the text | - | ||||||
| 1610 | is not visible. The default value is false. | - | ||||||
| 1611 | - | |||||||
| 1612 | \sa QProgressBar::textVisible | - | ||||||
| 1613 | */ | - | ||||||
| 1614 | - | |||||||
| 1615 | - | |||||||
| 1616 | /*! | - | ||||||
| 1617 | \variable QStyleOptionProgressBar::textAlignment | - | ||||||
| 1618 | \brief the text alignment for the text in the QProgressBar | - | ||||||
| 1619 | - | |||||||
| 1620 | This can be used as a guide on where the text should be in the | - | ||||||
| 1621 | progress bar. The default value is Qt::AlignLeft. | - | ||||||
| 1622 | */ | - | ||||||
| 1623 | - | |||||||
| 1624 | /*! | - | ||||||
| 1625 | \variable QStyleOptionProgressBar::progress | - | ||||||
| 1626 | \brief the current progress for the progress bar | - | ||||||
| 1627 | - | |||||||
| 1628 | The current progress. A value of QStyleOptionProgressBar::minimum | - | ||||||
| 1629 | - 1 indicates that the progress hasn't started yet. The default | - | ||||||
| 1630 | value is 0. | - | ||||||
| 1631 | - | |||||||
| 1632 | \sa QProgressBar::value | - | ||||||
| 1633 | */ | - | ||||||
| 1634 | - | |||||||
| 1635 | /*! | - | ||||||
| 1636 | \variable QStyleOptionProgressBar::orientation | - | ||||||
| 1637 | \brief the progress bar's orientation (horizontal or vertical); | - | ||||||
| 1638 | the default orentation is Qt::Horizontal | - | ||||||
| 1639 | - | |||||||
| 1640 | \deprecated | - | ||||||
| 1641 | Use the QStyle::State_Horizontal flag instead (in the the QStyleOption::state member). | - | ||||||
| 1642 | - | |||||||
| 1643 | \sa QProgressBar::orientation | - | ||||||
| 1644 | */ | - | ||||||
| 1645 | - | |||||||
| 1646 | /*! | - | ||||||
| 1647 | \variable QStyleOptionProgressBar::invertedAppearance | - | ||||||
| 1648 | \brief whether the progress bar's appearance is inverted | - | ||||||
| 1649 | - | |||||||
| 1650 | The default value is false. | - | ||||||
| 1651 | - | |||||||
| 1652 | \sa QProgressBar::invertedAppearance | - | ||||||
| 1653 | */ | - | ||||||
| 1654 | - | |||||||
| 1655 | /*! | - | ||||||
| 1656 | \variable QStyleOptionProgressBar::bottomToTop | - | ||||||
| 1657 | \brief whether the text reads from bottom to top when the progress | - | ||||||
| 1658 | bar is vertical | - | ||||||
| 1659 | - | |||||||
| 1660 | The default value is false. | - | ||||||
| 1661 | - | |||||||
| 1662 | \sa QProgressBar::textDirection | - | ||||||
| 1663 | */ | - | ||||||
| 1664 | - | |||||||
| 1665 | /*! | - | ||||||
| 1666 | \class QStyleOptionMenuItem | - | ||||||
| 1667 | \brief The QStyleOptionMenuItem class is used to describe the | - | ||||||
| 1668 | parameter necessary for drawing a menu item. | - | ||||||
| 1669 | - | |||||||
| 1670 | \inmodule QtWidgets | - | ||||||
| 1671 | - | |||||||
| 1672 | QStyleOptionMenuItem contains all the information that QStyle | - | ||||||
| 1673 | functions need to draw the menu items from \l QMenu. It is also | - | ||||||
| 1674 | used for drawing other menu-related widgets. | - | ||||||
| 1675 | - | |||||||
| 1676 | For performance reasons, the access to the member variables is | - | ||||||
| 1677 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 1678 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 1679 | these are simply parameters used by the style functions. | - | ||||||
| 1680 | - | |||||||
| 1681 | For an example demonstrating how style options can be used, see | - | ||||||
| 1682 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1683 | - | |||||||
| 1684 | \sa QStyleOption | - | ||||||
| 1685 | */ | - | ||||||
| 1686 | - | |||||||
| 1687 | /*! | - | ||||||
| 1688 | Constructs a QStyleOptionMenuItem, initializing the members | - | ||||||
| 1689 | variables to their default values. | - | ||||||
| 1690 | */ | - | ||||||
| 1691 | - | |||||||
| 1692 | QStyleOptionMenuItem::QStyleOptionMenuItem() | - | ||||||
| 1693 | : QStyleOption(QStyleOptionMenuItem::Version, SO_MenuItem), menuItemType(Normal), | - | ||||||
| 1694 | checkType(NotCheckable), checked(false), menuHasCheckableItems(true), maxIconWidth(0), tabWidth(0) | - | ||||||
| 1695 | { | - | ||||||
| 1696 | } never executed: end of block | 0 | ||||||
| 1697 | - | |||||||
| 1698 | /*! | - | ||||||
| 1699 | \internal | - | ||||||
| 1700 | */ | - | ||||||
| 1701 | QStyleOptionMenuItem::QStyleOptionMenuItem(int version) | - | ||||||
| 1702 | : QStyleOption(version, SO_MenuItem), menuItemType(Normal), | - | ||||||
| 1703 | checkType(NotCheckable), checked(false), menuHasCheckableItems(true), maxIconWidth(0), tabWidth(0) | - | ||||||
| 1704 | { | - | ||||||
| 1705 | } never executed: end of block | 0 | ||||||
| 1706 | - | |||||||
| 1707 | /*! | - | ||||||
| 1708 | \fn QStyleOptionMenuItem::QStyleOptionMenuItem(const QStyleOptionMenuItem &other) | - | ||||||
| 1709 | - | |||||||
| 1710 | Constructs a copy of the \a other style option. | - | ||||||
| 1711 | */ | - | ||||||
| 1712 | - | |||||||
| 1713 | /*! | - | ||||||
| 1714 | \enum QStyleOptionMenuItem::StyleOptionType | - | ||||||
| 1715 | - | |||||||
| 1716 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 1717 | is defined for each QStyleOption subclass. | - | ||||||
| 1718 | - | |||||||
| 1719 | \value Type The type of style option provided (\l{SO_MenuItem} for this class). | - | ||||||
| 1720 | - | |||||||
| 1721 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1722 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1723 | general you do not need to worry about this unless you want to | - | ||||||
| 1724 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 1725 | - | |||||||
| 1726 | \sa StyleOptionVersion | - | ||||||
| 1727 | */ | - | ||||||
| 1728 | - | |||||||
| 1729 | /*! | - | ||||||
| 1730 | \enum QStyleOptionMenuItem::StyleOptionVersion | - | ||||||
| 1731 | - | |||||||
| 1732 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 1733 | is defined for each QStyleOption subclass. | - | ||||||
| 1734 | - | |||||||
| 1735 | \value Version 1 | - | ||||||
| 1736 | - | |||||||
| 1737 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1738 | extensions without breaking compatibility. If you use | - | ||||||
| 1739 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1740 | - | |||||||
| 1741 | \sa StyleOptionType | - | ||||||
| 1742 | */ | - | ||||||
| 1743 | - | |||||||
| 1744 | /*! | - | ||||||
| 1745 | \enum QStyleOptionMenuItem::MenuItemType | - | ||||||
| 1746 | - | |||||||
| 1747 | This enum indicates the type of menu item that the structure describes. | - | ||||||
| 1748 | - | |||||||
| 1749 | \value Normal A normal menu item. | - | ||||||
| 1750 | \value DefaultItem A menu item that is the default action as specified with \l QMenu::defaultAction(). | - | ||||||
| 1751 | \value Separator A menu separator. | - | ||||||
| 1752 | \value SubMenu Indicates the menu item points to a sub-menu. | - | ||||||
| 1753 | \value Scroller A popup menu scroller (currently only used on \macos). | - | ||||||
| 1754 | \value TearOff A tear-off handle for the menu. | - | ||||||
| 1755 | \value Margin The margin of the menu. | - | ||||||
| 1756 | \value EmptyArea The empty area of the menu. | - | ||||||
| 1757 | - | |||||||
| 1758 | \sa menuItemType | - | ||||||
| 1759 | */ | - | ||||||
| 1760 | - | |||||||
| 1761 | /*! | - | ||||||
| 1762 | \enum QStyleOptionMenuItem::CheckType | - | ||||||
| 1763 | - | |||||||
| 1764 | This enum is used to indicate whether or not a check mark should be | - | ||||||
| 1765 | drawn for the item, or even if it should be drawn at all. | - | ||||||
| 1766 | - | |||||||
| 1767 | \value NotCheckable The item is not checkable. | - | ||||||
| 1768 | \value Exclusive The item is an exclusive check item (like a radio button). | - | ||||||
| 1769 | \value NonExclusive The item is a non-exclusive check item (like a check box). | - | ||||||
| 1770 | - | |||||||
| 1771 | \sa checkType, QAction::checkable, QAction::checked, QActionGroup::exclusive | - | ||||||
| 1772 | */ | - | ||||||
| 1773 | - | |||||||
| 1774 | /*! | - | ||||||
| 1775 | \variable QStyleOptionMenuItem::menuItemType | - | ||||||
| 1776 | \brief the type of menu item | - | ||||||
| 1777 | - | |||||||
| 1778 | The default value is \l Normal. | - | ||||||
| 1779 | - | |||||||
| 1780 | \sa MenuItemType | - | ||||||
| 1781 | */ | - | ||||||
| 1782 | - | |||||||
| 1783 | /*! | - | ||||||
| 1784 | \variable QStyleOptionMenuItem::checkType | - | ||||||
| 1785 | \brief the type of checkmark of the menu item | - | ||||||
| 1786 | - | |||||||
| 1787 | The default value is \l NotCheckable. | - | ||||||
| 1788 | - | |||||||
| 1789 | \sa CheckType | - | ||||||
| 1790 | */ | - | ||||||
| 1791 | - | |||||||
| 1792 | /*! | - | ||||||
| 1793 | \variable QStyleOptionMenuItem::checked | - | ||||||
| 1794 | \brief whether the menu item is checked or not | - | ||||||
| 1795 | - | |||||||
| 1796 | The default value is false. | - | ||||||
| 1797 | */ | - | ||||||
| 1798 | - | |||||||
| 1799 | /*! | - | ||||||
| 1800 | \variable QStyleOptionMenuItem::menuHasCheckableItems | - | ||||||
| 1801 | \brief whether the menu as a whole has checkable items or not | - | ||||||
| 1802 | - | |||||||
| 1803 | The default value is true. | - | ||||||
| 1804 | - | |||||||
| 1805 | If this option is set to false, then the menu has no checkable | - | ||||||
| 1806 | items. This makes it possible for GUI styles to save some | - | ||||||
| 1807 | horizontal space that would normally be used for the check column. | - | ||||||
| 1808 | */ | - | ||||||
| 1809 | - | |||||||
| 1810 | /*! | - | ||||||
| 1811 | \variable QStyleOptionMenuItem::menuRect | - | ||||||
| 1812 | \brief the rectangle for the entire menu | - | ||||||
| 1813 | - | |||||||
| 1814 | The default value is a null rectangle, i.e. a rectangle with both | - | ||||||
| 1815 | the width and the height set to 0. | - | ||||||
| 1816 | */ | - | ||||||
| 1817 | - | |||||||
| 1818 | /*! | - | ||||||
| 1819 | \variable QStyleOptionMenuItem::text | - | ||||||
| 1820 | \brief the text for the menu item | - | ||||||
| 1821 | - | |||||||
| 1822 | Note that the text format is something like this "Menu | - | ||||||
| 1823 | text\b{\\t}Shortcut". | - | ||||||
| 1824 | - | |||||||
| 1825 | If the menu item doesn't have a shortcut, it will just contain the | - | ||||||
| 1826 | menu item's text. The default value is an empty string. | - | ||||||
| 1827 | */ | - | ||||||
| 1828 | - | |||||||
| 1829 | /*! | - | ||||||
| 1830 | \variable QStyleOptionMenuItem::icon | - | ||||||
| 1831 | \brief the icon for the menu item | - | ||||||
| 1832 | - | |||||||
| 1833 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 1834 | pixmap nor a filename. | - | ||||||
| 1835 | */ | - | ||||||
| 1836 | - | |||||||
| 1837 | /*! | - | ||||||
| 1838 | \variable QStyleOptionMenuItem::maxIconWidth | - | ||||||
| 1839 | \brief the maximum icon width for the icon in the menu item | - | ||||||
| 1840 | - | |||||||
| 1841 | This can be used for drawing the icon into the correct place or | - | ||||||
| 1842 | properly aligning items. The variable must be set regardless of | - | ||||||
| 1843 | whether or not the menu item has an icon. The default value is 0. | - | ||||||
| 1844 | */ | - | ||||||
| 1845 | - | |||||||
| 1846 | /*! | - | ||||||
| 1847 | \variable QStyleOptionMenuItem::tabWidth | - | ||||||
| 1848 | \brief the tab width for the menu item | - | ||||||
| 1849 | - | |||||||
| 1850 | The tab width is the distance between the text of the menu item | - | ||||||
| 1851 | and the shortcut. The default value is 0. | - | ||||||
| 1852 | */ | - | ||||||
| 1853 | - | |||||||
| 1854 | - | |||||||
| 1855 | /*! | - | ||||||
| 1856 | \variable QStyleOptionMenuItem::font | - | ||||||
| 1857 | \brief the font used for the menu item text | - | ||||||
| 1858 | - | |||||||
| 1859 | This is the font that should be used for drawing the menu text | - | ||||||
| 1860 | minus the shortcut. The shortcut is usually drawn using the | - | ||||||
| 1861 | painter's font. By default, the application's default font is | - | ||||||
| 1862 | used. | - | ||||||
| 1863 | */ | - | ||||||
| 1864 | - | |||||||
| 1865 | /*! | - | ||||||
| 1866 | \class QStyleOptionComplex | - | ||||||
| 1867 | \brief The QStyleOptionComplex class is used to hold parameters that are | - | ||||||
| 1868 | common to all complex controls. | - | ||||||
| 1869 | - | |||||||
| 1870 | \inmodule QtWidgets | - | ||||||
| 1871 | - | |||||||
| 1872 | This class is not used on its own. Instead it is used to derive | - | ||||||
| 1873 | other complex control options, for example QStyleOptionSlider and | - | ||||||
| 1874 | QStyleOptionSpinBox. | - | ||||||
| 1875 | - | |||||||
| 1876 | For performance reasons, the access to the member variables is | - | ||||||
| 1877 | direct (i.e., using the \c . or \c -> operator). | - | ||||||
| 1878 | - | |||||||
| 1879 | For an example demonstrating how style options can be used, see | - | ||||||
| 1880 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1881 | - | |||||||
| 1882 | \sa QStyleOption | - | ||||||
| 1883 | */ | - | ||||||
| 1884 | - | |||||||
| 1885 | /*! | - | ||||||
| 1886 | Constructs a QStyleOptionComplex of the specified \a type and \a | - | ||||||
| 1887 | version, initializing the member variables to their default | - | ||||||
| 1888 | values. This constructor is usually called by subclasses. | - | ||||||
| 1889 | */ | - | ||||||
| 1890 | - | |||||||
| 1891 | QStyleOptionComplex::QStyleOptionComplex(int version, int type) | - | ||||||
| 1892 | : QStyleOption(version, type), subControls(QStyle::SC_All), activeSubControls(QStyle::SC_None) | - | ||||||
| 1893 | { | - | ||||||
| 1894 | } never executed: end of block | 0 | ||||||
| 1895 | - | |||||||
| 1896 | /*! | - | ||||||
| 1897 | \fn QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex &other) | - | ||||||
| 1898 | - | |||||||
| 1899 | Constructs a copy of the \a other style option. | - | ||||||
| 1900 | */ | - | ||||||
| 1901 | - | |||||||
| 1902 | /*! | - | ||||||
| 1903 | \enum QStyleOptionComplex::StyleOptionType | - | ||||||
| 1904 | - | |||||||
| 1905 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 1906 | is defined for each QStyleOption subclass. | - | ||||||
| 1907 | - | |||||||
| 1908 | \value Type The type of style option provided (\l{SO_Complex} for this class). | - | ||||||
| 1909 | - | |||||||
| 1910 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 1911 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 1912 | general you do not need to worry about this unless you want to | - | ||||||
| 1913 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 1914 | - | |||||||
| 1915 | \sa StyleOptionVersion | - | ||||||
| 1916 | */ | - | ||||||
| 1917 | - | |||||||
| 1918 | /*! | - | ||||||
| 1919 | \enum QStyleOptionComplex::StyleOptionVersion | - | ||||||
| 1920 | - | |||||||
| 1921 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 1922 | is defined for each QStyleOption subclass. | - | ||||||
| 1923 | - | |||||||
| 1924 | \value Version 1 | - | ||||||
| 1925 | - | |||||||
| 1926 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 1927 | extensions without breaking compatibility. If you use | - | ||||||
| 1928 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 1929 | - | |||||||
| 1930 | \sa StyleOptionType | - | ||||||
| 1931 | */ | - | ||||||
| 1932 | - | |||||||
| 1933 | /*! | - | ||||||
| 1934 | \variable QStyleOptionComplex::subControls | - | ||||||
| 1935 | - | |||||||
| 1936 | This variable holds a bitwise OR of the \l{QStyle::SubControl} | - | ||||||
| 1937 | {sub-controls} to be drawn for the complex control. | - | ||||||
| 1938 | - | |||||||
| 1939 | The default value is QStyle::SC_All. | - | ||||||
| 1940 | - | |||||||
| 1941 | \sa QStyle::SubControl | - | ||||||
| 1942 | */ | - | ||||||
| 1943 | - | |||||||
| 1944 | /*! | - | ||||||
| 1945 | \variable QStyleOptionComplex::activeSubControls | - | ||||||
| 1946 | - | |||||||
| 1947 | This variable holds a bitwise OR of the \l{QStyle::SubControl} | - | ||||||
| 1948 | {sub-controls} that are active for the complex control. | - | ||||||
| 1949 | - | |||||||
| 1950 | The default value is QStyle::SC_None. | - | ||||||
| 1951 | - | |||||||
| 1952 | \sa QStyle::SubControl | - | ||||||
| 1953 | */ | - | ||||||
| 1954 | - | |||||||
| 1955 | #ifndef QT_NO_SLIDER | - | ||||||
| 1956 | /*! | - | ||||||
| 1957 | \class QStyleOptionSlider | - | ||||||
| 1958 | \brief The QStyleOptionSlider class is used to describe the | - | ||||||
| 1959 | parameters needed for drawing a slider. | - | ||||||
| 1960 | - | |||||||
| 1961 | \inmodule QtWidgets | - | ||||||
| 1962 | - | |||||||
| 1963 | QStyleOptionSlider contains all the information that QStyle | - | ||||||
| 1964 | functions need to draw QSlider and QScrollBar. | - | ||||||
| 1965 | - | |||||||
| 1966 | For performance reasons, the access to the member variables is | - | ||||||
| 1967 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 1968 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 1969 | these are simply parameters used by the style functions. | - | ||||||
| 1970 | - | |||||||
| 1971 | For an example demonstrating how style options can be used, see | - | ||||||
| 1972 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 1973 | - | |||||||
| 1974 | \sa QStyleOptionComplex, QSlider, QScrollBar | - | ||||||
| 1975 | */ | - | ||||||
| 1976 | - | |||||||
| 1977 | /*! | - | ||||||
| 1978 | Constructs a QStyleOptionSlider, initializing the members | - | ||||||
| 1979 | variables to their default values. | - | ||||||
| 1980 | */ | - | ||||||
| 1981 | - | |||||||
| 1982 | QStyleOptionSlider::QStyleOptionSlider() | - | ||||||
| 1983 | : QStyleOptionComplex(Version, SO_Slider), orientation(Qt::Horizontal), minimum(0), maximum(0), | - | ||||||
| 1984 | tickPosition(QSlider::NoTicks), tickInterval(0), upsideDown(false), | - | ||||||
| 1985 | sliderPosition(0), sliderValue(0), singleStep(0), pageStep(0), notchTarget(0.0), | - | ||||||
| 1986 | dialWrapping(false) | - | ||||||
| 1987 | { | - | ||||||
| 1988 | } never executed: end of block | 0 | ||||||
| 1989 | - | |||||||
| 1990 | /*! | - | ||||||
| 1991 | \internal | - | ||||||
| 1992 | */ | - | ||||||
| 1993 | QStyleOptionSlider::QStyleOptionSlider(int version) | - | ||||||
| 1994 | : QStyleOptionComplex(version, SO_Slider), orientation(Qt::Horizontal), minimum(0), maximum(0), | - | ||||||
| 1995 | tickPosition(QSlider::NoTicks), tickInterval(0), upsideDown(false), | - | ||||||
| 1996 | sliderPosition(0), sliderValue(0), singleStep(0), pageStep(0), notchTarget(0.0), | - | ||||||
| 1997 | dialWrapping(false) | - | ||||||
| 1998 | { | - | ||||||
| 1999 | } never executed: end of block | 0 | ||||||
| 2000 | - | |||||||
| 2001 | /*! | - | ||||||
| 2002 | \fn QStyleOptionSlider::QStyleOptionSlider(const QStyleOptionSlider &other) | - | ||||||
| 2003 | - | |||||||
| 2004 | Constructs a copy of the \a other style option. | - | ||||||
| 2005 | */ | - | ||||||
| 2006 | - | |||||||
| 2007 | /*! | - | ||||||
| 2008 | \enum QStyleOptionSlider::StyleOptionType | - | ||||||
| 2009 | - | |||||||
| 2010 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2011 | is defined for each QStyleOption subclass. | - | ||||||
| 2012 | - | |||||||
| 2013 | \value Type The type of style option provided (\l{SO_Slider} for this class). | - | ||||||
| 2014 | - | |||||||
| 2015 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2016 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2017 | general you do not need to worry about this unless you want to | - | ||||||
| 2018 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2019 | - | |||||||
| 2020 | \sa StyleOptionVersion | - | ||||||
| 2021 | */ | - | ||||||
| 2022 | - | |||||||
| 2023 | /*! | - | ||||||
| 2024 | \enum QStyleOptionSlider::StyleOptionVersion | - | ||||||
| 2025 | - | |||||||
| 2026 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2027 | is defined for each QStyleOption subclass. | - | ||||||
| 2028 | - | |||||||
| 2029 | \value Version 1 | - | ||||||
| 2030 | - | |||||||
| 2031 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2032 | extensions without breaking compatibility. If you use | - | ||||||
| 2033 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2034 | - | |||||||
| 2035 | \sa StyleOptionType | - | ||||||
| 2036 | */ | - | ||||||
| 2037 | - | |||||||
| 2038 | /*! | - | ||||||
| 2039 | \variable QStyleOptionSlider::orientation | - | ||||||
| 2040 | \brief the slider's orientation (horizontal or vertical) | - | ||||||
| 2041 | - | |||||||
| 2042 | The default orientation is Qt::Horizontal. | - | ||||||
| 2043 | - | |||||||
| 2044 | \sa Qt::Orientation | - | ||||||
| 2045 | */ | - | ||||||
| 2046 | - | |||||||
| 2047 | /*! | - | ||||||
| 2048 | \variable QStyleOptionSlider::minimum | - | ||||||
| 2049 | \brief the minimum value for the slider | - | ||||||
| 2050 | - | |||||||
| 2051 | The default value is 0. | - | ||||||
| 2052 | */ | - | ||||||
| 2053 | - | |||||||
| 2054 | /*! | - | ||||||
| 2055 | \variable QStyleOptionSlider::maximum | - | ||||||
| 2056 | \brief the maximum value for the slider | - | ||||||
| 2057 | - | |||||||
| 2058 | The default value is 0. | - | ||||||
| 2059 | */ | - | ||||||
| 2060 | - | |||||||
| 2061 | /*! | - | ||||||
| 2062 | \variable QStyleOptionSlider::tickPosition | - | ||||||
| 2063 | \brief the position of the slider's tick marks, if any | - | ||||||
| 2064 | - | |||||||
| 2065 | The default value is QSlider::NoTicks. | - | ||||||
| 2066 | - | |||||||
| 2067 | \sa QSlider::TickPosition | - | ||||||
| 2068 | */ | - | ||||||
| 2069 | - | |||||||
| 2070 | /*! | - | ||||||
| 2071 | \variable QStyleOptionSlider::tickInterval | - | ||||||
| 2072 | \brief the interval that should be drawn between tick marks | - | ||||||
| 2073 | - | |||||||
| 2074 | The default value is 0. | - | ||||||
| 2075 | */ | - | ||||||
| 2076 | - | |||||||
| 2077 | /*! | - | ||||||
| 2078 | \variable QStyleOptionSlider::notchTarget | - | ||||||
| 2079 | \brief the number of pixel between notches | - | ||||||
| 2080 | - | |||||||
| 2081 | The default value is 0.0. | - | ||||||
| 2082 | - | |||||||
| 2083 | \sa QDial::notchTarget() | - | ||||||
| 2084 | */ | - | ||||||
| 2085 | - | |||||||
| 2086 | /*! | - | ||||||
| 2087 | \variable QStyleOptionSlider::dialWrapping | - | ||||||
| 2088 | \brief whether the dial should wrap or not | - | ||||||
| 2089 | - | |||||||
| 2090 | The default value is false, i.e. the dial is not wrapped. | - | ||||||
| 2091 | - | |||||||
| 2092 | \sa QDial::wrapping() | - | ||||||
| 2093 | */ | - | ||||||
| 2094 | - | |||||||
| 2095 | /*! | - | ||||||
| 2096 | \variable QStyleOptionSlider::upsideDown | - | ||||||
| 2097 | \brief the slider control orientation | - | ||||||
| 2098 | - | |||||||
| 2099 | Normally a slider increases as it moves up or to the right; | - | ||||||
| 2100 | upsideDown indicates that it should do the opposite (increase as | - | ||||||
| 2101 | it moves down or to the left). The default value is false, | - | ||||||
| 2102 | i.e. the slider increases as it moves up or to the right. | - | ||||||
| 2103 | - | |||||||
| 2104 | \sa QStyle::sliderPositionFromValue(), | - | ||||||
| 2105 | QStyle::sliderValueFromPosition(), | - | ||||||
| 2106 | QAbstractSlider::invertedAppearance | - | ||||||
| 2107 | */ | - | ||||||
| 2108 | - | |||||||
| 2109 | /*! | - | ||||||
| 2110 | \variable QStyleOptionSlider::sliderPosition | - | ||||||
| 2111 | \brief the position of the slider handle | - | ||||||
| 2112 | - | |||||||
| 2113 | If the slider has active feedback (i.e., | - | ||||||
| 2114 | QAbstractSlider::tracking is true), this value will be the same as | - | ||||||
| 2115 | \l sliderValue. Otherwise, it will have the current position of | - | ||||||
| 2116 | the handle. The default value is 0. | - | ||||||
| 2117 | - | |||||||
| 2118 | \sa QAbstractSlider::tracking, sliderValue | - | ||||||
| 2119 | */ | - | ||||||
| 2120 | - | |||||||
| 2121 | /*! | - | ||||||
| 2122 | \variable QStyleOptionSlider::sliderValue | - | ||||||
| 2123 | \brief the value of the slider | - | ||||||
| 2124 | - | |||||||
| 2125 | If the slider has active feedback (i.e., | - | ||||||
| 2126 | QAbstractSlider::tracking is true), this value will be the same | - | ||||||
| 2127 | as \l sliderPosition. Otherwise, it will have the value the | - | ||||||
| 2128 | slider had before the mouse was pressed. | - | ||||||
| 2129 | - | |||||||
| 2130 | The default value is 0. | - | ||||||
| 2131 | - | |||||||
| 2132 | \sa QAbstractSlider::tracking, sliderPosition | - | ||||||
| 2133 | */ | - | ||||||
| 2134 | - | |||||||
| 2135 | /*! | - | ||||||
| 2136 | \variable QStyleOptionSlider::singleStep | - | ||||||
| 2137 | \brief the size of the single step of the slider | - | ||||||
| 2138 | - | |||||||
| 2139 | The default value is 0. | - | ||||||
| 2140 | - | |||||||
| 2141 | \sa QAbstractSlider::singleStep | - | ||||||
| 2142 | */ | - | ||||||
| 2143 | - | |||||||
| 2144 | /*! | - | ||||||
| 2145 | \variable QStyleOptionSlider::pageStep | - | ||||||
| 2146 | \brief the size of the page step of the slider | - | ||||||
| 2147 | - | |||||||
| 2148 | The default value is 0. | - | ||||||
| 2149 | - | |||||||
| 2150 | \sa QAbstractSlider::pageStep | - | ||||||
| 2151 | */ | - | ||||||
| 2152 | #endif // QT_NO_SLIDER | - | ||||||
| 2153 | - | |||||||
| 2154 | #ifndef QT_NO_SPINBOX | - | ||||||
| 2155 | /*! | - | ||||||
| 2156 | \class QStyleOptionSpinBox | - | ||||||
| 2157 | \brief The QStyleOptionSpinBox class is used to describe the | - | ||||||
| 2158 | parameters necessary for drawing a spin box. | - | ||||||
| 2159 | - | |||||||
| 2160 | \inmodule QtWidgets | - | ||||||
| 2161 | - | |||||||
| 2162 | QStyleOptionSpinBox contains all the information that QStyle | - | ||||||
| 2163 | functions need to draw QSpinBox and QDateTimeEdit. | - | ||||||
| 2164 | - | |||||||
| 2165 | For performance reasons, the access to the member variables is | - | ||||||
| 2166 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2167 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2168 | these are simply parameters used by the style functions. | - | ||||||
| 2169 | - | |||||||
| 2170 | For an example demonstrating how style options can be used, see | - | ||||||
| 2171 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2172 | - | |||||||
| 2173 | \sa QStyleOption, QStyleOptionComplex | - | ||||||
| 2174 | */ | - | ||||||
| 2175 | - | |||||||
| 2176 | /*! | - | ||||||
| 2177 | Constructs a QStyleOptionSpinBox, initializing the members | - | ||||||
| 2178 | variables to their default values. | - | ||||||
| 2179 | */ | - | ||||||
| 2180 | - | |||||||
| 2181 | QStyleOptionSpinBox::QStyleOptionSpinBox() | - | ||||||
| 2182 | : QStyleOptionComplex(Version, SO_SpinBox), buttonSymbols(QAbstractSpinBox::UpDownArrows), | - | ||||||
| 2183 | stepEnabled(QAbstractSpinBox::StepNone), frame(false) | - | ||||||
| 2184 | { | - | ||||||
| 2185 | } never executed: end of block | 0 | ||||||
| 2186 | - | |||||||
| 2187 | /*! | - | ||||||
| 2188 | \internal | - | ||||||
| 2189 | */ | - | ||||||
| 2190 | QStyleOptionSpinBox::QStyleOptionSpinBox(int version) | - | ||||||
| 2191 | : QStyleOptionComplex(version, SO_SpinBox), buttonSymbols(QAbstractSpinBox::UpDownArrows), | - | ||||||
| 2192 | stepEnabled(QAbstractSpinBox::StepNone), frame(false) | - | ||||||
| 2193 | { | - | ||||||
| 2194 | } never executed: end of block | 0 | ||||||
| 2195 | - | |||||||
| 2196 | /*! | - | ||||||
| 2197 | \fn QStyleOptionSpinBox::QStyleOptionSpinBox(const QStyleOptionSpinBox &other) | - | ||||||
| 2198 | - | |||||||
| 2199 | Constructs a copy of the \a other style option. | - | ||||||
| 2200 | */ | - | ||||||
| 2201 | - | |||||||
| 2202 | /*! | - | ||||||
| 2203 | \enum QStyleOptionSpinBox::StyleOptionType | - | ||||||
| 2204 | - | |||||||
| 2205 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2206 | is defined for each QStyleOption subclass. | - | ||||||
| 2207 | - | |||||||
| 2208 | \value Type The type of style option provided (\l{SO_SpinBox} for this class). | - | ||||||
| 2209 | - | |||||||
| 2210 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2211 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2212 | general you do not need to worry about this unless you want to | - | ||||||
| 2213 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2214 | - | |||||||
| 2215 | \sa StyleOptionVersion | - | ||||||
| 2216 | */ | - | ||||||
| 2217 | - | |||||||
| 2218 | /*! | - | ||||||
| 2219 | \enum QStyleOptionSpinBox::StyleOptionVersion | - | ||||||
| 2220 | - | |||||||
| 2221 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2222 | is defined for each QStyleOption subclass. | - | ||||||
| 2223 | - | |||||||
| 2224 | \value Version 1 | - | ||||||
| 2225 | - | |||||||
| 2226 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2227 | extensions without breaking compatibility. If you use | - | ||||||
| 2228 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2229 | - | |||||||
| 2230 | \sa StyleOptionType | - | ||||||
| 2231 | */ | - | ||||||
| 2232 | - | |||||||
| 2233 | /*! | - | ||||||
| 2234 | \variable QStyleOptionSpinBox::buttonSymbols | - | ||||||
| 2235 | \brief the type of button symbols to draw for the spin box | - | ||||||
| 2236 | - | |||||||
| 2237 | The default value is QAbstractSpinBox::UpDownArrows specufying | - | ||||||
| 2238 | little arrows in the classic style. | - | ||||||
| 2239 | - | |||||||
| 2240 | \sa QAbstractSpinBox::ButtonSymbols | - | ||||||
| 2241 | */ | - | ||||||
| 2242 | - | |||||||
| 2243 | /*! | - | ||||||
| 2244 | \variable QStyleOptionSpinBox::stepEnabled | - | ||||||
| 2245 | \brief which buttons of the spin box that are enabled | - | ||||||
| 2246 | - | |||||||
| 2247 | The default value is QAbstractSpinBox::StepNone. | - | ||||||
| 2248 | - | |||||||
| 2249 | \sa QAbstractSpinBox::StepEnabled | - | ||||||
| 2250 | */ | - | ||||||
| 2251 | - | |||||||
| 2252 | /*! | - | ||||||
| 2253 | \variable QStyleOptionSpinBox::frame | - | ||||||
| 2254 | \brief whether the spin box has a frame | - | ||||||
| 2255 | - | |||||||
| 2256 | The default value is false, i.e. the spin box has no frame. | - | ||||||
| 2257 | */ | - | ||||||
| 2258 | #endif // QT_NO_SPINBOX | - | ||||||
| 2259 | - | |||||||
| 2260 | /*! | - | ||||||
| 2261 | \class QStyleOptionDockWidget | - | ||||||
| 2262 | \brief The QStyleOptionDockWidget class is used to describe the | - | ||||||
| 2263 | parameters for drawing a dock widget. | - | ||||||
| 2264 | - | |||||||
| 2265 | \inmodule QtWidgets | - | ||||||
| 2266 | - | |||||||
| 2267 | QStyleOptionDockWidget contains all the information that QStyle | - | ||||||
| 2268 | functions need to draw graphical elements like QDockWidget. | - | ||||||
| 2269 | - | |||||||
| 2270 | For performance reasons, the access to the member variables is | - | ||||||
| 2271 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2272 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2273 | these are simply parameters used by the style functions. | - | ||||||
| 2274 | - | |||||||
| 2275 | For an example demonstrating how style options can be used, see | - | ||||||
| 2276 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2277 | - | |||||||
| 2278 | \sa QStyleOption | - | ||||||
| 2279 | */ | - | ||||||
| 2280 | - | |||||||
| 2281 | /*! | - | ||||||
| 2282 | \typedef QStyleOptionDockWidgetV2 | - | ||||||
| 2283 | \relates QStyleOptionDockWidget | - | ||||||
| 2284 | \obsolete | - | ||||||
| 2285 | - | |||||||
| 2286 | Synonym for QStyleOptionDockWidget. | - | ||||||
| 2287 | */ | - | ||||||
| 2288 | - | |||||||
| 2289 | /*! | - | ||||||
| 2290 | Constructs a QStyleOptionDockWidget, initializing the member | - | ||||||
| 2291 | variables to their default values. | - | ||||||
| 2292 | */ | - | ||||||
| 2293 | - | |||||||
| 2294 | QStyleOptionDockWidget::QStyleOptionDockWidget() | - | ||||||
| 2295 | : QStyleOption(Version, SO_DockWidget), closable(false), | - | ||||||
| 2296 | movable(false), floatable(false), verticalTitleBar(false) | - | ||||||
| 2297 | { | - | ||||||
| 2298 | } never executed: end of block | 0 | ||||||
| 2299 | - | |||||||
| 2300 | /*! | - | ||||||
| 2301 | \internal | - | ||||||
| 2302 | */ | - | ||||||
| 2303 | QStyleOptionDockWidget::QStyleOptionDockWidget(int version) | - | ||||||
| 2304 | : QStyleOption(version, SO_DockWidget), closable(false), | - | ||||||
| 2305 | movable(false), floatable(false), verticalTitleBar(false) | - | ||||||
| 2306 | { | - | ||||||
| 2307 | } never executed: end of block | 0 | ||||||
| 2308 | - | |||||||
| 2309 | /*! | - | ||||||
| 2310 | \fn QStyleOptionDockWidget::QStyleOptionDockWidget(const QStyleOptionDockWidget &other) | - | ||||||
| 2311 | - | |||||||
| 2312 | Constructs a copy of the \a other style option. | - | ||||||
| 2313 | */ | - | ||||||
| 2314 | - | |||||||
| 2315 | /*! | - | ||||||
| 2316 | \enum QStyleOptionDockWidget::StyleOptionType | - | ||||||
| 2317 | - | |||||||
| 2318 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2319 | is defined for each QStyleOption subclass. | - | ||||||
| 2320 | - | |||||||
| 2321 | \value Type The type of style option provided (\l{SO_DockWidget} for this class). | - | ||||||
| 2322 | - | |||||||
| 2323 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2324 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2325 | general you do not need to worry about this unless you want to | - | ||||||
| 2326 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2327 | - | |||||||
| 2328 | \sa StyleOptionVersion | - | ||||||
| 2329 | */ | - | ||||||
| 2330 | - | |||||||
| 2331 | /*! | - | ||||||
| 2332 | \enum QStyleOptionDockWidget::StyleOptionVersion | - | ||||||
| 2333 | - | |||||||
| 2334 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2335 | is defined for each QStyleOption subclass. | - | ||||||
| 2336 | - | |||||||
| 2337 | \value Version 2 | - | ||||||
| 2338 | - | |||||||
| 2339 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2340 | extensions without breaking compatibility. If you use | - | ||||||
| 2341 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2342 | - | |||||||
| 2343 | \sa StyleOptionType | - | ||||||
| 2344 | */ | - | ||||||
| 2345 | - | |||||||
| 2346 | /*! | - | ||||||
| 2347 | \variable QStyleOptionDockWidget::title | - | ||||||
| 2348 | \brief the title of the dock window | - | ||||||
| 2349 | - | |||||||
| 2350 | The default value is an empty string. | - | ||||||
| 2351 | */ | - | ||||||
| 2352 | - | |||||||
| 2353 | /*! | - | ||||||
| 2354 | \variable QStyleOptionDockWidget::closable | - | ||||||
| 2355 | \brief whether the dock window is closable | - | ||||||
| 2356 | - | |||||||
| 2357 | The default value is true. | - | ||||||
| 2358 | */ | - | ||||||
| 2359 | - | |||||||
| 2360 | /*! | - | ||||||
| 2361 | \variable QStyleOptionDockWidget::movable | - | ||||||
| 2362 | \brief whether the dock window is movable | - | ||||||
| 2363 | - | |||||||
| 2364 | The default value is false. | - | ||||||
| 2365 | */ | - | ||||||
| 2366 | - | |||||||
| 2367 | /*! | - | ||||||
| 2368 | \variable QStyleOptionDockWidget::floatable | - | ||||||
| 2369 | \brief whether the dock window is floatable | - | ||||||
| 2370 | - | |||||||
| 2371 | The default value is true. | - | ||||||
| 2372 | */ | - | ||||||
| 2373 | - | |||||||
| 2374 | /*! | - | ||||||
| 2375 | \class QStyleOptionToolButton | - | ||||||
| 2376 | \brief The QStyleOptionToolButton class is used to describe the | - | ||||||
| 2377 | parameters for drawing a tool button. | - | ||||||
| 2378 | - | |||||||
| 2379 | \inmodule QtWidgets | - | ||||||
| 2380 | - | |||||||
| 2381 | QStyleOptionToolButton contains all the information that QStyle | - | ||||||
| 2382 | functions need to draw QToolButton. | - | ||||||
| 2383 | - | |||||||
| 2384 | For performance reasons, the access to the member variables is | - | ||||||
| 2385 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2386 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2387 | these are simply parameters used by the style functions. | - | ||||||
| 2388 | - | |||||||
| 2389 | For an example demonstrating how style options can be used, see | - | ||||||
| 2390 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2391 | - | |||||||
| 2392 | \sa QStyleOption, QStyleOptionComplex, QStyleOptionButton | - | ||||||
| 2393 | */ | - | ||||||
| 2394 | - | |||||||
| 2395 | /*! | - | ||||||
| 2396 | \enum QStyleOptionToolButton::ToolButtonFeature | - | ||||||
| 2397 | Describes the various features that a tool button can have. | - | ||||||
| 2398 | - | |||||||
| 2399 | \value None A normal tool button. | - | ||||||
| 2400 | \value Arrow The tool button is an arrow. | - | ||||||
| 2401 | \value Menu The tool button has a menu. | - | ||||||
| 2402 | \value PopupDelay There is a delay to showing the menu. | - | ||||||
| 2403 | \value HasMenu The button has a popup menu. | - | ||||||
| 2404 | \value MenuButtonPopup The button should display an arrow to | - | ||||||
| 2405 | indicate that a menu is present. | - | ||||||
| 2406 | - | |||||||
| 2407 | \sa features, QToolButton::toolButtonStyle(), QToolButton::popupMode() | - | ||||||
| 2408 | */ | - | ||||||
| 2409 | - | |||||||
| 2410 | /*! | - | ||||||
| 2411 | Constructs a QStyleOptionToolButton, initializing the members | - | ||||||
| 2412 | variables to their default values. | - | ||||||
| 2413 | */ | - | ||||||
| 2414 | - | |||||||
| 2415 | QStyleOptionToolButton::QStyleOptionToolButton() | - | ||||||
| 2416 | : QStyleOptionComplex(Version, SO_ToolButton), features(None), arrowType(Qt::DownArrow) | - | ||||||
| 2417 | , toolButtonStyle(Qt::ToolButtonIconOnly) | - | ||||||
| 2418 | { | - | ||||||
| 2419 | } never executed: end of block | 0 | ||||||
| 2420 | - | |||||||
| 2421 | /*! | - | ||||||
| 2422 | \internal | - | ||||||
| 2423 | */ | - | ||||||
| 2424 | QStyleOptionToolButton::QStyleOptionToolButton(int version) | - | ||||||
| 2425 | : QStyleOptionComplex(version, SO_ToolButton), features(None), arrowType(Qt::DownArrow) | - | ||||||
| 2426 | , toolButtonStyle(Qt::ToolButtonIconOnly) | - | ||||||
| 2427 | - | |||||||
| 2428 | { | - | ||||||
| 2429 | } never executed: end of block | 0 | ||||||
| 2430 | - | |||||||
| 2431 | /*! | - | ||||||
| 2432 | \fn QStyleOptionToolButton::QStyleOptionToolButton(const QStyleOptionToolButton &other) | - | ||||||
| 2433 | - | |||||||
| 2434 | Constructs a copy of the \a other style option. | - | ||||||
| 2435 | */ | - | ||||||
| 2436 | - | |||||||
| 2437 | /*! | - | ||||||
| 2438 | \enum QStyleOptionToolButton::StyleOptionType | - | ||||||
| 2439 | - | |||||||
| 2440 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2441 | is defined for each QStyleOption subclass. | - | ||||||
| 2442 | - | |||||||
| 2443 | \value Type The type of style option provided (\l{SO_ToolButton} for this class). | - | ||||||
| 2444 | - | |||||||
| 2445 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2446 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2447 | general you do not need to worry about this unless you want to | - | ||||||
| 2448 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2449 | - | |||||||
| 2450 | \sa StyleOptionVersion | - | ||||||
| 2451 | */ | - | ||||||
| 2452 | - | |||||||
| 2453 | /*! | - | ||||||
| 2454 | \enum QStyleOptionToolButton::StyleOptionVersion | - | ||||||
| 2455 | - | |||||||
| 2456 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2457 | is defined for each QStyleOption subclass. | - | ||||||
| 2458 | - | |||||||
| 2459 | \value Version 1 | - | ||||||
| 2460 | - | |||||||
| 2461 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2462 | extensions without breaking compatibility. If you use | - | ||||||
| 2463 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2464 | - | |||||||
| 2465 | \sa StyleOptionType | - | ||||||
| 2466 | */ | - | ||||||
| 2467 | - | |||||||
| 2468 | /*! | - | ||||||
| 2469 | \variable QStyleOptionToolButton::features | - | ||||||
| 2470 | \brief an OR combination of the tool button's features | - | ||||||
| 2471 | - | |||||||
| 2472 | The default value is \l None. | - | ||||||
| 2473 | - | |||||||
| 2474 | \sa ToolButtonFeature | - | ||||||
| 2475 | */ | - | ||||||
| 2476 | - | |||||||
| 2477 | /*! | - | ||||||
| 2478 | \variable QStyleOptionToolButton::icon | - | ||||||
| 2479 | \brief the icon for the tool button | - | ||||||
| 2480 | - | |||||||
| 2481 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 2482 | pixmap nor a filename. | - | ||||||
| 2483 | - | |||||||
| 2484 | \sa iconSize | - | ||||||
| 2485 | */ | - | ||||||
| 2486 | - | |||||||
| 2487 | /*! | - | ||||||
| 2488 | \variable QStyleOptionToolButton::iconSize | - | ||||||
| 2489 | \brief the size of the icon for the tool button | - | ||||||
| 2490 | - | |||||||
| 2491 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 2492 | */ | - | ||||||
| 2493 | - | |||||||
| 2494 | /*! | - | ||||||
| 2495 | \variable QStyleOptionToolButton::text | - | ||||||
| 2496 | \brief the text of the tool button | - | ||||||
| 2497 | - | |||||||
| 2498 | This value is only used if toolButtonStyle is | - | ||||||
| 2499 | Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or | - | ||||||
| 2500 | Qt::ToolButtonTextOnly. The default value is an empty string. | - | ||||||
| 2501 | */ | - | ||||||
| 2502 | - | |||||||
| 2503 | /*! | - | ||||||
| 2504 | \variable QStyleOptionToolButton::arrowType | - | ||||||
| 2505 | \brief the direction of the arrow for the tool button | - | ||||||
| 2506 | - | |||||||
| 2507 | This value is only used if \l features includes \l Arrow. The | - | ||||||
| 2508 | default value is Qt::DownArrow. | - | ||||||
| 2509 | */ | - | ||||||
| 2510 | - | |||||||
| 2511 | /*! | - | ||||||
| 2512 | \variable QStyleOptionToolButton::toolButtonStyle | - | ||||||
| 2513 | \brief a Qt::ToolButtonStyle value describing the appearance of | - | ||||||
| 2514 | the tool button | - | ||||||
| 2515 | - | |||||||
| 2516 | The default value is Qt::ToolButtonIconOnly. | - | ||||||
| 2517 | - | |||||||
| 2518 | \sa QToolButton::toolButtonStyle() | - | ||||||
| 2519 | */ | - | ||||||
| 2520 | - | |||||||
| 2521 | /*! | - | ||||||
| 2522 | \variable QStyleOptionToolButton::pos | - | ||||||
| 2523 | \brief the position of the tool button | - | ||||||
| 2524 | - | |||||||
| 2525 | The default value is a null point, i.e. (0, 0) | - | ||||||
| 2526 | */ | - | ||||||
| 2527 | - | |||||||
| 2528 | /*! | - | ||||||
| 2529 | \variable QStyleOptionToolButton::font | - | ||||||
| 2530 | \brief the font that is used for the text | - | ||||||
| 2531 | - | |||||||
| 2532 | This value is only used if toolButtonStyle is | - | ||||||
| 2533 | Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or | - | ||||||
| 2534 | Qt::ToolButtonTextOnly. By default, the application's default font | - | ||||||
| 2535 | is used. | - | ||||||
| 2536 | */ | - | ||||||
| 2537 | - | |||||||
| 2538 | /*! | - | ||||||
| 2539 | \class QStyleOptionComboBox | - | ||||||
| 2540 | \brief The QStyleOptionComboBox class is used to describe the | - | ||||||
| 2541 | parameter for drawing a combobox. | - | ||||||
| 2542 | - | |||||||
| 2543 | \inmodule QtWidgets | - | ||||||
| 2544 | - | |||||||
| 2545 | QStyleOptionButton contains all the information that QStyle | - | ||||||
| 2546 | functions need to draw QComboBox. | - | ||||||
| 2547 | - | |||||||
| 2548 | For performance reasons, the access to the member variables is | - | ||||||
| 2549 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2550 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2551 | these are simply parameters used by the style functions. | - | ||||||
| 2552 | - | |||||||
| 2553 | For an example demonstrating how style options can be used, see | - | ||||||
| 2554 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2555 | - | |||||||
| 2556 | \sa QStyleOption, QStyleOptionComplex, QComboBox | - | ||||||
| 2557 | */ | - | ||||||
| 2558 | - | |||||||
| 2559 | /*! | - | ||||||
| 2560 | Creates a QStyleOptionComboBox, initializing the members variables | - | ||||||
| 2561 | to their default values. | - | ||||||
| 2562 | */ | - | ||||||
| 2563 | - | |||||||
| 2564 | QStyleOptionComboBox::QStyleOptionComboBox() | - | ||||||
| 2565 | : QStyleOptionComplex(Version, SO_ComboBox), editable(false), frame(true) | - | ||||||
| 2566 | { | - | ||||||
| 2567 | } never executed: end of block | 0 | ||||||
| 2568 | - | |||||||
| 2569 | /*! | - | ||||||
| 2570 | \internal | - | ||||||
| 2571 | */ | - | ||||||
| 2572 | QStyleOptionComboBox::QStyleOptionComboBox(int version) | - | ||||||
| 2573 | : QStyleOptionComplex(version, SO_ComboBox), editable(false), frame(true) | - | ||||||
| 2574 | { | - | ||||||
| 2575 | } never executed: end of block | 0 | ||||||
| 2576 | - | |||||||
| 2577 | /*! | - | ||||||
| 2578 | \fn QStyleOptionComboBox::QStyleOptionComboBox(const QStyleOptionComboBox &other) | - | ||||||
| 2579 | - | |||||||
| 2580 | Constructs a copy of the \a other style option. | - | ||||||
| 2581 | */ | - | ||||||
| 2582 | - | |||||||
| 2583 | /*! | - | ||||||
| 2584 | \enum QStyleOptionComboBox::StyleOptionType | - | ||||||
| 2585 | - | |||||||
| 2586 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2587 | is defined for each QStyleOption subclass. | - | ||||||
| 2588 | - | |||||||
| 2589 | \value Type The type of style option provided (\l{SO_ComboBox} for this class). | - | ||||||
| 2590 | - | |||||||
| 2591 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2592 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2593 | general you do not need to worry about this unless you want to | - | ||||||
| 2594 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2595 | - | |||||||
| 2596 | \sa StyleOptionVersion | - | ||||||
| 2597 | */ | - | ||||||
| 2598 | - | |||||||
| 2599 | /*! | - | ||||||
| 2600 | \enum QStyleOptionComboBox::StyleOptionVersion | - | ||||||
| 2601 | - | |||||||
| 2602 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2603 | is defined for each QStyleOption subclass. | - | ||||||
| 2604 | - | |||||||
| 2605 | \value Version 1 | - | ||||||
| 2606 | - | |||||||
| 2607 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2608 | extensions without breaking compatibility. If you use | - | ||||||
| 2609 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2610 | - | |||||||
| 2611 | \sa StyleOptionType | - | ||||||
| 2612 | */ | - | ||||||
| 2613 | - | |||||||
| 2614 | /*! | - | ||||||
| 2615 | \variable QStyleOptionComboBox::editable | - | ||||||
| 2616 | \brief whether or not the combobox is editable or not | - | ||||||
| 2617 | - | |||||||
| 2618 | the default | - | ||||||
| 2619 | value is false | - | ||||||
| 2620 | - | |||||||
| 2621 | \sa QComboBox::isEditable() | - | ||||||
| 2622 | */ | - | ||||||
| 2623 | - | |||||||
| 2624 | - | |||||||
| 2625 | /*! | - | ||||||
| 2626 | \variable QStyleOptionComboBox::frame | - | ||||||
| 2627 | \brief whether the combo box has a frame | - | ||||||
| 2628 | - | |||||||
| 2629 | The default value is true. | - | ||||||
| 2630 | */ | - | ||||||
| 2631 | - | |||||||
| 2632 | /*! | - | ||||||
| 2633 | \variable QStyleOptionComboBox::currentText | - | ||||||
| 2634 | \brief the text for the current item of the combo box | - | ||||||
| 2635 | - | |||||||
| 2636 | The default value is an empty string. | - | ||||||
| 2637 | */ | - | ||||||
| 2638 | - | |||||||
| 2639 | /*! | - | ||||||
| 2640 | \variable QStyleOptionComboBox::currentIcon | - | ||||||
| 2641 | \brief the icon for the current item of the combo box | - | ||||||
| 2642 | - | |||||||
| 2643 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 2644 | pixmap nor a filename. | - | ||||||
| 2645 | */ | - | ||||||
| 2646 | - | |||||||
| 2647 | /*! | - | ||||||
| 2648 | \variable QStyleOptionComboBox::iconSize | - | ||||||
| 2649 | \brief the icon size for the current item of the combo box | - | ||||||
| 2650 | - | |||||||
| 2651 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 2652 | */ | - | ||||||
| 2653 | - | |||||||
| 2654 | /*! | - | ||||||
| 2655 | \variable QStyleOptionComboBox::popupRect | - | ||||||
| 2656 | \brief the popup rectangle for the combobox | - | ||||||
| 2657 | - | |||||||
| 2658 | The default value is a null rectangle, i.e. a rectangle with both | - | ||||||
| 2659 | the width and the height set to 0. | - | ||||||
| 2660 | - | |||||||
| 2661 | This variable is currently unused. You can safely ignore it. | - | ||||||
| 2662 | - | |||||||
| 2663 | \sa QStyle::SC_ComboBoxListBoxPopup | - | ||||||
| 2664 | */ | - | ||||||
| 2665 | - | |||||||
| 2666 | /*! | - | ||||||
| 2667 | \class QStyleOptionToolBox | - | ||||||
| 2668 | \brief The QStyleOptionToolBox class is used to describe the | - | ||||||
| 2669 | parameters needed for drawing a tool box. | - | ||||||
| 2670 | - | |||||||
| 2671 | \inmodule QtWidgets | - | ||||||
| 2672 | - | |||||||
| 2673 | QStyleOptionToolBox contains all the information that QStyle | - | ||||||
| 2674 | functions need to draw QToolBox. | - | ||||||
| 2675 | - | |||||||
| 2676 | For performance reasons, the access to the member variables is | - | ||||||
| 2677 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2678 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2679 | these are simply parameters used by the style functions. | - | ||||||
| 2680 | - | |||||||
| 2681 | For an example demonstrating how style options can be used, see | - | ||||||
| 2682 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2683 | - | |||||||
| 2684 | \sa QStyleOption, QToolBox | - | ||||||
| 2685 | */ | - | ||||||
| 2686 | - | |||||||
| 2687 | /*! | - | ||||||
| 2688 | \typedef QStyleOptionToolBoxV2 | - | ||||||
| 2689 | \relates QStyleOptionToolBox | - | ||||||
| 2690 | \obsolete | - | ||||||
| 2691 | - | |||||||
| 2692 | Synonym for QStyleOptionToolBox. | - | ||||||
| 2693 | */ | - | ||||||
| 2694 | - | |||||||
| 2695 | /*! | - | ||||||
| 2696 | Creates a QStyleOptionToolBox, initializing the members variables | - | ||||||
| 2697 | to their default values. | - | ||||||
| 2698 | */ | - | ||||||
| 2699 | - | |||||||
| 2700 | QStyleOptionToolBox::QStyleOptionToolBox() | - | ||||||
| 2701 | : QStyleOption(Version, SO_ToolBox), position(Beginning), selectedPosition(NotAdjacent) | - | ||||||
| 2702 | { | - | ||||||
| 2703 | } never executed: end of block | 0 | ||||||
| 2704 | - | |||||||
| 2705 | /*! | - | ||||||
| 2706 | \internal | - | ||||||
| 2707 | */ | - | ||||||
| 2708 | QStyleOptionToolBox::QStyleOptionToolBox(int version) | - | ||||||
| 2709 | : QStyleOption(version, SO_ToolBox), position(Beginning), selectedPosition(NotAdjacent) | - | ||||||
| 2710 | { | - | ||||||
| 2711 | } never executed: end of block | 0 | ||||||
| 2712 | - | |||||||
| 2713 | /*! | - | ||||||
| 2714 | \fn QStyleOptionToolBox::QStyleOptionToolBox(const QStyleOptionToolBox &other) | - | ||||||
| 2715 | - | |||||||
| 2716 | Constructs a copy of the \a other style option. | - | ||||||
| 2717 | */ | - | ||||||
| 2718 | - | |||||||
| 2719 | /*! | - | ||||||
| 2720 | \enum QStyleOptionToolBox::StyleOptionType | - | ||||||
| 2721 | - | |||||||
| 2722 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2723 | is defined for each QStyleOption subclass. | - | ||||||
| 2724 | - | |||||||
| 2725 | \value Type The type of style option provided (\l{SO_ToolBox} for this class). | - | ||||||
| 2726 | - | |||||||
| 2727 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2728 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2729 | general you do not need to worry about this unless you want to | - | ||||||
| 2730 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2731 | - | |||||||
| 2732 | \sa StyleOptionVersion | - | ||||||
| 2733 | */ | - | ||||||
| 2734 | - | |||||||
| 2735 | /*! | - | ||||||
| 2736 | \enum QStyleOptionToolBox::StyleOptionVersion | - | ||||||
| 2737 | - | |||||||
| 2738 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2739 | is defined for each QStyleOption subclass. | - | ||||||
| 2740 | - | |||||||
| 2741 | \value Version 2 | - | ||||||
| 2742 | - | |||||||
| 2743 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2744 | extensions without breaking compatibility. If you use | - | ||||||
| 2745 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2746 | - | |||||||
| 2747 | \sa StyleOptionType | - | ||||||
| 2748 | */ | - | ||||||
| 2749 | - | |||||||
| 2750 | /*! | - | ||||||
| 2751 | \variable QStyleOptionToolBox::icon | - | ||||||
| 2752 | \brief the icon for the tool box tab | - | ||||||
| 2753 | - | |||||||
| 2754 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 2755 | pixmap nor a filename. | - | ||||||
| 2756 | */ | - | ||||||
| 2757 | - | |||||||
| 2758 | /*! | - | ||||||
| 2759 | \variable QStyleOptionToolBox::text | - | ||||||
| 2760 | \brief the text for the tool box tab | - | ||||||
| 2761 | - | |||||||
| 2762 | The default value is an empty string. | - | ||||||
| 2763 | */ | - | ||||||
| 2764 | - | |||||||
| 2765 | /*! | - | ||||||
| 2766 | \enum QStyleOptionToolBox::SelectedPosition | - | ||||||
| 2767 | - | |||||||
| 2768 | This enum describes the position of the selected tab. Some styles | - | ||||||
| 2769 | need to draw a tab differently depending on whether or not it is | - | ||||||
| 2770 | adjacent to the selected tab. | - | ||||||
| 2771 | - | |||||||
| 2772 | \value NotAdjacent The tab is not adjacent to a selected tab (or is the selected tab). | - | ||||||
| 2773 | \value NextIsSelected The next tab (typically the tab on the right) is selected. | - | ||||||
| 2774 | \value PreviousIsSelected The previous tab (typically the tab on the left) is selected. | - | ||||||
| 2775 | - | |||||||
| 2776 | \sa selectedPosition | - | ||||||
| 2777 | */ | - | ||||||
| 2778 | - | |||||||
| 2779 | /*! | - | ||||||
| 2780 | \enum QStyleOptionToolBox::TabPosition | - | ||||||
| 2781 | - | |||||||
| 2782 | This enum describes tab positions relative to other tabs. | - | ||||||
| 2783 | - | |||||||
| 2784 | \value Beginning The tab is the first (i.e., top-most) tab in | - | ||||||
| 2785 | the toolbox. | - | ||||||
| 2786 | \value Middle The tab is placed in the middle of the toolbox. | - | ||||||
| 2787 | \value End The tab is placed at the bottom of the toolbox. | - | ||||||
| 2788 | \value OnlyOneTab There is only one tab in the toolbox. | - | ||||||
| 2789 | */ | - | ||||||
| 2790 | - | |||||||
| 2791 | /*! | - | ||||||
| 2792 | \variable QStyleOptionToolBox::selectedPosition | - | ||||||
| 2793 | \brief the position of the selected tab in relation to this tab | - | ||||||
| 2794 | - | |||||||
| 2795 | The default value is NotAdjacent, i.e. the tab is not adjacent to | - | ||||||
| 2796 | a selected tab nor is it the selected tab. | - | ||||||
| 2797 | */ | - | ||||||
| 2798 | - | |||||||
| 2799 | #ifndef QT_NO_RUBBERBAND | - | ||||||
| 2800 | /*! | - | ||||||
| 2801 | \class QStyleOptionRubberBand | - | ||||||
| 2802 | \brief The QStyleOptionRubberBand class is used to describe the | - | ||||||
| 2803 | parameters needed for drawing a rubber band. | - | ||||||
| 2804 | - | |||||||
| 2805 | \inmodule QtWidgets | - | ||||||
| 2806 | - | |||||||
| 2807 | QStyleOptionRubberBand contains all the information that | - | ||||||
| 2808 | QStyle functions need to draw QRubberBand. | - | ||||||
| 2809 | - | |||||||
| 2810 | For performance reasons, the access to the member variables is | - | ||||||
| 2811 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2812 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2813 | these are simply parameters used by the style functions. | - | ||||||
| 2814 | - | |||||||
| 2815 | For an example demonstrating how style options can be used, see | - | ||||||
| 2816 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2817 | - | |||||||
| 2818 | \sa QStyleOption, QRubberBand | - | ||||||
| 2819 | */ | - | ||||||
| 2820 | - | |||||||
| 2821 | /*! | - | ||||||
| 2822 | Creates a QStyleOptionRubberBand, initializing the members | - | ||||||
| 2823 | variables to their default values. | - | ||||||
| 2824 | */ | - | ||||||
| 2825 | - | |||||||
| 2826 | QStyleOptionRubberBand::QStyleOptionRubberBand() | - | ||||||
| 2827 | : QStyleOption(Version, SO_RubberBand), shape(QRubberBand::Line), opaque(false) | - | ||||||
| 2828 | { | - | ||||||
| 2829 | } never executed: end of block | 0 | ||||||
| 2830 | - | |||||||
| 2831 | /*! | - | ||||||
| 2832 | \internal | - | ||||||
| 2833 | */ | - | ||||||
| 2834 | QStyleOptionRubberBand::QStyleOptionRubberBand(int version) | - | ||||||
| 2835 | : QStyleOption(version, SO_RubberBand), shape(QRubberBand::Line), opaque(false) | - | ||||||
| 2836 | { | - | ||||||
| 2837 | } never executed: end of block | 0 | ||||||
| 2838 | - | |||||||
| 2839 | /*! | - | ||||||
| 2840 | \fn QStyleOptionRubberBand::QStyleOptionRubberBand(const QStyleOptionRubberBand &other) | - | ||||||
| 2841 | - | |||||||
| 2842 | Constructs a copy of the \a other style option. | - | ||||||
| 2843 | */ | - | ||||||
| 2844 | - | |||||||
| 2845 | /*! | - | ||||||
| 2846 | \enum QStyleOptionRubberBand::StyleOptionType | - | ||||||
| 2847 | - | |||||||
| 2848 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2849 | is defined for each QStyleOption subclass. | - | ||||||
| 2850 | - | |||||||
| 2851 | \value Type The type of style option provided (\l{SO_RubberBand} for this class). | - | ||||||
| 2852 | - | |||||||
| 2853 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2854 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2855 | general you do not need to worry about this unless you want to | - | ||||||
| 2856 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2857 | - | |||||||
| 2858 | \sa StyleOptionVersion | - | ||||||
| 2859 | */ | - | ||||||
| 2860 | - | |||||||
| 2861 | /*! | - | ||||||
| 2862 | \enum QStyleOptionRubberBand::StyleOptionVersion | - | ||||||
| 2863 | - | |||||||
| 2864 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2865 | is defined for each QStyleOption subclass. | - | ||||||
| 2866 | - | |||||||
| 2867 | \value Version 1 | - | ||||||
| 2868 | - | |||||||
| 2869 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2870 | extensions without breaking compatibility. If you use | - | ||||||
| 2871 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2872 | - | |||||||
| 2873 | \sa StyleOptionType | - | ||||||
| 2874 | */ | - | ||||||
| 2875 | - | |||||||
| 2876 | /*! | - | ||||||
| 2877 | \variable QStyleOptionRubberBand::shape | - | ||||||
| 2878 | \brief the shape of the rubber band | - | ||||||
| 2879 | - | |||||||
| 2880 | The default shape is QRubberBand::Line. | - | ||||||
| 2881 | */ | - | ||||||
| 2882 | - | |||||||
| 2883 | /*! | - | ||||||
| 2884 | \variable QStyleOptionRubberBand::opaque | - | ||||||
| 2885 | \brief whether the rubber band is required to be drawn in an opaque style | - | ||||||
| 2886 | - | |||||||
| 2887 | The default value is true. | - | ||||||
| 2888 | */ | - | ||||||
| 2889 | #endif // QT_NO_RUBBERBAND | - | ||||||
| 2890 | - | |||||||
| 2891 | /*! | - | ||||||
| 2892 | \class QStyleOptionTitleBar | - | ||||||
| 2893 | \brief The QStyleOptionTitleBar class is used to describe the | - | ||||||
| 2894 | parameters for drawing a title bar. | - | ||||||
| 2895 | - | |||||||
| 2896 | \inmodule QtWidgets | - | ||||||
| 2897 | - | |||||||
| 2898 | QStyleOptionTitleBar contains all the information that QStyle | - | ||||||
| 2899 | functions need to draw the title bar of a QMdiSubWindow. | - | ||||||
| 2900 | - | |||||||
| 2901 | For performance reasons, the access to the member variables is | - | ||||||
| 2902 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 2903 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 2904 | these are simply parameters used by the style functions. | - | ||||||
| 2905 | - | |||||||
| 2906 | For an example demonstrating how style options can be used, see | - | ||||||
| 2907 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 2908 | - | |||||||
| 2909 | \sa QStyleOption, QStyleOptionComplex, QMdiSubWindow | - | ||||||
| 2910 | */ | - | ||||||
| 2911 | - | |||||||
| 2912 | /*! | - | ||||||
| 2913 | Constructs a QStyleOptionTitleBar, initializing the members | - | ||||||
| 2914 | variables to their default values. | - | ||||||
| 2915 | */ | - | ||||||
| 2916 | - | |||||||
| 2917 | QStyleOptionTitleBar::QStyleOptionTitleBar() | - | ||||||
| 2918 | : QStyleOptionComplex(Version, SO_TitleBar), titleBarState(0), titleBarFlags(0) | - | ||||||
| 2919 | { | - | ||||||
| 2920 | } never executed: end of block | 0 | ||||||
| 2921 | - | |||||||
| 2922 | /*! | - | ||||||
| 2923 | \fn QStyleOptionTitleBar::QStyleOptionTitleBar(const QStyleOptionTitleBar &other) | - | ||||||
| 2924 | - | |||||||
| 2925 | Constructs a copy of the \a other style option. | - | ||||||
| 2926 | */ | - | ||||||
| 2927 | - | |||||||
| 2928 | /*! | - | ||||||
| 2929 | \enum QStyleOptionTitleBar::StyleOptionType | - | ||||||
| 2930 | - | |||||||
| 2931 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 2932 | is defined for each QStyleOption subclass. | - | ||||||
| 2933 | - | |||||||
| 2934 | \value Type The type of style option provided (\l{SO_TitleBar} for this class). | - | ||||||
| 2935 | - | |||||||
| 2936 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 2937 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 2938 | general you do not need to worry about this unless you want to | - | ||||||
| 2939 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 2940 | - | |||||||
| 2941 | \sa StyleOptionVersion | - | ||||||
| 2942 | */ | - | ||||||
| 2943 | - | |||||||
| 2944 | /*! | - | ||||||
| 2945 | \enum QStyleOptionTitleBar::StyleOptionVersion | - | ||||||
| 2946 | - | |||||||
| 2947 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 2948 | is defined for each QStyleOption subclass. | - | ||||||
| 2949 | - | |||||||
| 2950 | \value Version 1 | - | ||||||
| 2951 | - | |||||||
| 2952 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 2953 | extensions without breaking compatibility. If you use | - | ||||||
| 2954 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 2955 | - | |||||||
| 2956 | \sa StyleOptionType | - | ||||||
| 2957 | */ | - | ||||||
| 2958 | - | |||||||
| 2959 | /*! | - | ||||||
| 2960 | \internal | - | ||||||
| 2961 | */ | - | ||||||
| 2962 | QStyleOptionTitleBar::QStyleOptionTitleBar(int version) | - | ||||||
| 2963 | : QStyleOptionComplex(version, SO_TitleBar), titleBarState(0), titleBarFlags(0) | - | ||||||
| 2964 | { | - | ||||||
| 2965 | } never executed: end of block | 0 | ||||||
| 2966 | - | |||||||
| 2967 | - | |||||||
| 2968 | /*! | - | ||||||
| 2969 | \variable QStyleOptionTitleBar::text | - | ||||||
| 2970 | \brief the text of the title bar | - | ||||||
| 2971 | - | |||||||
| 2972 | The default value is an empty string. | - | ||||||
| 2973 | */ | - | ||||||
| 2974 | - | |||||||
| 2975 | /*! | - | ||||||
| 2976 | \variable QStyleOptionTitleBar::icon | - | ||||||
| 2977 | \brief the icon for the title bar | - | ||||||
| 2978 | - | |||||||
| 2979 | The default value is an empty icon, i.e. an icon with neither a | - | ||||||
| 2980 | pixmap nor a filename. | - | ||||||
| 2981 | */ | - | ||||||
| 2982 | - | |||||||
| 2983 | /*! | - | ||||||
| 2984 | \variable QStyleOptionTitleBar::titleBarState | - | ||||||
| 2985 | \brief the state of the title bar | - | ||||||
| 2986 | - | |||||||
| 2987 | This is basically the window state of the underlying widget. The | - | ||||||
| 2988 | default value is 0. | - | ||||||
| 2989 | - | |||||||
| 2990 | \sa QWidget::windowState() | - | ||||||
| 2991 | */ | - | ||||||
| 2992 | - | |||||||
| 2993 | /*! | - | ||||||
| 2994 | \variable QStyleOptionTitleBar::titleBarFlags | - | ||||||
| 2995 | \brief the widget flags for the title bar | - | ||||||
| 2996 | - | |||||||
| 2997 | The default value is Qt::Widget. | - | ||||||
| 2998 | - | |||||||
| 2999 | \sa Qt::WindowFlags | - | ||||||
| 3000 | */ | - | ||||||
| 3001 | - | |||||||
| 3002 | #ifndef QT_NO_ITEMVIEWS | - | ||||||
| 3003 | /*! | - | ||||||
| 3004 | \class QStyleOptionViewItem | - | ||||||
| 3005 | \brief The QStyleOptionViewItem class is used to describe the | - | ||||||
| 3006 | parameters used to draw an item in a view widget. | - | ||||||
| 3007 | - | |||||||
| 3008 | \inmodule QtWidgets | - | ||||||
| 3009 | - | |||||||
| 3010 | QStyleOptionViewItem contains all the information that QStyle | - | ||||||
| 3011 | functions need to draw the items for Qt's model/view classes. | - | ||||||
| 3012 | - | |||||||
| 3013 | For performance reasons, the access to the member variables is | - | ||||||
| 3014 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 3015 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 3016 | these are simply parameters used by the style functions. | - | ||||||
| 3017 | - | |||||||
| 3018 | For an example demonstrating how style options can be used, see | - | ||||||
| 3019 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 3020 | - | |||||||
| 3021 | \sa QStyleOption, {model-view-programming.html}{Model/View | - | ||||||
| 3022 | Programming} | - | ||||||
| 3023 | */ | - | ||||||
| 3024 | - | |||||||
| 3025 | /*! | - | ||||||
| 3026 | \typedef QStyleOptionViewItemV2 | - | ||||||
| 3027 | \relates QStyleOptionViewItem | - | ||||||
| 3028 | \obsolete | - | ||||||
| 3029 | - | |||||||
| 3030 | Synonym for QStyleOptionViewItem. | - | ||||||
| 3031 | */ | - | ||||||
| 3032 | - | |||||||
| 3033 | /*! | - | ||||||
| 3034 | \typedef QStyleOptionViewItemV3 | - | ||||||
| 3035 | \relates QStyleOptionViewItem | - | ||||||
| 3036 | \obsolete | - | ||||||
| 3037 | - | |||||||
| 3038 | Synonym for QStyleOptionViewItem. | - | ||||||
| 3039 | */ | - | ||||||
| 3040 | - | |||||||
| 3041 | /*! | - | ||||||
| 3042 | \typedef QStyleOptionViewItemV4 | - | ||||||
| 3043 | \relates QStyleOptionViewItem | - | ||||||
| 3044 | \obsolete | - | ||||||
| 3045 | - | |||||||
| 3046 | Synonym for QStyleOptionViewItem. | - | ||||||
| 3047 | */ | - | ||||||
| 3048 | - | |||||||
| 3049 | /*! | - | ||||||
| 3050 | \enum QStyleOptionViewItem::Position | - | ||||||
| 3051 | - | |||||||
| 3052 | This enum describes the position of the item's decoration. | - | ||||||
| 3053 | - | |||||||
| 3054 | \value Left On the left of the text. | - | ||||||
| 3055 | \value Right On the right of the text. | - | ||||||
| 3056 | \value Top Above the text. | - | ||||||
| 3057 | \value Bottom Below the text. | - | ||||||
| 3058 | - | |||||||
| 3059 | \sa decorationPosition | - | ||||||
| 3060 | */ | - | ||||||
| 3061 | - | |||||||
| 3062 | /*! | - | ||||||
| 3063 | \variable QStyleOptionViewItem::showDecorationSelected | - | ||||||
| 3064 | \brief whether the decoration should be highlighted on selected | - | ||||||
| 3065 | items | - | ||||||
| 3066 | - | |||||||
| 3067 | If this option is true, the branch and any decorations on selected items | - | ||||||
| 3068 | should be highlighted, indicating that the item is selected; otherwise, no | - | ||||||
| 3069 | highlighting is required. The default value is false. | - | ||||||
| 3070 | - | |||||||
| 3071 | \sa QStyle::SH_ItemView_ShowDecorationSelected, QAbstractItemView | - | ||||||
| 3072 | */ | - | ||||||
| 3073 | - | |||||||
| 3074 | /*! | - | ||||||
| 3075 | \variable QStyleOptionViewItem::textElideMode | - | ||||||
| 3076 | \brief where ellipsis should be added for text that is too long to fit | - | ||||||
| 3077 | into an item | - | ||||||
| 3078 | - | |||||||
| 3079 | The default value is Qt::ElideMiddle, i.e. the ellipsis appears in | - | ||||||
| 3080 | the middle of the text. | - | ||||||
| 3081 | - | |||||||
| 3082 | \sa Qt::TextElideMode, QStyle::SH_ItemView_EllipsisLocation | - | ||||||
| 3083 | */ | - | ||||||
| 3084 | - | |||||||
| 3085 | /*! | - | ||||||
| 3086 | Constructs a QStyleOptionViewItem, initializing the members | - | ||||||
| 3087 | variables to their default values. | - | ||||||
| 3088 | */ | - | ||||||
| 3089 | - | |||||||
| 3090 | QStyleOptionViewItem::QStyleOptionViewItem() | - | ||||||
| 3091 | : QStyleOption(Version, SO_ViewItem), | - | ||||||
| 3092 | displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft), | - | ||||||
| 3093 | textElideMode(Qt::ElideMiddle), decorationPosition(Left), | - | ||||||
| 3094 | showDecorationSelected(false), features(None), widget(0), | - | ||||||
| 3095 | checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid) | - | ||||||
| 3096 | { | - | ||||||
| 3097 | } never executed: end of block | 0 | ||||||
| 3098 | - | |||||||
| 3099 | /*! | - | ||||||
| 3100 | \internal | - | ||||||
| 3101 | */ | - | ||||||
| 3102 | QStyleOptionViewItem::QStyleOptionViewItem(int version) | - | ||||||
| 3103 | : QStyleOption(version, SO_ViewItem), | - | ||||||
| 3104 | displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft), | - | ||||||
| 3105 | textElideMode(Qt::ElideMiddle), decorationPosition(Left), | - | ||||||
| 3106 | showDecorationSelected(false), features(None), widget(0), | - | ||||||
| 3107 | checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid) | - | ||||||
| 3108 | { | - | ||||||
| 3109 | } never executed: end of block | 0 | ||||||
| 3110 | - | |||||||
| 3111 | /*! | - | ||||||
| 3112 | \fn QStyleOptionViewItem::QStyleOptionViewItem(const QStyleOptionViewItem &other) | - | ||||||
| 3113 | - | |||||||
| 3114 | Constructs a copy of the \a other style option. | - | ||||||
| 3115 | */ | - | ||||||
| 3116 | - | |||||||
| 3117 | /*! | - | ||||||
| 3118 | \enum QStyleOptionViewItem::StyleOptionType | - | ||||||
| 3119 | - | |||||||
| 3120 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3121 | is defined for each QStyleOption subclass. | - | ||||||
| 3122 | - | |||||||
| 3123 | \value Type The type of style option provided (\l{SO_ViewItem} for this class). | - | ||||||
| 3124 | - | |||||||
| 3125 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 3126 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3127 | general you do not need to worry about this unless you want to | - | ||||||
| 3128 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 3129 | - | |||||||
| 3130 | \sa StyleOptionVersion | - | ||||||
| 3131 | */ | - | ||||||
| 3132 | - | |||||||
| 3133 | /*! | - | ||||||
| 3134 | \enum QStyleOptionViewItem::StyleOptionVersion | - | ||||||
| 3135 | - | |||||||
| 3136 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3137 | is defined for each QStyleOption subclass. | - | ||||||
| 3138 | - | |||||||
| 3139 | \value Version 4 | - | ||||||
| 3140 | - | |||||||
| 3141 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 3142 | extensions without breaking compatibility. If you use | - | ||||||
| 3143 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3144 | - | |||||||
| 3145 | \sa StyleOptionType | - | ||||||
| 3146 | */ | - | ||||||
| 3147 | - | |||||||
| 3148 | /*! | - | ||||||
| 3149 | \variable QStyleOptionViewItem::displayAlignment | - | ||||||
| 3150 | \brief the alignment of the display value for the item | - | ||||||
| 3151 | - | |||||||
| 3152 | The default value is Qt::AlignLeft. | - | ||||||
| 3153 | */ | - | ||||||
| 3154 | - | |||||||
| 3155 | /*! | - | ||||||
| 3156 | \variable QStyleOptionViewItem::decorationAlignment | - | ||||||
| 3157 | \brief the alignment of the decoration for the item | - | ||||||
| 3158 | - | |||||||
| 3159 | The default value is Qt::AlignLeft. | - | ||||||
| 3160 | */ | - | ||||||
| 3161 | - | |||||||
| 3162 | /*! | - | ||||||
| 3163 | \variable QStyleOptionViewItem::decorationPosition | - | ||||||
| 3164 | \brief the position of the decoration for the item | - | ||||||
| 3165 | - | |||||||
| 3166 | The default value is \l Left. | - | ||||||
| 3167 | - | |||||||
| 3168 | \sa Position | - | ||||||
| 3169 | */ | - | ||||||
| 3170 | - | |||||||
| 3171 | /*! | - | ||||||
| 3172 | \variable QStyleOptionViewItem::decorationSize | - | ||||||
| 3173 | \brief the size of the decoration for the item | - | ||||||
| 3174 | - | |||||||
| 3175 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 3176 | - | |||||||
| 3177 | \sa decorationAlignment, decorationPosition | - | ||||||
| 3178 | */ | - | ||||||
| 3179 | - | |||||||
| 3180 | /*! | - | ||||||
| 3181 | \variable QStyleOptionViewItem::font | - | ||||||
| 3182 | \brief the font used for the item | - | ||||||
| 3183 | - | |||||||
| 3184 | By default, the application's default font is used. | - | ||||||
| 3185 | - | |||||||
| 3186 | \sa QFont | - | ||||||
| 3187 | */ | - | ||||||
| 3188 | - | |||||||
| 3189 | /*! | - | ||||||
| 3190 | \variable QStyleOptionViewItem::features | - | ||||||
| 3191 | \brief a bitwise OR of the features that describe this view item | - | ||||||
| 3192 | - | |||||||
| 3193 | \sa ViewItemFeature | - | ||||||
| 3194 | */ | - | ||||||
| 3195 | - | |||||||
| 3196 | /*! | - | ||||||
| 3197 | \enum QStyleOptionViewItem::ViewItemFeature | - | ||||||
| 3198 | - | |||||||
| 3199 | This enum describes the different types of features an item can have. | - | ||||||
| 3200 | - | |||||||
| 3201 | \value None Indicates a normal item. | - | ||||||
| 3202 | \value WrapText Indicates an item with wrapped text. | - | ||||||
| 3203 | \value Alternate Indicates that the item's background is rendered using alternateBase. | - | ||||||
| 3204 | \value HasCheckIndicator Indicates that the item has a check state indicator. | - | ||||||
| 3205 | \value HasDisplay Indicates that the item has a display role. | - | ||||||
| 3206 | \value HasDecoration Indicates that the item has a decoration role. | - | ||||||
| 3207 | */ | - | ||||||
| 3208 | - | |||||||
| 3209 | /*! | - | ||||||
| 3210 | \variable QStyleOptionViewItem::index | - | ||||||
| 3211 | - | |||||||
| 3212 | The model index that is to be drawn. | - | ||||||
| 3213 | */ | - | ||||||
| 3214 | - | |||||||
| 3215 | /*! | - | ||||||
| 3216 | \variable QStyleOptionViewItem::checkState | - | ||||||
| 3217 | - | |||||||
| 3218 | If this view item is checkable, i.e., | - | ||||||
| 3219 | ViewItemFeature::HasCheckIndicator is true, \c checkState is true | - | ||||||
| 3220 | if the item is checked; otherwise, it is false. | - | ||||||
| 3221 | - | |||||||
| 3222 | */ | - | ||||||
| 3223 | - | |||||||
| 3224 | /*! | - | ||||||
| 3225 | \variable QStyleOptionViewItem::icon | - | ||||||
| 3226 | - | |||||||
| 3227 | The icon (if any) to be drawn in the view item. | - | ||||||
| 3228 | */ | - | ||||||
| 3229 | - | |||||||
| 3230 | - | |||||||
| 3231 | /*! | - | ||||||
| 3232 | \variable QStyleOptionViewItem::text | - | ||||||
| 3233 | - | |||||||
| 3234 | The text (if any) to be drawn in the view item. | - | ||||||
| 3235 | */ | - | ||||||
| 3236 | - | |||||||
| 3237 | /*! | - | ||||||
| 3238 | \variable QStyleOptionViewItem::backgroundBrush | - | ||||||
| 3239 | - | |||||||
| 3240 | The QBrush that should be used to paint the view items | - | ||||||
| 3241 | background. | - | ||||||
| 3242 | */ | - | ||||||
| 3243 | - | |||||||
| 3244 | /*! | - | ||||||
| 3245 | \variable QStyleOptionViewItem::viewItemPosition | - | ||||||
| 3246 | - | |||||||
| 3247 | Gives the position of this view item relative to other items. See | - | ||||||
| 3248 | the \l{QStyleOptionViewItem::}{ViewItemPosition} enum for the | - | ||||||
| 3249 | details. | - | ||||||
| 3250 | */ | - | ||||||
| 3251 | - | |||||||
| 3252 | /*! | - | ||||||
| 3253 | \enum QStyleOptionViewItem::ViewItemPosition | - | ||||||
| 3254 | - | |||||||
| 3255 | This enum is used to represent the placement of the item on | - | ||||||
| 3256 | a row. This can be used to draw items differently depending | - | ||||||
| 3257 | on their placement, for example by putting rounded edges at | - | ||||||
| 3258 | the beginning and end, and straight edges in between. | - | ||||||
| 3259 | - | |||||||
| 3260 | \value Invalid The ViewItemPosition is unknown and should be | - | ||||||
| 3261 | disregarded. | - | ||||||
| 3262 | \value Beginning The item appears at the beginning of the row. | - | ||||||
| 3263 | \value Middle The item appears in the middle of the row. | - | ||||||
| 3264 | \value End The item appears at the end of the row. | - | ||||||
| 3265 | \value OnlyOne The item is the only one on the row, and is | - | ||||||
| 3266 | therefore both at the beginning and the end. | - | ||||||
| 3267 | */ | - | ||||||
| 3268 | - | |||||||
| 3269 | #endif // QT_NO_ITEMVIEWS | - | ||||||
| 3270 | /*! | - | ||||||
| 3271 | \fn T qstyleoption_cast<T>(const QStyleOption *option) | - | ||||||
| 3272 | \relates QStyleOption | - | ||||||
| 3273 | - | |||||||
| 3274 | Returns a T or 0 depending on the \l{QStyleOption::type}{type} and | - | ||||||
| 3275 | \l{QStyleOption::version}{version} of the given \a option. | - | ||||||
| 3276 | - | |||||||
| 3277 | Example: | - | ||||||
| 3278 | - | |||||||
| 3279 | \snippet qstyleoption/main.cpp 4 | - | ||||||
| 3280 | - | |||||||
| 3281 | \sa QStyleOption::type, QStyleOption::version | - | ||||||
| 3282 | */ | - | ||||||
| 3283 | - | |||||||
| 3284 | /*! | - | ||||||
| 3285 | \fn T qstyleoption_cast<T>(QStyleOption *option) | - | ||||||
| 3286 | \overload | - | ||||||
| 3287 | \relates QStyleOption | - | ||||||
| 3288 | - | |||||||
| 3289 | Returns a T or 0 depending on the type of the given \a option. | - | ||||||
| 3290 | */ | - | ||||||
| 3291 | - | |||||||
| 3292 | #ifndef QT_NO_TABWIDGET | - | ||||||
| 3293 | /*! | - | ||||||
| 3294 | \class QStyleOptionTabWidgetFrame | - | ||||||
| 3295 | \brief The QStyleOptionTabWidgetFrame class is used to describe the | - | ||||||
| 3296 | parameters for drawing the frame around a tab widget. | - | ||||||
| 3297 | - | |||||||
| 3298 | \inmodule QtWidgets | - | ||||||
| 3299 | - | |||||||
| 3300 | QStyleOptionTabWidgetFrame contains all the information that | - | ||||||
| 3301 | QStyle functions need to draw the frame around QTabWidget. | - | ||||||
| 3302 | - | |||||||
| 3303 | For performance reasons, the access to the member variables is | - | ||||||
| 3304 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 3305 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 3306 | these are simply parameters used by the style functions. | - | ||||||
| 3307 | - | |||||||
| 3308 | For an example demonstrating how style options can be used, see | - | ||||||
| 3309 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 3310 | - | |||||||
| 3311 | \sa QStyleOption, QTabWidget | - | ||||||
| 3312 | */ | - | ||||||
| 3313 | - | |||||||
| 3314 | /*! | - | ||||||
| 3315 | \typedef QStyleOptionTabWidgetFrameV2 | - | ||||||
| 3316 | \relates QStyleOptionTabWidgetFrame | - | ||||||
| 3317 | \obsolete | - | ||||||
| 3318 | - | |||||||
| 3319 | Synonym for QStyleOptionTabWidgetFrame. | - | ||||||
| 3320 | */ | - | ||||||
| 3321 | - | |||||||
| 3322 | /*! | - | ||||||
| 3323 | Constructs a QStyleOptionTabWidgetFrame, initializing the members | - | ||||||
| 3324 | variables to their default values. | - | ||||||
| 3325 | */ | - | ||||||
| 3326 | QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame() | - | ||||||
| 3327 | : QStyleOption(Version, SO_TabWidgetFrame), lineWidth(0), midLineWidth(0), | - | ||||||
| 3328 | shape(QTabBar::RoundedNorth) | - | ||||||
| 3329 | { | - | ||||||
| 3330 | } never executed: end of block | 0 | ||||||
| 3331 | - | |||||||
| 3332 | /*! | - | ||||||
| 3333 | \fn QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other) | - | ||||||
| 3334 | - | |||||||
| 3335 | Constructs a copy of \a other. | - | ||||||
| 3336 | */ | - | ||||||
| 3337 | - | |||||||
| 3338 | /*! \internal */ | - | ||||||
| 3339 | QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version) | - | ||||||
| 3340 | : QStyleOption(version, SO_TabWidgetFrame), lineWidth(0), midLineWidth(0), | - | ||||||
| 3341 | shape(QTabBar::RoundedNorth) | - | ||||||
| 3342 | { | - | ||||||
| 3343 | } never executed: end of block | 0 | ||||||
| 3344 | - | |||||||
| 3345 | /*! | - | ||||||
| 3346 | \enum QStyleOptionTabWidgetFrame::StyleOptionType | - | ||||||
| 3347 | - | |||||||
| 3348 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3349 | is defined for each QStyleOption subclass. | - | ||||||
| 3350 | - | |||||||
| 3351 | \value Type The type of style option provided (\l{SO_TabWidgetFrame} for this class). | - | ||||||
| 3352 | - | |||||||
| 3353 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 3354 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3355 | general you do not need to worry about this unless you want to | - | ||||||
| 3356 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 3357 | - | |||||||
| 3358 | \sa StyleOptionVersion | - | ||||||
| 3359 | */ | - | ||||||
| 3360 | - | |||||||
| 3361 | /*! | - | ||||||
| 3362 | \enum QStyleOptionTabWidgetFrame::StyleOptionVersion | - | ||||||
| 3363 | - | |||||||
| 3364 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3365 | is defined for each QStyleOption subclass. | - | ||||||
| 3366 | - | |||||||
| 3367 | \value Version 2 | - | ||||||
| 3368 | - | |||||||
| 3369 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 3370 | extensions without breaking compatibility. If you use | - | ||||||
| 3371 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3372 | - | |||||||
| 3373 | \sa StyleOptionType | - | ||||||
| 3374 | */ | - | ||||||
| 3375 | - | |||||||
| 3376 | /*! | - | ||||||
| 3377 | \variable QStyleOptionTabWidgetFrame::lineWidth | - | ||||||
| 3378 | \brief the line width for drawing the panel | - | ||||||
| 3379 | - | |||||||
| 3380 | The default value is 0. | - | ||||||
| 3381 | */ | - | ||||||
| 3382 | - | |||||||
| 3383 | /*! | - | ||||||
| 3384 | \variable QStyleOptionTabWidgetFrame::midLineWidth | - | ||||||
| 3385 | \brief the mid-line width for drawing the panel | - | ||||||
| 3386 | - | |||||||
| 3387 | The mid line width is usually used in drawing sunken or raised | - | ||||||
| 3388 | frames. The default value is 0. | - | ||||||
| 3389 | */ | - | ||||||
| 3390 | - | |||||||
| 3391 | /*! | - | ||||||
| 3392 | \variable QStyleOptionTabWidgetFrame::shape | - | ||||||
| 3393 | \brief the tab shape used to draw the tabs | - | ||||||
| 3394 | - | |||||||
| 3395 | The default value is QTabBar::RoundedNorth. | - | ||||||
| 3396 | */ | - | ||||||
| 3397 | - | |||||||
| 3398 | /*! | - | ||||||
| 3399 | \variable QStyleOptionTabWidgetFrame::tabBarSize | - | ||||||
| 3400 | \brief the size of the tab bar | - | ||||||
| 3401 | - | |||||||
| 3402 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 3403 | */ | - | ||||||
| 3404 | - | |||||||
| 3405 | /*! | - | ||||||
| 3406 | \variable QStyleOptionTabWidgetFrame::rightCornerWidgetSize | - | ||||||
| 3407 | \brief the size of the right-corner widget | - | ||||||
| 3408 | - | |||||||
| 3409 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 3410 | */ | - | ||||||
| 3411 | - | |||||||
| 3412 | /*! \variable QStyleOptionTabWidgetFrame::leftCornerWidgetSize | - | ||||||
| 3413 | \brief the size of the left-corner widget | - | ||||||
| 3414 | - | |||||||
| 3415 | The default value is QSize(-1, -1), i.e. an invalid size. | - | ||||||
| 3416 | */ | - | ||||||
| 3417 | - | |||||||
| 3418 | - | |||||||
| 3419 | /*! | - | ||||||
| 3420 | \variable QStyleOptionTabWidgetFrame::tabBarRect | - | ||||||
| 3421 | \brief the rectangle containing all the tabs | - | ||||||
| 3422 | - | |||||||
| 3423 | The default value is a null rectangle, i.e. a rectangle with both | - | ||||||
| 3424 | the width and the height set to 0. | - | ||||||
| 3425 | */ | - | ||||||
| 3426 | - | |||||||
| 3427 | /*! | - | ||||||
| 3428 | \variable QStyleOptionTabWidgetFrame::selectedTabRect | - | ||||||
| 3429 | \brief the rectangle containing the selected tab | - | ||||||
| 3430 | - | |||||||
| 3431 | This rectangle is contained within the tabBarRect. The default | - | ||||||
| 3432 | value is a null rectangle, i.e. a rectangle with both the width | - | ||||||
| 3433 | and the height set to 0. | - | ||||||
| 3434 | */ | - | ||||||
| 3435 | - | |||||||
| 3436 | #endif // QT_NO_TABWIDGET | - | ||||||
| 3437 | - | |||||||
| 3438 | #ifndef QT_NO_TABBAR | - | ||||||
| 3439 | - | |||||||
| 3440 | /*! | - | ||||||
| 3441 | \class QStyleOptionTabBarBase | - | ||||||
| 3442 | \brief The QStyleOptionTabBarBase class is used to describe | - | ||||||
| 3443 | the base of a tab bar, i.e. the part that the tab bar usually | - | ||||||
| 3444 | overlaps with. | - | ||||||
| 3445 | - | |||||||
| 3446 | \inmodule QtWidgets | - | ||||||
| 3447 | - | |||||||
| 3448 | QStyleOptionTabBarBase contains all the information that QStyle | - | ||||||
| 3449 | functions need to draw the tab bar base. Note that this is only | - | ||||||
| 3450 | drawn for a standalone QTabBar (one that isn't part of a | - | ||||||
| 3451 | QTabWidget). | - | ||||||
| 3452 | - | |||||||
| 3453 | For performance reasons, the access to the member variables is | - | ||||||
| 3454 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 3455 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 3456 | these are simply parameters used by the style functions. | - | ||||||
| 3457 | - | |||||||
| 3458 | For an example demonstrating how style options can be used, see | - | ||||||
| 3459 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 3460 | - | |||||||
| 3461 | \sa QStyleOption, QTabBar::drawBase() | - | ||||||
| 3462 | */ | - | ||||||
| 3463 | - | |||||||
| 3464 | /*! | - | ||||||
| 3465 | \typedef QStyleOptionTabBarBaseV2 | - | ||||||
| 3466 | \relates QStyleOptionTabBarBase | - | ||||||
| 3467 | \obsolete | - | ||||||
| 3468 | - | |||||||
| 3469 | Synonym for QStyleOptionTabBarBase. | - | ||||||
| 3470 | */ | - | ||||||
| 3471 | - | |||||||
| 3472 | /*! | - | ||||||
| 3473 | Construct a QStyleOptionTabBarBase, initializing the members | - | ||||||
| 3474 | vaiables to their default values. | - | ||||||
| 3475 | */ | - | ||||||
| 3476 | QStyleOptionTabBarBase::QStyleOptionTabBarBase() | - | ||||||
| 3477 | : QStyleOption(Version, SO_TabBarBase), shape(QTabBar::RoundedNorth), | - | ||||||
| 3478 | documentMode(false) | - | ||||||
| 3479 | { | - | ||||||
| 3480 | } never executed: end of block | 0 | ||||||
| 3481 | - | |||||||
| 3482 | /*! \internal */ | - | ||||||
| 3483 | QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version) | - | ||||||
| 3484 | : QStyleOption(version, SO_TabBarBase), shape(QTabBar::RoundedNorth), | - | ||||||
| 3485 | documentMode(false) | - | ||||||
| 3486 | { | - | ||||||
| 3487 | } never executed: end of block | 0 | ||||||
| 3488 | - | |||||||
| 3489 | /*! | - | ||||||
| 3490 | \fn QStyleOptionTabBarBase::QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) | - | ||||||
| 3491 | - | |||||||
| 3492 | Constructs a copy of \a other. | - | ||||||
| 3493 | */ | - | ||||||
| 3494 | - | |||||||
| 3495 | /*! | - | ||||||
| 3496 | \enum QStyleOptionTabBarBase::StyleOptionType | - | ||||||
| 3497 | - | |||||||
| 3498 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3499 | is defined for each QStyleOption subclass. | - | ||||||
| 3500 | - | |||||||
| 3501 | \value Type The type of style option provided (\l{SO_TabBarBase} for this class). | - | ||||||
| 3502 | - | |||||||
| 3503 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 3504 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3505 | general you do not need to worry about this unless you want to | - | ||||||
| 3506 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 3507 | - | |||||||
| 3508 | \sa StyleOptionVersion | - | ||||||
| 3509 | */ | - | ||||||
| 3510 | - | |||||||
| 3511 | /*! | - | ||||||
| 3512 | \enum QStyleOptionTabBarBase::StyleOptionVersion | - | ||||||
| 3513 | - | |||||||
| 3514 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3515 | is defined for each QStyleOption subclass. | - | ||||||
| 3516 | - | |||||||
| 3517 | \value Version 2 | - | ||||||
| 3518 | - | |||||||
| 3519 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 3520 | extensions without breaking compatibility. If you use | - | ||||||
| 3521 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3522 | - | |||||||
| 3523 | \sa StyleOptionType | - | ||||||
| 3524 | */ | - | ||||||
| 3525 | - | |||||||
| 3526 | /*! | - | ||||||
| 3527 | \variable QStyleOptionTabBarBase::shape | - | ||||||
| 3528 | \brief the shape of the tab bar | - | ||||||
| 3529 | - | |||||||
| 3530 | The default value is QTabBar::RoundedNorth. | - | ||||||
| 3531 | */ | - | ||||||
| 3532 | - | |||||||
| 3533 | /*! | - | ||||||
| 3534 | \variable QStyleOptionTabBarBase::tabBarRect | - | ||||||
| 3535 | \brief the rectangle containing all the tabs | - | ||||||
| 3536 | - | |||||||
| 3537 | The default value is a null rectangle, i.e. a rectangle with both | - | ||||||
| 3538 | the width and the height set to 0. | - | ||||||
| 3539 | */ | - | ||||||
| 3540 | - | |||||||
| 3541 | /*! | - | ||||||
| 3542 | \variable QStyleOptionTabBarBase::selectedTabRect | - | ||||||
| 3543 | \brief the rectangle containing the selected tab | - | ||||||
| 3544 | - | |||||||
| 3545 | This rectangle is contained within the tabBarRect. The default | - | ||||||
| 3546 | value is a null rectangle, i.e. a rectangle with both the width | - | ||||||
| 3547 | and the height set to 0. | - | ||||||
| 3548 | */ | - | ||||||
| 3549 | - | |||||||
| 3550 | - | |||||||
| 3551 | /*! | - | ||||||
| 3552 | \variable QStyleOptionTabBarBase::documentMode | - | ||||||
| 3553 | \brief whether the tabbar is in document mode. | - | ||||||
| 3554 | - | |||||||
| 3555 | The default value is false; | - | ||||||
| 3556 | */ | - | ||||||
| 3557 | - | |||||||
| 3558 | #endif // QT_NO_TABBAR | - | ||||||
| 3559 | - | |||||||
| 3560 | #ifndef QT_NO_SIZEGRIP | - | ||||||
| 3561 | /*! | - | ||||||
| 3562 | \class QStyleOptionSizeGrip | - | ||||||
| 3563 | \brief The QStyleOptionSizeGrip class is used to describe the | - | ||||||
| 3564 | parameter for drawing a size grip. | - | ||||||
| 3565 | \since 4.2 | - | ||||||
| 3566 | \inmodule QtWidgets | - | ||||||
| 3567 | - | |||||||
| 3568 | QStyleOptionButton contains all the information that QStyle | - | ||||||
| 3569 | functions need to draw QSizeGrip. | - | ||||||
| 3570 | - | |||||||
| 3571 | For performance reasons, the access to the member variables is | - | ||||||
| 3572 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 3573 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 3574 | these are simply parameters used by the style functions. | - | ||||||
| 3575 | - | |||||||
| 3576 | For an example demonstrating how style options can be used, see | - | ||||||
| 3577 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 3578 | - | |||||||
| 3579 | \sa QStyleOption, QStyleOptionComplex, QSizeGrip | - | ||||||
| 3580 | */ | - | ||||||
| 3581 | - | |||||||
| 3582 | /*! | - | ||||||
| 3583 | Constructs a QStyleOptionSizeGrip. | - | ||||||
| 3584 | */ | - | ||||||
| 3585 | QStyleOptionSizeGrip::QStyleOptionSizeGrip() | - | ||||||
| 3586 | : QStyleOptionComplex(Version, Type), corner(Qt::BottomRightCorner) | - | ||||||
| 3587 | { | - | ||||||
| 3588 | } never executed: end of block | 0 | ||||||
| 3589 | - | |||||||
| 3590 | /*! | - | ||||||
| 3591 | \fn QStyleOptionSizeGrip::QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) | - | ||||||
| 3592 | - | |||||||
| 3593 | Constructs a copy of the \a other style option. | - | ||||||
| 3594 | */ | - | ||||||
| 3595 | - | |||||||
| 3596 | /*! | - | ||||||
| 3597 | \internal | - | ||||||
| 3598 | */ | - | ||||||
| 3599 | QStyleOptionSizeGrip::QStyleOptionSizeGrip(int version) | - | ||||||
| 3600 | : QStyleOptionComplex(version, Type), corner(Qt::BottomRightCorner) | - | ||||||
| 3601 | { | - | ||||||
| 3602 | } never executed: end of block | 0 | ||||||
| 3603 | - | |||||||
| 3604 | /*! | - | ||||||
| 3605 | \variable QStyleOptionSizeGrip::corner | - | ||||||
| 3606 | - | |||||||
| 3607 | The corner in which the size grip is located. | - | ||||||
| 3608 | */ | - | ||||||
| 3609 | - | |||||||
| 3610 | /*! | - | ||||||
| 3611 | \enum QStyleOptionSizeGrip::StyleOptionType | - | ||||||
| 3612 | - | |||||||
| 3613 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3614 | is defined for each QStyleOption subclass. | - | ||||||
| 3615 | - | |||||||
| 3616 | \value Type The type of style option provided (\l{SO_TabBarBase} for this class). | - | ||||||
| 3617 | - | |||||||
| 3618 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 3619 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3620 | general you do not need to worry about this unless you want to | - | ||||||
| 3621 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 3622 | - | |||||||
| 3623 | \sa StyleOptionVersion | - | ||||||
| 3624 | */ | - | ||||||
| 3625 | - | |||||||
| 3626 | /*! | - | ||||||
| 3627 | \enum QStyleOptionSizeGrip::StyleOptionVersion | - | ||||||
| 3628 | - | |||||||
| 3629 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3630 | is defined for each QStyleOption subclass. | - | ||||||
| 3631 | - | |||||||
| 3632 | \value Version 1 | - | ||||||
| 3633 | - | |||||||
| 3634 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 3635 | extensions without breaking compatibility. If you use | - | ||||||
| 3636 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3637 | - | |||||||
| 3638 | \sa StyleOptionType | - | ||||||
| 3639 | */ | - | ||||||
| 3640 | #endif // QT_NO_SIZEGRIP | - | ||||||
| 3641 | - | |||||||
| 3642 | /*! | - | ||||||
| 3643 | \class QStyleOptionGraphicsItem | - | ||||||
| 3644 | \brief The QStyleOptionGraphicsItem class is used to describe | - | ||||||
| 3645 | the parameters needed to draw a QGraphicsItem. | - | ||||||
| 3646 | \since 4.2 | - | ||||||
| 3647 | \ingroup graphicsview-api | - | ||||||
| 3648 | \inmodule QtWidgets | - | ||||||
| 3649 | - | |||||||
| 3650 | For performance reasons, the access to the member variables is | - | ||||||
| 3651 | direct (i.e., using the \c . or \c -> operator). This low-level feel | - | ||||||
| 3652 | makes the structures straightforward to use and emphasizes that | - | ||||||
| 3653 | these are simply parameters. | - | ||||||
| 3654 | - | |||||||
| 3655 | For an example demonstrating how style options can be used, see | - | ||||||
| 3656 | the \l {widgets/styles}{Styles} example. | - | ||||||
| 3657 | - | |||||||
| 3658 | \sa QStyleOption, QGraphicsItem::paint() | - | ||||||
| 3659 | */ | - | ||||||
| 3660 | - | |||||||
| 3661 | /*! | - | ||||||
| 3662 | \enum QStyleOptionGraphicsItem::StyleOptionType | - | ||||||
| 3663 | - | |||||||
| 3664 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3665 | is defined for each QStyleOption subclass. | - | ||||||
| 3666 | - | |||||||
| 3667 | \value Type The type of style option provided (\l SO_GraphicsItem for this class). | - | ||||||
| 3668 | - | |||||||
| 3669 | The type is used internally by QStyleOption, its subclasses, and | - | ||||||
| 3670 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3671 | general you do not need to worry about this unless you want to | - | ||||||
| 3672 | create your own QStyleOption subclass and your own styles. | - | ||||||
| 3673 | - | |||||||
| 3674 | \sa StyleOptionVersion | - | ||||||
| 3675 | */ | - | ||||||
| 3676 | - | |||||||
| 3677 | /*! | - | ||||||
| 3678 | \enum QStyleOptionGraphicsItem::StyleOptionVersion | - | ||||||
| 3679 | - | |||||||
| 3680 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3681 | is defined for each QStyleOption subclass. | - | ||||||
| 3682 | - | |||||||
| 3683 | \value Version 1 | - | ||||||
| 3684 | - | |||||||
| 3685 | The version is used by QStyleOption subclasses to implement | - | ||||||
| 3686 | extensions without breaking compatibility. If you use | - | ||||||
| 3687 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3688 | - | |||||||
| 3689 | \sa StyleOptionType | - | ||||||
| 3690 | */ | - | ||||||
| 3691 | - | |||||||
| 3692 | /*! | - | ||||||
| 3693 | Constructs a QStyleOptionGraphicsItem. | - | ||||||
| 3694 | */ | - | ||||||
| 3695 | QStyleOptionGraphicsItem::QStyleOptionGraphicsItem() | - | ||||||
| 3696 | : QStyleOption(Version, Type), levelOfDetail(1) | - | ||||||
| 3697 | { | - | ||||||
| 3698 | } never executed: end of block | 0 | ||||||
| 3699 | - | |||||||
| 3700 | /*! | - | ||||||
| 3701 | \internal | - | ||||||
| 3702 | */ | - | ||||||
| 3703 | QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version) | - | ||||||
| 3704 | : QStyleOption(version, Type), levelOfDetail(1) | - | ||||||
| 3705 | { | - | ||||||
| 3706 | } never executed: end of block | 0 | ||||||
| 3707 | - | |||||||
| 3708 | /*! | - | ||||||
| 3709 | \since 4.6 | - | ||||||
| 3710 | - | |||||||
| 3711 | Returns the level of detail from the \a worldTransform. | - | ||||||
| 3712 | - | |||||||
| 3713 | Its value represents the maximum value of the height and | - | ||||||
| 3714 | width of a unity rectangle, mapped using the \a worldTransform | - | ||||||
| 3715 | of the painter used to draw the item. By default, if no | - | ||||||
| 3716 | transformations are applied, its value is 1. If zoomed out 1:2, the level | - | ||||||
| 3717 | of detail will be 0.5, and if zoomed in 2:1, its value is 2. | - | ||||||
| 3718 | - | |||||||
| 3719 | \sa QGraphicsScene::minimumRenderSize() | - | ||||||
| 3720 | */ | - | ||||||
| 3721 | qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &worldTransform) | - | ||||||
| 3722 | { | - | ||||||
| 3723 | if (worldTransform.type() <= QTransform::TxTranslate)
| 0 | ||||||
| 3724 | return 1; // Translation only? The LOD is 1. never executed: return 1; | 0 | ||||||
| 3725 | - | |||||||
| 3726 | // Two unit vectors. | - | ||||||
| 3727 | QLineF v1(0, 0, 1, 0); | - | ||||||
| 3728 | QLineF v2(0, 0, 0, 1); | - | ||||||
| 3729 | // LOD is the transformed area of a 1x1 rectangle. | - | ||||||
| 3730 | return qSqrt(worldTransform.map(v1).length() * worldTransform.map(v2).length()); never executed: return qSqrt(worldTransform.map(v1).length() * worldTransform.map(v2).length()); | 0 | ||||||
| 3731 | } | - | ||||||
| 3732 | - | |||||||
| 3733 | /*! | - | ||||||
| 3734 | \fn QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) | - | ||||||
| 3735 | - | |||||||
| 3736 | Constructs a copy of \a other. | - | ||||||
| 3737 | */ | - | ||||||
| 3738 | - | |||||||
| 3739 | /*! | - | ||||||
| 3740 | \variable QStyleOptionGraphicsItem::exposedRect | - | ||||||
| 3741 | \brief the exposed rectangle, in item coordinates | - | ||||||
| 3742 | - | |||||||
| 3743 | Make use of this rectangle to speed up item drawing when only parts of the | - | ||||||
| 3744 | item are exposed. If the whole item is exposed, this rectangle will be the | - | ||||||
| 3745 | same as QGraphicsItem::boundingRect(). | - | ||||||
| 3746 | - | |||||||
| 3747 | This member is only initialized for items that have the | - | ||||||
| 3748 | QGraphicsItem::ItemUsesExtendedStyleOption flag set. | - | ||||||
| 3749 | */ | - | ||||||
| 3750 | - | |||||||
| 3751 | /*! | - | ||||||
| 3752 | \variable QStyleOptionGraphicsItem::matrix | - | ||||||
| 3753 | \brief the complete transformation matrix for the item | - | ||||||
| 3754 | \obsolete | - | ||||||
| 3755 | - | |||||||
| 3756 | The QMatrix provided through this member does include information about | - | ||||||
| 3757 | any perspective transformations applied to the view or item. To get the | - | ||||||
| 3758 | correct transformation matrix, use QPainter::transform() on the painter | - | ||||||
| 3759 | passed into the QGraphicsItem::paint() implementation. | - | ||||||
| 3760 | - | |||||||
| 3761 | This matrix is the combination of the item's scene matrix and the matrix | - | ||||||
| 3762 | of the painter used for drawing the item. It is provided for convenience, | - | ||||||
| 3763 | allowing anvanced level-of-detail metrics that can be used to speed up | - | ||||||
| 3764 | item drawing. | - | ||||||
| 3765 | - | |||||||
| 3766 | To find the dimensions of an item in screen coordinates (i.e., pixels), | - | ||||||
| 3767 | you can use the mapping functions of QMatrix, such as QMatrix::map(). | - | ||||||
| 3768 | - | |||||||
| 3769 | This member is only initialized for items that have the | - | ||||||
| 3770 | QGraphicsItem::ItemUsesExtendedStyleOption flag set. | - | ||||||
| 3771 | - | |||||||
| 3772 | \sa QStyleOptionGraphicsItem::levelOfDetailFromTransform() | - | ||||||
| 3773 | */ | - | ||||||
| 3774 | - | |||||||
| 3775 | /*! | - | ||||||
| 3776 | \variable QStyleOptionGraphicsItem::levelOfDetail | - | ||||||
| 3777 | \obsolete | - | ||||||
| 3778 | - | |||||||
| 3779 | Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() | - | ||||||
| 3780 | together with QPainter::worldTransform() instead. | - | ||||||
| 3781 | */ | - | ||||||
| 3782 | - | |||||||
| 3783 | /*! | - | ||||||
| 3784 | \class QStyleHintReturn | - | ||||||
| 3785 | \brief The QStyleHintReturn class provides style hints that return more | - | ||||||
| 3786 | than basic data types. | - | ||||||
| 3787 | - | |||||||
| 3788 | \ingroup appearance | - | ||||||
| 3789 | \inmodule QtWidgets | - | ||||||
| 3790 | - | |||||||
| 3791 | QStyleHintReturn and its subclasses are used to pass information | - | ||||||
| 3792 | from a style back to the querying widget. This is most useful | - | ||||||
| 3793 | when the return value from QStyle::styleHint() does not provide enough | - | ||||||
| 3794 | detail; for example, when a mask is to be returned. | - | ||||||
| 3795 | - | |||||||
| 3796 | \omit | - | ||||||
| 3797 | ### --Sam | - | ||||||
| 3798 | \endomit | - | ||||||
| 3799 | */ | - | ||||||
| 3800 | - | |||||||
| 3801 | /*! | - | ||||||
| 3802 | \enum QStyleHintReturn::HintReturnType | - | ||||||
| 3803 | - | |||||||
| 3804 | \value SH_Default QStyleHintReturn | - | ||||||
| 3805 | \value SH_Mask \l QStyle::SH_RubberBand_Mask QStyle::SH_FocusFrame_Mask | - | ||||||
| 3806 | \value SH_Variant \l QStyle::SH_TextControl_FocusIndicatorTextCharFormat | - | ||||||
| 3807 | */ | - | ||||||
| 3808 | - | |||||||
| 3809 | /*! | - | ||||||
| 3810 | \enum QStyleHintReturn::StyleOptionType | - | ||||||
| 3811 | - | |||||||
| 3812 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3813 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3814 | - | |||||||
| 3815 | \value Type The type of style option provided (\l SH_Default for | - | ||||||
| 3816 | this class). | - | ||||||
| 3817 | - | |||||||
| 3818 | The type is used internally by QStyleHintReturn, its subclasses, and | - | ||||||
| 3819 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3820 | general you do not need to worry about this unless you want to | - | ||||||
| 3821 | create your own QStyleHintReturn subclass and your own styles. | - | ||||||
| 3822 | - | |||||||
| 3823 | \sa StyleOptionVersion | - | ||||||
| 3824 | */ | - | ||||||
| 3825 | - | |||||||
| 3826 | /*! | - | ||||||
| 3827 | \enum QStyleHintReturn::StyleOptionVersion | - | ||||||
| 3828 | - | |||||||
| 3829 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3830 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3831 | - | |||||||
| 3832 | \value Version 1 | - | ||||||
| 3833 | - | |||||||
| 3834 | The version is used by QStyleHintReturn subclasses to implement | - | ||||||
| 3835 | extensions without breaking compatibility. If you use | - | ||||||
| 3836 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3837 | - | |||||||
| 3838 | \sa StyleOptionType | - | ||||||
| 3839 | */ | - | ||||||
| 3840 | - | |||||||
| 3841 | /*! | - | ||||||
| 3842 | \variable QStyleHintReturn::type | - | ||||||
| 3843 | \brief the type of the style hint container | - | ||||||
| 3844 | - | |||||||
| 3845 | \sa HintReturnType | - | ||||||
| 3846 | */ | - | ||||||
| 3847 | - | |||||||
| 3848 | /*! | - | ||||||
| 3849 | \variable QStyleHintReturn::version | - | ||||||
| 3850 | \brief the version of the style hint return container | - | ||||||
| 3851 | - | |||||||
| 3852 | This value can be used by subclasses to implement extensions | - | ||||||
| 3853 | without breaking compatibility. If you use qstyleoption_cast<T>(), you | - | ||||||
| 3854 | normally do not need to check it. | - | ||||||
| 3855 | */ | - | ||||||
| 3856 | - | |||||||
| 3857 | /*! | - | ||||||
| 3858 | Constructs a QStyleHintReturn with version \a version and type \a | - | ||||||
| 3859 | type. | - | ||||||
| 3860 | - | |||||||
| 3861 | The version has no special meaning for QStyleHintReturn; it can be | - | ||||||
| 3862 | used by subclasses to distinguish between different version of | - | ||||||
| 3863 | the same hint type. | - | ||||||
| 3864 | - | |||||||
| 3865 | \sa QStyleOption::version, QStyleOption::type | - | ||||||
| 3866 | */ | - | ||||||
| 3867 | - | |||||||
| 3868 | QStyleHintReturn::QStyleHintReturn(int version, int type) | - | ||||||
| 3869 | : version(version), type(type) | - | ||||||
| 3870 | { | - | ||||||
| 3871 | } never executed: end of block | 0 | ||||||
| 3872 | - | |||||||
| 3873 | /*! | - | ||||||
| 3874 | \internal | - | ||||||
| 3875 | */ | - | ||||||
| 3876 | - | |||||||
| 3877 | QStyleHintReturn::~QStyleHintReturn() | - | ||||||
| 3878 | { | - | ||||||
| 3879 | - | |||||||
| 3880 | } | - | ||||||
| 3881 | - | |||||||
| 3882 | /*! | - | ||||||
| 3883 | \class QStyleHintReturnMask | - | ||||||
| 3884 | \brief The QStyleHintReturnMask class provides style hints that return a QRegion. | - | ||||||
| 3885 | - | |||||||
| 3886 | \ingroup appearance | - | ||||||
| 3887 | \inmodule QtWidgets | - | ||||||
| 3888 | - | |||||||
| 3889 | \omit | - | ||||||
| 3890 | ### --Sam | - | ||||||
| 3891 | \endomit | - | ||||||
| 3892 | */ | - | ||||||
| 3893 | - | |||||||
| 3894 | /*! | - | ||||||
| 3895 | \variable QStyleHintReturnMask::region | - | ||||||
| 3896 | \brief the region for style hints that return a QRegion | - | ||||||
| 3897 | */ | - | ||||||
| 3898 | - | |||||||
| 3899 | /*! | - | ||||||
| 3900 | Constructs a QStyleHintReturnMask. The member variables are | - | ||||||
| 3901 | initialized to default values. | - | ||||||
| 3902 | */ | - | ||||||
| 3903 | QStyleHintReturnMask::QStyleHintReturnMask() : QStyleHintReturn(Version, Type) | - | ||||||
| 3904 | { | - | ||||||
| 3905 | } never executed: end of block | 0 | ||||||
| 3906 | - | |||||||
| 3907 | /*! | - | ||||||
| 3908 | Destructor. | - | ||||||
| 3909 | */ | - | ||||||
| 3910 | QStyleHintReturnMask::~QStyleHintReturnMask() | - | ||||||
| 3911 | { | - | ||||||
| 3912 | } | - | ||||||
| 3913 | - | |||||||
| 3914 | /*! | - | ||||||
| 3915 | \enum QStyleHintReturnMask::StyleOptionType | - | ||||||
| 3916 | - | |||||||
| 3917 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3918 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3919 | - | |||||||
| 3920 | \value Type The type of style option provided (\l{SH_Mask} for | - | ||||||
| 3921 | this class). | - | ||||||
| 3922 | - | |||||||
| 3923 | The type is used internally by QStyleHintReturn, its subclasses, and | - | ||||||
| 3924 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3925 | general you do not need to worry about this unless you want to | - | ||||||
| 3926 | create your own QStyleHintReturn subclass and your own styles. | - | ||||||
| 3927 | - | |||||||
| 3928 | \sa StyleOptionVersion | - | ||||||
| 3929 | */ | - | ||||||
| 3930 | - | |||||||
| 3931 | /*! | - | ||||||
| 3932 | \enum QStyleHintReturnMask::StyleOptionVersion | - | ||||||
| 3933 | - | |||||||
| 3934 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3935 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3936 | - | |||||||
| 3937 | \value Version 1 | - | ||||||
| 3938 | - | |||||||
| 3939 | The version is used by QStyleHintReturn subclasses to implement | - | ||||||
| 3940 | extensions without breaking compatibility. If you use | - | ||||||
| 3941 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 3942 | - | |||||||
| 3943 | \sa StyleOptionType | - | ||||||
| 3944 | */ | - | ||||||
| 3945 | - | |||||||
| 3946 | /*! | - | ||||||
| 3947 | \class QStyleHintReturnVariant | - | ||||||
| 3948 | \brief The QStyleHintReturnVariant class provides style hints that return a QVariant. | - | ||||||
| 3949 | \since 4.3 | - | ||||||
| 3950 | \ingroup appearance | - | ||||||
| 3951 | \inmodule QtWidgets | - | ||||||
| 3952 | */ | - | ||||||
| 3953 | - | |||||||
| 3954 | /*! | - | ||||||
| 3955 | \variable QStyleHintReturnVariant::variant | - | ||||||
| 3956 | \brief the variant for style hints that return a QVariant | - | ||||||
| 3957 | */ | - | ||||||
| 3958 | - | |||||||
| 3959 | /*! | - | ||||||
| 3960 | Constructs a QStyleHintReturnVariant. The member variables are | - | ||||||
| 3961 | initialized to default values. | - | ||||||
| 3962 | */ | - | ||||||
| 3963 | QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, Type) | - | ||||||
| 3964 | { | - | ||||||
| 3965 | } never executed: end of block | 0 | ||||||
| 3966 | - | |||||||
| 3967 | /*! | - | ||||||
| 3968 | Destructor. | - | ||||||
| 3969 | */ | - | ||||||
| 3970 | QStyleHintReturnVariant::~QStyleHintReturnVariant() | - | ||||||
| 3971 | { | - | ||||||
| 3972 | } | - | ||||||
| 3973 | - | |||||||
| 3974 | /*! | - | ||||||
| 3975 | \enum QStyleHintReturnVariant::StyleOptionType | - | ||||||
| 3976 | - | |||||||
| 3977 | This enum is used to hold information about the type of the style option, and | - | ||||||
| 3978 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3979 | - | |||||||
| 3980 | \value Type The type of style option provided (\l{SH_Variant} for | - | ||||||
| 3981 | this class). | - | ||||||
| 3982 | - | |||||||
| 3983 | The type is used internally by QStyleHintReturn, its subclasses, and | - | ||||||
| 3984 | qstyleoption_cast() to determine the type of style option. In | - | ||||||
| 3985 | general you do not need to worry about this unless you want to | - | ||||||
| 3986 | create your own QStyleHintReturn subclass and your own styles. | - | ||||||
| 3987 | - | |||||||
| 3988 | \sa StyleOptionVersion | - | ||||||
| 3989 | */ | - | ||||||
| 3990 | - | |||||||
| 3991 | /*! | - | ||||||
| 3992 | \enum QStyleHintReturnVariant::StyleOptionVersion | - | ||||||
| 3993 | - | |||||||
| 3994 | This enum is used to hold information about the version of the style option, and | - | ||||||
| 3995 | is defined for each QStyleHintReturn subclass. | - | ||||||
| 3996 | - | |||||||
| 3997 | \value Version 1 | - | ||||||
| 3998 | - | |||||||
| 3999 | The version is used by QStyleHintReturn subclasses to implement | - | ||||||
| 4000 | extensions without breaking compatibility. If you use | - | ||||||
| 4001 | qstyleoption_cast(), you normally do not need to check it. | - | ||||||
| 4002 | - | |||||||
| 4003 | \sa StyleOptionType | - | ||||||
| 4004 | */ | - | ||||||
| 4005 | - | |||||||
| 4006 | /*! | - | ||||||
| 4007 | \fn T qstyleoption_cast<T>(const QStyleHintReturn *hint) | - | ||||||
| 4008 | \relates QStyleHintReturn | - | ||||||
| 4009 | - | |||||||
| 4010 | Returns a T or 0 depending on the \l{QStyleHintReturn::type}{type} | - | ||||||
| 4011 | and \l{QStyleHintReturn::version}{version} of \a hint. | - | ||||||
| 4012 | - | |||||||
| 4013 | Example: | - | ||||||
| 4014 | - | |||||||
| 4015 | \snippet code/src_gui_styles_qstyleoption.cpp 0 | - | ||||||
| 4016 | - | |||||||
| 4017 | \sa QStyleHintReturn::type, QStyleHintReturn::version | - | ||||||
| 4018 | */ | - | ||||||
| 4019 | - | |||||||
| 4020 | /*! | - | ||||||
| 4021 | \fn T qstyleoption_cast<T>(QStyleHintReturn *hint) | - | ||||||
| 4022 | \overload | - | ||||||
| 4023 | \relates QStyleHintReturn | - | ||||||
| 4024 | - | |||||||
| 4025 | Returns a T or 0 depending on the type of \a hint. | - | ||||||
| 4026 | */ | - | ||||||
| 4027 | - | |||||||
| 4028 | #if !defined(QT_NO_DEBUG_STREAM) | - | ||||||
| 4029 | QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType) | - | ||||||
| 4030 | { | - | ||||||
| 4031 | #if !defined(QT_NO_DEBUG) | - | ||||||
| 4032 | switch (optionType) { | - | ||||||
| 4033 | case QStyleOption::SO_Default: never executed: case QStyleOption::SO_Default: | 0 | ||||||
| 4034 | debug << "SO_Default"; break; never executed: break; | 0 | ||||||
| 4035 | case QStyleOption::SO_FocusRect: never executed: case QStyleOption::SO_FocusRect: | 0 | ||||||
| 4036 | debug << "SO_FocusRect"; break; never executed: break; | 0 | ||||||
| 4037 | case QStyleOption::SO_Button: never executed: case QStyleOption::SO_Button: | 0 | ||||||
| 4038 | debug << "SO_Button"; break; never executed: break; | 0 | ||||||
| 4039 | case QStyleOption::SO_Tab: never executed: case QStyleOption::SO_Tab: | 0 | ||||||
| 4040 | debug << "SO_Tab"; break; never executed: break; | 0 | ||||||
| 4041 | case QStyleOption::SO_MenuItem: never executed: case QStyleOption::SO_MenuItem: | 0 | ||||||
| 4042 | debug << "SO_MenuItem"; break; never executed: break; | 0 | ||||||
| 4043 | case QStyleOption::SO_Frame: never executed: case QStyleOption::SO_Frame: | 0 | ||||||
| 4044 | debug << "SO_Frame"; break; never executed: break; | 0 | ||||||
| 4045 | case QStyleOption::SO_ProgressBar: never executed: case QStyleOption::SO_ProgressBar: | 0 | ||||||
| 4046 | debug << "SO_ProgressBar"; break; never executed: break; | 0 | ||||||
| 4047 | case QStyleOption::SO_ToolBox: never executed: case QStyleOption::SO_ToolBox: | 0 | ||||||
| 4048 | debug << "SO_ToolBox"; break; never executed: break; | 0 | ||||||
| 4049 | case QStyleOption::SO_Header: never executed: case QStyleOption::SO_Header: | 0 | ||||||
| 4050 | debug << "SO_Header"; break; never executed: break; | 0 | ||||||
| 4051 | case QStyleOption::SO_DockWidget: never executed: case QStyleOption::SO_DockWidget: | 0 | ||||||
| 4052 | debug << "SO_DockWidget"; break; never executed: break; | 0 | ||||||
| 4053 | case QStyleOption::SO_ViewItem: never executed: case QStyleOption::SO_ViewItem: | 0 | ||||||
| 4054 | debug << "SO_ViewItem"; break; never executed: break; | 0 | ||||||
| 4055 | case QStyleOption::SO_TabWidgetFrame: never executed: case QStyleOption::SO_TabWidgetFrame: | 0 | ||||||
| 4056 | debug << "SO_TabWidgetFrame"; break; never executed: break; | 0 | ||||||
| 4057 | case QStyleOption::SO_TabBarBase: never executed: case QStyleOption::SO_TabBarBase: | 0 | ||||||
| 4058 | debug << "SO_TabBarBase"; break; never executed: break; | 0 | ||||||
| 4059 | case QStyleOption::SO_RubberBand: never executed: case QStyleOption::SO_RubberBand: | 0 | ||||||
| 4060 | debug << "SO_RubberBand"; break; never executed: break; | 0 | ||||||
| 4061 | case QStyleOption::SO_Complex: never executed: case QStyleOption::SO_Complex: | 0 | ||||||
| 4062 | debug << "SO_Complex"; break; never executed: break; | 0 | ||||||
| 4063 | case QStyleOption::SO_Slider: never executed: case QStyleOption::SO_Slider: | 0 | ||||||
| 4064 | debug << "SO_Slider"; break; never executed: break; | 0 | ||||||
| 4065 | case QStyleOption::SO_SpinBox: never executed: case QStyleOption::SO_SpinBox: | 0 | ||||||
| 4066 | debug << "SO_SpinBox"; break; never executed: break; | 0 | ||||||
| 4067 | case QStyleOption::SO_ToolButton: never executed: case QStyleOption::SO_ToolButton: | 0 | ||||||
| 4068 | debug << "SO_ToolButton"; break; never executed: break; | 0 | ||||||
| 4069 | case QStyleOption::SO_ComboBox: never executed: case QStyleOption::SO_ComboBox: | 0 | ||||||
| 4070 | debug << "SO_ComboBox"; break; never executed: break; | 0 | ||||||
| 4071 | case QStyleOption::SO_TitleBar: never executed: case QStyleOption::SO_TitleBar: | 0 | ||||||
| 4072 | debug << "SO_TitleBar"; break; never executed: break; | 0 | ||||||
| 4073 | case QStyleOption::SO_CustomBase: never executed: case QStyleOption::SO_CustomBase: | 0 | ||||||
| 4074 | debug << "SO_CustomBase"; break; never executed: break; | 0 | ||||||
| 4075 | case QStyleOption::SO_GroupBox: never executed: case QStyleOption::SO_GroupBox: | 0 | ||||||
| 4076 | debug << "SO_GroupBox"; break; never executed: break; | 0 | ||||||
| 4077 | case QStyleOption::SO_ToolBar: never executed: case QStyleOption::SO_ToolBar: | 0 | ||||||
| 4078 | debug << "SO_ToolBar"; break; never executed: break; | 0 | ||||||
| 4079 | case QStyleOption::SO_ComplexCustomBase: never executed: case QStyleOption::SO_ComplexCustomBase: | 0 | ||||||
| 4080 | debug << "SO_ComplexCustomBase"; break; never executed: break; | 0 | ||||||
| 4081 | case QStyleOption::SO_SizeGrip: never executed: case QStyleOption::SO_SizeGrip: | 0 | ||||||
| 4082 | debug << "SO_SizeGrip"; break; never executed: break; | 0 | ||||||
| 4083 | case QStyleOption::SO_GraphicsItem: never executed: case QStyleOption::SO_GraphicsItem: | 0 | ||||||
| 4084 | debug << "SO_GraphicsItem"; break; never executed: break; | 0 | ||||||
| 4085 | } | - | ||||||
| 4086 | #else | - | ||||||
| 4087 | Q_UNUSED(optionType); | - | ||||||
| 4088 | #endif | - | ||||||
| 4089 | return debug; never executed: return debug; | 0 | ||||||
| 4090 | } | - | ||||||
| 4091 | - | |||||||
| 4092 | QDebug operator<<(QDebug debug, const QStyleOption &option) | - | ||||||
| 4093 | { | - | ||||||
| 4094 | #if !defined(QT_NO_DEBUG) | - | ||||||
| 4095 | debug << "QStyleOption("; | - | ||||||
| 4096 | debug << QStyleOption::OptionType(option.type); | - | ||||||
| 4097 | debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight"); | - | ||||||
| 4098 | debug << ',' << option.state; | - | ||||||
| 4099 | debug << ',' << option.rect; | - | ||||||
| 4100 | debug << ',' << option.styleObject; | - | ||||||
| 4101 | debug << ')'; | - | ||||||
| 4102 | #else | - | ||||||
| 4103 | Q_UNUSED(option); | - | ||||||
| 4104 | #endif | - | ||||||
| 4105 | return debug; never executed: return debug; | 0 | ||||||
| 4106 | } | - | ||||||
| 4107 | #endif | - | ||||||
| 4108 | - | |||||||
| 4109 | QT_END_NAMESPACE | - | ||||||
| Source code | Switch to Preprocessed file |