mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
添加商店内弹出窗消息
使用SpkUiMessage::SendStoreNotification激活,必须在SpkStore构造函数加载完全局SpkPopup类之后才可 使用。
This commit is contained in:
30
inc/spkpopup.h
Normal file
30
inc/spkpopup.h
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QSequentialAnimationGroup>
|
||||
|
||||
class SpkMainWindow;
|
||||
|
||||
namespace SpkUi
|
||||
{
|
||||
class SpkPopup : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpkPopup(QWidget *parent, int aMillis = 3000);
|
||||
|
||||
public slots:
|
||||
void Show(QString aText);
|
||||
|
||||
private:
|
||||
QPoint MoveOffset;
|
||||
QLabel *mText;
|
||||
QHBoxLayout *mBox;
|
||||
QPropertyAnimation *mAnimFadeIn, *mAnimFadeOut;
|
||||
QSequentialAnimationGroup *mAnim;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user