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,38 +8,37 @@
class ElaNavigationNode;
class QPropertyAnimation;
class ElaBaseListView;
class ElaFooterDelegate : public QStyledItemDelegate
{
class ElaFooterDelegate : public QStyledItemDelegate {
Q_OBJECT
Q_PRIVATE_CREATE(ElaBaseListView*, ElaListView);
Q_PRIVATE_CREATE(ElaBaseListView *, ElaListView);
Q_PRIVATE_CREATE(QModelIndex, PressIndex);
public:
explicit ElaFooterDelegate(QObject* parent = nullptr);
explicit ElaFooterDelegate(QObject *parent = nullptr);
~ElaFooterDelegate();
void navigationNodeStateChange(QVariantMap data);
protected:
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
int _leftPadding{11};
int _iconAreaWidth{40};
int _textRightSpacing{3};
int _indicatorIconAreaWidth{24};
qreal _lastSelectMarkTop{10};
qreal _lastSelectMarkBottom{10};
qreal _selectMarkTop{10};
qreal _selectMarkBottom{10};
bool _isSelectMarkDisplay{true};
ElaNavigationNode* _lastSelectedNode{nullptr};
int _leftPadding{11};
int _iconAreaWidth{40};
int _textRightSpacing{3};
int _indicatorIconAreaWidth{24};
qreal _lastSelectMarkTop{10};
qreal _lastSelectMarkBottom{10};
qreal _selectMarkTop{10};
qreal _selectMarkBottom{10};
bool _isSelectMarkDisplay{true};
ElaNavigationNode *_lastSelectedNode{nullptr};
ElaThemeType::ThemeMode _themeMode;
QPropertyAnimation* _lastSelectMarkTopAnimation{nullptr};
QPropertyAnimation* _lastSelectMarkBottomAnimation{nullptr};
QPropertyAnimation* _selectMarkTopAnimation{nullptr};
QPropertyAnimation* _selectMarkBottomAnimation{nullptr};
bool _compareItemY(ElaNavigationNode* node1, ElaNavigationNode* node2);
QPropertyAnimation *_lastSelectMarkTopAnimation{nullptr};
QPropertyAnimation *_lastSelectMarkBottomAnimation{nullptr};
QPropertyAnimation *_selectMarkTopAnimation{nullptr};
QPropertyAnimation *_selectMarkBottomAnimation{nullptr};
bool _compareItemY(ElaNavigationNode *node1, ElaNavigationNode *node2);
};
#endif // ELAFOOTERDELEGATE_H