Qt 4.8
|
#include <qstylesheetstyle_p.h>
Public Functions | |
QStyle * | baseStyle () const |
void | clearWidgetFont (QWidget *w) const |
void | deref () |
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 | 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... | |
void | drawItemText (QPainter *painter, const QRect &rect, int alignment, 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... | |
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 *option) const |
Reimplemented Function More... | |
SubControl | hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *w=0) const |
Reimplemented Function More... | |
QRect | itemPixmapRect (const QRect &rect, int alignment, const QPixmap &pixmap) const |
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment. More... | |
QRect | itemTextRect (const QFontMetrics &metrics, const QRect &rect, int alignment, 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 |
int | pixelMetric (PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | polish (QWidget *widget) |
Reimplemented Function More... | |
void | polish (QApplication *app) |
Reimplemented Function More... | |
void | polish (QPalette &pal) |
Reimplemented Function More... | |
QStyleSheetStyle (QStyle *baseStyle) | |
void | ref () |
void | repolish (QWidget *widget) |
void | repolish (QApplication *app) |
void | saveWidgetFont (QWidget *w, const QFont &font) const |
QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget=0) const |
Reimplemented Function More... | |
QPalette | standardPalette () const |
Returns the style's standard palette. More... | |
QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *option=0, const QWidget *w=0) const |
Reimplemented Function More... | |
int | styleHint (StyleHint sh, const QStyleOption *opt=0, const QWidget *w=0, QStyleHintReturn *shret=0) const |
Reimplemented Function More... | |
bool | styleSheetPalette (const QWidget *w, const QStyleOption *opt, QPalette *pal) |
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 *app) |
Reimplemented Function More... | |
void | updateStyleSheetFont (QWidget *w) const |
~QStyleSheetStyle () | |
Public Functions inherited from QWindowsStyle | |
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... | |
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... | |
QWindowsStyle () | |
Constructs a QWindowsStyle object. More... | |
QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget=0) const |
Reimplemented Function More... | |
QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const |
Reimplemented Function More... | |
int | styleHint (StyleHint hint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const |
Reimplemented Function More... | |
QRect | subElementRect (SubElement r, const QStyleOption *opt, const QWidget *widget=0) const |
Reimplemented Function More... | |
void | unpolish (QApplication *) |
Reimplemented Function More... | |
void | unpolish (QWidget *) |
Reimplemented Function More... | |
~QWindowsStyle () | |
Destroys the QWindowsStyle object. More... | |
Public Functions inherited from QCommonStyle | |
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... | |
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... | |
Public Variables | |
QStyle * | base |
Static Public Variables | |
static int | numinstances = 0 |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Functions | |
bool | event (QEvent *e) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. More... | |
Protected Functions inherited from QWindowsStyle | |
bool | eventFilter (QObject *o, QEvent *e) |
Reimplemented Function More... | |
QWindowsStyle (QWindowsStylePrivate &dd) | |
Constructs a QWindowsStyle object. More... | |
void | timerEvent (QTimerEvent *event) |
Reimplemented Function More... | |
Protected Functions inherited from QCommonStyle | |
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 |
Private Types | |
typedef QWindowsStyle | ParentStyle |
Static Private Functions | |
static bool | isNaturalChild (const QWidget *w) |
static Qt::Alignment | resolveAlignment (Qt::LayoutDirection, Qt::Alignment) |
Properties | |
QCss::Parser | parser |
int | refcount |
Friends | |
class | QRenderRule |
Definition at line 75 of file qstylesheetstyle_p.h.
|
private |
Definition at line 77 of file qstylesheetstyle_p.h.
QStyleSheetStyle::QStyleSheetStyle | ( | QStyle * | baseStyle | ) |
Definition at line 2613 of file qstylesheetstyle.cpp.
QStyleSheetStyle::~QStyleSheetStyle | ( | ) |
Definition at line 2622 of file qstylesheetstyle.cpp.
QStyle * QStyleSheetStyle::baseStyle | ( | ) | const |
Definition at line 2629 of file qstylesheetstyle.cpp.
Referenced by QStyleSheetStyleSelector::attribute(), drawComplexControl(), drawControl(), drawItemPixmap(), drawItemText(), drawPrimitive(), event(), generatedIconPixmap(), hitTestComplexControl(), itemPixmapRect(), itemTextRect(), layoutSpacing(), layoutSpacingImplementation(), pixelMetric(), polish(), sizeFromContents(), standardIconImplementation(), standardPalette(), standardPixmap(), styleHint(), subControlRect(), subElementRect(), and unpolish().
void QStyleSheetStyle::clearWidgetFont | ( | QWidget * | w | ) | const |
Definition at line 5846 of file qstylesheetstyle.cpp.
|
private |
Definition at line 2160 of file qstylesheetstyle.cpp.
|
inline |
Definition at line 128 of file qstylesheetstyle_p.h.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2845 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 3303 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl().
|
virtual |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.
Reimplemented from QStyle.
Definition at line 4118 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), and drawControl().
|
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 from QStyle.
Definition at line 4124 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), and drawControl().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 4130 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), and drawControl().
|
protectedvirtual |
This virtual function receives events to an object and should return true if the event e was recognized and processed.
The event() function can be reimplemented to customize the behavior of an object.
Reimplemented from QObject.
Definition at line 5804 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 4451 of file qstylesheetstyle.cpp.
|
private |
Definition at line 147 of file qstylesheetstyle_default.cpp.
|
private |
Definition at line 2029 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), drawControl(), hitTestComplexControl(), pixelMetric(), sizeFromContents(), subControlRect(), and subElementRect().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 4457 of file qstylesheetstyle.cpp.
|
private |
Make sure that the cache will be clean by connecting destroyed if needed.
return false if the widget is not stylable;
Definition at line 2657 of file qstylesheetstyle.cpp.
Referenced by polish().
|
staticprivate |
Definition at line 5894 of file qstylesheetstyle.cpp.
Referenced by updateStyleSheetFont().
|
virtual |
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.
Reimplemented from QStyle.
Definition at line 4509 of file qstylesheetstyle.cpp.
|
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 from QStyle.
Definition at line 4514 of file qstylesheetstyle.cpp.
int QStyleSheetStyle::layoutSpacing | ( | QSizePolicy::ControlType | control1, |
QSizePolicy::ControlType | control2, | ||
Qt::Orientation | orientation, | ||
const QStyleOption * | option = 0 , |
||
const QWidget * | widget = 0 |
||
) | const |
Definition at line 5107 of file qstylesheetstyle.cpp.
|
protectedslot |
Definition at line 5114 of file qstylesheetstyle.cpp.
|
private |
Definition at line 1615 of file qstylesheetstyle.cpp.
Referenced by QRenderRule::QRenderRule().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 4520 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), drawControl(), sizeFromContents(), subControlRect(), and subElementRect().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2672 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2763 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2768 of file qstylesheetstyle.cpp.
|
private |
Definition at line 2311 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), drawControl(), sizeFromContents(), subControlRect(), and subElementRect().
|
private |
Definition at line 2280 of file qstylesheetstyle.cpp.
|
inline |
Definition at line 127 of file qstylesheetstyle_p.h.
|
private |
Definition at line 1717 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), drawControl(), drawPrimitive(), hitTestComplexControl(), pixelMetric(), polish(), sizeFromContents(), standardIconImplementation(), standardPixmap(), styleHint(), styleSheetPalette(), subControlRect(), subElementRect(), and updateStyleSheetFont().
|
private |
Definition at line 1754 of file qstylesheetstyle.cpp.
void QStyleSheetStyle::repolish | ( | QWidget * | widget | ) |
Definition at line 2773 of file qstylesheetstyle.cpp.
Referenced by QWidgetPrivate::inheritStyle(), QApplication::setStyleSheet(), and QWidget::setStyleSheet().
void QStyleSheetStyle::repolish | ( | QApplication * | app | ) |
Definition at line 2781 of file qstylesheetstyle.cpp.
|
staticprivate |
Definition at line 5872 of file qstylesheetstyle.cpp.
Referenced by subControlRect().
Definition at line 5841 of file qstylesheetstyle.cpp.
Referenced by QWidget::setFont().
|
private |
Definition at line 2437 of file qstylesheetstyle.cpp.
Referenced by polish().
|
private |
Definition at line 2533 of file qstylesheetstyle.cpp.
Referenced by polish().
|
private |
Definition at line 2485 of file qstylesheetstyle.cpp.
Referenced by polish().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 4801 of file qstylesheetstyle.cpp.
|
protectedslot |
Definition at line 5074 of file qstylesheetstyle.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 from QStyle.
Definition at line 5087 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 5092 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 5123 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), drawControl(), and drawPrimitive().
|
private |
Definition at line 1519 of file qstylesheetstyle.cpp.
Referenced by polish().
bool QStyleSheetStyle::styleSheetPalette | ( | const QWidget * | w, |
const QStyleOption * | opt, | ||
QPalette * | pal | ||
) |
Definition at line 5855 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 5227 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), and drawControl().
|
virtual |
Reimplemented Function
we need to access the widget here because the style option doesn't
Reimplemented from QCommonStyle.
Definition at line 5578 of file qstylesheetstyle.cpp.
|
private |
Definition at line 741 of file qstylesheetstyle.cpp.
Referenced by drawComplexControl(), hitTestComplexControl(), and subControlRect().
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2792 of file qstylesheetstyle.cpp.
|
virtual |
Reimplemented Function
Reimplemented from QCommonStyle.
Definition at line 2825 of file qstylesheetstyle.cpp.
|
private |
Definition at line 2567 of file qstylesheetstyle.cpp.
Referenced by polish(), and unpolish().
void QStyleSheetStyle::updateStyleSheetFont | ( | QWidget * | w | ) | const |
Definition at line 5809 of file qstylesheetstyle.cpp.
Referenced by QWidgetPrivate::updateFont().
|
friend |
Definition at line 151 of file qstylesheetstyle_p.h.
QStyle* QStyleSheetStyle::base |
Definition at line 126 of file qstylesheetstyle_p.h.
Referenced by baseStyle(), QWidgetPrivate::inheritStyle(), and QApplication::setStyleSheet().
|
static |
Definition at line 178 of file qstylesheetstyle_p.h.
Referenced by QStyleSheetStyle(), updateWidgets(), and ~QStyleSheetStyle().
|
mutableprivate |
Definition at line 161 of file qstylesheetstyle_p.h.
|
private |
Definition at line 149 of file qstylesheetstyle_p.h.