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

@@ -8,32 +8,31 @@ class ElaPushButton;
class ElaPopularCard;
class ElaPopularCardPrivate;
class QGraphicsOpacityEffect;
class ElaPopularCardFloater : public QWidget
{
class ElaPopularCardFloater : public QWidget {
Q_OBJECT
Q_PROPERTY_CREATE(qreal, HoverYOffset);
Q_PROPERTY_CREATE(qreal, HoverOpacity);
public:
explicit ElaPopularCardFloater(ElaPopularCard* card, ElaPopularCardPrivate* cardPrivate, QWidget* parent = nullptr);
explicit ElaPopularCardFloater(ElaPopularCard *card, ElaPopularCardPrivate *cardPrivate, QWidget *parent = nullptr);
~ElaPopularCardFloater();
void showFloater();
void hideFloater();
protected:
virtual bool event(QEvent* event) override;
virtual void paintEvent(QPaintEvent* event) override;
virtual bool event(QEvent *event) override;
virtual void paintEvent(QPaintEvent *event) override;
private:
friend class ElaPopularCard;
ElaThemeType::ThemeMode _themeMode;
ElaPushButton* _overButton{nullptr};
QGraphicsOpacityEffect* _opacityEffect{nullptr};
bool _isHideAnimationFinished{true};
ElaPopularCard* _card{nullptr};
ElaPopularCardPrivate* _cardPrivate{nullptr};
QRect _calculateTargetGeometry(QRect cardGeometry);
int _floatGeometryOffset{25};
ElaPushButton *_overButton{nullptr};
QGraphicsOpacityEffect *_opacityEffect{nullptr};
bool _isHideAnimationFinished{true};
ElaPopularCard *_card{nullptr};
ElaPopularCardPrivate *_cardPrivate{nullptr};
QRect _calculateTargetGeometry(QRect cardGeometry);
int _floatGeometryOffset{25};
};
#endif // ELAPOPULARCARDFLOATER_H