diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-05 22:01:44 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-05 22:01:44 +0000 |
commit | 15c45c7b596e065fe99705e3bc0d7e80aeb2c752 (patch) | |
tree | 7900ccc11b58dcc86c63d417e50e4000373af912 /qtinterface/tqcommonstyle.cpp | |
parent | c9dc3907763cbf0b0e6164d793291bd2659f1534 (diff) | |
download | tqtinterface-15c45c7b596e065fe99705e3bc0d7e80aeb2c752.tar.gz tqtinterface-15c45c7b596e065fe99705e3bc0d7e80aeb2c752.zip |
Additional Qt4 support added
Now compiles all of kdelibs/dcop, kdelibs/kdecore/svgicons, and kdelibs/kdecore/network
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1159658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface/tqcommonstyle.cpp')
-rw-r--r-- | qtinterface/tqcommonstyle.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/qtinterface/tqcommonstyle.cpp b/qtinterface/tqcommonstyle.cpp index 75a860f..2741709 100644 --- a/qtinterface/tqcommonstyle.cpp +++ b/qtinterface/tqcommonstyle.cpp @@ -21,3 +21,75 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <tqcommonstyle.h> + +#ifdef USE_QT4 + +// void QCommonStyle::drawPrimitive(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w) const { +// drawControl(element, opt, p, w); +// } + +void QCommonStyle::drawPrimitive( PrimitiveElement pe, + Q3Painter *p, + const QRect &r, + const QColorGroup &cg, + SFlags flags, + const QStyleOption& opt) const { + drawPrimitive(pe, &opt, (QPainter*)p); +} + +void QCommonStyle::drawControl( ControlElement element, + Q3Painter *p, + const QWidget *widget, + const QRect &r, + const QColorGroup &cg, + SFlags how, + const QStyleOption& opt) const { + + drawControl(element, &opt, (QPainter*)p, widget); +} + +void QCommonStyle::drawComplexControl( ComplexControl control, + Q3Painter *p, + const QWidget *widget, + const QRect &r, + const QColorGroup &cg, + SFlags how, + SCFlags sub, + SCFlags subActive, + const QStyleOption& opt ) const { + drawComplexControl(control, (QStyleOptionComplex*)&opt, (QPainter*)p, widget); +} + +int QCommonStyle::styleHint(StyleHint sh, const QWidget * widget, const QStyleOption &opt, QStyleHintReturn *shret) const { + return styleHint(sh, &opt, widget, shret); +} + +QPixmap QCommonStyle::stylePixmap( StandardPixmap stylepixmap, const QWidget *widget, const QStyleOption& opt) const { + return standardPixmap(stylepixmap, &opt, widget); +} + +QRect QCommonStyle::querySubControlMetrics( ComplexControl control, + const QWidget *widget, + SubControl sc, + const QStyleOption& opt) const { + return subControlRect(control, (QStyleOptionComplex*)&opt, sc, widget); +} + +QRect QCommonStyle::subRect( SubElement r, const QWidget *widget ) const { + QStyleOption opt = QStyleOption::SO_Default; + return subElementRect(r, &opt, widget); +} + +int QCommonStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const { + QStyleOption opt = QStyleOption::SO_Default; + return pixelMetric(m, &opt, widget); +} + +QCommonStyle::SubControl QCommonStyle::querySubControl( ComplexControl control, + const QWidget *widget, + const QPoint &pos, + const QStyleOption& opt ) const { + return hitTestComplexControl(control, (QStyleOptionComplex*)&opt, pos, widget); +} + +#endif // USE_QT4
\ No newline at end of file |