diff options
-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); |