summaryrefslogtreecommitdiffstats
path: root/kdefx
diff options
context:
space:
mode:
Diffstat (limited to 'kdefx')
-rw-r--r--kdefx/kstyle.cpp21
-rw-r--r--kdefx/kstyle.h11
2 files changed, 31 insertions, 1 deletions
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index d22a6d795..a533e2803 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -516,6 +516,25 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) c
return value;
}
+// -----------------------------------------------------------------------------
+
+#ifdef USE_QT4
+
+void KStyle::drawPrimitive( ControlElement pe,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
+ SFlags flags,
+ const TQStyleOption& opt ) const
+{
+ // FIXME:
+ // What should "widget" be in actuality? How should I get it? From where?
+ // Almost certainly it should not be null!
+ TQWidget *widget = 0;
+ drawControl(pe, p, widget, r, cg, flags, opt);
+}
+
+#endif // USE_QT4
// -----------------------------------------------------------------------------
@@ -999,7 +1018,7 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
case PM_SliderControlThickness: {
const TQSlider* slider = (const TQSlider*)widget;
TQSlider::TickSetting ts = slider->tickmarks();
- int thickness = (slider->orientation() == Horizontal) ?
+ int thickness = (slider->orientation() == TQ_Horizontal) ?
slider->height() : slider->width();
switch (ts) {
case TQSlider::NoMarks: // Use total area.
diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h
index 87b5d299e..f9a47ec45 100644
--- a/kdefx/kstyle.h
+++ b/kdefx/kstyle.h
@@ -281,6 +281,17 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
+#ifdef USE_QT4
+
+ void drawPrimitive( ControlElement pe,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
+ SFlags flags = Style_Default,
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
+
+#endif // USE_QT4
+
void drawControl( ControlElement element,
TQPainter* p,
const TQWidget* widget,