51 lines
1012 B
C++
51 lines
1012 B
C++
|
|
#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
|