@@ -97,7 +97,8 public: | |||||
97 | operator QUuid() {return _uuid;} |
|
97 | operator QUuid() {return _uuid;} | |
98 | QUuid ID(){return _uuid;} |
|
98 | QUuid ID(){return _uuid;} | |
99 | signals: |
|
99 | signals: | |
100 | void updated(); |
|
100 | void updated(QUuid ID); | |
|
101 | ||||
101 |
|
|
102 | private: | |
102 |
|
|
103 | class VariablePrivate; | |
103 | spimpl::unique_impl_ptr<VariablePrivate> impl; |
|
104 | spimpl::unique_impl_ptr<VariablePrivate> impl; |
@@ -60,7 +60,7 signals: | |||||
60 | void asyncChangeRange(const std::shared_ptr<Variable>& variable, const DateTimeRange& r); |
|
60 | void asyncChangeRange(const std::shared_ptr<Variable>& variable, const DateTimeRange& r); | |
61 | public slots: |
|
61 | public slots: | |
62 | /// Slot called when data of a variable has been updated |
|
62 | /// Slot called when data of a variable has been updated | |
63 | void variableUpdated() noexcept; |
|
63 | void variableUpdated(QUuid id) noexcept; | |
64 | void variableAdded(const std::shared_ptr<Variable>&); |
|
64 | void variableAdded(const std::shared_ptr<Variable>&); | |
65 | void variableDeleted(const std::shared_ptr<Variable>&); |
|
65 | void variableDeleted(const std::shared_ptr<Variable>&); | |
66 | }; |
|
66 | }; |
@@ -54,7 +54,7 static DataSeriesType findDataSeriesType(const QVariantHash &metadata) | |||||
54 | void Variable::setter(const type& getter) noexcept \ |
|
54 | void Variable::setter(const type& getter) noexcept \ | |
55 | {\ |
|
55 | {\ | |
56 | impl->setter(getter);\ |
|
56 | impl->setter(getter);\ | |
57 | emit updated();\ |
|
57 | emit updated(this->ID());\ | |
58 | }\ |
|
58 | }\ | |
59 |
|
59 | |||
60 | struct Variable::VariablePrivate { |
|
60 | struct Variable::VariablePrivate { | |
@@ -165,7 +165,7 void Variable::setRange(const DateTimeRange &range, bool notify) noexcept | |||||
165 | impl->setRange(range); |
|
165 | impl->setRange(range); | |
166 | impl->updateRealRange(); |
|
166 | impl->updateRealRange(); | |
167 | if(notify) |
|
167 | if(notify) | |
168 | emit this->updated(); |
|
168 | emit this->updated(this->ID()); | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | V_FW_GETTER_SETTER(cacheRange, setCacheRange, DateTimeRange) |
|
171 | V_FW_GETTER_SETTER(cacheRange, setCacheRange, DateTimeRange) | |
@@ -190,10 +190,9 void Variable::updateData(const std::vector<IDataSeries *> &dataSeries, const Da | |||||
190 | impl->purgeDataSeries(); |
|
190 | impl->purgeDataSeries(); | |
191 | } |
|
191 | } | |
192 | if(notify) |
|
192 | if(notify) | |
193 | emit updated(); |
|
193 | emit updated(this->ID()); | |
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 |
|
||||
197 | std::shared_ptr<IDataSeries> Variable::dataSeries() const noexcept |
|
196 | std::shared_ptr<IDataSeries> Variable::dataSeries() const noexcept | |
198 | { |
|
197 | { | |
199 | return impl->dataSeries(); |
|
198 | return impl->dataSeries(); | |
@@ -211,4 +210,3 QVariantHash Variable::metadata() const noexcept | |||||
211 | impl->unlock(); |
|
210 | impl->unlock(); | |
212 | return metadata; |
|
211 | return metadata; | |
213 | } |
|
212 | } | |
214 |
|
@@ -240,7 +240,7 bool VariableModel2::dropMimeData(const QMimeData *data, Qt::DropAction action, | |||||
240 | return dropDone; |
|
240 | return dropDone; | |
241 | } |
|
241 | } | |
242 |
|
242 | |||
243 | void VariableModel2::variableUpdated() noexcept |
|
243 | void VariableModel2::variableUpdated(QUuid id) noexcept | |
244 | { |
|
244 | { | |
245 | emit dataChanged(QModelIndex(),QModelIndex()); |
|
245 | emit dataChanged(QModelIndex(),QModelIndex()); | |
246 | } |
|
246 | } |
General Comments 0
You need to be logged in to leave comments.
Login now