first commit
This commit is contained in:
50
project/fm_viewer/module/fm_version_checker.h
Normal file
50
project/fm_viewer/module/fm_version_checker.h
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
#ifndef FM_VERSION_CHECKER_H
|
||||
#define FM_VERSION_CHECKER_H
|
||||
#if (USE_VERSION_CHECK)
|
||||
|
||||
#include <QObject>
|
||||
#include <QtCore>
|
||||
#include <QDialog>
|
||||
|
||||
class QNetworkReply;
|
||||
class FMVersionChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static FMVersionChecker* _instance;
|
||||
explicit FMVersionChecker(QObject *parent = nullptr);
|
||||
void start();
|
||||
static FMVersionChecker* instance()
|
||||
{
|
||||
if(_instance == NULL)
|
||||
{
|
||||
_instance = new FMVersionChecker();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
private:
|
||||
bool _checkedViewer;
|
||||
|
||||
signals:
|
||||
void updateFound(QMap<QString,QString>); // 업데이트 정보 발견
|
||||
|
||||
public slots:
|
||||
void onFinished(QNetworkReply* reply);
|
||||
};
|
||||
|
||||
class FMVersionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FMVersionDialog(QMap<QString,QString> update, QWidget *parent = nullptr);
|
||||
private:
|
||||
QMap<QString,QString> _info;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
|
||||
#endif // #if (USE_VERSION_CHECK)
|
||||
#endif // FM_VERSION_CHECKER_H
|
||||
Reference in New Issue
Block a user