chore: 格式化ElaWidgetTools代码

This commit is contained in:
sleepwithoutbz
2025-09-20 01:39:00 +08:00
parent d2fded145d
commit 4ab391f8a1
394 changed files with 10913 additions and 15860 deletions

View File

@@ -9,31 +9,30 @@
class QTimer;
class QPropertyAnimation;
class ElaScrollBar;
class ElaScrollBarPrivate : public QObject
{
class ElaScrollBarPrivate : public QObject {
Q_OBJECT
Q_D_CREATE(ElaScrollBar)
Q_PROPERTY_CREATE_D(bool, IsAnimation)
Q_PROPERTY_CREATE_D(qreal, SpeedLimit)
Q_PROPERTY_CREATE(int, TargetMaximum)
public:
explicit ElaScrollBarPrivate(QObject* parent = nullptr);
explicit ElaScrollBarPrivate(QObject *parent = nullptr);
~ElaScrollBarPrivate();
Q_SLOT void onRangeChanged(int min, int max);
private:
QScrollBar* _originScrollBar{nullptr};
QAbstractScrollArea* _originScrollArea{nullptr};
QTimer* _expandTimer{nullptr};
bool _isExpand{false};
QPropertyAnimation* _slideSmoothAnimation{nullptr};
int _scrollValue{-1};
void _scroll(Qt::KeyboardModifiers modifiers, int value);
int _pixelPosToRangeValue(int pos) const;
QScrollBar *_originScrollBar{nullptr};
QAbstractScrollArea *_originScrollArea{nullptr};
QTimer *_expandTimer{nullptr};
bool _isExpand{false};
QPropertyAnimation *_slideSmoothAnimation{nullptr};
int _scrollValue{-1};
void _scroll(Qt::KeyboardModifiers modifiers, int value);
int _pixelPosToRangeValue(int pos) const;
// 映射处理函数
void _initAllConfig();
void _handleScrollBarValueChanged(QScrollBar* scrollBar, int value);
void _handleScrollBarValueChanged(QScrollBar *scrollBar, int value);
void _handleScrollBarRangeChanged(int min, int max);
void _handleScrollBarGeometry();
};