Qt 4.8
|
The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows Vista. More...
#include <qwindowsvistastyle.h>
Public Functions | |
void | drawComplexControl (ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const |
void | drawControl (ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const |
void | drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=0) const |
bool | event (QEvent *event) |
SubControl | hitTestComplexControl (ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget=0) const |
int | pixelMetric (PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const |
void | polish (QWidget *widget) |
void | polish (QPalette &pal) |
void | polish (QApplication *app) |
QWindowsVistaStyle () | |
Constructs a QWindowsVistaStyle object. More... | |
QSize | sizeFromContents (ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const |
QPalette | standardPalette () const |
QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const |
int | styleHint (StyleHint hint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const |
QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const |
QRect | subElementRect (SubElement element, const QStyleOption *option, const QWidget *widget) const |
void | unpolish (QWidget *widget) |
void | unpolish (QApplication *app) |
Public Functions inherited from QWindowsXPStyle | |
void | drawComplexControl (ComplexControl cc, const QStyleOptionComplex *option, QPainter *p, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | drawControl (ControlElement element, const QStyleOption *option, QPainter *p, const QWidget *wwidget=0) const |
Reimplemented Function More... | |
void | drawPrimitive (PrimitiveElement pe, const QStyleOption *option, QPainter *p, const QWidget *widget=0) const |
Reimplemented Function More... | |
int | pixelMetric (PixelMetric pm, const QStyleOption *option=0, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | polish (QApplication *) |
Reimplemented Function More... | |
void | polish (QWidget *) |
Reimplemented Function More... | |
void | polish (QPalette &) |
Reimplemented Function More... | |
QWindowsXPStyle () | |
Constructs a QWindowsStyle. More... | |
QWindowsXPStyle (QWindowsXPStylePrivate &dd) | |
Constructs a QWindowsXPStyle object. More... | |
QSize | sizeFromContents (ContentsType ct, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget=0) const |
Reimplemented Function More... | |
QPalette | standardPalette () const |
Reimplemented Function More... | |
QPixmap | standardPixmap (StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget=0) const |
Reimplemented Function More... | |
int | styleHint (StyleHint hint, const QStyleOption *option=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const |
Reimplemented Function More... | |
QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *option, SubControl sc, const QWidget *widget=0) const |
Reimplemented Function More... | |
QRect | subElementRect (SubElement r, const QStyleOption *option, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | unpolish (QApplication *) |
Reimplemented Function More... | |
void | unpolish (QWidget *) |
Reimplemented Function More... | |
~QWindowsXPStyle () | |
Destroys the style. More... | |
Public Functions inherited from QWindowsStyle | |
QWindowsStyle () | |
Constructs a QWindowsStyle object. More... | |
~QWindowsStyle () | |
Destroys the QWindowsStyle object. More... | |
Public Functions inherited from QCommonStyle | |
QPixmap | generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const |
Reimplemented Function More... | |
QCommonStyle () | |
Constructs a QCommonStyle. More... | |
~QCommonStyle () | |
Destroys the style. More... | |
Public Functions inherited from QStyle | |
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 | 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 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... | |
const QStyle * | proxy () const |
QStyle () | |
Constructs a style object. More... | |
QIcon | standardIcon (StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const |
Returns an icon for the given standardIcon. 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... | |
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... | |
Friends | |
class | QStyleFactory |
The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows Vista.
Definition at line 56 of file qwindowsvistastyle.h.
QWindowsVistaStyle::QWindowsVistaStyle | ( | ) |
Constructs a QWindowsVistaStyle object.
Definition at line 164 of file qwindowsvistastyle.cpp.
|
virtual |
see drawPrimitive for comments on the animation support
Reimplemented from QWindowsStyle.
Definition at line 1548 of file qwindowsvistastyle.cpp.
|
virtual |
see drawPrimitive for comments on the animation support
Reimplemented from QWindowsStyle.
Definition at line 881 of file qwindowsvistastyle.cpp.
|
virtual |
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.
Reimplemented from QWindowsStyle.
Definition at line 345 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QObject.
Definition at line 2301 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QCommonStyle.
Definition at line 2324 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2336 of file qwindowsvistastyle.cpp.
Referenced by drawControl().
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2377 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2481 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2369 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 1932 of file qwindowsvistastyle.cpp.
|
protectedslot |
Definition at line 2635 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QStyle.
Definition at line 2361 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2490 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2154 of file qwindowsvistastyle.cpp.
Referenced by drawControl().
|
virtual |
Reimplemented from QCommonStyle.
Definition at line 2189 of file qwindowsvistastyle.cpp.
Referenced by drawComplexControl().
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 1986 of file qwindowsvistastyle.cpp.
Referenced by drawControl(), and drawPrimitive().
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2431 of file qwindowsvistastyle.cpp.
|
virtual |
Reimplemented from QWindowsStyle.
Definition at line 2473 of file qwindowsvistastyle.cpp.
|
friend |
Definition at line 100 of file qwindowsvistastyle.h.