Qt 4.8
|
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI. More...
#include <qstyle.h>
Public Functions | |
int | combinedLayoutSpacing (QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option=0, QWidget *widget=0) const |
Returns the spacing that should be used between controls1 and controls2 in a layout. More... | |
virtual void | drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget=0) const =0 |
Draws the given control using the provided painter with the style options specified by option. More... | |
virtual void | drawControl (ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0 |
Draws the given element with the provided painter with the style options specified by option. More... | |
virtual void | drawItemPixmap (QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter. More... | |
virtual void | drawItemText (QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const |
Draws the given text in the specified rectangle using the provided painter and palette. More... | |
virtual void | drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0 |
Draws the given primitive element with the provided painter using the style options specified by option. More... | |
virtual QPixmap | generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const =0 |
Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option. More... | |
virtual SubControl | hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=0) const =0 |
Returns the sub control at the given position in the given complex control (with the style options specified by option). More... | |
virtual QRect | itemPixmapRect (const QRect &r, int flags, const QPixmap &pixmap) const |
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment. More... | |
virtual QRect | itemTextRect (const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment. More... | |
int | layoutSpacing (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=0, const QWidget *widget=0) const |
Returns the spacing that should be used between control1 and control2 in a layout. More... | |
virtual int | pixelMetric (PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const =0 |
Returns the value of the given pixel metric. More... | |
virtual void | polish (QWidget *) |
Initializes the appearance of the given widget. More... | |
virtual void | polish (QApplication *) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Late initialization of the given application object. More... | |
virtual void | polish (QPalette &) |
Changes the palette according to style specific requirements for color palettes (if any). More... | |
const QStyle * | proxy () const |
QStyle () | |
Constructs a style object. More... | |
virtual QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=0) const =0 |
Returns the size of the element described by the specified option and type, based on the provided contentsSize. More... | |
QIcon | standardIcon (StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const |
Returns an icon for the given standardIcon. More... | |
virtual QPalette | standardPalette () const |
Returns the style's standard palette. More... | |
virtual QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt=0, const QWidget *widget=0) const =0 |
virtual int | styleHint (StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0 |
Returns an integer representing the specified style hint for the given widget described by the provided style option. More... | |
virtual QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=0) const =0 |
Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). More... | |
virtual QRect | subElementRect (SubElement subElement, const QStyleOption *option, const QWidget *widget=0) const =0 |
Returns the sub-area for the given element as described in the provided style option. More... | |
virtual void | unpolish (QWidget *) |
Uninitialize the given {widget}'s appearance. More... | |
virtual void | unpolish (QApplication *) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Uninitialize the given application. More... | |
virtual | ~QStyle () |
Destroys the style object. More... | |
Public Functions inherited from QObject | |
bool | blockSignals (bool b) |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More... | |
const QObjectList & | children () const |
Returns a list of child objects. More... | |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectInfo () |
Dumps information about signal connections, etc. More... | |
void | dumpObjectTree () |
Dumps a tree of children to the debug output. More... | |
QList< QByteArray > | dynamicPropertyNames () const |
Returns the names of all properties that were dynamically added to the object using setProperty(). More... | |
virtual bool | event (QEvent *) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. More... | |
virtual bool | eventFilter (QObject *, QEvent *) |
Filters events if this object has been installed as an event filter for the watched object. More... | |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More... | |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More... | |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More... | |
void | installEventFilter (QObject *) |
Installs an event filter filterObj on this object. More... | |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. More... | |
void | killTimer (int id) |
Kills the timer with timer identifier, id. More... | |
virtual const QMetaObject * | metaObject () const |
Returns a pointer to the meta-object of this object. More... | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. More... | |
QString | objectName () const |
QObject * | parent () const |
Returns a pointer to the parent object. More... | |
QVariant | property (const char *name) const |
Returns the value of the object's name property. More... | |
Q_INVOKABLE | QObject (QObject *parent=0) |
Constructs an object with parent object parent. More... | |
void | removeEventFilter (QObject *) |
Removes an event filter object obj from this object. More... | |
void | setObjectName (const QString &name) |
void | setParent (QObject *) |
Makes the object a child of parent. More... | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. More... | |
void | setUserData (uint id, QObjectUserData *data) |
bool | signalsBlocked () const |
Returns true if signals are blocked; otherwise returns false. More... | |
int | startTimer (int interval) |
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Static Public Functions | |
static QRect | alignedRect (Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize &size, const QRect &rectangle) |
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction. More... | |
static int | sliderPositionFromValue (int min, int max, int val, int space, bool upsideDown=false) |
Converts the given logicalValue to a pixel position. More... | |
static int | sliderValueFromPosition (int min, int max, int pos, int space, bool upsideDown=false) |
Converts the given pixel position to a logical value. More... | |
static Qt::Alignment | visualAlignment (Qt::LayoutDirection direction, Qt::Alignment alignment) |
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. More... | |
static QPoint | visualPos (Qt::LayoutDirection direction, const QRect &boundingRect, const QPoint &logicalPos) |
Returns the given logicalPosition converted to screen coordinates based on the specified direction. More... | |
static QRect | visualRect (Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect) |
Returns the given logicalRectangle converted to screen coordinates based on the specified direction. More... | |
Static Public Functions inherited from QObject | |
static bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More... | |
static bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
Disconnects signal in object sender from method in object receiver. More... | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static uint | registerUserData () |
static QString | tr (const char *sourceText, const char *comment=0, int n=-1) |
static QString | trUtf8 (const char *sourceText, const char *comment=0, int n=-1) |
Protected Slots | |
int | layoutSpacingImplementation (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=0, const QWidget *widget=0) const |
This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout. More... | |
QIcon | standardIconImplementation (StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const |
Returns an icon for the given standardIcon. More... | |
Protected Functions | |
QStyle (QStylePrivate &dd) | |
Constructs a style object. More... | |
Protected Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *) |
This event handler can be reimplemented in a subclass to receive child events. More... | |
virtual void | connectNotify (const char *signal) |
This virtual function is called when something has been connected to signal in this object. More... | |
virtual void | customEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive custom events. More... | |
virtual void | disconnectNotify (const char *signal) |
This virtual function is called when something has been disconnected from signal in this object. More... | |
QObject (QObjectPrivate &dd, QObject *parent=0) | |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. More... | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More... | |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *) |
This event handler can be reimplemented in a subclass to receive timer events for the object. More... | |
Private Functions | |
void | setProxy (QStyle *style) |
Friends | |
class | QApplication |
class | QProxyStyle |
class | QProxyStylePrivate |
class | QWidget |
class | QWidgetPrivate |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
Schedules this object for deletion. More... | |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More... | |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
Qt contains a set of QStyle subclasses that emulate the styles of the different platforms supported by Qt (QWindowsStyle, QMacStyle, QMotifStyle, etc.). By default, these styles are built into the QtGui library. Styles can also be made available as plugins.
Qt's built-in widgets use QStyle to perform nearly all of their drawing, ensuring that they look exactly like the equivalent native widgets. The diagram below shows a QComboBox in eight different styles.
Topics:
The style of the entire application can be set using the QApplication::setStyle() function. It can also be specified by the user of the application, using the -style
command-line option:
If no style is specified, Qt will choose the most appropriate style for the user's platform or desktop environment.
A style can also be set on an individual widget using the QWidget::setStyle() function.
If you are developing custom widgets and want them to look good on all platforms, you can use QStyle functions to perform parts of the widget drawing, such as drawItemText(), drawItemPixmap(), drawPrimitive(), drawControl(), and drawComplexControl().
Most QStyle draw functions take four arguments:
For example, if you want to draw a focus rectangle on your widget, you can write:
QStyle gets all the information it needs to render the graphical element from QStyleOption. The widget is passed as the last argument in case the style needs it to perform special effects (such as animated default buttons on Mac OS X), but it isn't mandatory. In fact, you can use QStyle to draw on any paint device, not just widgets, by setting the QPainter properly.
QStyleOption has various subclasses for the various types of graphical elements that can be drawn. For example, PE_FrameFocusRect expects a QStyleOptionFocusRect argument.
To ensure that drawing operations are as fast as possible, QStyleOption and its subclasses have public data members. See the QStyleOption class documentation for details on how to use it.
For convenience, Qt provides the QStylePainter class, which combines a QStyle, a QPainter, and a QWidget. This makes it possible to write
...
instead of
...
You can create a custom look and feel for your application by creating a custom style. There are two approaches to creating a custom style. In the static approach, you either choose an existing QStyle class, subclass it, and reimplement virtual functions to provide the custom behavior, or you create an entire QStyle class from scratch. In the dynamic approach, you modify the behavior of your system style at runtime. The static approach is described below. The dynamic approach is described in QProxyStyle.
The first step in the static approach is to pick one of the styles provided by Qt from which you will build your custom style. Your choice of QStyle class will depend on which style resembles your desired style the most. The most general class that you can use as a base is QCommonStyle (not QStyle). This is because Qt requires its styles to be QCommonStyle.
Depending on which parts of the base style you want to change, you must reimplement the functions that are used to draw those parts of the interface. To illustrate this, we will modify the look of the spin box arrows drawn by QWindowsStyle. The arrows are primitive elements that are drawn by the drawPrimitive() function, so we need to reimplement that function. We need the following class declaration:
To draw its up and down arrows, QSpinBox uses the PE_IndicatorSpinUp and PE_IndicatorSpinDown primitive elements. Here's how to reimplement the drawPrimitive() function to draw them differently:
Notice that we don't use the widget
argument, except to pass it on to the QWindowStyle::drawPrimitive() function. As mentioned earlier, the information about what is to be drawn and how it should be drawn is specified by a QStyleOption object, so there is no need to ask the widget.
If you need to use the widget
argument to obtain additional information, be careful to ensure that it isn't 0 and that it is of the correct type before using it. For example:
...
When implementing a custom style, you cannot assume that the widget is a QSpinBox just because the enum value is called PE_IndicatorSpinUp or PE_IndicatorSpinDown.
The documentation for the Styles example covers this topic in more detail.
There are several ways of using a custom style in a Qt application. The simplest way is to pass the custom style to the QApplication::setStyle() static function before creating the QApplication object:
You can call QApplication::setStyle() at any time, but by calling it before the constructor, you ensure that the user's preference, set using the -style
command-line option, is respected.
You may want to make your custom style available for use in other applications, which may not be yours and hence not available for you to recompile. The Qt Plugin system makes it possible to create styles as plugins. Styles created as plugins are loaded as shared objects at runtime by Qt itself. Please refer to the Qt Plugin documentation for more information on how to go about creating a style plugin.
Compile your plugin and put it into Qt's plugins/styles
directory. We now have a pluggable style that Qt can load automatically. To use your new style with existing applications, simply start the application with the following argument:
The application will use the look and feel from the custom style you implemented.
Languages written from right to left (such as Arabic and Hebrew) usually also mirror the whole layout of widgets, and require the light to come from the screen's top-right corner instead of top-left.
If you create a custom style, you should take special care when drawing asymmetric elements to make sure that they also look correct in a mirrored layout. An easy way to test your styles is to run applications with the -reverse
command-line option or to call QApplication::setLayoutDirection() in your main()
function.
Here are some things to keep in mind when making a style work well in a right-to-left environment:
The painting of items in views is performed by a delegate. Qt's default delegate, QStyledItemDelegate, is also used for calculating bounding rectangles of items, and their sub-elements for the various kind of item data roles QStyledItemDelegate supports. See the QStyledItemDelegate class description to find out which datatypes and roles are supported. You can read more about item data roles in Model/View Programming.
When QStyledItemDelegate paints its items, it draws CE_ItemViewItem, and calculates their size with CT_ItemViewItem. Note also that it uses SE_ItemViewItemText to set the size of editors. When implementing a style to customize drawing of item views, you need to check the implementation of QCommonStyle (and any other subclasses from which your style inherits). This way, you find out which and how other style elements are painted, and you can then reimplement the painting of elements that should be drawn differently.
We include a small example where we customize the drawing of item backgrounds.
The primitive element PE_PanelItemViewItem is responsible for painting the background of items, and is called from QCommonStyle's implementation of CE_ItemViewItem.
To add support for drawing of new datatypes and item data roles, it is necessary to create a custom delegate. But if you only need to support the datatypes implemented by the default delegate, a custom style does not need an accompanying delegate. The QStyledItemDelegate class description gives more information on custom delegates.
The drawing of item view headers is also done by the style, giving control over size of header items and row and column sizes.
This enum describes the available complex controls.
Complex controls have different behavior depending upon where the user clicks on them or which keys are pressed.
Enumerator | |
---|---|
CC_SpinBox | |
CC_ComboBox | |
CC_ScrollBar | |
CC_Slider | |
CC_ToolButton | |
CC_TitleBar | |
CC_Q3ListView | |
CC_Dial | |
CC_GroupBox | |
CC_MdiControls | |
CC_CustomBase |
Definition at line 386 of file qstyle.h.
enum QStyle::ContentsType |
This enum describes the available contents types.
These are used to calculate sizes for the contents of various widgets.
Definition at line 602 of file qstyle.h.
This enum represents a control element.
A control element is a part of a widget that performs some action or displays information to the user.
Definition at line 217 of file qstyle.h.
enum QStyle::PixelMetric |
This enum describes the various available pixel metrics.
A pixel metric is a style dependent size represented by a single pixel value.
The following values are obsolete:
Definition at line 474 of file qstyle.h.
This enum describes the various primitive elements.
A primitive element is a common GUI element, such as a checkbox indicator or button bevel.
Definition at line 145 of file qstyle.h.
This enum describes under what circumstances a software input panel will be requested by input capable widgets.
Enumerator | |
---|---|
RSIP_OnMouseClickAndAlreadyFocused | |
RSIP_OnMouseClick |
Definition at line 635 of file qstyle.h.
This enum describes the available standard pixmaps.
A standard pixmap is a pixmap that can follow some existing GUI style or guideline.
Definition at line 755 of file qstyle.h.
enum QStyle::StateFlag |
This enum describes flags that are used when drawing primitive elements.
Note that not all primitives use all of these flags, and that the flags may mean different things to different items.
Definition at line 103 of file qstyle.h.
enum QStyle::StyleHint |
This enum describes the available style hints.
A style hint is a general look and/or feel hint.
Definition at line 640 of file qstyle.h.
enum QStyle::SubControl |
This enum describes the available sub controls.
A subcontrol is a control element within a complex control (ComplexControl).
Definition at line 402 of file qstyle.h.
enum QStyle::SubElement |
This enum represents a sub-area of a widget.
Style implementations use these areas to draw the different parts of a widget.
Definition at line 289 of file qstyle.h.
|
protected |
Constructs a style object.
Definition at line 352 of file qstyle.cpp.
QStyle::QStyle | ( | ) |
Constructs a style object.
Definition at line 337 of file qstyle.cpp.
|
virtual |
Destroys the style object.
Definition at line 362 of file qstyle.cpp.
Referenced by QStyleSheetStyle::drawComplexControl(), and QCommonStyle::drawControl().
|
static |
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.
Definition at line 2120 of file qstyle.cpp.
Referenced by QItemDelegate::doLayout(), QRenderRule::drawBackgroundImage(), QCommonStyle::drawControl(), QPlastiqueStyle::drawControl(), QGtkStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), drawItemPixmap(), QIcon::paint(), QStyleSheetStyle::positionRect(), QCommonStyle::subControlRect(), QWindowsCEStyle::subControlRect(), QMacStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QComboBoxPrivate::updateLineEditGeometry(), QScrollAreaPrivate::updateWidgetPosition(), QCommonStylePrivate::viewItemDrawText(), and QCommonStylePrivate::viewItemLayout().
int QStyle::combinedLayoutSpacing | ( | QSizePolicy::ControlTypes | controls1, |
QSizePolicy::ControlTypes | controls2, | ||
Qt::Orientation | orientation, | ||
QStyleOption * | option = 0 , |
||
QWidget * | widget = 0 |
||
) | const |
Returns the spacing that should be used between controls1 and controls2 in a layout.
orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.
controls1 and controls2 are OR-combination of zero or more control types.
This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
Definition at line 2438 of file qstyle.cpp.
Referenced by QGridLayoutEngine::fillRowData(), QBoxLayoutPrivate::setupGeom(), QGridLayoutPrivate::setupSpacings(), spacingHelper(), and QFormLayoutPrivate::updateSizes().
|
pure virtual |
Draws the given control using the provided painter with the style options specified by option.
The widget argument is optional and can be used as aid in drawing the control.
The option parameter is a pointer to a QStyleOptionComplex object that can be cast to the correct subclass using the qstyleoption_cast() function. Note that the rect
member of the specified option must be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates before calling the drawPrimitive() or drawControl() function.
The table below is listing the complex control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the QStyle::StateFlag{style flags} that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
Complex Control | QStyleOptionComplex Subclass | Style Flag | Remark |
CC_SpinBox | QStyleOptionSpinBox | State_Enabled | Set if the spin box is enabled. |
State_HasFocus | Set if the spin box has input focus. | ||
CC_ComboBox | QStyleOptionComboBox | State_Enabled | Set if the combobox is enabled. |
State_HasFocus | Set if the combobox has input focus. | ||
CC_ScrollBar | QStyleOptionSlider | State_Enabled | Set if the scroll bar is enabled. |
State_HasFocus | Set if the scroll bar has input focus. | ||
CC_Slider | QStyleOptionSlider | State_Enabled | Set if the slider is enabled. |
State_HasFocus | Set if the slider has input focus. | ||
CC_Dial | QStyleOptionSlider | State_Enabled | Set if the dial is enabled. |
State_HasFocus | Set if the dial has input focus. | ||
CC_ToolButton | QStyleOptionToolButton | State_Enabled | Set if the tool button is enabled. |
State_HasFocus | Set if the tool button has input focus. | ||
State_DownArrow | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). | ||
State_On | Set if the tool button is a toggle button and is toggled on. | ||
State_AutoRaise | Set if the tool button has auto-raise enabled. | ||
State_Raised | Set if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled. | ||
CC_TitleBar | QStyleOptionTitleBar | State_Enabled | Set if the title bar is enabled. |
CC_Q3ListView | QStyleOptionQ3ListView | State_Enabled | Set if the list view is enabled. |
Implemented in QMacStyle, QStyleSheetStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QCleanlooksStyle, QProxyStyle, QWindowsMobileStyle, QPlastiqueStyle, QCommonStyle, QWindowsCEStyle, and QWindowsVistaStyle.
Referenced by QWindowsVistaStyle::drawComplexControl(), QStylePainter::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QDecorationStyled::paint(), QScrollBar::paintEvent(), QMDIControl::paintEvent(), QSlider::paintEvent(), QDockWidgetTitleButton::paintEvent(), QWorkspaceTitleBar::paintEvent(), QMdi::ControllerWidget::paintEvent(), and QGraphicsWidget::paintWindowFrame().
|
pure virtual |
Draws the given element with the provided painter with the style options specified by option.
The widget argument is optional and can be used as aid in drawing the control. The option parameter is a pointer to a QStyleOption object that can be cast to the correct subclass using the qstyleoption_cast() function.
The table below is listing the control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
Note that if a control element is not listed here, it is because it uses a plain QStyleOption object.
Control Element | QStyleOption Subclass | Style Flag | Remark |
CE_MenuItem , CE_MenuBarItem | QStyleOptionMenuItem | State_Selected | The menu item is currently selected item. |
State_Enabled | The item is enabled. | ||
State_DownArrow | Indicates that a scroll down arrow should be drawn. | ||
State_UpArrow | Indicates that a scroll up arrow should be drawn | ||
State_HasFocus | Set if the menu bar has input focus. | ||
CE_PushButton , CE_PushButtonBevel , CE_PushButtonLabel | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
State_HasFocus | Set if the button has input focus. | ||
State_Raised | Set if the button is not down, not on and not flat. | ||
State_On | Set if the button is a toggle button and is toggled on. | ||
State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). | ||
CE_RadioButton , CE_RadioButtonLabel , CE_CheckBox , CE_CheckBoxLabel | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
State_HasFocus | Set if the button has input focus. | ||
State_On | Set if the button is checked. | ||
State_Off | Set if the button is not checked. | ||
State_NoChange | Set if the button is in the NoChange state. | ||
State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). | ||
CE_ProgressBarContents , CE_ProgressBarLabel , CE_ProgressBarGroove | QStyleOptionProgressBar | State_Enabled | Set if the progress bar is enabled. |
State_HasFocus | Set if the progress bar has input focus. | ||
CE_Header , CE_HeaderSection , CE_HeaderLabel | QStyleOptionHeader | ||
CE_TabBarTab , CE_TabBarTabShape, CE_TabBarTabLabel | QStyleOptionTab | State_Enabled | Set if the tab bar is enabled. |
State_Selected | The tab bar is the currently selected tab bar. | ||
State_HasFocus | Set if the tab bar tab has input focus. | ||
CE_ToolButtonLabel | QStyleOptionToolButton | State_Enabled | Set if the tool button is enabled. |
State_HasFocus | Set if the tool button has input focus. | ||
State_Sunken | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). | ||
State_On | Set if the tool button is a toggle button and is toggled on. | ||
State_AutoRaise | Set if the tool button has auto-raise enabled. | ||
State_MouseOver | Set if the mouse pointer is over the tool button. | ||
State_Raised | Set if the button is not down and is not on. | ||
CE_ToolBoxTab | QStyleOptionToolBox | State_Selected | The tab is the currently selected tab. |
CE_HeaderSection | QStyleOptionHeader | State_Sunken | Indicates that the section is pressed. |
State_UpArrow | Indicates that the sort indicator should be pointing up. | ||
State_DownArrow | Indicates that the sort indicator should be pointing down. |
Implemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QCleanlooksStyle, QProxyStyle, QPlastiqueStyle, QWindowsMobileStyle, QCDEStyle, QCommonStyle, QWindowsCEStyle, and QWindowsVistaStyle.
Referenced by QWindowsVistaStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QStylePainter::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QStyleSheetStyle::drawControl(), QFrame::drawFrame(), QCleanlooksStyle::drawPrimitive(), QStyledItemDelegate::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QSizeGrip::paintEvent(), QColumnViewGrip::paintEvent(), QToolBoxButton::paintEvent(), QComboBoxListView::paintEvent(), QMenuBar::paintEvent(), QToolBar::paintEvent(), QListView::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QHeaderView::paintEvent(), QGraphicsView::paintEvent(), QHeaderView::paintSection(), and QMacStyle::styleHint().
|
virtual |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.
Reimplemented in QCleanlooksStyle, QStyleSheetStyle, QGtkStyle, and QProxyStyle.
Definition at line 570 of file qstyle.cpp.
Referenced by QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QWindowsCEStyle::drawControl(), QCommonStyle::drawControl(), QPlastiqueStyle::drawControl(), QWindowsXPStyle::drawControl(), QGtkStyle::drawControl(), QMacStyle::drawControl(), QStylePainter::drawItemPixmap(), QCleanlooksStyle::drawItemPixmap(), QStyleSheetStyle::drawItemPixmap(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), and QLabel::paintEvent().
|
virtual |
Draws the given text in the specified rectangle using the provided painter and palette.
The text is drawn using the painter's pen, and aligned and wrapped according to the specified alignment. If an explicit textRole is specified, the text is drawn using the palette's color for the given role. The enabled parameter indicates whether or not the item is enabled; when reimplementing this function, the enabled parameter should influence how the item is drawn.
Reimplemented in QMacStyle, QCleanlooksStyle, QStyleSheetStyle, QGtkStyle, QProxyStyle, and QWindowsCEStyle.
Definition at line 532 of file qstyle.cpp.
Referenced by QCommonStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStylePainter::drawItemText(), QStyleSheetStyle::drawItemText(), QMacStyle::drawItemText(), QScriptDebuggerLocalsItemDelegate::paint(), and QLabel::paintEvent().
|
pure virtual |
Draws the given primitive element with the provided painter using the style options specified by option.
The widget argument is optional and may contain a widget that may aid in drawing the primitive element.
The table below is listing the primitive elements and their associated style option subclasses. The style options contain all the parameters required to draw the elements, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
Note that if a primitive element is not listed here, it is because it uses a plain QStyleOption object.
Primitive Element | QStyleOption Subclass | Style Flag | Remark |
PE_FrameFocusRect | QStyleOptionFocusRect | State_FocusAtBorder | Whether the focus is is at the border or inside the widget. |
PE_IndicatorCheckBox | QStyleOptionButton | State_NoChange | Indicates a "tri-state" checkbox. |
State_On | Indicates the indicator is checked. | ||
PE_IndicatorRadioButton | QStyleOptionButton | State_On | Indicates that a radio button is selected. |
PE_Q3CheckListExclusiveIndicator , PE_Q3CheckListIndicator | QStyleOptionQ3ListView | State_On | Indicates whether or not the controller is selected. |
State_NoChange | Indicates a "tri-state" controller. | ||
State_Enabled | Indicates the controller is enabled. | ||
PE_IndicatorBranch | QStyleOption | State_Children | Indicates that the control for expanding the tree to show child items, should be drawn. |
State_Item | Indicates that a horizontal branch (to show a child item), should be drawn. | ||
State_Open | Indicates that the tree branch is expanded. | ||
State_Sibling | Indicates that a vertical line (to show a sibling item), should be drawn. | ||
PE_IndicatorHeaderArrow | QStyleOptionHeader | State_UpArrow | Indicates that the arrow should be drawn up; otherwise it should be down. |
PE_FrameGroupBox , PE_Frame , PE_FrameLineEdit , PE_FrameMenu , PE_FrameDockWidget , PE_FrameWindow | QStyleOptionFrame | State_Sunken | Indicates that the Frame should be sunken. |
PE_IndicatorToolBarHandle | QStyleOption | State_Horizontal | Indicates that the window handle is horizontal instead of vertical. |
PE_Q3DockWindowSeparator | QStyleOption | State_Horizontal | Indicates that the separator is horizontal instead of vertical. |
PE_IndicatorSpinPlus , PE_IndicatorSpinMinus , PE_IndicatorSpinUp , PE_IndicatorSpinDown , | QStyleOptionSpinBox | State_Sunken | Indicates that the button is pressed. |
PE_PanelButtonCommand | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
State_HasFocus | Set if the button has input focus. | ||
State_Raised | Set if the button is not down, not on and not flat. | ||
State_On | Set if the button is a toggle button and is toggled on. | ||
State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). |
Implemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QCDEStyle, QProxyStyle, QCleanlooksStyle, QPlastiqueStyle, QWindowsMobileStyle, QCommonStyle, QWindowsVistaStyle, and QWindowsCEStyle.
Referenced by drawArrow(), QTreeView::drawBranches(), QItemDelegate::drawCheck(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawFocus(), QWindowsVistaStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QStylePainter::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QTreeView::drawRow(), QAbstractScrollArea::event(), QDecorationStyled::paint(), QColumnViewDelegate::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QWellArray::paintCell(), QToolBarSeparator::paintEvent(), QStatusBar::paintEvent(), QDockWidgetTitleButton::paintEvent(), QMenuBar::paintEvent(), QToolBar::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), QLineEdit::paintEvent(), CloseButton::paintEvent(), QWorkspaceChild::paintEvent(), paintSep(), and QGraphicsWidget::paintWindowFrame().
|
pure virtual |
Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option.
The option parameter can pass extra information, but it must contain a palette.
Note that not all pixmaps will conform, in which case the returned pixmap is a plain copy.
Implemented in QMacStyle, QGtkStyle, QStyleSheetStyle, QProxyStyle, QCommonStyle, QCleanlooksStyle, and QWindowsMobileStyle.
Referenced by QStyleSheetStyle::generatedIconPixmap(), QLabel::paintEvent(), QSvgIconEngine::pixmap(), and QPixmapIconEngine::pixmap().
|
pure virtual |
Returns the sub control at the given position in the given complex control (with the style options specified by option).
Note that the position is expressed in screen coordinates.
The option argument is a pointer to a QStyleOptionComplex object (or one of its subclasses). The object can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget argument is optional and can contain additional information for the function.
Implemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QProxyStyle, QWindowsCEStyle, QPlastiqueStyle, QCleanlooksStyle, QWindowsVistaStyle, and QCommonStyle.
Referenced by QWorkspaceTitleBar::contextMenuEvent(), QGroupBox::event(), QMDIControl::event(), QMdi::ControllerWidget::getSubControl(), QStyleSheetStyle::hitTestComplexControl(), QScrollBar::mouseMoveEvent(), QMDIControl::mouseMoveEvent(), QGroupBox::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QScrollBar::mousePressEvent(), QMDIControl::mousePressEvent(), QGroupBox::mousePressEvent(), QSlider::mousePressEvent(), QComboBoxPrivateContainer::mousePressEvent(), QComboBox::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QMDIControl::mouseReleaseEvent(), QGroupBox::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), and QWorkspaceTitleBar::paintEvent().
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.
Reimplemented in QStyleSheetStyle, QGtkStyle, QCleanlooksStyle, and QProxyStyle.
Definition at line 497 of file qstyle.cpp.
Referenced by QCleanlooksStyle::itemPixmapRect(), QStyleSheetStyle::itemPixmapRect(), and QCommonStyle::subElementRect().
|
virtual |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment.
The enabled parameter indicates whether or not the associated item is enabled.
If the given rectangle is larger than the area needed to render the text, the rectangle that is returned will be offset within rectangle according to the specified alignment. For example, if alignment is Qt::AlignCenter, the returned rectangle will be centered within rectangle. If the given rectangle is smaller than the area needed, the returned rectangle will be the smallest rectangle large enough to render the text.
Reimplemented in QStyleSheetStyle, and QProxyStyle.
Definition at line 470 of file qstyle.cpp.
Referenced by QMacStyle::drawControl(), QStyleSheetStyle::itemTextRect(), QRadioButton::sizeHint(), QCheckBox::sizeHint(), and QCommonStyle::subElementRect().
int QStyle::layoutSpacing | ( | QSizePolicy::ControlType | control1, |
QSizePolicy::ControlType | control2, | ||
Qt::Orientation | orientation, | ||
const QStyleOption * | option = 0 , |
||
const QWidget * | widget = 0 |
||
) | const |
Returns the spacing that should be used between control1 and control2 in a layout.
orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.
This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
For binary compatibility reasons, this function is not virtual. If you want to specify custom layout spacings in a QStyle subclass, implement a slot called layoutSpacingImplementation(). QStyle will discover the slot at run-time (using Qt's meta-object system) and direct all calls to layoutSpacing() to layoutSpacingImplementation().
Definition at line 2395 of file qstyle.cpp.
Referenced by combinedLayoutSpacing(), QWizardPrivate::layoutInfoForCurrentPage(), QStyleSheetStyle::layoutSpacing(), QStyleSheetStyle::layoutSpacingImplementation(), and QLayoutStyleInfo::perItemSpacing().
|
protectedslot |
This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout.
orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.
If you want to provide custom layout spacings in a QStyle subclass, implement a slot called layoutSpacingImplementation() in your subclass. Be aware that this slot will only be called if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
The default implementation returns -1.
Definition at line 2481 of file qstyle.cpp.
Referenced by QStyleSheetStyle::deref().
|
pure virtual |
Returns the value of the given pixel metric.
The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:
Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.
Implemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QWindowsCEStyle, QWindowsMobileStyle, QGtkStyle, QProxyStyle, QPlastiqueStyle, QWindowsStyle, QWindowsXPStyle, QWindowsVistaStyle, QCommonStyle, QCleanlooksStyle, and QCDEStyle.
Referenced by QDialog::adjustPosition(), QWorkspaceChild::adjustToFullscreen(), QMenuBarPrivate::calcActionRects(), QAbstractButton::changeEvent(), QMenuBar::defaultAction(), QStyleSheetStyle::defaultSize(), QItemDelegate::doLayout(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QCommonStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QItemDelegate::drawDisplay(), QCommonStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QToolBarLayout::expandedSize(), QGridLayoutEngine::fillRowData(), QMenuBar::heightForWidth(), QWorkspaceChild::iconWidget(), QToolBarPrivate::init(), QTabBarPrivate::initStyleBaseOption(), QToolButton::initStyleOption(), QToolBar::initStyleOption(), QLineEdit::initStyleOption(), QMenu::internalDelayedPopup(), QMenu::keyPressEvent(), QToolBarLayout::layoutActions(), QWizardPrivate::layoutInfoForCurrentPage(), QToolBoxButton::minimumSizeHint(), QGroupBox::minimumSizeHint(), QMdiSubWindow::minimumSizeHint(), QAbstractScrollArea::minimumSizeHint(), QSlider::minimumSizeHint(), QMenuBar::minimumSizeHint(), QCalendarWidget::minimumSizeHint(), QDockWidgetLayout::minimumTitleWidth(), QScrollBar::mouseMoveEvent(), QStyleSheetStyle::nativeFrameWidth(), QDecorationStyled::paint(), QWellArray::paintCell(), QFocusFrame::paintEvent(), QCommandLinkButton::paintEvent(), QDockWidgetTitleButton::paintEvent(), QMdiSubWindow::paintEvent(), QMenuBar::paintEvent(), QMenu::paintEvent(), QTabBar::paintEvent(), QWorkspaceChild::paintEvent(), QGraphicsWidget::paintWindowFrame(), QCommonStyle::pixelMetric(), QWindowsStyle::pixelMetric(), QMotifStyle::pixelMetric(), QMacStyle::pixelMetric(), QStyleSheetStyle::pixelMetric(), QMenu::popup(), QMacStylePrivate::pushButtonSizeFromContents(), QBalloonTip::QBalloonTip(), QDockAreaLayout::QDockAreaLayout(), QLayoutStyleInfo::QLayoutStyleInfo(), QMainWindowLayout::QMainWindowLayout(), qSmartSpacing(), QWorkspaceChild::QWorkspaceChild(), QMdi::SimpleCascader::rearrange(), QDecorationStyled::region(), QHeaderView::sectionSizeFromContents(), QTabBar::setCurrentIndex(), QHeaderView::setDefaultSectionSize(), QToolBarLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QMainWindow::setIconSize(), QToolBar::setIconSize(), QComboBox::setMinimumContentsLength(), QTextControl::setOverwriteMode(), QMenu::setSeparatorsCollapsible(), QSplitter::setSizes(), QComboBox::showPopup(), QDockWidgetLayout::sizeFromContent(), QWindowsVistaStyle::sizeFromContents(), QPlastiqueStyle::sizeFromContents(), QCommonStyle::sizeFromContents(), QCleanlooksStyle::sizeFromContents(), QWindowsStyle::sizeFromContents(), QWindowsXPStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QScrollBar::sizeHint(), QToolBarExtension::sizeHint(), QPushButton::sizeHint(), QToolBarSeparator::sizeHint(), QToolBoxButton::sizeHint(), QToolButton::sizeHint(), QSlider::sizeHint(), QProgressBar::sizeHint(), QProgressDialog::sizeHint(), QMenuBarExtension::sizeHint(), QMenuBar::sizeHint(), QDockWidgetTitleButton::sizeHint(), QMenu::sizeHint(), CloseButton::sizeHint(), QWorkspaceTitleBar::sizeHint(), QGridLayoutEngine::spacing(), QMessageBoxPrivate::standardIcon(), QDockAreaLayout::styleChangedEvent(), QCommonStyle::styleHint(), QWindowsXPStyle::styleHint(), QCommonStyle::subControlRect(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subControlRect(), QMacStyle::subControlRect(), QGtkStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QWindowsStyle::subElementRect(), QMacStyle::subElementRect(), QMotifStyle::subElementRect(), QTabBar::tabSizeHint(), QItemDelegate::textRectangle(), QDecorationStyled::titleBarHeight(), QDockWidgetLayout::titleHeight(), QGraphicsWidget::unsetWindowFrameMargins(), QMenuPrivate::updateActionRects(), QToolBarLayout::updateGeomArray(), QToolBarLayout::updateMarginAndSpacing(), QComboBoxPrivateContainer::updateTopBottomMargin(), QListView::viewOptions(), and QAbstractItemView::viewOptions().
|
virtual |
Initializes the appearance of the given widget.
This function is called for every widget at some point after it has been fully created but just before it is shown for the very first time.
Note that the default implementation does nothing. Reasonable actions in this function might be to call the QWidget::setBackgroundMode() function for the widget. Do not use the function to set, for example, the geometry. Reimplementing this function provides a back-door through which the appearance of a widget can be changed, but with Qt's style engine it is rarely necessary to implement this function; reimplement drawItemPixmap(), drawItemText(), drawPrimitive(), etc. instead.
The QWidget::inherits() function may provide enough information to allow class-specific customizations. But because new QStyle subclasses are expected to work reasonably with all current and future widgets, limited use of hard-coded customization is recommended.
Reimplemented in QGtkStyle, QStyleSheetStyle, QCleanlooksStyle, QWindowsMobileStyle, QWindowsCEStyle, QCommonStyle, QProxyStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 390 of file qstyle.cpp.
Referenced by QWidget::event(), QMotifStyle::polish(), QCommonStyle::polish(), QStyleSheetStyle::polish(), qt_mac_update_os_settings(), QtWndProc(), QApplicationPrivate::setPalette_helper(), QApplication::setStyle(), QWorkspaceChild::showShaded(), QApplication::style(), and updateWidgets().
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Late initialization of the given application object.
Reimplemented in QGtkStyle, QStyleSheetStyle, QCleanlooksStyle, QWindowsCEStyle, QProxyStyle, QWindowsMobileStyle, QCommonStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsXPStyle, and QWindowsStyle.
Definition at line 419 of file qstyle.cpp.
|
virtual |
Changes the palette according to style specific requirements for color palettes (if any).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in QGtkStyle, QStyleSheetStyle, QCleanlooksStyle, QWindowsMobileStyle, QWindowsCEStyle, QProxyStyle, QPlastiqueStyle, QCommonStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 445 of file qstyle.cpp.
const QStyle * QStyle::proxy | ( | ) | const |
This function returns the current proxy for this style. By default most styles will return themselves. However when a proxy style is in use, it will allow the style to call back into its proxy.
Definition at line 2546 of file qstyle.cpp.
Referenced by QWindowsVistaStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), drawItemText(), QCommonStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QMotifStyle::event(), QMacStyle::event(), QCommonStyle::hitTestComplexControl(), QPlastiqueStyle::hitTestComplexControl(), itemTextRect(), QCommonStyle::pixelMetric(), QWindowsStyle::pixelMetric(), QMotifStyle::pixelMetric(), QMacStyle::pixelMetric(), QWindowsStyle::polish(), QMacStylePrivate::pushButtonSizeFromContents(), QWindowsVistaStyle::sizeFromContents(), QPlastiqueStyle::sizeFromContents(), QCommonStyle::sizeFromContents(), QCleanlooksStyle::sizeFromContents(), QWindowsStyle::sizeFromContents(), QWindowsXPStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QGtkStyle::sizeFromContents(), QWindowsStyle::standardIconImplementation(), QCommonStyle::standardIconImplementation(), QCommonStyle::standardPixmap(), QCommonStyle::styleHint(), QWindowsXPStyle::styleHint(), QMacStyle::styleHint(), QCommonStyle::subControlRect(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subControlRect(), QMacStyle::subControlRect(), QGtkStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QWindowsStyle::subElementRect(), QMacStyle::subElementRect(), and QMotifStyle::subElementRect().
|
private |
Definition at line 2557 of file qstyle.cpp.
Referenced by QProxyStylePrivate::ensureBaseStyle(), and QProxyStyle::QProxyStyle().
|
pure virtual |
Returns the size of the element described by the specified option and type, based on the provided contentsSize.
The option argument is a pointer to a QStyleOption or one of its subclasses. The option can be cast to the appropriate type using the qstyleoption_cast() function. The widget is an optional argument and can contain extra information used for calculating the size.
See the table below for the appropriate option casts:
Implemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QMotifStyle, QWindowsStyle, QWindowsXPStyle, QCleanlooksStyle, QProxyStyle, QWindowsCEStyle, QCommonStyle, QWindowsMobileStyle, QPlastiqueStyle, and QWindowsVistaStyle.
Referenced by QMenuBar::heightForWidth(), QTabWidget::heightForWidth(), QGroupBox::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QTabWidget::minimumSizeHint(), QHeaderView::sectionSizeFromContents(), QStyleSheetStyle::sizeFromContents(), QRadioButton::sizeHint(), QCheckBox::sizeHint(), QScrollBar::sizeHint(), QPushButton::sizeHint(), QStyledItemDelegate::sizeHint(), QToolButton::sizeHint(), QSlider::sizeHint(), QProgressBar::sizeHint(), QMDIControl::sizeHint(), QAbstractSpinBox::sizeHint(), QTabWidget::sizeHint(), QMenu::sizeHint(), DetailButton::sizeHint(), QDateTimeEdit::sizeHint(), QSplitterHandle::sizeHint(), QMdi::ControllerWidget::sizeHint(), QTabBar::tabSizeHint(), QMenuPrivate::updateActionRects(), and QExpandingLineEdit::updateMinimumWidth().
|
static |
Converts the given logicalValue to a pixel position.
The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow, providing that span is less than 4096.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
Definition at line 2176 of file qstyle.cpp.
Referenced by QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QCommonStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsCEStyle::subControlRect(), QMotifStyle::subControlRect(), and QStyleSheetStyle::subControlRect().
|
static |
Converts the given pixel position to a logical value.
0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
Definition at line 2222 of file qstyle.cpp.
Referenced by QSliderPrivate::pixelPosToRangeValue(), and QScrollBarPrivate::pixelPosToRangeValue().
QIcon QStyle::standardIcon | ( | StandardPixmap | standardIcon, |
const QStyleOption * | option = 0 , |
||
const QWidget * | widget = 0 |
||
) | const |
Returns an icon for the given standardIcon.
The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.
Definition at line 2327 of file qstyle.cpp.
Referenced by QDialogButtonBoxPrivate::createButton(), QMdiSubWindowPrivate::createSystemMenu(), QCommonStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QWindowsXPStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), QMdiSubWindow::event(), QFileIconProviderPrivate::getIcon(), QBalloonTip::QBalloonTip(), QMdiSubWindow::QMdiSubWindow(), QMessageBoxPrivate::standardIcon(), QCommonStyle::standardIconImplementation(), QStyleSheetStyle::standardIconImplementation(), QCommonStyle::subElementRect(), QMacStyle::subElementRect(), and QMdi::ControlLabel::updateWindowIcon().
|
protectedslot |
Returns an icon for the given standardIcon.
Reimplement this slot to provide your own icons in a QStyle subclass; because of binary compatibility constraints, the standardIcon() function (introduced in Qt 4.1) is not virtual. Instead, standardIcon() will dynamically detect and call this slot.
The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.
Definition at line 2363 of file qstyle.cpp.
|
virtual |
Returns the style's standard palette.
Note that on systems that support system colors, the style's standard palette is not used. In particular, the Windows XP, Vista, and Mac styles do not use the standard palette, but make use of native theme engines. With these styles, you should not set the palette with QApplication::setStandardPalette().
Reimplemented in QStyleSheetStyle, QMotifStyle, QMacStyle, QWindowsMobileStyle, QWindowsCEStyle, QPlastiqueStyle, QWindowsVistaStyle, QProxyStyle, QWindowsXPStyle, QGtkStyle, QCDEStyle, and QCleanlooksStyle.
Definition at line 2283 of file qstyle.cpp.
Referenced by QCleanlooksStyle::standardPalette(), QWindowsXPStyle::standardPalette(), QMacStyle::standardPalette(), and QStyleSheetStyle::standardPalette().
|
pure virtual |
A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.
Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement the slot standardIconImplementation().
Implemented in QMacStyle, QStyleSheetStyle, QGtkStyle, QMotifStyle, QWindowsStyle, QWindowsXPStyle, QCleanlooksStyle, QProxyStyle, QPlastiqueStyle, QWindowsCEStyle, QWindowsMobileStyle, QCommonStyle, and QWindowsVistaStyle.
Referenced by QSystemTrayIconPrivate::showMessage_sys(), standardIconImplementation(), QCommonStyle::standardPixmap(), and QStyleSheetStyle::standardPixmap().
|
pure virtual |
Returns an integer representing the specified style hint for the given widget described by the provided style option.
returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.
Implemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QWindowsCEStyle, QWindowsMobileStyle, QGtkStyle, QWindowsStyle, QCleanlooksStyle, QWindowsXPStyle, QProxyStyle, QWindowsVistaStyle, QCommonStyle, and QPlastiqueStyle.
Referenced by QWorkspaceChild::adjustToFullscreen(), QMenuBarPrivate::calcActionRects(), QWorkspace::changeEvent(), QToolButton::changeEvent(), QAbstractSpinBox::changeEvent(), QTabBar::changeEvent(), QComboBoxPrivateContainer::changeEvent(), QDialogButtonBoxPrivate::createButton(), QDefaultItemEditorFactory::createEditor(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), drawItemText(), QCommonStyle::drawPrimitive(), QLineEdit::event(), QFocusFrame::eventFilter(), QWindowsStyle::eventFilter(), QLineEdit::focusInEvent(), QTextControl::getPaintContext(), QMenuBar::heightForWidth(), QMenuPrivate::hideMenu(), QComboBox::hidePopup(), QTabBar::insertTab(), itemTextRect(), QAbstractSpinBox::keyPressEvent(), QMenu::keyPressEvent(), QMenuBar::minimumSizeHint(), QTreeView::mouseDoubleClickEvent(), QAbstractItemView::mouseDoubleClickEvent(), QScrollBar::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSlider::mousePressEvent(), QTabBar::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QTreeView::moveCursor(), QDecorationStyled::paint(), QComboBoxListView::paintEvent(), QLabel::paintEvent(), QTableView::paintEvent(), CloseButton::paintEvent(), QGraphicsWidget::paintWindowFrame(), QWindowsStyle::polish(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), qt_setWindowTitle_helperHelper(), QWorkspaceChild::QWorkspaceChild(), QDecorationStyled::region(), QGraphicsViewPrivate::rubberBandRegion(), QApplication::setActiveWindow(), QComboBoxPrivateContainer::setItemView(), QTabBar::setTabsClosable(), QComboBox::showPopup(), QPushButton::sizeHint(), QMenuBar::sizeHint(), QAccessibleMenuItem::state(), QStyleSheetStyle::styleHint(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QGtkStyle::subControlRect(), QCommonStyle::subElementRect(), QTextControl::timerEvent(), QStyledItemDelegate::updateEditorGeometry(), QComboBoxPrivateContainer::updateScrollers(), QComboBoxPrivateContainer::updateTopBottomMargin(), and QAbstractItemView::viewOptions().
|
pure virtual |
Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option).
The rectangle is defined in screen coordinates.
The option argument is a pointer to QStyleOptionComplex or one of its subclasses, and can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget is optional and can contain additional information for the function.
Implemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QMotifStyle, QCleanlooksStyle, QWindowsCEStyle, QProxyStyle, QWindowsMobileStyle, QWindowsXPStyle, QPlastiqueStyle, QWindowsVistaStyle, and QCommonStyle.
Referenced by QWindowsVistaStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QPlastiqueStyle::drawControl(), QGtkStyle::drawControl(), QGroupBox::event(), QCommonStyle::hitTestComplexControl(), QPlastiqueStyle::hitTestComplexControl(), QAbstractSpinBox::minimumSizeHint(), QScrollBar::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSlider::mousePressEvent(), QToolButton::mousePressEvent(), QCalendarPopup::mousePressEvent(), QMdiSubWindow::paintEvent(), QWorkspaceTitleBar::paintEvent(), QAccessibleAbstractSpinBox::rect(), QAccessibleToolButton::rect(), QAccessibleDoubleSpinBox::rect(), QAccessibleScrollBar::rect(), QAccessibleSlider::rect(), QAccessibleComboBox::rect(), QDecorationStyled::region(), QComboBox::showPopup(), showToolTip(), QGtkStyle::sizeFromContents(), QAbstractSpinBox::sizeHint(), QDateTimeEdit::sizeHint(), QWorkspaceTitleBar::sizeHint(), and QStyleSheetStyle::subControlRect().
|
pure virtual |
Returns the sub-area for the given element as described in the provided style option.
The returned rectangle is defined in screen coordinates.
The widget argument is optional and can be used to aid determining the area. The QStyleOption object can be cast to the appropriate type using the qstyleoption_cast() function. See the table below for the appropriate option casts:
Implemented in QStyleSheetStyle, QGtkStyle, QMotifStyle, QMacStyle, QWindowsCEStyle, QProxyStyle, QWindowsStyle, QWindowsMobileStyle, QCleanlooksStyle, QWindowsXPStyle, QPlastiqueStyle, QWindowsVistaStyle, and QCommonStyle.
Referenced by QItemDelegate::check(), QCommonStyle::drawControl(), QStyledItemDelegate::editorEvent(), QRadioButton::hitButton(), QCheckBox::hitButton(), QToolBar::paintEvent(), QTabBar::paintEvent(), QLineEdit::paintEvent(), QDockWidgetLayout::setGeometry(), QTabWidget::setUpLayout(), QCommonStyle::subElementRect(), QStyleSheetStyle::subElementRect(), and QStyledItemDelegate::updateEditorGeometry().
|
virtual |
Uninitialize the given {widget}'s appearance.
This function is the counterpart to polish(). It is called for every polished widget whenever the style is dynamically changed; the former style has to unpolish its settings before the new style can polish them again.
Note that unpolish() will only be called if the widget is destroyed. This can cause problems in some cases, e.g, if you remove a widget from the UI, cache it, and then reinsert it after the style has changed; some of Qt's classes cache their widgets.
Reimplemented in QStyleSheetStyle, QGtkStyle, QCleanlooksStyle, QWindowsMobileStyle, QProxyStyle, QCommonStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 409 of file qstyle.cpp.
Referenced by QtWndProc(), QApplication::setStyle(), QWidgetPrivate::setStyle_helper(), QCommonStyle::unpolish(), and QStyleSheetStyle::unpolish().
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Uninitialize the given application.
Reimplemented in QStyleSheetStyle, QGtkStyle, QCleanlooksStyle, QProxyStyle, QWindowsMobileStyle, QCommonStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 429 of file qstyle.cpp.
|
static |
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction.
The other alignment flags are left untouched.
If no horizontal alignment was specified, the function returns the default alignment for the given layout direction.
Definition at line 2149 of file qstyle.cpp.
Referenced by alignedRect(), QLayout::alignmentRect(), QLabelPrivate::documentRect(), QCommonStyle::drawControl(), QGtkStyle::drawControl(), QItemDelegate::drawDisplay(), QTextDocumentLayoutPrivate::layoutBlock(), QLabel::paintEvent(), QLineEdit::paintEvent(), qt_format_text(), QWidgetItem::setGeometry(), QApplication::setLayoutDirection(), QLabelPrivate::sizeForWidth(), and QCommonStylePrivate::viewItemDrawText().
|
static |
Returns the given logicalPosition converted to screen coordinates based on the specified direction.
The boundingRectangle is used when performing the translation.
Definition at line 2109 of file qstyle.cpp.
Referenced by QWindowsCEStyle::drawControl(), QWindowsVistaStyle::drawControl(), QCleanlooksStyle::drawControl(), QGtkStyle::drawControl(), QScrollArea::ensureVisible(), QToolBarAreaLayout::gapIndex(), and QAbstractScrollAreaPrivate::layoutChildren().
|
static |
Returns the given logicalRectangle converted to screen coordinates based on the specified direction.
The boundingRectangle is used when performing the translation.
This function is provided to support right-to-left desktops, and is typically used in implementations of the subControlRect() function.
Definition at line 2087 of file qstyle.cpp.
Referenced by QToolBarAreaLayout::apply(), QFormLayoutPrivate::arrangeWidgets(), QMenuBarPrivate::calcActionRects(), QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QStyleSheetStyle::drawPrimitive(), QTreeView::drawRow(), QToolBarAreaLayout::itemRect(), QToolBarLayout::layoutActions(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBarPrivate::layoutTabs(), QMdiAreaPrivate::place(), QWorkspacePrivate::place(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QToolBarLayout::setGeometry(), QMainWindowLayout::setGeometry(), QWindowsCEStyle::sizeFromContents(), QCommonStyle::subControlRect(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QWindowsCEStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subControlRect(), QMacStyle::subControlRect(), QGtkStyle::subControlRect(), QStyleSheetStyle::subControlRect(), QCommonStyle::subElementRect(), QWindowsVistaStyle::subElementRect(), QPlastiqueStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QWindowsStyle::subElementRect(), QWindowsCEStyle::subElementRect(), QMacStyle::subElementRect(), QMotifStyle::subElementRect(), QGtkStyle::subElementRect(), QStyleSheetStyle::subElementRect(), QTabBar::tabRect(), QMenuBarPrivate::updateGeometries(), QMdiAreaPrivate::updateTabBarGeometry(), and QScrollAreaPrivate::updateWidgetPosition().
|
friend |
|
friend |
|
friend |
|
friend |