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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
# include <QStringList>
# include <QObject>
# include "iGuiSplash_global.h"
class iSplashObj ;
class QSettings ;
class I_GUI_SPLASH_EXPORT iSplashUtil : public QObject
{
Q_OBJECT
public :
// 闪屏模式
enum SplashMethod
{
SM_Basic = 0 , //基于Qt自带QSplashScreen增加进度条
SM_LoopImgs , //多幅图片循环播放
SM_Swf , //Flash模式, 运行swf文件
SM_Gif , //Gif模式, 运行gif文件
SM_Unknown
} ;
public :
explicit iSplashUtil ( SplashMethod o ) ;
~ iSplashUtil ( ) ;
// 设置闪屏时长, 单位ms毫秒
void setTimeSpan ( int ms ) ;
// 设置文件
void setSplashFiles ( QStringList list ) ;
// 开启或关闭
void start ( ) ;
void finish ( ) ;
protected :
private :
SplashMethod m_oSm ;
// 设置闪屏时长, 单位ms毫秒
// 默认2000
int m_nTimeSpan ;
// 设置文件,可以一个或多个
QStringList m_listFiles ;
// 闪屏载体
iSplashObj * m_pObj ;
} ;
# define spMethod iSplashUtil::SplashMethod
// 闪屏相关函数定义
class I_GUI_SPLASH_EXPORT iSplashHelper
{
public :
explicit iSplashHelper ( ) ;
~ iSplashHelper ( ) ;
QStringList getSplashFiles ( spMethod o ) ;
bool checkSplash ( spMethod & o , int & ms ) ;
private :
bool isSpalshOpen ( ) ; //New method
void setSplashOpen ( bool bOpen ) ;
QSettings * getSplashSettings ( QString & sKey ) ;
} ;