8 #include <QAbstractListModel>
12 #include "qalphacloud.h"
13 #include "qalphacloud_export.h"
15 #include "connector.h"
20 class StorageSystemsModelPrivate;
36 Q_PROPERTY(
QAlphaCloud::Connector *connector READ connector WRITE setConnector NOTIFY connectorChanged REQUIRED)
45 Q_PROPERTY(
bool cached READ cached WRITE setCached NOTIFY cachedChanged)
50 Q_PROPERTY(
int count READ rowCount NOTIFY countChanged)
59 Q_PROPERTY(QString primarySerialNumber READ primarySerialNumber NOTIFY primarySerialNumberChanged)
81 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
103 SerialNumber = Qt::UserRole,
108 BatteryGrossCapacity,
109 BatteryRemainingCapacity,
110 BatteryUsableCapacity,
112 RawJson = Qt::UserRole
121 Q_REQUIRED_RESULT
bool cached()
const;
122 void setCached(
bool cached);
123 Q_SIGNAL
void cachedChanged(
bool cached);
128 QString primarySerialNumber()
const;
129 Q_SIGNAL
void primarySerialNumberChanged(
const QString &primarySerialNumber);
134 QString errorString()
const;
135 Q_SIGNAL
void errorStringChanged(
const QString &errorString);
137 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
138 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
139 QHash<int, QByteArray> roleNames()
const override;
158 friend StorageSystemsModelPrivate;
159 std::unique_ptr<StorageSystemsModelPrivate>
const d;
API Connection.
Definition: connector.h:39
Storage Systems Model.
Definition: storagesystemsmodel.h:30
Roles
The model roles.
Definition: storagesystemsmodel.h:102
Utility namespace.
Definition: apirequest.cpp:24
RequestStatus
Request status.
Definition: qalphacloud.h:28
ErrorCode
Error codes.
Definition: qalphacloud.h:45