diff options
-rw-r--r-- | src/kernel/qstyle.cpp | 24 | ||||
-rw-r--r-- | src/kernel/qstyle.h | 22 |
2 files changed, 27 insertions, 19 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp index ebc7e5b..75757c9 100644 --- a/src/kernel/qstyle.cpp +++ b/src/kernel/qstyle.cpp @@ -2795,6 +2795,30 @@ QPixmap QStyle::stylePixmap(StylePixmap sp, const QWidget *w, const QStyleOption \obsolete */ +#ifndef QT_NO_COMPAT +int QStyle::defaultFrameWidth() const +{ + QStyleControlElementData ceData; + return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None ); +} + +void QStyle::tabbarMetrics( const QWidget* t, int& hf, int& vf, int& ov ) const +{ + QStyleControlElementData ceData; + hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t ); + vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t ); + ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t ); +} + +QSize QStyle::scrollBarExtent() const +{ + QStyleControlElementData ceData; + ceData.orientation = Qt::Horizontal; + return QSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None), + pixelMetric(PM_ScrollBarExtent, ceData, CEF_None)); +} +#endif + QStyleControlElementData::QStyleControlElementData() { isNull = true; activePainter = 0; diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h index c38f403..be23340 100644 --- a/src/kernel/qstyle.h +++ b/src/kernel/qstyle.h @@ -1189,25 +1189,9 @@ public: // Old 2.x QStyle API #ifndef QT_NO_COMPAT - int defaultFrameWidth() const - { - QStyleControlElementData ceData; - return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None ); - } - void tabbarMetrics( const QWidget* t, - int& hf, int& vf, int& ov ) const - { - QStyleControlElementData ceData; - hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t ); - vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t ); - ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t ); - } - QSize scrollBarExtent() const - { - QStyleControlElementData ceData; - return QSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None), - pixelMetric(PM_ScrollBarExtent, ceData, CEF_None)); - } + int defaultFrameWidth() const; + void tabbarMetrics( const QWidget* t, int& hf, int& vf, int& ov ) const; + QSize scrollBarExtent() const; #endif public: |