Adverts widget supports population from web and from local files.

This commit is contained in:
felixrojauro
2015-11-01 19:19:03 +01:00
parent 5a3b2dbce6
commit 85a611ed19
16 changed files with 167 additions and 116 deletions

View File

@@ -6,6 +6,8 @@
#include "jsonactivepromotionsparser.h"
#include "jsonsingleactivepromotion.h"
#include <QNetworkReply>
class CasinoCoinWebAPIParser : public QObject
{
Q_OBJECT
@@ -21,12 +23,18 @@ signals:
public slots:
void slotParseAnswer( const QByteArray& a_rJsonFile );
void slotNetworkError
( QNetworkReply::NetworkError a_eError
, const QUrl a_rFailedUrl
);
private:
void ParsePromotions( const QJsonObject& a_rJsonPromotions );
void ParseCasinos ( const QJsonObject& a_rJsonCasinos );
void ParseExchanges ( const QJsonObject& a_rJsonExchanges );
void ParseNewsItems ( const QJsonObject& a_rJsonNewsItems );
QByteArray ReadFile( QString a_strSourcePath );
void StoreFile( QString a_strDestinationPath, const QByteArray& a_rJsonFile );
};
#endif // CASINOCOINWEBAPIPARSER_H