qstyleoption.cpp

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

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9