Back to home page

EIC code displayed by LXR

 
 

    


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 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
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,                    // qreal [s]
0052         DragStartDistance,                       // qreal [m]
0053         DragVelocitySmoothingFactor,             // qreal [0..1/s]  (complex calculation involving time) v = v_new* DASF + v_old * (1-DASF)
0054         AxisLockThreshold,                       // qreal [0..1] atan(|min(dx,dy)|/|max(dx,dy)|)
0055 
0056         ScrollingCurve,                          // QEasingCurve
0057         DecelerationFactor,                      // slope of the curve
0058 
0059         MinimumVelocity,                         // qreal [m/s]
0060         MaximumVelocity,                         // qreal [m/s]
0061         MaximumClickThroughVelocity,             // qreal [m/s]
0062 
0063         AcceleratingFlickMaximumTime,            // qreal [s]
0064         AcceleratingFlickSpeedupFactor,          // qreal [1..]
0065 
0066         SnapPositionRatio,                       // qreal [0..1]
0067         SnapTime,                                // qreal [s]
0068 
0069         OvershootDragResistanceFactor,           // qreal [0..1]
0070         OvershootDragDistanceFactor,             // qreal [0..1]
0071         OvershootScrollDistanceFactor,           // qreal [0..1]
0072         OvershootScrollTime,                     // qreal [s]
0073 
0074         HorizontalOvershootPolicy,               // enum OvershootPolicy
0075         VerticalOvershootPolicy,                 // enum OvershootPolicy
0076         FrameRate,                               // enum FrameRates
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 // QSCROLLERPROPERTIES_H