Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QWindowsVistaStyle Class Reference

The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows Vista. More...

#include <qwindowsvistastyle_p.h>

Inheritance diagram for QWindowsVistaStyle:
Collaboration diagram for QWindowsVistaStyle:

Public Member Functions

 QWindowsVistaStyle ()
 Constructs a QWindowsVistaStyle object.
 ~QWindowsVistaStyle () override
 Destructor.
void drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=nullptr) const override
void drawControl (ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
void drawComplexControl (ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
QSize sizeFromContents (ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
QRect subElementRect (SubElement element, const QStyleOption *option, const QWidget *widget) const override
QRect subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const override
SubControl hitTestComplexControl (ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget=nullptr) const override
QIcon standardIcon (StandardPixmap standardIcon, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
 \reimp
QPixmap standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=nullptr) const override
int pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
int styleHint (StyleHint hint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
void polish (QWidget *widget) override
void unpolish (QWidget *widget) override
void polish (QPalette &pal) override
void polish (QApplication *app) override

Protected Member Functions

 QWindowsVistaStyle (QWindowsVistaStylePrivate &dd)

Friends

class QStyleFactory

Detailed Description

The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows Vista.

Since
4.3

\inmodule QtWidgets

Warning
This style is only available on the Windows Vista platform because it makes use of Windows Vista's style engine.
See also
QMacStyle, QFusionStyle

Definition at line 25 of file qwindowsvistastyle_p.h.

Constructor & Destructor Documentation

◆ QWindowsVistaStyle() [1/2]

QWindowsVistaStyle::QWindowsVistaStyle ( )

Constructs a QWindowsVistaStyle object.

Definition at line 1285 of file qwindowsvistastyle.cpp.

◆ ~QWindowsVistaStyle()

QWindowsVistaStyle::~QWindowsVistaStyle ( )
overridedefault

Destructor.

◆ QWindowsVistaStyle() [2/2]

QWindowsVistaStyle::QWindowsVistaStyle ( QWindowsVistaStylePrivate & dd)
protected

Constructs a QWindowsStyle object.

Definition at line 1293 of file qwindowsvistastyle.cpp.

Member Function Documentation

◆ drawComplexControl()

void QWindowsVistaStyle::drawComplexControl ( ComplexControl control,
const QStyleOptionComplex * option,
QPainter * painter,
const QWidget * widget ) const
override

see drawPrimitive for comments on the animation support

Definition at line 3280 of file qwindowsvistastyle.cpp.

References QPaintEngine::QPainter.

Here is the call graph for this function:

◆ drawControl()

void QWindowsVistaStyle::drawControl ( ControlElement element,
const QStyleOption * option,
QPainter * painter,
const QWidget * widget ) const
override

see drawPrimitive for comments on the animation support

Definition at line 2323 of file qwindowsvistastyle.cpp.

References QPaintEngine::QPainter.

Here is the call graph for this function:

◆ drawPrimitive()

void QWindowsVistaStyle::drawPrimitive ( PrimitiveElement element,
const QStyleOption * option,
QPainter * painter,
const QWidget * widget = nullptr ) const
override

Animations are used for some state transitions on specific widgets.

Only one running animation can exist for a widget at any specific time. Animations can be added through QWindowsVistaStylePrivate::startAnimation(Animation *) and any existing animation on a widget can be retrieved with QWindowsVistaStylePrivate::widgetAnimation(Widget *).

Once an animation has been started, QWindowsVistaStylePrivate::timerEvent(QTimerEvent *) will continuously call update() on the widget until it is stopped, meaning that drawPrimitive will be called many times until the transition has completed. During this time, the result will be retrieved by the Animation::paint(...) function and not by the style itself.

To determine if a transition should occur, the style needs to know the previous state of the widget as well as the current one. This is solved by updating dynamic properties on the widget every time the function is called.

Transitions interrupting existing transitions should always be smooth, so whenever a hover-transition is started on a pulsating button, it uses the current frame of the pulse-animation as the starting image for the hover transition.

Definition at line 1336 of file qwindowsvistastyle.cpp.

References QPaintEngine::QPainter.

Here is the call graph for this function:

◆ hitTestComplexControl()

QStyle::SubControl QWindowsVistaStyle::hitTestComplexControl ( ComplexControl control,
const QStyleOptionComplex * option,
const QPoint & pos,
const QWidget * widget = nullptr ) const
override

Definition at line 4505 of file qwindowsvistastyle.cpp.

◆ pixelMetric()

int QWindowsVistaStyle::pixelMetric ( PixelMetric metric,
const QStyleOption * option = nullptr,
const QWidget * widget = nullptr ) const
override

Definition at line 4514 of file qwindowsvistastyle.cpp.

◆ polish() [1/3]

void QWindowsVistaStyle::polish ( QApplication * app)
override

Definition at line 4812 of file qwindowsvistastyle.cpp.

◆ polish() [2/3]

void QWindowsVistaStyle::polish ( QPalette & pal)
override

Definition at line 4772 of file qwindowsvistastyle.cpp.

◆ polish() [3/3]

void QWindowsVistaStyle::polish ( QWidget * widget)
override

Definition at line 4608 of file qwindowsvistastyle.cpp.

◆ sizeFromContents()

QSize QWindowsVistaStyle::sizeFromContents ( ContentsType type,
const QStyleOption * option,
const QSize & size,
const QWidget * widget ) const
override

Definition at line 4028 of file qwindowsvistastyle.cpp.

◆ standardIcon()

QIcon QWindowsVistaStyle::standardIcon ( StandardPixmap standardIcon,
const QStyleOption * option = nullptr,
const QWidget * widget = nullptr ) const
override

\reimp

Definition at line 4877 of file qwindowsvistastyle.cpp.

References QPaintEngine::QPainter, and QWindowsVistaStylePrivate::useVista().

Here is the call graph for this function:

◆ standardPixmap()

QPixmap QWindowsVistaStyle::standardPixmap ( StandardPixmap standardPixmap,
const QStyleOption * option,
const QWidget * widget = nullptr ) const
override

Definition at line 4847 of file qwindowsvistastyle.cpp.

References QWindowsVistaStylePrivate::useVista().

Here is the call graph for this function:

◆ styleHint()

int QWindowsVistaStyle::styleHint ( StyleHint hint,
const QStyleOption * option = nullptr,
const QWidget * widget = nullptr,
QStyleHintReturn * returnData = nullptr ) const
override

Definition at line 2210 of file qwindowsvistastyle.cpp.

◆ subControlRect()

QRect QWindowsVistaStyle::subControlRect ( ComplexControl control,
const QStyleOptionComplex * option,
SubControl subControl,
const QWidget * widget ) const
override

Definition at line 4292 of file qwindowsvistastyle.cpp.

◆ subElementRect()

QRect QWindowsVistaStyle::subElementRect ( SubElement element,
const QStyleOption * option,
const QWidget * widget ) const
override

Definition at line 4141 of file qwindowsvistastyle.cpp.

◆ unpolish()

void QWindowsVistaStyle::unpolish ( QWidget * widget)
override

Definition at line 4689 of file qwindowsvistastyle.cpp.

References QWindowsVistaStylePrivate::useVista().

Here is the call graph for this function:

◆ QStyleFactory

friend class QStyleFactory
friend

Definition at line 68 of file qwindowsvistastyle_p.h.


The documentation for this class was generated from the following files: