1 #ifndef H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_DATAOBJECT_HPP
2 #define H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_DATAOBJECT_HPP
4 #include "internal/common.hpp"
6 #include <cutehmi/InplaceError.hpp>
7 #include <cutehmi/shareddatabase/DatabaseWorker.hpp>
16 namespace dataacquisition {
30 Q_PROPERTY(
QString connectionName READ connectionName WRITE setConnectionName RESET resetConnectionName NOTIFY connectionNameChanged)
35 Q_PROPERTY(
bool busy READ busy NOTIFY busyChanged)
41 void setConnectionName(const
QString & connectionName);
43 void resetConnectionName();
48 void connectionNameChanged();
61 void pushError(const
QSqlError & sqlError);
72 shareddatabase::DatabaseWorker * worker(
std::function<
void(
QSqlDatabase & db)> task) const;
91 virtual
void processErrors();
100 void onDatabaseWorkerStriked(const
QString & reason);
108 mutable QMutex sqlErrorsMutex;