8 #include <QAbstractListModel>
13 #include "connector.h"
14 #include "qalphacloud.h"
15 #include "qalphacloud_export.h"
20 class OneDayPowerModelPrivate;
36 Q_PROPERTY(
QAlphaCloud::Connector *connector READ connector WRITE setConnector NOTIFY connectorChanged REQUIRED)
43 Q_PROPERTY(QString serialNumber READ serialNumber WRITE setSerialNumber NOTIFY serialNumberChanged REQUIRED)
49 Q_PROPERTY(QDate date READ date WRITE setDate RESET resetDate NOTIFY dateChanged)
62 Q_PROPERTY(
bool cached READ cached WRITE setCached NOTIFY cachedChanged)
69 Q_PROPERTY(QDateTime fromDateTime READ fromDateTime NOTIFY fromDateTimeChanged)
75 Q_PROPERTY(QDateTime toDateTime READ toDateTime NOTIFY toDateTimeChanged)
82 Q_PROPERTY(
int peakPhotovoltaic READ peakPhotovoltaic NOTIFY peakPhotovoltaicChanged)
88 Q_PROPERTY(
int peakLoad READ peakLoad NOTIFY peakLoadChanged)
94 Q_PROPERTY(
int peakGridFeed READ peakGridFeed NOTIFY peakGridFeedChanged)
100 Q_PROPERTY(
int peakGridCharge READ peakGridCharge NOTIFY peakGridChargeChanged)
105 Q_PROPERTY(
int count READ rowCount NOTIFY countChanged)
124 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
148 PhotovoltaicEnergy = Qt::UserRole,
154 RawJson = Qt::UserRole
159 Q_REQUIRED_RESULT
Connector *connector()
const;
161 Q_SIGNAL
void connectorChanged(
Connector *connector);
163 Q_REQUIRED_RESULT QString serialNumber()
const;
164 void setSerialNumber(
const QString &serialNumber);
165 Q_SIGNAL
void serialNumberChanged(
const QString &serialNumber);
167 Q_REQUIRED_RESULT QDate date()
const;
168 void setDate(
const QDate &date);
170 Q_SIGNAL
void dateChanged(
const QDate &date);
172 Q_REQUIRED_RESULT
bool cached()
const;
173 void setCached(
bool cached);
174 Q_SIGNAL
void cachedChanged(
bool cached);
176 Q_REQUIRED_RESULT QDateTime fromDateTime()
const;
177 Q_SIGNAL
void fromDateTimeChanged(
const QDateTime &fromDateTime);
179 Q_REQUIRED_RESULT QDateTime toDateTime()
const;
180 Q_SIGNAL
void toDateTimeChanged(
const QDateTime &toDateTime);
182 Q_REQUIRED_RESULT
int peakPhotovoltaic()
const;
183 Q_SIGNAL
void peakPhotovoltaicChanged(
int peakPhotovoltaicChanged);
185 Q_REQUIRED_RESULT
int peakLoad()
const;
186 Q_SIGNAL
void peakLoadChanged(
int peakLoad);
188 Q_REQUIRED_RESULT
int peakGridFeed()
const;
189 Q_SIGNAL
void peakGridFeedChanged(
int peakGridFeed);
191 Q_REQUIRED_RESULT
int peakGridCharge()
const;
192 Q_SIGNAL
void peakGridChargeChanged(
int peakGridCharge);
200 QString errorString()
const;
201 Q_SIGNAL
void errorStringChanged(
const QString &errorString);
203 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
204 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
205 QHash<int, QByteArray> roleNames()
const override;
240 friend OneDayPowerModelPrivate;
241 std::unique_ptr<OneDayPowerModelPrivate>
const d;
API Connection.
Definition: connector.h:39
Historic power data for a day.
Definition: onedaypowermodel.h:30
Roles
The model roles.
Definition: onedaypowermodel.h:147
Utility namespace.
Definition: apirequest.cpp:24
RequestStatus
Request status.
Definition: qalphacloud.h:28
ErrorCode
Error codes.
Definition: qalphacloud.h:45