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

@@ -11,8 +11,7 @@ class ElaBaseListView;
class ElaCalendarModel;
class ElaCalendarDelegate;
class ElaToolButton;
class ElaCalendarPrivate : public QObject
{
class ElaCalendarPrivate : public QObject {
Q_OBJECT
Q_D_CREATE(ElaCalendar)
Q_PROPERTY_CREATE_D(int, BorderRaiuds)
@@ -20,32 +19,32 @@ class ElaCalendarPrivate : public QObject
Q_PROPERTY_CREATE(qreal, ZoomRatio)
Q_PROPERTY_CREATE(qreal, PixOpacity)
public:
explicit ElaCalendarPrivate(QObject* parent = nullptr);
explicit ElaCalendarPrivate(QObject *parent = nullptr);
~ElaCalendarPrivate();
Q_SLOT void onSwitchButtonClicked();
Q_SLOT void onCalendarViewClicked(const QModelIndex& index);
Q_SLOT void onCalendarViewClicked(const QModelIndex &index);
Q_SLOT void onUpButtonClicked();
Q_SLOT void onDownButtonClicked();
private:
QPixmap _oldCalendarViewPix;
QPixmap _newCalendarViewPix;
int _lastSelectedYear{0};
int _lastSelectedMonth{1};
qreal _borderWidth{1.5};
QPixmap _oldCalendarViewPix;
QPixmap _newCalendarViewPix;
int _lastSelectedYear{0};
int _lastSelectedMonth{1};
qreal _borderWidth{1.5};
ElaThemeType::ThemeMode _themeMode;
ElaBaseListView* _calendarView{nullptr};
ElaCalendarModel* _calendarModel{nullptr};
ElaCalendarDelegate* _calendarDelegate{nullptr};
ElaBaseListView* _calendarTitleView{nullptr};
ElaToolButton* _modeSwitchButton{nullptr};
ElaToolButton* _upButton{nullptr};
ElaToolButton* _downButton{nullptr};
bool _isSwitchAnimationFinished{true};
bool _isDrawNewPix{false};
void _scrollToDate(QDate date);
void _doSwitchAnimation(bool isZoomIn);
void _updateSwitchButtonText();
ElaBaseListView *_calendarView{nullptr};
ElaCalendarModel *_calendarModel{nullptr};
ElaCalendarDelegate *_calendarDelegate{nullptr};
ElaBaseListView *_calendarTitleView{nullptr};
ElaToolButton *_modeSwitchButton{nullptr};
ElaToolButton *_upButton{nullptr};
ElaToolButton *_downButton{nullptr};
bool _isSwitchAnimationFinished{true};
bool _isDrawNewPix{false};
void _scrollToDate(QDate date);
void _doSwitchAnimation(bool isZoomIn);
void _updateSwitchButtonText();
};
#endif // ELACALENDARPRIVATE_H