diff options
author | Jarno Malmari <ext-jarno.malmari@nokia.com> | 2010-10-26 19:57:00 +0300 |
---|---|---|
committer | Armin Berres <armin.berres@basyskom.de> | 2010-11-08 17:11:23 +0100 |
commit | 3666d8b15e7fe5364327aaa066026671538b62b4 (patch) | |
tree | e5d1c255030806cadc4319c7c60a1a02cb2bcf9d | |
parent | c06799f09dd258e41bc4a9b84fd19a3d7063fa01 (diff) |
Fixes: Make MPannableWidget::panDirection a const method.
RevBy: Daniel d'Andrada, Michael Hasselmann
Details: Old one deprecated.
-rw-r--r-- | src/corelib/widgets/mpannablewidget.cpp | 5 | ||||
-rw-r--r-- | src/corelib/widgets/mpannablewidget.h | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/widgets/mpannablewidget.cpp b/src/corelib/widgets/mpannablewidget.cpp index 55f4a570..bfbeab8f 100644 --- a/src/corelib/widgets/mpannablewidget.cpp +++ b/src/corelib/widgets/mpannablewidget.cpp @@ -698,6 +698,11 @@ void MPannableWidget::setPanDirection(const Qt::Orientations &panDirection) Qt::Orientations MPannableWidget::panDirection() { + return static_cast<const MPannableWidget *>(this)->panDirection(); +} + +Qt::Orientations MPannableWidget::panDirection() const +{ Qt::Orientations directions(0); if (verticalPanningPolicy() != PanningAlwaysOff) diff --git a/src/corelib/widgets/mpannablewidget.h b/src/corelib/widgets/mpannablewidget.h index 56415257..437747c2 100644 --- a/src/corelib/widgets/mpannablewidget.h +++ b/src/corelib/widgets/mpannablewidget.h @@ -215,10 +215,22 @@ public: * that direction is either PanningAlwaysOn or PanningAsNeeded. * * By default, the panning is enabled in Qt::Vertical direction. + * + * \deprecated Please use const version instead. Since 0.20.50 */ Qt::Orientations panDirection(); /*! + * \brief Returns the enabled panning directions. + * + * A panning direction is enabled if the policy of panning for + * that direction is either PanningAlwaysOn or PanningAsNeeded. + * + * By default, the panning is enabled in Qt::Vertical direction. + */ + Qt::Orientations panDirection() const; + + /*! * \brief Deprecated since 0.20 */ void setPanThreshold(qreal value); |