mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-25 20:35:24 +02:00
31 lines
672 B
C
31 lines
672 B
C
![]() |
#ifndef PRICES_H
|
||
|
#define PRICES_H
|
||
|
|
||
|
#include <QCoreApplication>
|
||
|
#include <QtNetwork>
|
||
|
#include <QNetworkAccessManager>
|
||
|
#include <QNetworkReply>
|
||
|
#include <QDebug>
|
||
|
|
||
|
class Prices : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
Prices(QNetworkAccessManager *networkAccessManager, QObject *parent = nullptr);
|
||
|
|
||
|
public slots:
|
||
|
Q_INVOKABLE void getJSON(const QString url);
|
||
|
void gotJSON();
|
||
|
void gotError();
|
||
|
void gotError(const QString &message);
|
||
|
signals:
|
||
|
void priceJsonReceived(QVariantMap document);
|
||
|
void priceJsonError(QString message);
|
||
|
|
||
|
private:
|
||
|
mutable QPointer<QNetworkReply> m_reply;
|
||
|
QNetworkAccessManager *m_networkAccessManager;
|
||
|
};
|
||
|
|
||
|
#endif // PRICES_H
|