mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-20 17:19:58 +00:00
Replace yahoo finance to stooq (#131)
Old code is dropped to separated provider
This commit is contained in:
@ -21,26 +21,24 @@
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
|
||||
#include "abstractextitem.h"
|
||||
|
||||
|
||||
class AbstractWeatherProvider : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int number READ number)
|
||||
|
||||
public:
|
||||
explicit AbstractWeatherProvider(QObject *_parent, const int _number)
|
||||
: QObject(_parent)
|
||||
, m_number(_number){};
|
||||
explicit AbstractWeatherProvider(QObject *_parent)
|
||||
: QObject(_parent){};
|
||||
virtual ~AbstractWeatherProvider(){};
|
||||
virtual void initUrl(const QString &_city, const QString &_country,
|
||||
const int _ts)
|
||||
= 0;
|
||||
virtual void initUrl(const QString &_city, const QString &_country, const int _ts) = 0;
|
||||
virtual QVariantHash parse(const QVariantMap &_json) const = 0;
|
||||
QString tag(const QString &_type) const
|
||||
{
|
||||
return static_cast<AbstractExtItem *>(parent())->tag(_type);
|
||||
};
|
||||
virtual QUrl url() const = 0;
|
||||
int number() const { return m_number; };
|
||||
|
||||
private:
|
||||
int m_number;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user