feat: 添加ElaWidgetTool库
This commit is contained in:
30
ElaWidgetTools/ElaPromotionView.h
Normal file
30
ElaWidgetTools/ElaPromotionView.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef ELAPROMOTIONVIEW_H
|
||||
#define ELAPROMOTIONVIEW_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QWidget>
|
||||
|
||||
#include "ElaProperty.h"
|
||||
class ElaPromotionCard;
|
||||
class ElaPromotionViewPrivate;
|
||||
class ELA_EXPORT ElaPromotionView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_Q_CREATE(ElaPromotionView)
|
||||
Q_PROPERTY_CREATE_Q_H(int, CardExpandWidth)
|
||||
Q_PROPERTY_CREATE_Q_H(int, CardCollapseWidth)
|
||||
Q_PROPERTY_CREATE_Q_H(int, CurrentIndex)
|
||||
Q_PROPERTY_CREATE_Q_H(bool, IsAutoScroll)
|
||||
Q_PROPERTY_CREATE_Q_H(int, AutoScrollInterval)
|
||||
public:
|
||||
explicit ElaPromotionView(QWidget* parent = nullptr);
|
||||
~ElaPromotionView();
|
||||
|
||||
void appendPromotionCard(ElaPromotionCard* card);
|
||||
|
||||
protected:
|
||||
virtual void wheelEvent(QWheelEvent* event) override;
|
||||
virtual void paintEvent(QPaintEvent* event) override;
|
||||
};
|
||||
|
||||
#endif // ELAPROMOTIONVIEW_H
|
||||
Reference in New Issue
Block a user