feat: 添加ElaWidgetTool库

This commit is contained in:
sleepwithoutbz
2025-09-19 22:40:52 +08:00
parent 5f93e8caf6
commit 4eef5c7fd5
407 changed files with 36325 additions and 7 deletions

View File

@@ -0,0 +1,34 @@
#ifndef ELAFRAMEWORK_ELAWIDGETTOOLS_PRIVATE_ELAROLLERPRIVATE_H_
#define ELAFRAMEWORK_ELAWIDGETTOOLS_PRIVATE_ELAROLLERPRIVATE_H_
#include "ElaDef.h"
#include <QObject>
#include <QPoint>
class ElaRoller;
class QPropertyAnimation;
class ElaRollerPrivate : public QObject
{
Q_OBJECT
Q_D_CREATE(ElaRoller)
Q_PROPERTY_CREATE_D(int, BorderRadius)
Q_PROPERTY_CREATE(qreal, ScrollOffset)
Q_PROPERTY_CREATE_D(QStringList, ItemList)
Q_PROPERTY_CREATE_D(int, ItemHeight)
Q_PROPERTY_CREATE_D(int, MaxVisibleItems)
Q_PROPERTY_CREATE_D(int, CurrentIndex)
public:
explicit ElaRollerPrivate(QObject* parent = nullptr);
~ElaRollerPrivate() override;
private:
ElaThemeType::ThemeMode _themeMode;
QPropertyAnimation* _scrollAnimation{nullptr};
int _penBorderWidth{1};
int _indicatorMargin{3};
qreal _targetScrollOffset{0};
QPoint _mousePoint;
void _scroll(int delta);
};
#endif //ELAFRAMEWORK_ELAWIDGETTOOLS_PRIVATE_ELAROLLERPRIVATE_H_