Warning, file /include/QtWidgets/qscrollerproperties.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QSCROLLERPROPERTIES_H
0005 #define QSCROLLERPROPERTIES_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtCore/QScopedPointer>
0009 #include <QtCore/QMetaType>
0010 #include <QtCore/QVariant>
0011
0012 QT_REQUIRE_CONFIG(scroller);
0013
0014 QT_BEGIN_NAMESPACE
0015
0016
0017 class QScroller;
0018 class QScrollerPrivate;
0019 class QScrollerPropertiesPrivate;
0020
0021 class Q_WIDGETS_EXPORT QScrollerProperties
0022 {
0023 public:
0024 QScrollerProperties();
0025 QScrollerProperties(const QScrollerProperties &sp);
0026 QScrollerProperties &operator=(const QScrollerProperties &sp);
0027 virtual ~QScrollerProperties();
0028
0029 bool operator==(const QScrollerProperties &sp) const;
0030 bool operator!=(const QScrollerProperties &sp) const;
0031
0032 static void setDefaultScrollerProperties(const QScrollerProperties &sp);
0033 static void unsetDefaultScrollerProperties();
0034
0035 enum OvershootPolicy
0036 {
0037 OvershootWhenScrollable,
0038 OvershootAlwaysOff,
0039 OvershootAlwaysOn
0040 };
0041
0042 enum FrameRates {
0043 Standard,
0044 Fps60,
0045 Fps30,
0046 Fps20
0047 };
0048
0049 enum ScrollMetric
0050 {
0051 MousePressEventDelay,
0052 DragStartDistance,
0053 DragVelocitySmoothingFactor,
0054 AxisLockThreshold,
0055
0056 ScrollingCurve,
0057 DecelerationFactor,
0058
0059 MinimumVelocity,
0060 MaximumVelocity,
0061 MaximumClickThroughVelocity,
0062
0063 AcceleratingFlickMaximumTime,
0064 AcceleratingFlickSpeedupFactor,
0065
0066 SnapPositionRatio,
0067 SnapTime,
0068
0069 OvershootDragResistanceFactor,
0070 OvershootDragDistanceFactor,
0071 OvershootScrollDistanceFactor,
0072 OvershootScrollTime,
0073
0074 HorizontalOvershootPolicy,
0075 VerticalOvershootPolicy,
0076 FrameRate,
0077
0078 ScrollMetricCount
0079 };
0080
0081 QVariant scrollMetric(ScrollMetric metric) const;
0082 void setScrollMetric(ScrollMetric metric, const QVariant &value);
0083
0084 protected:
0085 QScopedPointer<QScrollerPropertiesPrivate> d;
0086
0087 private:
0088 QScrollerProperties(QScrollerPropertiesPrivate &dd);
0089
0090 friend class QScrollerPropertiesPrivate;
0091 friend class QScroller;
0092 friend class QScrollerPrivate;
0093 };
0094
0095 QT_END_NAMESPACE
0096
0097 QT_DECL_METATYPE_EXTERN_TAGGED(QScrollerProperties::OvershootPolicy,
0098 QScrollerProperties__OvershootPolicy, Q_WIDGETS_EXPORT)
0099 QT_DECL_METATYPE_EXTERN_TAGGED(QScrollerProperties::FrameRates,
0100 QScrollerProperties__FrameRates, Q_WIDGETS_EXPORT)
0101
0102 #endif