mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-11 05:42:20 +08:00
32 lines
582 B
C++
32 lines
582 B
C++
|
|
#pragma once
|
|
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
|
|
class SpkAppItem : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
SpkAppItem(QWidget *parent = nullptr);
|
|
|
|
void SetIcon(QPixmap p) { mIcon->setPixmap(p); }
|
|
void SetTitle(QString s) { mTitle->setText(s); }
|
|
void SetDescription(QString s) { mDescription->setText(s); }
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *e);
|
|
|
|
private:
|
|
QLabel *mIcon;
|
|
QLabel *mTitle;
|
|
QLabel *mDescription;
|
|
|
|
QVBoxLayout *mLayText;
|
|
QHBoxLayout *mMainLay;
|
|
|
|
static constexpr int IconSize = 72;
|
|
};
|
|
|