mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-09-03 22:29:56 +00:00
change constants from #define
to const var val
Update contributing.md accordingly
This commit is contained in:
@ -22,10 +22,6 @@
|
||||
|
||||
#include "abstractextitem.h"
|
||||
|
||||
#define YAHOO_QUOTES_URL "https://query.yahooapis.com/v1/public/yql"
|
||||
#define YAHOO_QUOTES_QUERY \
|
||||
"select * from yahoo.finance.quotes where symbol='%1'"
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -38,6 +34,10 @@ class ExtQuotes : public AbstractExtItem
|
||||
Q_PROPERTY(QString ticker READ ticker WRITE setTicker)
|
||||
|
||||
public:
|
||||
const char *YAHOO_QUOTES_URL = "https://query.yahooapis.com/v1/public/yql";
|
||||
const char *YAHOO_QUOTES_QUERY
|
||||
= "select * from yahoo.finance.quotes where symbol='%1'";
|
||||
|
||||
explicit ExtQuotes(QWidget *parent, const QString filePath = QString());
|
||||
virtual ~ExtQuotes();
|
||||
ExtQuotes *copy(const QString _fileName, const int _number);
|
||||
|
@ -20,17 +20,17 @@
|
||||
|
||||
#include "abstractweatherprovider.h"
|
||||
|
||||
// we are using own server to pass requests to OpenWeatherMap because it
|
||||
// requires specific APPID which belongs to developer not user
|
||||
#define OWM_WEATHER_URL "http://arcanis.me/weather"
|
||||
#define OWM_FORECAST_URL "http://arcanis.me/forecast"
|
||||
|
||||
|
||||
class OWMWeatherProvider : public AbstractWeatherProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// we are using own server to pass requests to OpenWeatherMap because it
|
||||
// requires specific APPID which belongs to developer not user
|
||||
const char *OWM_WEATHER_URL = "http://arcanis.me/weather";
|
||||
const char *OWM_FORECAST_URL = "http://arcanis.me/forecast";
|
||||
|
||||
explicit OWMWeatherProvider(QObject *parent, const int number);
|
||||
virtual ~OWMWeatherProvider();
|
||||
void initUrl(const QString city, const QString country, const int);
|
||||
|
@ -20,17 +20,17 @@
|
||||
|
||||
#include "abstractweatherprovider.h"
|
||||
|
||||
#define YAHOO_WEATHER_URL "https://query.yahooapis.com/v1/public/yql"
|
||||
#define YAHOO_WEATHER_QUERY \
|
||||
"select * from weather.forecast where u='c' and woeid in (select woeid " \
|
||||
"from geo.places(1) where text='%1, %2')"
|
||||
|
||||
|
||||
class YahooWeatherProvider : public AbstractWeatherProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
const char *YAHOO_WEATHER_URL = "https://query.yahooapis.com/v1/public/yql";
|
||||
const char *YAHOO_WEATHER_QUERY = "select * from weather.forecast where "
|
||||
"u='c' and woeid in (select woeid from "
|
||||
"geo.places(1) where text='%1, %2')";
|
||||
|
||||
explicit YahooWeatherProvider(QObject *parent, const int number);
|
||||
virtual ~YahooWeatherProvider();
|
||||
void initUrl(const QString city, const QString country, const int);
|
||||
|
Reference in New Issue
Block a user