1 #ifndef H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_ABSTRACTLISTMODEL_HPP
2 #define H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_ABSTRACTLISTMODEL_HPP
4 #include "internal/common.hpp"
5 #include "internal/DbServiceableMixin.hpp"
8 #include <cutehmi/services/Serviceable.hpp>
10 #include <QAbstractListModel>
13 namespace dataacquisition {
25 static constexpr
int INITIAL_INTERVAL = 1000;
30 Q_PROPERTY(
bool busy READ busy NOTIFY busyChanged)
38 Q_PROPERTY(
int interval READ interval WRITE setInterval NOTIFY intervalChanged)
40 Q_PROPERTY(
Schema * schema READ schema WRITE setSchema NOTIFY schemaChanged)
44 virtual
bool busy() const = 0;
48 void setInterval(
int interval);
52 void setSchema(
Schema * schema);
77 virtual
void requestUpdate() = 0;
80 void intervalChanged();
87 virtual
void confirmUpdateFinished() = 0;
89 CUTEHMI_PROTECTED_SIGNALS:
96 void databaseConnected();
98 void schemaValidated();
100 void updateTimerStarted();
102 void updateTimerStopped();
104 void updateFinished();
108 void onSchemaValidated(
bool result);
110 void startUpdateTimer();
112 void stopUpdateTimer();
124 interval(INITIAL_INTERVAL)