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