Qt 4.8
|
The QCommonStyle class encapsulates the common Look and Feel of a GUI. More...
#include <qcommonstyle.h>
Public Functions | |
void | drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w=0) const |
Reimplemented Function More... | |
void | drawControl (ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const |
Reimplemented Function More... | |
void | drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const |
Reimplemented Function More... | |
QPixmap | generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const |
Reimplemented Function More... | |
SubControl | hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *w=0) const |
Reimplemented Function More... | |
int | pixelMetric (PixelMetric m, const QStyleOption *opt=0, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | polish (QPalette &) |
Reimplemented Function More... | |
void | polish (QApplication *app) |
Reimplemented Function More... | |
void | polish (QWidget *widget) |
Reimplemented Function More... | |
QCommonStyle () | |
Constructs a QCommonStyle. More... | |
QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget=0) const |
Reimplemented Function More... | |
QPixmap | standardPixmap (StandardPixmap sp, const QStyleOption *opt=0, const QWidget *widget=0) const |
Reimplemented Function More... | |
int | styleHint (StyleHint sh, const QStyleOption *opt=0, const QWidget *w=0, QStyleHintReturn *shret=0) const |
Reimplemented Function More... | |
QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *w=0) const |
Reimplemented Function More... | |
QRect | subElementRect (SubElement r, const QStyleOption *opt, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | unpolish (QWidget *widget) |
Reimplemented Function More... | |
void | unpolish (QApplication *application) |
Reimplemented Function 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 QPalette | standardPalette () const |
Returns the style's standard palette. 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... | |
Protected Slots | |
QIcon | standardIconImplementation (StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const |
Protected Slots inherited from QStyle | |
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 | |
QCommonStyle (QCommonStylePrivate &dd) | |
Protected Functions inherited from QStyle | |
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... | |
The QCommonStyle class encapsulates the common Look and Feel of a GUI.
This abstract class implements some of the widget's look and feel that is common to all GUI styles provided and shipped as part of Qt.
Since QCommonStyle inherits QStyle, all of its functions are fully documented in the QStyle documentation.
Definition at line 54 of file qcommonstyle.h.
QCommonStyle::QCommonStyle | ( | ) |
Constructs a QCommonStyle.
Definition at line 123 of file qcommonstyle.cpp.
QCommonStyle::~QCommonStyle | ( | ) |
|
protected |
Definition at line 129 of file qcommonstyle.cpp.
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QMacStyle, QStyleSheetStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QWindowsMobileStyle, QPlastiqueStyle, QWindowsCEStyle, and QWindowsVistaStyle.
Definition at line 3107 of file qcommonstyle.cpp.
Referenced by QWindowsCEStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), and QMotifStyle::drawComplexControl().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QPlastiqueStyle, QWindowsMobileStyle, QWindowsCEStyle, and QWindowsVistaStyle.
Definition at line 1203 of file qcommonstyle.cpp.
Referenced by QWindowsCEStyle::drawControl(), QCDEStyle::drawControl(), QWindowsMobileStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), and QStyleSheetStyle::drawControl().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QPlastiqueStyle, QWindowsMobileStyle, QWindowsVistaStyle, and QWindowsCEStyle.
Definition at line 143 of file qcommonstyle.cpp.
Referenced by drawControl(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), and QMotifStyle::drawPrimitive().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QMacStyle, QGtkStyle, QStyleSheetStyle, QProxyStyle, and QWindowsMobileStyle.
Definition at line 5981 of file qcommonstyle.cpp.
Referenced by QWindowsMobileStyle::generatedIconPixmap(), QCleanlooksStyle::generatedIconPixmap(), and QMacStyle::generatedIconPixmap().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QProxyStyle, QWindowsCEStyle, QPlastiqueStyle, and QWindowsVistaStyle.
Definition at line 3796 of file qcommonstyle.cpp.
Referenced by QWindowsVistaStyle::hitTestComplexControl(), QCleanlooksStyle::hitTestComplexControl(), QPlastiqueStyle::hitTestComplexControl(), QWindowsCEStyle::hitTestComplexControl(), QMacStyle::hitTestComplexControl(), and QStyleSheetStyle::hitTestComplexControl().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QWindowsCEStyle, QWindowsMobileStyle, QGtkStyle, QProxyStyle, QPlastiqueStyle, QWindowsStyle, QWindowsXPStyle, and QWindowsVistaStyle.
Definition at line 4373 of file qcommonstyle.cpp.
Referenced by drawComplexControl(), drawControl(), QWindowsStyle::pixelMetric(), QMotifStyle::pixelMetric(), sizeFromContents(), and subElementRect().
|
virtual |
Reimplemented Function
Reimplemented from QStyle.
Reimplemented in QGtkStyle, QStyleSheetStyle, QWindowsMobileStyle, QWindowsCEStyle, QProxyStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 6052 of file qcommonstyle.cpp.
Referenced by QWindowsStyle::polish(), and QMotifStyle::polish().
|
virtual |
Reimplemented Function
Reimplemented from QStyle.
Reimplemented in QGtkStyle, QStyleSheetStyle, QWindowsCEStyle, QProxyStyle, QWindowsMobileStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsXPStyle, and QWindowsStyle.
Definition at line 6076 of file qcommonstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QStyle.
Reimplemented in QGtkStyle, QStyleSheetStyle, QWindowsMobileStyle, QWindowsCEStyle, QProxyStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 6060 of file qcommonstyle.cpp.
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QMotifStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QWindowsCEStyle, QWindowsMobileStyle, QPlastiqueStyle, and QWindowsVistaStyle.
Definition at line 4734 of file qcommonstyle.cpp.
Referenced by QWindowsMobileStyle::sizeFromContents(), QWindowsStyle::sizeFromContents(), QMotifStyle::sizeFromContents(), and QMacStyle::sizeFromContents().
|
protectedslot |
Definition at line 5485 of file qcommonstyle.cpp.
Referenced by QWindowsStyle::standardIconImplementation(), and QMotifStyle::standardIconImplementation().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QMacStyle, QStyleSheetStyle, QGtkStyle, QMotifStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QPlastiqueStyle, QWindowsCEStyle, QWindowsMobileStyle, and QWindowsVistaStyle.
Definition at line 5176 of file qcommonstyle.cpp.
Referenced by standardIconImplementation(), QWindowsMobileStyle::standardPixmap(), QWindowsStyle::standardPixmap(), and QMotifStyle::standardPixmap().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QMacStyle, QMotifStyle, QWindowsCEStyle, QWindowsMobileStyle, QGtkStyle, QWindowsStyle, QWindowsXPStyle, QProxyStyle, QWindowsVistaStyle, and QPlastiqueStyle.
Definition at line 4885 of file qcommonstyle.cpp.
Referenced by drawComplexControl(), drawControl(), QPlastiqueStyle::styleHint(), QWindowsStyle::styleHint(), and QMotifStyle::styleHint().
|
virtual |
Reimplemented Function
Implements QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QMacStyle, QMotifStyle, QWindowsCEStyle, QProxyStyle, QWindowsMobileStyle, QWindowsXPStyle, QPlastiqueStyle, and QWindowsVistaStyle.
Definition at line 3941 of file qcommonstyle.cpp.
Referenced by QStyleSheetStyle::drawComplexControl(), QWindowsVistaStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QWindowsXPStyle::subControlRect(), QWindowsMobileStyle::subControlRect(), QWindowsCEStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subControlRect(), QMacStyle::subControlRect(), QGtkStyle::subControlRect(), and QStyleSheetStyle::subControlRect().
|
virtual |
Reimplemented Function
we need to access the widget here because the style option doesn't
Implements QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QMotifStyle, QMacStyle, QWindowsCEStyle, QProxyStyle, QWindowsStyle, QWindowsMobileStyle, QWindowsXPStyle, QPlastiqueStyle, and QWindowsVistaStyle.
Definition at line 2319 of file qcommonstyle.cpp.
Referenced by drawControl(), drawPrimitive(), QWindowsVistaStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QWindowsStyle::subElementRect(), QMacStyle::subElementRect(), and QMotifStyle::subElementRect().
|
virtual |
Reimplemented Function
Reimplemented from QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QWindowsMobileStyle, QProxyStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 6068 of file qcommonstyle.cpp.
Referenced by QWindowsStyle::unpolish(), and QMotifStyle::unpolish().
|
virtual |
Reimplemented Function
Reimplemented from QStyle.
Reimplemented in QStyleSheetStyle, QGtkStyle, QProxyStyle, QWindowsMobileStyle, QPlastiqueStyle, QWindowsVistaStyle, QMacStyle, QMotifStyle, QWindowsStyle, and QWindowsXPStyle.
Definition at line 6084 of file qcommonstyle.cpp.