You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iGui/iGuiSplash/iSplashObjImgLoop.h

56 lines
1006 B
C++

#pragma once
#include <QDialog>
#include <QButtonGroup>
#include "iSplashObj.h"
namespace Ui {
class iSplashObjImgLoop;
}
class I_GUI_SPLASH_EXPORT iSplashObjImgLoop : public QDialog, public iSplashObj
{
Q_OBJECT
public:
/// @param nMax:图片数目
/// @param sImg:第一幅显示的图片
explicit iSplashObjImgLoop(int nMax, QString sImg, \
QWidget *parent = 0);
~iSplashObjImgLoop();
// 开启或关闭
virtual void start();
virtual void finish();
protected:
// 初始化(内部)
void initRadios(int n);
void initTimer();
// 刷新
void freshByIndex(int n);
void freshCurImg(QString sImg);
void freshCurRadio(int n);
virtual void paintEvent(QPaintEvent *e);
private slots:
// 计时器响应
void slotFreshNext();
private:
Ui::iSplashObjImgLoop *ui;
QButtonGroup* m_pBtnGroup;
// 设置图片
int m_nCurrentIndex;
// 计时器
QTimer* m_pTimer;
};