KexiUtils::StyleProxy Class Reference
#include <styleproxy.h>
Inheritance diagram for KexiUtils::StyleProxy:

Detailed Description
a QStyle proxy allowing to customizing the currently used styleAll you need is to reimplement one or more of the methods. For example, you can reimpelmente drawPrimitive() and temporary change the color in color group.
You can change even the smallest part of the style for a selected widget using the following code:
class MyStyle : public KexiUtils::StyleProxy { //reimplement method(s) here... }; QWidget *w = ..... w->setStyle( new MyStyle(&w->style(), w) ); //this will alter w's style a bit
More info at http://doc.trolltech.com/qq/qq09-q-and-a.html#style
Definition at line 48 of file styleproxy.h.
Public Member Functions | |
| StyleProxy (QStyle *parentStyle) | |
| virtual | ~StyleProxy () |
| QStyle * | parentStyle () const |
| void | setParentStyle (QStyle *style) |
| virtual void | polish (QWidget *w) |
| virtual void | unPolish (QWidget *w) |
| virtual void | polish (QApplication *a) |
| virtual void | unPolish (QApplication *a) |
| virtual void | polish (QPalette &p) |
| virtual void | polishPopupMenu (QPopupMenu *p) |
| virtual QRect | itemRect (QPainter *p, const QRect &r, int flags, bool enabled, const QPixmap *pixmap, const QString &text, int len=-1) const |
| virtual void | drawItem (QPainter *p, const QRect &r, int flags, const QColorGroup &g, bool enabled, const QPixmap *pixmap, const QString &text, int len=-1, const QColor *penColor=0) const |
| virtual void | drawPrimitive (PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption &option=QStyleOption::Default) const |
| virtual void | drawControl (ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption &option=QStyleOption::Default) const |
| virtual void | drawControlMask (ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption &option=QStyleOption::Default) const |
| virtual QRect | subRect (SubRect r, const QWidget *widget) const |
| virtual void | drawComplexControl (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=(uint) SC_All, SCFlags subActive=SC_None, const QStyleOption &option=QStyleOption::Default) const |
| virtual void | drawComplexControlMask (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption &option=QStyleOption::Default) const |
| virtual QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption &option=QStyleOption::Default) const |
| virtual SubControl | querySubControl (ComplexControl control, const QWidget *widget, const QPoint &pos, const QStyleOption &option=QStyleOption::Default) const |
| virtual int | pixelMetric (PixelMetric metric, const QWidget *widget=0) const |
| virtual QSize | sizeFromContents (ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption &option=QStyleOption::Default) const |
| virtual int | styleHint (StyleHint stylehint, const QWidget *widget=0, const QStyleOption &option=QStyleOption::Default, QStyleHintReturn *returnData=0) const |
| virtual QPixmap | stylePixmap (StylePixmap stylepixmap, const QWidget *widget=0, const QStyleOption &option=QStyleOption::Default) const |
Protected Attributes | |
| QStyle * | m_style |
Constructor & Destructor Documentation
|
|
Creates a new style proxy object. parentStyle pointer will not be kept (because it's most likely owned by the application: a new QStyle instance for this name will be created internally. Definition at line 24 of file styleproxy.cpp. References setParentStyle(). |
|
|
Definition at line 30 of file styleproxy.cpp. References m_style. |
Member Function Documentation
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 109 of file styleproxy.h. |
|
||||||||||||||||||||||||
|
Definition at line 122 of file styleproxy.h. |
|
||||||||||||||||||||||||||||||||
|
Definition at line 90 of file styleproxy.h. |
|
||||||||||||||||||||||||
|
Definition at line 97 of file styleproxy.h. |
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 76 of file styleproxy.h. References len. |
|
||||||||||||||||||||||||||||
|
Definition at line 83 of file styleproxy.h. |
|
||||||||||||||||||||||||||||||||
|
Definition at line 70 of file styleproxy.h. References len. |
|
|
Definition at line 40 of file styleproxy.cpp. References m_style. |
|
||||||||||||
|
Definition at line 143 of file styleproxy.h. |
|
|
Definition at line 66 of file styleproxy.h. |
|
|
Definition at line 63 of file styleproxy.h. |
|
|
Definition at line 60 of file styleproxy.h. |
|
|
Definition at line 68 of file styleproxy.h. |
|
||||||||||||||||||||
|
Definition at line 136 of file styleproxy.h. |
|
||||||||||||||||||||
|
Definition at line 129 of file styleproxy.h. |
|
|
Definition at line 35 of file styleproxy.cpp. References m_style. Referenced by StyleProxy(). |
|
||||||||||||||||||||
|
Definition at line 149 of file styleproxy.h. |
|
||||||||||||||||||||
|
Definition at line 156 of file styleproxy.h. |
|
||||||||||||||||
|
Definition at line 163 of file styleproxy.h. |
|
||||||||||||
|
Definition at line 104 of file styleproxy.h. |
|
|
Definition at line 64 of file styleproxy.h. |
|
|
Definition at line 61 of file styleproxy.h. |
Member Data Documentation
|
|
Definition at line 171 of file styleproxy.h. Referenced by parentStyle(), setParentStyle(), and ~StyleProxy(). |
The documentation for this class was generated from the following files:
