CuteHMI - Data Acquisition (CuteHMI.DataAcquisition.0)
TableCollective.hpp
1 #ifndef H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_TABLECOLLECTIVE_HPP
2 #define H_EXTENSIONS_CUTEHMI_DATAACQUISITION_0_INCLUDE_CUTEHMI_DATAACQUISITION_INTERNAL_TABLECOLLECTIVE_HPP
3 
4 #include "common.hpp"
5 #include "../Schema.hpp"
6 
7 #include <QObject>
8 
9 namespace cutehmi {
10 namespace dataacquisition {
11 namespace internal {
12 
13 class CUTEHMI_DATAACQUISITION_PRIVATE TableCollective:
14  public QObject
15 {
16  Q_OBJECT
17 
18  public:
20 
21  Schema * schema() const;
22 
23  void setSchema(Schema * schema);
24 
25  public slots:
26  void confirmWorkersFinished();
27 
28  signals:
29  void workersFinished();
30 
31  void errored(cutehmi::InplaceError error);
32 
33  protected:
34  virtual void updateSchema(Schema * schema) = 0;
35 
36  void accountInsertBusy(bool busy);
37 
38  private:
39  struct Members
40  {
41  Schema * schema = nullptr;
42  int insertsBusy = 0;
43  };
44 
45  MPtr<Members> m;
46 };
47 
48 }
49 }
50 }
51 
52 #endif
53 
54 //(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
55 //(c)C: This file is a part of CuteHMI.
56 //(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
57 //(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
58 //(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
cutehmi::dataacquisition::internal::TableCollective
Definition: TableCollective.hpp:13
cutehmi::InplaceError
cutehmi::MPtr< Members >
QObject
cutehmi
std::internal
T internal(T... args)
cutehmi::dataacquisition::Schema
Database schema.
Definition: Schema.hpp:13