1#ifndef H_EXTENSIONS_CUTEHMI_SHAREDDATABASE_1_INCLUDE_CUTEHMI_SHAREDDATABASE_DATAOBJECT_HPP
2#define H_EXTENSIONS_CUTEHMI_SHAREDDATABASE_1_INCLUDE_CUTEHMI_SHAREDDATABASE_DATAOBJECT_HPP
4#include "internal/common.hpp"
5#include "DatabaseWorker.hpp"
7#include <cutehmi/InplaceError.hpp>
18namespace shareddatabase {
28 QML_UNCREATABLE(
"DataObject can not be created from QML")
34 Q_PROPERTY(
QString connectionName READ connectionName WRITE setConnectionName RESET resetConnectionName NOTIFY connectionNameChanged)
39 Q_PROPERTY(
bool busy READ busy NOTIFY busyChanged)
57 void setConnectionName(
const QString & connectionName);
62 void resetConnectionName();
115 void incrementBusy();
120 void decrementBusy();
128 virtual void processErrors();
137 void onDatabaseWorkerRefused(
const QString & reason);
145 mutable QMutex sqlErrorsMutex;
Database object.
Definition: DataObject.hpp:25
void busyChanged()
Busy changed.
void connectionNameChanged()
Connection name changed.
void errored(cutehmi::InplaceError error)
Errored.
Database worker.
Definition: DatabaseWorker.hpp:18