mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 12:52:04 +08:00
实现应用列表和SpkResource
SpkResource现有已知问题:首次使用不会完全进行所有任务。
This commit is contained in:
@@ -4,13 +4,14 @@
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include "qt/elidedlabel.h"
|
||||
|
||||
class SpkAppItem : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpkAppItem(QWidget *parent = nullptr);
|
||||
|
||||
public:
|
||||
SpkAppItem(int appId, QWidget *parent = nullptr);
|
||||
void SetIcon(QPixmap p) { mIcon->setPixmap(p); }
|
||||
void SetTitle(QString s) { mTitle->setText(s); }
|
||||
void SetDescription(QString s) { mDescription->setText(s); }
|
||||
@@ -18,14 +19,17 @@ class SpkAppItem : public QWidget
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
|
||||
public:
|
||||
static constexpr int IconSize = 72;
|
||||
static constexpr QSize IconSize_ = { IconSize, IconSize };
|
||||
|
||||
private:
|
||||
QLabel *mIcon;
|
||||
QLabel *mTitle;
|
||||
QLabel *mDescription;
|
||||
ElidedLabel *mDescription;
|
||||
int mAppId;
|
||||
|
||||
QVBoxLayout *mLayText;
|
||||
QHBoxLayout *mMainLay;
|
||||
|
||||
static constexpr int IconSize = 72;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user