@@ -52,7 +52,7 const auto LEFTINSPECTORSIDEPANESPLITTERINDEX = 1; | |||||
52 | const auto VIEWPLITTERINDEX = 2; |
|
52 | const auto VIEWPLITTERINDEX = 2; | |
53 | const auto RIGHTINSPECTORSIDEPANESPLITTERINDEX = 3; |
|
53 | const auto RIGHTINSPECTORSIDEPANESPLITTERINDEX = 3; | |
54 | const auto RIGHTMAININSPECTORWIDGETSPLITTERINDEX = 4; |
|
54 | const auto RIGHTMAININSPECTORWIDGETSPLITTERINDEX = 4; | |
55 | } |
|
55 | } // namespace | |
56 |
|
56 | |||
57 | class MainWindow::MainWindowPrivate { |
|
57 | class MainWindow::MainWindowPrivate { | |
58 | public: |
|
58 | public: | |
@@ -237,9 +237,7 MainWindow::MainWindow(QWidget *parent) | |||||
237 | Qt::DirectConnection); |
|
237 | Qt::DirectConnection); | |
238 | } |
|
238 | } | |
239 |
|
239 | |||
240 | MainWindow::~MainWindow() |
|
240 | MainWindow::~MainWindow() {} | |
241 | { |
|
|||
242 | } |
|
|||
243 |
|
241 | |||
244 | void MainWindow::changeEvent(QEvent *e) |
|
242 | void MainWindow::changeEvent(QEvent *e) | |
245 | { |
|
243 | { |
@@ -13,30 +13,30 struct MetaTypeRegistry { | |||||
13 | }; |
|
13 | }; | |
14 |
|
14 | |||
15 | /** |
|
15 | /** | |
16 |
|
|
16 | * This macro can be used to : | |
17 |
|
|
17 | * - declare a type as a Qt meta type | |
18 |
|
|
18 | * - and register it (through a static instance) at the launch of SciQlop, so it can be passed in | |
19 | * Qt signals/slots |
|
19 | * Qt signals/slots | |
20 |
|
|
20 | * | |
21 |
|
|
21 | * It can be used both in .h or in .cpp files | |
22 |
|
|
22 | * | |
23 |
|
|
23 | * @param NAME name of the instance under which the type will be registered (in uppercase) | |
24 |
|
|
24 | * @param TYPE type to register | |
25 |
|
|
25 | * | |
26 |
|
|
26 | * Example: | |
27 |
|
|
27 | * ~~~cpp | |
28 |
|
|
28 | * // The following macro : | |
29 |
|
|
29 | * // - declares std::shared_ptr<Variable> as a Qt meta type | |
30 |
|
|
30 | * // - registers it through an instance named VAR_SHARED_PTR | |
31 |
|
|
31 | * SCIQLOP_REGISTER_META_TYPE(VAR_SHARED_PTR, std::shared_ptr<Variable>) | |
32 |
|
|
32 | * | |
33 |
|
|
33 | * // The following macro : | |
34 |
|
|
34 | * // - declares a raw pointer of Variable as a Qt meta type | |
35 |
|
|
35 | * // - registers it through an instance named VAR_RAW_PTR | |
36 |
|
|
36 | * SCIQLOP_REGISTER_META_TYPE(VAR_RAW_PTR, Variable*) | |
37 |
|
|
37 | * ~~~ | |
38 |
|
|
38 | * | |
39 |
|
|
39 | */ | |
40 | // clang-format off |
|
40 | // clang-format off | |
41 | #define SCIQLOP_REGISTER_META_TYPE(NAME, TYPE) \ |
|
41 | #define SCIQLOP_REGISTER_META_TYPE(NAME, TYPE) \ | |
42 | Q_DECLARE_METATYPE(TYPE) \ |
|
42 | Q_DECLARE_METATYPE(TYPE) \ |
@@ -89,10 +89,10 using default_copier_t = typename default_copier<T>::type; | |||||
89 |
|
89 | |||
90 | template <class T, class D, class C> |
|
90 | template <class T, class D, class C> | |
91 | struct is_default_manageable |
|
91 | struct is_default_manageable | |
92 | : public std::integral_constant<bool, std::is_same<D, default_deleter_t<T> >::value |
|
92 | : public std::integral_constant<bool, std::is_same<D, default_deleter_t<T> >::value | |
93 | && std::is_same<C, default_copier_t<T> >::value> { |
|
93 | && std::is_same<C, default_copier_t<T> >::value> { | |
94 | }; |
|
94 | }; | |
95 | } |
|
95 | } // namespace details | |
96 |
|
96 | |||
97 |
|
97 | |||
98 | template <class T, class Deleter = details::default_deleter_t<T>, |
|
98 | template <class T, class Deleter = details::default_deleter_t<T>, | |
@@ -135,7 +135,7 public: | |||||
135 | && is_default_manageable::value, |
|
135 | && is_default_manageable::value, | |
136 | dummy_t_>::type |
|
136 | dummy_t_>::type | |
137 | = dummy_t_()) SPIMPL_NOEXCEPT |
|
137 | = dummy_t_()) SPIMPL_NOEXCEPT | |
138 | : impl_ptr(u, &details::default_delete<T>, &details::default_copy<T>) |
|
138 | : impl_ptr(u, &details::default_delete<T>, &details::default_copy<T>) | |
139 | { |
|
139 | { | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
@@ -155,8 +155,8 public: | |||||
155 | && is_default_manageable::value, |
|
155 | && is_default_manageable::value, | |
156 | dummy_t_>::type |
|
156 | dummy_t_>::type | |
157 | = dummy_t_()) SPIMPL_NOEXCEPT |
|
157 | = dummy_t_()) SPIMPL_NOEXCEPT | |
158 | : ptr_(u.release(), &details::default_delete<T>), |
|
158 | : ptr_(u.release(), &details::default_delete<T>), | |
159 | copier_(&details::default_copy<T>) |
|
159 | copier_(&details::default_copy<T>) | |
160 | { |
|
160 | { | |
161 | } |
|
161 | } | |
162 | #endif |
|
162 | #endif | |
@@ -234,13 +234,12 public: | |||||
234 | return operator=(u.clone()); |
|
234 | return operator=(u.clone()); | |
235 | } |
|
235 | } | |
236 |
|
236 | |||
237 | // |
|
237 | // | |
238 |
|
238 | |||
239 | #ifdef SPIMPL_HAS_AUTO_PTR |
|
239 | #ifdef SPIMPL_HAS_AUTO_PTR | |
240 | template <class U> |
|
240 | template <class U> | |
241 | typename std::enable_if<std::is_convertible<U *, pointer>::value |
|
241 | typename std::enable_if< | |
242 | && is_default_manageable::value, |
|
242 | std::is_convertible<U *, pointer>::value && is_default_manageable::value, impl_ptr &>::type | |
243 | impl_ptr &>::type |
|
|||
244 | operator=(std::auto_ptr<U> &&u) SPIMPL_NOEXCEPT |
|
243 | operator=(std::auto_ptr<U> &&u) SPIMPL_NOEXCEPT | |
245 | { |
|
244 | { | |
246 | return operator=(impl_ptr(std::move(u))); |
|
245 | return operator=(impl_ptr(std::move(u))); | |
@@ -248,9 +247,8 public: | |||||
248 | #endif |
|
247 | #endif | |
249 |
|
248 | |||
250 | template <class U> |
|
249 | template <class U> | |
251 | typename std::enable_if<std::is_convertible<U *, pointer>::value |
|
250 | typename std::enable_if< | |
252 | && is_default_manageable::value, |
|
251 | std::is_convertible<U *, pointer>::value && is_default_manageable::value, impl_ptr &>::type | |
253 | impl_ptr &>::type |
|
|||
254 | operator=(std::unique_ptr<U> &&u) SPIMPL_NOEXCEPT |
|
252 | operator=(std::unique_ptr<U> &&u) SPIMPL_NOEXCEPT | |
255 | { |
|
253 | { | |
256 | return operator=(impl_ptr(std::move(u))); |
|
254 | return operator=(impl_ptr(std::move(u))); | |
@@ -442,7 +440,7 inline unique_impl_ptr<T> make_unique_impl(Args &&... args) | |||||
442 | static_assert(!std::is_array<T>::value, "unique_impl_ptr does not support arrays"); |
|
440 | static_assert(!std::is_array<T>::value, "unique_impl_ptr does not support arrays"); | |
443 | return unique_impl_ptr<T>(new T(std::forward<Args>(args)...), &details::default_delete<T>); |
|
441 | return unique_impl_ptr<T>(new T(std::forward<Args>(args)...), &details::default_delete<T>); | |
444 | } |
|
442 | } | |
445 | } |
|
443 | } // namespace spimpl | |
446 |
|
444 | |||
447 | namespace std { |
|
445 | namespace std { | |
448 | template <class T, class D, class C> |
|
446 | template <class T, class D, class C> | |
@@ -455,6 +453,6 struct hash<spimpl::impl_ptr<T, D, C> > { | |||||
455 | return hash<typename argument_type::pointer>()(p.get()); |
|
453 | return hash<typename argument_type::pointer>()(p.get()); | |
456 | } |
|
454 | } | |
457 | }; |
|
455 | }; | |
458 | } |
|
456 | } // namespace std | |
459 |
|
457 | |||
460 | #endif // SPIMPL_H_ |
|
458 | #endif // SPIMPL_H_ |
@@ -43,9 +43,10 std::vector<double> flatten(std::vector<double> xValues, std::vector<double> yVa | |||||
43 | VectorSeries::VectorSeries(std::vector<double> xAxisData, std::vector<double> xValuesData, |
|
43 | VectorSeries::VectorSeries(std::vector<double> xAxisData, std::vector<double> xValuesData, | |
44 | std::vector<double> yValuesData, std::vector<double> zValuesData, |
|
44 | std::vector<double> yValuesData, std::vector<double> zValuesData, | |
45 | const Unit &xAxisUnit, const Unit &valuesUnit) |
|
45 | const Unit &xAxisUnit, const Unit &valuesUnit) | |
46 | : VectorSeries{std::move(xAxisData), flatten(std::move(xValuesData), std::move(yValuesData), |
|
46 | : VectorSeries{ | |
47 | std::move(zValuesData)), |
|
47 | std::move(xAxisData), | |
48 | xAxisUnit, valuesUnit} |
|
48 | flatten(std::move(xValuesData), std::move(yValuesData), std::move(zValuesData)), | |
|
49 | xAxisUnit, valuesUnit} | |||
49 | { |
|
50 | { | |
50 | } |
|
51 | } | |
51 |
|
52 |
@@ -49,14 +49,14 public: | |||||
49 | DataSourceController::DataSourceController(QObject *parent) |
|
49 | DataSourceController::DataSourceController(QObject *parent) | |
50 | : impl{spimpl::make_unique_impl<DataSourceControllerPrivate>()} |
|
50 | : impl{spimpl::make_unique_impl<DataSourceControllerPrivate>()} | |
51 | { |
|
51 | { | |
52 |
qCDebug(LOG_DataSourceController()) |
|
52 | qCDebug(LOG_DataSourceController()) | |
53 | << QThread::currentThread(); |
|
53 | << tr("DataSourceController construction") << QThread::currentThread(); | |
54 | } |
|
54 | } | |
55 |
|
55 | |||
56 | DataSourceController::~DataSourceController() |
|
56 | DataSourceController::~DataSourceController() | |
57 | { |
|
57 | { | |
58 |
qCDebug(LOG_DataSourceController()) |
|
58 | qCDebug(LOG_DataSourceController()) | |
59 | << QThread::currentThread(); |
|
59 | << tr("DataSourceController destruction") << QThread::currentThread(); | |
60 | this->waitForFinish(); |
|
60 | this->waitForFinish(); | |
61 | } |
|
61 | } | |
62 |
|
62 | |||
@@ -126,8 +126,8 void DataSourceController::loadProductItem(const QUuid &dataSourceUid, | |||||
126 |
|
126 | |||
127 | void DataSourceController::initialize() |
|
127 | void DataSourceController::initialize() | |
128 | { |
|
128 | { | |
129 |
qCDebug(LOG_DataSourceController()) |
|
129 | qCDebug(LOG_DataSourceController()) | |
130 | << QThread::currentThread(); |
|
130 | << tr("DataSourceController init") << QThread::currentThread(); | |
131 | impl->m_WorkingMutex.lock(); |
|
131 | impl->m_WorkingMutex.lock(); | |
132 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController init END"); |
|
132 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController init END"); | |
133 | } |
|
133 | } |
@@ -64,8 +64,8 void NetworkController::onProcessRequested(std::shared_ptr<QNetworkRequest> requ | |||||
64 | impl->unlock(); |
|
64 | impl->unlock(); | |
65 | } |
|
65 | } | |
66 |
|
66 | |||
67 |
qCDebug(LOG_NetworkController()) |
|
67 | qCDebug(LOG_NetworkController()) | |
68 |
|
|
68 | << tr("NetworkController onReplyFinished END") << QThread::currentThread() << reply; | |
69 | }; |
|
69 | }; | |
70 |
|
70 | |||
71 | auto onReplyProgress = [reply, request, this](qint64 bytesRead, qint64 totalBytes) { |
|
71 | auto onReplyProgress = [reply, request, this](qint64 bytesRead, qint64 totalBytes) { | |
@@ -73,9 +73,9 void NetworkController::onProcessRequested(std::shared_ptr<QNetworkRequest> requ | |||||
73 | // NOTE: a totalbytes of 0 can happened when a request has been aborted |
|
73 | // NOTE: a totalbytes of 0 can happened when a request has been aborted | |
74 | if (totalBytes > 0) { |
|
74 | if (totalBytes > 0) { | |
75 | double progress = (bytesRead * 100.0) / totalBytes; |
|
75 | double progress = (bytesRead * 100.0) / totalBytes; | |
76 |
qCDebug(LOG_NetworkController()) |
|
76 | qCDebug(LOG_NetworkController()) | |
77 | << QThread::currentThread() << request.get() << reply |
|
77 | << tr("NetworkController onReplyProgress") << progress << QThread::currentThread() | |
78 |
|
|
78 | << request.get() << reply << bytesRead << totalBytes; | |
79 | impl->lockRead(); |
|
79 | impl->lockRead(); | |
80 | auto it = impl->m_NetworkReplyToId.find(reply); |
|
80 | auto it = impl->m_NetworkReplyToId.find(reply); | |
81 | if (it != impl->m_NetworkReplyToId.cend()) { |
|
81 | if (it != impl->m_NetworkReplyToId.cend()) { | |
@@ -87,8 +87,8 void NetworkController::onProcessRequested(std::shared_ptr<QNetworkRequest> requ | |||||
87 | impl->unlock(); |
|
87 | impl->unlock(); | |
88 | } |
|
88 | } | |
89 |
|
89 | |||
90 |
qCDebug(LOG_NetworkController()) |
|
90 | qCDebug(LOG_NetworkController()) | |
91 |
|
|
91 | << tr("NetworkController onReplyProgress END") << QThread::currentThread() << reply; | |
92 | } |
|
92 | } | |
93 | }; |
|
93 | }; | |
94 |
|
94 | |||
@@ -125,8 +125,8 void NetworkController::finalize() | |||||
125 | void NetworkController::onReplyCanceled(QUuid identifier) |
|
125 | void NetworkController::onReplyCanceled(QUuid identifier) | |
126 | { |
|
126 | { | |
127 | auto findReply = [identifier](const auto &entry) { return identifier == entry.second; }; |
|
127 | auto findReply = [identifier](const auto &entry) { return identifier == entry.second; }; | |
128 |
qCDebug(LOG_NetworkController()) |
|
128 | qCDebug(LOG_NetworkController()) | |
129 |
|
|
129 | << tr("NetworkController onReplyCanceled") << QThread::currentThread() << identifier; | |
130 |
|
130 | |||
131 |
|
131 | |||
132 | impl->lockRead(); |
|
132 | impl->lockRead(); | |
@@ -138,8 +138,8 void NetworkController::onReplyCanceled(QUuid identifier) | |||||
138 | << QThread::currentThread() << identifier; |
|
138 | << QThread::currentThread() << identifier; | |
139 | it->first->abort(); |
|
139 | it->first->abort(); | |
140 | } |
|
140 | } | |
141 |
qCDebug(LOG_NetworkController()) |
|
141 | qCDebug(LOG_NetworkController()) | |
142 | << QThread::currentThread(); |
|
142 | << tr("NetworkController onReplyCanceled END") << QThread::currentThread(); | |
143 | } |
|
143 | } | |
144 |
|
144 | |||
145 | void NetworkController::waitForFinish() |
|
145 | void NetworkController::waitForFinish() |
@@ -99,9 +99,7 struct PluginManager::PluginManagerPrivate { | |||||
99 | QHash<QString, QString> m_RegisteredPlugins; |
|
99 | QHash<QString, QString> m_RegisteredPlugins; | |
100 | }; |
|
100 | }; | |
101 |
|
101 | |||
102 | PluginManager::PluginManager() : impl{spimpl::make_unique_impl<PluginManagerPrivate>()} |
|
102 | PluginManager::PluginManager() : impl{spimpl::make_unique_impl<PluginManagerPrivate>()} {} | |
103 | { |
|
|||
104 | } |
|
|||
105 |
|
103 | |||
106 | void PluginManager::loadPlugins(const QDir &pluginDir) |
|
104 | void PluginManager::loadPlugins(const QDir &pluginDir) | |
107 | { |
|
105 | { |
@@ -265,8 +265,8 QVector<SqpRange> Variable::provideNotInCacheRangeList(const SqpRange &range) co | |||||
265 | notInCache << SqpRange{impl->m_CacheRange.m_TEnd, range.m_TEnd}; |
|
265 | notInCache << SqpRange{impl->m_CacheRange.m_TEnd, range.m_TEnd}; | |
266 | } |
|
266 | } | |
267 | else { |
|
267 | else { | |
268 |
qCCritical(LOG_Variable()) |
|
268 | qCCritical(LOG_Variable()) | |
269 |
|
|
269 | << tr("Detection of unknown case.") << QThread::currentThread(); | |
270 | } |
|
270 | } | |
271 | } |
|
271 | } | |
272 | } |
|
272 | } | |
@@ -305,8 +305,8 QVector<SqpRange> Variable::provideInCacheRangeList(const SqpRange &range) const | |||||
305 | inCache << impl->m_CacheRange; |
|
305 | inCache << impl->m_CacheRange; | |
306 | } |
|
306 | } | |
307 | else { |
|
307 | else { | |
308 |
qCCritical(LOG_Variable()) |
|
308 | qCCritical(LOG_Variable()) | |
309 |
|
|
309 | << tr("Detection of unknown case.") << QThread::currentThread(); | |
310 | } |
|
310 | } | |
311 | } |
|
311 | } | |
312 | } |
|
312 | } | |
@@ -339,8 +339,8 QVector<SqpRange> Variable::provideNotInCacheRangeList(const SqpRange &oldRange, | |||||
339 | notInCache << SqpRange{oldRange.m_TEnd, nextRange.m_TEnd}; |
|
339 | notInCache << SqpRange{oldRange.m_TEnd, nextRange.m_TEnd}; | |
340 | } |
|
340 | } | |
341 | else { |
|
341 | else { | |
342 |
qCCritical(LOG_Variable()) |
|
342 | qCCritical(LOG_Variable()) | |
343 |
|
|
343 | << tr("Detection of unknown case.") << QThread::currentThread(); | |
344 | } |
|
344 | } | |
345 | } |
|
345 | } | |
346 | } |
|
346 | } | |
@@ -378,8 +378,8 QVector<SqpRange> Variable::provideInCacheRangeList(const SqpRange &oldRange, | |||||
378 | inCache << oldRange; |
|
378 | inCache << oldRange; | |
379 | } |
|
379 | } | |
380 | else { |
|
380 | else { | |
381 |
qCCritical(LOG_Variable()) |
|
381 | qCCritical(LOG_Variable()) | |
382 |
|
|
382 | << tr("Detection of unknown case.") << QThread::currentThread(); | |
383 | } |
|
383 | } | |
384 | } |
|
384 | } | |
385 | } |
|
385 | } |
@@ -53,8 +53,8 VariableAcquisitionWorker::VariableAcquisitionWorker(QObject *parent) | |||||
53 |
|
53 | |||
54 | VariableAcquisitionWorker::~VariableAcquisitionWorker() |
|
54 | VariableAcquisitionWorker::~VariableAcquisitionWorker() | |
55 | { |
|
55 | { | |
56 |
qCInfo(LOG_VariableAcquisitionWorker()) |
|
56 | qCInfo(LOG_VariableAcquisitionWorker()) | |
57 | << QThread::currentThread(); |
|
57 | << tr("VariableAcquisitionWorker destruction") << QThread::currentThread(); | |
58 | this->waitForFinish(); |
|
58 | this->waitForFinish(); | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
@@ -71,8 +71,8 QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid v | |||||
71 |
|
71 | |||
72 | // Request creation |
|
72 | // Request creation | |
73 | auto acqRequest = AcquisitionRequest{}; |
|
73 | auto acqRequest = AcquisitionRequest{}; | |
74 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
74 | qCDebug(LOG_VariableAcquisitionWorker()) | |
75 | << varRequestId; |
|
75 | << tr("PushVariableRequest ") << vIdentifier << varRequestId; | |
76 | acqRequest.m_VarRequestId = varRequestId; |
|
76 | acqRequest.m_VarRequestId = varRequestId; | |
77 | acqRequest.m_vIdentifier = vIdentifier; |
|
77 | acqRequest.m_vIdentifier = vIdentifier; | |
78 | acqRequest.m_DataProviderParameters = parameters; |
|
78 | acqRequest.m_DataProviderParameters = parameters; | |
@@ -150,8 +150,8 void VariableAcquisitionWorker::abortProgressRequested(QUuid vIdentifier) | |||||
150 | void VariableAcquisitionWorker::onVariableRetrieveDataInProgress(QUuid acqIdentifier, |
|
150 | void VariableAcquisitionWorker::onVariableRetrieveDataInProgress(QUuid acqIdentifier, | |
151 | double progress) |
|
151 | double progress) | |
152 | { |
|
152 | { | |
153 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
153 | qCDebug(LOG_VariableAcquisitionWorker()) | |
154 | << acqIdentifier << progress; |
|
154 | << tr("TORM: onVariableRetrieveDataInProgress ") << acqIdentifier << progress; | |
155 | impl->lockRead(); |
|
155 | impl->lockRead(); | |
156 | auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); |
|
156 | auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); | |
157 | if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { |
|
157 | if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { | |
@@ -176,16 +176,16 void VariableAcquisitionWorker::onVariableRetrieveDataInProgress(QUuid acqIdenti | |||||
176 |
|
176 | |||
177 | void VariableAcquisitionWorker::onVariableAcquisitionFailed(QUuid acqIdentifier) |
|
177 | void VariableAcquisitionWorker::onVariableAcquisitionFailed(QUuid acqIdentifier) | |
178 | { |
|
178 | { | |
179 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
179 | qCDebug(LOG_VariableAcquisitionWorker()) | |
180 | << QThread::currentThread(); |
|
180 | << tr("onVariableAcquisitionFailed") << QThread::currentThread(); | |
181 | impl->lockRead(); |
|
181 | impl->lockRead(); | |
182 | auto it = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); |
|
182 | auto it = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); | |
183 | if (it != impl->m_AcqIdentifierToAcqRequestMap.cend()) { |
|
183 | if (it != impl->m_AcqIdentifierToAcqRequestMap.cend()) { | |
184 | auto request = it->second; |
|
184 | auto request = it->second; | |
185 | impl->unlock(); |
|
185 | impl->unlock(); | |
186 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
186 | qCDebug(LOG_VariableAcquisitionWorker()) | |
187 |
|
|
187 | << tr("onVariableAcquisitionFailed") << acqIdentifier << request.m_vIdentifier | |
188 |
|
|
188 | << QThread::currentThread(); | |
189 | emit variableCanceledRequested(request.m_vIdentifier); |
|
189 | emit variableCanceledRequested(request.m_vIdentifier); | |
190 | } |
|
190 | } | |
191 | else { |
|
191 | else { | |
@@ -198,8 +198,8 void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier, | |||||
198 | std::shared_ptr<IDataSeries> dataSeries, |
|
198 | std::shared_ptr<IDataSeries> dataSeries, | |
199 | SqpRange dataRangeAcquired) |
|
199 | SqpRange dataRangeAcquired) | |
200 | { |
|
200 | { | |
201 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
201 | qCDebug(LOG_VariableAcquisitionWorker()) | |
202 | << acqIdentifier << dataRangeAcquired; |
|
202 | << tr("TORM: onVariableDataAcquired on range ") << acqIdentifier << dataRangeAcquired; | |
203 | impl->lockWrite(); |
|
203 | impl->lockWrite(); | |
204 | auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); |
|
204 | auto aIdToARit = impl->m_AcqIdentifierToAcqRequestMap.find(acqIdentifier); | |
205 | if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { |
|
205 | if (aIdToARit != impl->m_AcqIdentifierToAcqRequestMap.cend()) { | |
@@ -270,8 +270,8 void VariableAcquisitionWorker::onExecuteRequest(QUuid acqIdentifier) | |||||
270 |
|
270 | |||
271 | void VariableAcquisitionWorker::initialize() |
|
271 | void VariableAcquisitionWorker::initialize() | |
272 | { |
|
272 | { | |
273 |
qCDebug(LOG_VariableAcquisitionWorker()) |
|
273 | qCDebug(LOG_VariableAcquisitionWorker()) | |
274 | << QThread::currentThread(); |
|
274 | << tr("VariableAcquisitionWorker init") << QThread::currentThread(); | |
275 | impl->m_WorkingMutex.lock(); |
|
275 | impl->m_WorkingMutex.lock(); | |
276 | qCDebug(LOG_VariableAcquisitionWorker()) << tr("VariableAcquisitionWorker init END"); |
|
276 | qCDebug(LOG_VariableAcquisitionWorker()) << tr("VariableAcquisitionWorker init END"); | |
277 | } |
|
277 | } |
@@ -30,8 +30,8 VariableCacheController::VariableCacheController(QObject *parent) | |||||
30 | void VariableCacheController::addDateTime(std::shared_ptr<Variable> variable, |
|
30 | void VariableCacheController::addDateTime(std::shared_ptr<Variable> variable, | |
31 | const SqpRange &dateTime) |
|
31 | const SqpRange &dateTime) | |
32 | { |
|
32 | { | |
33 |
qCDebug(LOG_VariableCacheController()) |
|
33 | qCDebug(LOG_VariableCacheController()) | |
34 | << QThread::currentThread()->objectName(); |
|
34 | << "VariableCacheController::addDateTime" << QThread::currentThread()->objectName(); | |
35 | if (variable) { |
|
35 | if (variable) { | |
36 | auto findVariableIte = impl->m_VariableToSqpRangeListMap.find(variable); |
|
36 | auto findVariableIte = impl->m_VariableToSqpRangeListMap.find(variable); | |
37 | if (findVariableIte == impl->m_VariableToSqpRangeListMap.end()) { |
|
37 | if (findVariableIte == impl->m_VariableToSqpRangeListMap.end()) { | |
@@ -104,8 +104,8 VariableCacheController::provideNotInCacheDateTimeList(std::shared_ptr<Variable> | |||||
104 | QVector<SqpRange> |
|
104 | QVector<SqpRange> | |
105 | VariableCacheController::dateCacheList(std::shared_ptr<Variable> variable) const noexcept |
|
105 | VariableCacheController::dateCacheList(std::shared_ptr<Variable> variable) const noexcept | |
106 | { |
|
106 | { | |
107 |
qCDebug(LOG_VariableCacheController()) |
|
107 | qCDebug(LOG_VariableCacheController()) | |
108 | << QThread::currentThread()->objectName(); |
|
108 | << "VariableCacheController::dateCacheList" << QThread::currentThread()->objectName(); | |
109 | try { |
|
109 | try { | |
110 | return impl->m_VariableToSqpRangeListMap.at(variable); |
|
110 | return impl->m_VariableToSqpRangeListMap.at(variable); | |
111 | } |
|
111 | } | |
@@ -215,8 +215,8 void VariableCacheController::displayCache(std::shared_ptr<Variable> variable) c | |||||
215 | { |
|
215 | { | |
216 | auto variableDateTimeList = impl->m_VariableToSqpRangeListMap.find(variable); |
|
216 | auto variableDateTimeList = impl->m_VariableToSqpRangeListMap.find(variable); | |
217 | if (variableDateTimeList != impl->m_VariableToSqpRangeListMap.end()) { |
|
217 | if (variableDateTimeList != impl->m_VariableToSqpRangeListMap.end()) { | |
218 |
qCInfo(LOG_VariableCacheController()) |
|
218 | qCInfo(LOG_VariableCacheController()) | |
219 | << variableDateTimeList->second; |
|
219 | << tr("VariableCacheController::displayCache") << variableDateTimeList->second; | |
220 | } |
|
220 | } | |
221 | else { |
|
221 | else { | |
222 | qCWarning(LOG_VariableCacheController()) |
|
222 | qCWarning(LOG_VariableCacheController()) |
@@ -76,7 +76,7 SqpRange computeSynchroRangeRequested(const SqpRange &varRange, const SqpRange & | |||||
76 |
|
76 | |||
77 | return varRangeRequested; |
|
77 | return varRangeRequested; | |
78 | } |
|
78 | } | |
79 | } |
|
79 | } // namespace | |
80 |
|
80 | |||
81 | enum class VariableRequestHandlerState { OFF, RUNNING, PENDING }; |
|
81 | enum class VariableRequestHandlerState { OFF, RUNNING, PENDING }; | |
82 |
|
82 | |||
@@ -165,8 +165,8 struct VariableController::VariableControllerPrivate { | |||||
165 | VariableController::VariableController(QObject *parent) |
|
165 | VariableController::VariableController(QObject *parent) | |
166 | : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>(this)} |
|
166 | : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>(this)} | |
167 | { |
|
167 | { | |
168 |
qCDebug(LOG_VariableController()) |
|
168 | qCDebug(LOG_VariableController()) | |
169 | << QThread::currentThread(); |
|
169 | << tr("VariableController construction") << QThread::currentThread(); | |
170 |
|
170 | |||
171 | connect(impl->m_VariableModel, &VariableModel::abortProgessRequested, this, |
|
171 | connect(impl->m_VariableModel, &VariableModel::abortProgessRequested, this, | |
172 | &VariableController::onAbortProgressRequested); |
|
172 | &VariableController::onAbortProgressRequested); | |
@@ -193,8 +193,8 VariableController::VariableController(QObject *parent) | |||||
193 |
|
193 | |||
194 | VariableController::~VariableController() |
|
194 | VariableController::~VariableController() | |
195 | { |
|
195 | { | |
196 |
qCDebug(LOG_VariableController()) |
|
196 | qCDebug(LOG_VariableController()) | |
197 | << QThread::currentThread(); |
|
197 | << tr("VariableController destruction") << QThread::currentThread(); | |
198 | this->waitForFinish(); |
|
198 | this->waitForFinish(); | |
199 | } |
|
199 | } | |
200 |
|
200 | |||
@@ -361,8 +361,8 VariableController::createVariable(const QString &name, const QVariantHash &meta | |||||
361 | void VariableController::onDateTimeOnSelection(const SqpRange &dateTime) |
|
361 | void VariableController::onDateTimeOnSelection(const SqpRange &dateTime) | |
362 | { |
|
362 | { | |
363 | // NOTE: Even if acquisition request is aborting, the graphe range will be changed |
|
363 | // NOTE: Even if acquisition request is aborting, the graphe range will be changed | |
364 |
qCDebug(LOG_VariableController()) |
|
364 | qCDebug(LOG_VariableController()) | |
365 | << QThread::currentThread()->objectName(); |
|
365 | << "VariableController::onDateTimeOnSelection" << QThread::currentThread()->objectName(); | |
366 | auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); |
|
366 | auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); | |
367 |
|
367 | |||
368 | // NOTE we only permit the time modification for one variable |
|
368 | // NOTE we only permit the time modification for one variable | |
@@ -483,9 +483,9 void VariableController::onAbortAcquisitionRequested(QUuid vIdentifier) | |||||
483 |
|
483 | |||
484 | void VariableController::onAddSynchronizationGroupId(QUuid synchronizationGroupId) |
|
484 | void VariableController::onAddSynchronizationGroupId(QUuid synchronizationGroupId) | |
485 | { |
|
485 | { | |
486 | qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronizationGroupId" |
|
486 | qCDebug(LOG_VariableController()) | |
487 | << QThread::currentThread()->objectName() |
|
487 | << "TORM: VariableController::onAddSynchronizationGroupId" | |
488 | << synchronizationGroupId; |
|
488 | << QThread::currentThread()->objectName() << synchronizationGroupId; | |
489 | auto vSynchroGroup = std::make_shared<VariableSynchronizationGroup>(); |
|
489 | auto vSynchroGroup = std::make_shared<VariableSynchronizationGroup>(); | |
490 | impl->m_GroupIdToVariableSynchronizationGroupMap.insert( |
|
490 | impl->m_GroupIdToVariableSynchronizationGroupMap.insert( | |
491 | std::make_pair(synchronizationGroupId, vSynchroGroup)); |
|
491 | std::make_pair(synchronizationGroupId, vSynchroGroup)); | |
@@ -500,8 +500,8 void VariableController::onAddSynchronized(std::shared_ptr<Variable> variable, | |||||
500 | QUuid synchronizationGroupId) |
|
500 | QUuid synchronizationGroupId) | |
501 |
|
501 | |||
502 | { |
|
502 | { | |
503 |
qCDebug(LOG_VariableController()) |
|
503 | qCDebug(LOG_VariableController()) | |
504 | << synchronizationGroupId; |
|
504 | << "TORM: VariableController::onAddSynchronized" << synchronizationGroupId; | |
505 | auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(variable); |
|
505 | auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(variable); | |
506 | if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) { |
|
506 | if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) { | |
507 | auto groupIdToVSGIt |
|
507 | auto groupIdToVSGIt | |
@@ -565,9 +565,9 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||||
565 | } |
|
565 | } | |
566 |
|
566 | |||
567 | auto varRequestId = QUuid::createUuid(); |
|
567 | auto varRequestId = QUuid::createUuid(); | |
568 |
qCDebug(LOG_VariableController()) |
|
568 | qCDebug(LOG_VariableController()) | |
569 | << QThread::currentThread()->objectName() << varRequestId |
|
569 | << "VariableController::onRequestDataLoading" << QThread::currentThread()->objectName() | |
570 |
|
|
570 | << varRequestId << range << synchronise; | |
571 |
|
571 | |||
572 | if (!synchronise) { |
|
572 | if (!synchronise) { | |
573 | auto varIds = std::list<QUuid>{}; |
|
573 | auto varIds = std::list<QUuid>{}; | |
@@ -577,8 +577,8 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||||
577 | } |
|
577 | } | |
578 | impl->m_VarGroupIdToVarIds.insert(std::make_pair(varRequestId, varIds)); |
|
578 | impl->m_VarGroupIdToVarIds.insert(std::make_pair(varRequestId, varIds)); | |
579 | for (const auto &var : variables) { |
|
579 | for (const auto &var : variables) { | |
580 |
qCDebug(LOG_VariableController()) |
|
580 | qCDebug(LOG_VariableController()) | |
581 | << varIds.size(); |
|
581 | << "processRequest for" << var->name() << varRequestId << varIds.size(); | |
582 | impl->processRequest(var, range, varRequestId); |
|
582 | impl->processRequest(var, range, varRequestId); | |
583 | } |
|
583 | } | |
584 | } |
|
584 | } | |
@@ -603,8 +603,8 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||||
603 |
|
603 | |||
604 | // Don't process already processed var |
|
604 | // Don't process already processed var | |
605 | if (var != nullptr) { |
|
605 | if (var != nullptr) { | |
606 |
qCDebug(LOG_VariableController()) |
|
606 | qCDebug(LOG_VariableController()) | |
607 | << varRequestId; |
|
607 | << "processRequest synchro for" << var->name() << varRequestId; | |
608 | auto vSyncRangeRequested |
|
608 | auto vSyncRangeRequested | |
609 | = variables.contains(var) |
|
609 | = variables.contains(var) | |
610 | ? range |
|
610 | ? range | |
@@ -706,26 +706,26 void VariableController::VariableControllerPrivate::processRequest(std::shared_p | |||||
706 |
|
706 | |||
707 | switch (varHandler->m_State) { |
|
707 | switch (varHandler->m_State) { | |
708 | case VariableRequestHandlerState::OFF: { |
|
708 | case VariableRequestHandlerState::OFF: { | |
709 |
qCDebug(LOG_VariableController()) |
|
709 | qCDebug(LOG_VariableController()) | |
710 |
|
|
710 | << tr("Process Request OFF") << varRequest.m_RangeRequested | |
711 |
|
|
711 | << varRequest.m_CacheRangeRequested; | |
712 | varHandler->m_RunningVarRequest = varRequest; |
|
712 | varHandler->m_RunningVarRequest = varRequest; | |
713 | varHandler->m_State = VariableRequestHandlerState::RUNNING; |
|
713 | varHandler->m_State = VariableRequestHandlerState::RUNNING; | |
714 | executeVarRequest(var, varRequest); |
|
714 | executeVarRequest(var, varRequest); | |
715 | break; |
|
715 | break; | |
716 | } |
|
716 | } | |
717 | case VariableRequestHandlerState::RUNNING: { |
|
717 | case VariableRequestHandlerState::RUNNING: { | |
718 |
qCDebug(LOG_VariableController()) |
|
718 | qCDebug(LOG_VariableController()) | |
719 |
|
|
719 | << tr("Process Request RUNNING") << varRequest.m_RangeRequested | |
720 |
|
|
720 | << varRequest.m_CacheRangeRequested; | |
721 | varHandler->m_State = VariableRequestHandlerState::PENDING; |
|
721 | varHandler->m_State = VariableRequestHandlerState::PENDING; | |
722 | varHandler->m_PendingVarRequest = varRequest; |
|
722 | varHandler->m_PendingVarRequest = varRequest; | |
723 | break; |
|
723 | break; | |
724 | } |
|
724 | } | |
725 | case VariableRequestHandlerState::PENDING: { |
|
725 | case VariableRequestHandlerState::PENDING: { | |
726 |
qCDebug(LOG_VariableController()) |
|
726 | qCDebug(LOG_VariableController()) | |
727 |
|
|
727 | << tr("Process Request PENDING") << varRequest.m_RangeRequested | |
728 |
|
|
728 | << varRequest.m_CacheRangeRequested; | |
729 | auto variableGroupIdToCancel = varHandler->m_PendingVarRequest.m_VariableGroupId; |
|
729 | auto variableGroupIdToCancel = varHandler->m_PendingVarRequest.m_VariableGroupId; | |
730 | cancelVariableRequest(variableGroupIdToCancel); |
|
730 | cancelVariableRequest(variableGroupIdToCancel); | |
731 | // Cancel variable can make state downgrade |
|
731 | // Cancel variable can make state downgrade | |
@@ -762,8 +762,8 VariableController::VariableControllerPrivate::findVariable(QUuid vIdentifier) | |||||
762 | std::shared_ptr<IDataSeries> VariableController::VariableControllerPrivate::retrieveDataSeries( |
|
762 | std::shared_ptr<IDataSeries> VariableController::VariableControllerPrivate::retrieveDataSeries( | |
763 | const QVector<AcquisitionDataPacket> acqDataPacketVector) |
|
763 | const QVector<AcquisitionDataPacket> acqDataPacketVector) | |
764 | { |
|
764 | { | |
765 | qCDebug(LOG_VariableController()) << tr("TORM: retrieveDataSeries acqDataPacketVector size") |
|
765 | qCDebug(LOG_VariableController()) | |
766 | << acqDataPacketVector.size(); |
|
766 | << tr("TORM: retrieveDataSeries acqDataPacketVector size") << acqDataPacketVector.size(); | |
767 | std::shared_ptr<IDataSeries> dataSeries; |
|
767 | std::shared_ptr<IDataSeries> dataSeries; | |
768 | if (!acqDataPacketVector.isEmpty()) { |
|
768 | if (!acqDataPacketVector.isEmpty()) { | |
769 | dataSeries = acqDataPacketVector[0].m_DateSeries; |
|
769 | dataSeries = acqDataPacketVector[0].m_DateSeries; | |
@@ -780,8 +780,8 void VariableController::VariableControllerPrivate::registerProvider( | |||||
780 | std::shared_ptr<IDataProvider> provider) |
|
780 | std::shared_ptr<IDataProvider> provider) | |
781 | { |
|
781 | { | |
782 | if (m_ProviderSet.find(provider) == m_ProviderSet.end()) { |
|
782 | if (m_ProviderSet.find(provider) == m_ProviderSet.end()) { | |
783 |
qCDebug(LOG_VariableController()) |
|
783 | qCDebug(LOG_VariableController()) | |
784 |
|
|
784 | << tr("Registering of a new provider") << provider->objectName(); | |
785 | m_ProviderSet.insert(provider); |
|
785 | m_ProviderSet.insert(provider); | |
786 | connect(provider.get(), &IDataProvider::dataProvided, m_VariableAcquisitionWorker.get(), |
|
786 | connect(provider.get(), &IDataProvider::dataProvided, m_VariableAcquisitionWorker.get(), | |
787 | &VariableAcquisitionWorker::onVariableDataAcquired); |
|
787 | &VariableAcquisitionWorker::onVariableDataAcquired); | |
@@ -816,8 +816,8 QUuid VariableController::VariableControllerPrivate::acceptVariableRequest( | |||||
816 |
|
816 | |||
817 | // Element traitΓ©, on a dΓ©jΓ toutes les donnΓ©es necessaires |
|
817 | // Element traitΓ©, on a dΓ©jΓ toutes les donnΓ©es necessaires | |
818 | auto varGroupId = varHandler->m_RunningVarRequest.m_VariableGroupId; |
|
818 | auto varGroupId = varHandler->m_RunningVarRequest.m_VariableGroupId; | |
819 | qCDebug(LOG_VariableController()) << "Variable::acceptVariableRequest" << varGroupId |
|
819 | qCDebug(LOG_VariableController()) | |
820 | << m_VarGroupIdToVarIds.size(); |
|
820 | << "Variable::acceptVariableRequest" << varGroupId << m_VarGroupIdToVarIds.size(); | |
821 |
|
821 | |||
822 | return varHandler->m_RunningVarRequest.m_VariableGroupId; |
|
822 | return varHandler->m_RunningVarRequest.m_VariableGroupId; | |
823 | } |
|
823 | } | |
@@ -837,8 +837,8 void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq | |||||
837 | auto &varIds = varGroupIdToVarIdsIt->second; |
|
837 | auto &varIds = varGroupIdToVarIdsIt->second; | |
838 | auto varIdsEnd = varIds.end(); |
|
838 | auto varIdsEnd = varIds.end(); | |
839 | bool processVariableUpdate = true; |
|
839 | bool processVariableUpdate = true; | |
840 |
qCDebug(LOG_VariableController()) |
|
840 | qCDebug(LOG_VariableController()) | |
841 | << varRequestId << varIds.size(); |
|
841 | << "VariableControllerPrivate::updateVariables" << varRequestId << varIds.size(); | |
842 | for (auto varIdsIt = varIds.begin(); (varIdsIt != varIdsEnd) && processVariableUpdate; |
|
842 | for (auto varIdsIt = varIds.begin(); (varIdsIt != varIdsEnd) && processVariableUpdate; | |
843 | ++varIdsIt) { |
|
843 | ++varIdsIt) { | |
844 | auto itVarHandler = m_VarIdToVarRequestHandler.find(*varIdsIt); |
|
844 | auto itVarHandler = m_VarIdToVarRequestHandler.find(*varIdsIt); | |
@@ -856,15 +856,15 void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq | |||||
856 | auto &varRequest = itVarHandler->second->m_RunningVarRequest; |
|
856 | auto &varRequest = itVarHandler->second->m_RunningVarRequest; | |
857 | var->setRange(varRequest.m_RangeRequested); |
|
857 | var->setRange(varRequest.m_RangeRequested); | |
858 | var->setCacheRange(varRequest.m_CacheRangeRequested); |
|
858 | var->setCacheRange(varRequest.m_CacheRangeRequested); | |
859 |
qCDebug(LOG_VariableController()) |
|
859 | qCDebug(LOG_VariableController()) | |
860 |
|
|
860 | << tr("1: onDataProvided") << varRequest.m_RangeRequested | |
861 |
|
|
861 | << varRequest.m_CacheRangeRequested; | |
862 |
qCDebug(LOG_VariableController()) |
|
862 | qCDebug(LOG_VariableController()) | |
863 | << var->nbPoints() |
|
863 | << tr("2: onDataProvided var points before") << var->nbPoints() | |
864 |
|
|
864 | << varRequest.m_DataSeries->nbPoints(); | |
865 | var->mergeDataSeries(varRequest.m_DataSeries); |
|
865 | var->mergeDataSeries(varRequest.m_DataSeries); | |
866 |
qCDebug(LOG_VariableController()) |
|
866 | qCDebug(LOG_VariableController()) | |
867 | << var->nbPoints(); |
|
867 | << tr("3: onDataProvided var points after") << var->nbPoints(); | |
868 |
|
868 | |||
869 | emit var->updated(); |
|
869 | emit var->updated(); | |
870 | qCDebug(LOG_VariableController()) << tr("Update OK"); |
|
870 | qCDebug(LOG_VariableController()) << tr("Update OK"); |
@@ -18,21 +18,21 public: | |||||
18 | VisualizationController::VisualizationController(QObject *parent) |
|
18 | VisualizationController::VisualizationController(QObject *parent) | |
19 | : impl{spimpl::make_unique_impl<VisualizationControllerPrivate>()} |
|
19 | : impl{spimpl::make_unique_impl<VisualizationControllerPrivate>()} | |
20 | { |
|
20 | { | |
21 |
qCDebug(LOG_VisualizationController()) |
|
21 | qCDebug(LOG_VisualizationController()) | |
22 | << QThread::currentThread(); |
|
22 | << tr("VisualizationController construction") << QThread::currentThread(); | |
23 | } |
|
23 | } | |
24 |
|
24 | |||
25 | VisualizationController::~VisualizationController() |
|
25 | VisualizationController::~VisualizationController() | |
26 | { |
|
26 | { | |
27 |
qCDebug(LOG_VisualizationController()) |
|
27 | qCDebug(LOG_VisualizationController()) | |
28 | << QThread::currentThread(); |
|
28 | << tr("VisualizationController destruction") << QThread::currentThread(); | |
29 | this->waitForFinish(); |
|
29 | this->waitForFinish(); | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | void VisualizationController::initialize() |
|
32 | void VisualizationController::initialize() | |
33 | { |
|
33 | { | |
34 |
qCDebug(LOG_VisualizationController()) |
|
34 | qCDebug(LOG_VisualizationController()) | |
35 | << QThread::currentThread(); |
|
35 | << tr("VisualizationController init") << QThread::currentThread(); | |
36 | impl->m_WorkingMutex.lock(); |
|
36 | impl->m_WorkingMutex.lock(); | |
37 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController init END"); |
|
37 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController init END"); | |
38 | } |
|
38 | } |
@@ -652,8 +652,8 void TestDataSeries::testValuesBoundsScalar_data() | |||||
652 | QTest::newRow("scalarBounds4") |
|
652 | QTest::newRow("scalarBounds4") | |
653 | << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 5.1 << 6. |
|
653 | << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 5.1 << 6. | |
654 | << false << nan << nan; |
|
654 | << false << nan << nan; | |
655 | QTest::newRow("scalarBounds5") << createScalarSeries({1.}, {100.}) << 0. << 2. << true << 100. |
|
655 | QTest::newRow("scalarBounds5") | |
656 | << 100.; |
|
656 | << createScalarSeries({1.}, {100.}) << 0. << 2. << true << 100. << 100.; | |
657 | QTest::newRow("scalarBounds6") << createScalarSeries({}, {}) << 0. << 2. << false << nan << nan; |
|
657 | QTest::newRow("scalarBounds6") << createScalarSeries({}, {}) << 0. << 2. << false << nan << nan; | |
658 |
|
658 | |||
659 | // Tests with NaN values: NaN values are not included in min/max search |
|
659 | // Tests with NaN values: NaN values are not included in min/max search |
@@ -81,14 +81,13 void TestTwoDimArrayData::testCtor_data() | |||||
81 | QTest::addColumn<Container>("expectedData"); // expected array data (when success) |
|
81 | QTest::addColumn<Container>("expectedData"); // expected array data (when success) | |
82 |
|
82 | |||
83 | // Test cases |
|
83 | // Test cases | |
84 | QTest::newRow("validInput") << flatten(Container{{1., 2., 3., 4., 5.}, |
|
84 | QTest::newRow("validInput") | |
85 | {6., 7., 8., 9., 10.}, |
|
85 | << flatten( | |
86 | {11., 12., 13., 14., 15.}}) |
|
86 | Container{{1., 2., 3., 4., 5.}, {6., 7., 8., 9., 10.}, {11., 12., 13., 14., 15.}}) | |
87 | << true << Container{{1., 2., 3., 4., 5.}, |
|
87 | << true | |
88 | {6., 7., 8., 9., 10.}, |
|
88 | << Container{{1., 2., 3., 4., 5.}, {6., 7., 8., 9., 10.}, {11., 12., 13., 14., 15.}}; | |
89 | {11., 12., 13., 14., 15.}}; |
|
89 | QTest::newRow("invalidInput (invalid data size") | |
90 | QTest::newRow("invalidInput (invalid data size") << InputData{{1., 2., 3., 4., 5., 6., 7.}, 3} |
|
90 | << InputData{{1., 2., 3., 4., 5., 6., 7.}, 3} << false << Container{{}, {}, {}}; | |
91 | << false << Container{{}, {}, {}}; |
|
|||
92 | QTest::newRow("invalidInput (less than two components") |
|
91 | QTest::newRow("invalidInput (less than two components") | |
93 | << flatten(Container{{1., 2., 3., 4., 5.}}) << false << Container{{}, {}, {}}; |
|
92 | << flatten(Container{{1., 2., 3., 4., 5.}}) << false << Container{{}, {}, {}}; | |
94 | } |
|
93 | } |
@@ -398,10 +398,10 void testSyncOnVarCase1() | |||||
398 | // Go back to initial range |
|
398 | // Go back to initial range | |
399 | moveOp(initialRange, initialRange, 300); |
|
399 | moveOp(initialRange, initialRange, 300); | |
400 |
|
400 | |||
401 | QTest::newRow("syncOnVarCase1") << syncId << initialRange << std::move(creations) |
|
401 | QTest::newRow("syncOnVarCase1") | |
402 | << std::move(iterations); |
|
402 | << syncId << initialRange << std::move(creations) << std::move(iterations); | |
403 | } |
|
|||
404 | } |
|
403 | } | |
|
404 | } // namespace | |||
405 |
|
405 | |||
406 | void TestVariableSync::testSync_data() |
|
406 | void TestVariableSync::testSync_data() | |
407 | { |
|
407 | { |
@@ -5,7 +5,7 | |||||
5 |
|
5 | |||
6 | namespace Ui { |
|
6 | namespace Ui { | |
7 | class DataSourceWidget; |
|
7 | class DataSourceWidget; | |
8 | } // Ui |
|
8 | } // namespace Ui | |
9 |
|
9 | |||
10 | class DataSourceItem; |
|
10 | class DataSourceItem; | |
11 |
|
11 |
@@ -7,7 +7,7 | |||||
7 |
|
7 | |||
8 | namespace Ui { |
|
8 | namespace Ui { | |
9 | class SqpSettingsDialog; |
|
9 | class SqpSettingsDialog; | |
10 | } // Ui |
|
10 | } // namespace Ui | |
11 |
|
11 | |||
12 | /** |
|
12 | /** | |
13 | * @brief The SqpSettingsDialog class represents the dialog in which the parameters of SciQlop are |
|
13 | * @brief The SqpSettingsDialog class represents the dialog in which the parameters of SciQlop are |
@@ -7,7 +7,7 | |||||
7 |
|
7 | |||
8 | namespace Ui { |
|
8 | namespace Ui { | |
9 | class SqpSettingsGeneralWidget; |
|
9 | class SqpSettingsGeneralWidget; | |
10 | } // Ui |
|
10 | } // namespace Ui | |
11 |
|
11 | |||
12 | /** |
|
12 | /** | |
13 | * @brief The SqpSettingsGeneralWidget class represents the general settings of SciQlop |
|
13 | * @brief The SqpSettingsGeneralWidget class represents the general settings of SciQlop |
@@ -5,7 +5,7 | |||||
5 |
|
5 | |||
6 | namespace Ui { |
|
6 | namespace Ui { | |
7 | class SqpSidePane; |
|
7 | class SqpSidePane; | |
8 | } // Ui |
|
8 | } // namespace Ui | |
9 |
|
9 | |||
10 | class QToolBar; |
|
10 | class QToolBar; | |
11 |
|
11 |
@@ -7,7 +7,7 | |||||
7 |
|
7 | |||
8 | namespace Ui { |
|
8 | namespace Ui { | |
9 | class TimeWidget; |
|
9 | class TimeWidget; | |
10 | } // Ui |
|
10 | } // namespace Ui | |
11 |
|
11 | |||
12 | class TimeWidget : public QWidget { |
|
12 | class TimeWidget : public QWidget { | |
13 | Q_OBJECT |
|
13 | Q_OBJECT |
@@ -5,7 +5,7 | |||||
5 |
|
5 | |||
6 | namespace Ui { |
|
6 | namespace Ui { | |
7 | class RenameVariableDialog; |
|
7 | class RenameVariableDialog; | |
8 | } // Ui |
|
8 | } // namespace Ui | |
9 |
|
9 | |||
10 | /** |
|
10 | /** | |
11 | * @brief The RenameVariableDialog class represents the dialog to rename a variable |
|
11 | * @brief The RenameVariableDialog class represents the dialog to rename a variable |
@@ -15,7 +15,7 class QProgressBarItemDelegate; | |||||
15 |
|
15 | |||
16 | namespace Ui { |
|
16 | namespace Ui { | |
17 | class VariableInspectorWidget; |
|
17 | class VariableInspectorWidget; | |
18 | } // Ui |
|
18 | } // namespace Ui | |
19 |
|
19 | |||
20 | /** |
|
20 | /** | |
21 | * @brief The VariableInspectorWidget class representes represents the variable inspector, from |
|
21 | * @brief The VariableInspectorWidget class representes represents the variable inspector, from |
@@ -8,7 +8,7 | |||||
8 |
|
8 | |||
9 | namespace Ui { |
|
9 | namespace Ui { | |
10 | class VariableMenuHeaderWidget; |
|
10 | class VariableMenuHeaderWidget; | |
11 | } // Ui |
|
11 | } // namespace Ui | |
12 |
|
12 | |||
13 | class Variable; |
|
13 | class Variable; | |
14 |
|
14 |
@@ -5423,11 +5423,11 protected: | |||||
5423 | bool mGradientImageInvalidated; |
|
5423 | bool mGradientImageInvalidated; | |
5424 | // re-using some methods of QCPAxisRect to make them available to friend class QCPColorScale |
|
5424 | // re-using some methods of QCPAxisRect to make them available to friend class QCPColorScale | |
5425 | using QCPAxisRect::calculateAutoMargin; |
|
5425 | using QCPAxisRect::calculateAutoMargin; | |
5426 | using QCPAxisRect::mousePressEvent; |
|
|||
5427 | using QCPAxisRect::mouseMoveEvent; |
|
5426 | using QCPAxisRect::mouseMoveEvent; | |
|
5427 | using QCPAxisRect::mousePressEvent; | |||
5428 | using QCPAxisRect::mouseReleaseEvent; |
|
5428 | using QCPAxisRect::mouseReleaseEvent; | |
5429 | using QCPAxisRect::wheelEvent; |
|
|||
5430 | using QCPAxisRect::update; |
|
5429 | using QCPAxisRect::update; | |
|
5430 | using QCPAxisRect::wheelEvent; | |||
5431 | virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; |
|
5431 | virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; | |
5432 | void updateGradientImage(); |
|
5432 | void updateGradientImage(); | |
5433 | Q_SLOT void axisSelectionChanged(QCPAxis::SelectableParts selectedParts); |
|
5433 | Q_SLOT void axisSelectionChanged(QCPAxis::SelectableParts selectedParts); |
@@ -176,9 +176,7 struct DragDropHelper::DragDropHelperPrivate { | |||||
176 | }; |
|
176 | }; | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()} |
|
179 | DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()} {} | |
180 | { |
|
|||
181 | } |
|
|||
182 |
|
180 | |||
183 | DragDropHelper::~DragDropHelper() |
|
181 | DragDropHelper::~DragDropHelper() | |
184 | { |
|
182 | { |
@@ -120,13 +120,9 SqpApplication::SqpApplication(int &argc, char **argv) | |||||
120 | impl->m_VisualizationControllerThread.start(); |
|
120 | impl->m_VisualizationControllerThread.start(); | |
121 | } |
|
121 | } | |
122 |
|
122 | |||
123 | SqpApplication::~SqpApplication() |
|
123 | SqpApplication::~SqpApplication() {} | |
124 | { |
|
|||
125 | } |
|
|||
126 |
|
124 | |||
127 | void SqpApplication::initialize() |
|
125 | void SqpApplication::initialize() {} | |
128 | { |
|
|||
129 | } |
|
|||
130 |
|
126 | |||
131 | DataSourceController &SqpApplication::dataSourceController() noexcept |
|
127 | DataSourceController &SqpApplication::dataSourceController() noexcept | |
132 | { |
|
128 | { |
@@ -73,9 +73,10 VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget | |||||
73 | &VisualizationGraphWidget::onMouseRelease); |
|
73 | &VisualizationGraphWidget::onMouseRelease); | |
74 | connect(ui->widget, &QCustomPlot::mouseMove, this, &VisualizationGraphWidget::onMouseMove); |
|
74 | connect(ui->widget, &QCustomPlot::mouseMove, this, &VisualizationGraphWidget::onMouseMove); | |
75 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); |
|
75 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); | |
76 | connect(ui->widget->xAxis, static_cast<void (QCPAxis::*)(const QCPRange &, const QCPRange &)>( |
|
76 | connect( | |
77 | &QCPAxis::rangeChanged), |
|
77 | ui->widget->xAxis, | |
78 | this, &VisualizationGraphWidget::onRangeChanged, Qt::DirectConnection); |
|
78 | static_cast<void (QCPAxis::*)(const QCPRange &, const QCPRange &)>(&QCPAxis::rangeChanged), | |
|
79 | this, &VisualizationGraphWidget::onRangeChanged, Qt::DirectConnection); | |||
79 |
|
80 | |||
80 | // Activates menu when right clicking on the graph |
|
81 | // Activates menu when right clicking on the graph | |
81 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); |
|
82 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); | |
@@ -290,9 +291,9 void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept | |||||
290 |
|
291 | |||
291 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2) |
|
292 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2) | |
292 | { |
|
293 | { | |
293 |
qCDebug(LOG_VisualizationGraphWidget()) |
|
294 | qCDebug(LOG_VisualizationGraphWidget()) | |
294 | << QThread::currentThread()->objectName() << "DoAcqui" |
|
295 | << tr("TORM: VisualizationGraphWidget::onRangeChanged") | |
295 | << impl->m_DoAcquisition; |
|
296 | << QThread::currentThread()->objectName() << "DoAcqui" << impl->m_DoAcquisition; | |
296 |
|
297 | |||
297 | auto graphRange = SqpRange{t1.lower, t1.upper}; |
|
298 | auto graphRange = SqpRange{t1.lower, t1.upper}; | |
298 | auto oldGraphRange = SqpRange{t2.lower, t2.upper}; |
|
299 | auto oldGraphRange = SqpRange{t2.lower, t2.upper}; |
@@ -160,10 +160,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
160 | graphChildRange.m_TStart += deltaLeft; |
|
160 | graphChildRange.m_TStart += deltaLeft; | |
161 | graphChildRange.m_TEnd -= deltaRight; |
|
161 | graphChildRange.m_TEnd -= deltaRight; | |
162 | qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); |
|
162 | qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); | |
163 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
163 | qCDebug(LOG_VisualizationZoneWidget()) | |
164 | << deltaLeft; |
|
164 | << tr("TORM: deltaLeft") << deltaLeft; | |
165 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
165 | qCDebug(LOG_VisualizationZoneWidget()) | |
166 | << deltaRight; |
|
166 | << tr("TORM: deltaRight") << deltaRight; | |
167 | qCDebug(LOG_VisualizationZoneWidget()) |
|
167 | qCDebug(LOG_VisualizationZoneWidget()) | |
168 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; |
|
168 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
169 |
|
169 | |||
@@ -174,10 +174,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
174 | qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut"); |
|
174 | qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut"); | |
175 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; |
|
175 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
176 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; |
|
176 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
177 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
177 | qCDebug(LOG_VisualizationZoneWidget()) | |
178 | << deltaLeft; |
|
178 | << tr("TORM: deltaLeft") << deltaLeft; | |
179 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
179 | qCDebug(LOG_VisualizationZoneWidget()) | |
180 | << deltaRight; |
|
180 | << tr("TORM: deltaRight") << deltaRight; | |
181 | qCDebug(LOG_VisualizationZoneWidget()) |
|
181 | qCDebug(LOG_VisualizationZoneWidget()) | |
182 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; |
|
182 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
183 | graphChildRange.m_TStart -= deltaLeft; |
|
183 | graphChildRange.m_TStart -= deltaLeft; | |
@@ -214,10 +214,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
214 | break; |
|
214 | break; | |
215 | } |
|
215 | } | |
216 | graphChild->enableAcquisition(false); |
|
216 | graphChild->enableAcquisition(false); | |
217 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
217 | qCDebug(LOG_VisualizationZoneWidget()) | |
218 |
|
|
218 | << tr("TORM: Range before: ") << graphChild->graphRange(); | |
219 |
qCDebug(LOG_VisualizationZoneWidget()) |
|
219 | qCDebug(LOG_VisualizationZoneWidget()) | |
220 | << graphChildRange; |
|
220 | << tr("TORM: Range after : ") << graphChildRange; | |
221 | qCDebug(LOG_VisualizationZoneWidget()) |
|
221 | qCDebug(LOG_VisualizationZoneWidget()) | |
222 | << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; |
|
222 | << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; | |
223 | graphChild->setGraphRange(graphChildRange); |
|
223 | graphChild->setGraphRange(graphChildRange); |
@@ -108,33 +108,25 | |||||
108 | /*! |
|
108 | /*! | |
109 | Creates a QCPVector2D object and initializes the x and y coordinates to 0. |
|
109 | Creates a QCPVector2D object and initializes the x and y coordinates to 0. | |
110 | */ |
|
110 | */ | |
111 | QCPVector2D::QCPVector2D() : mX(0), mY(0) |
|
111 | QCPVector2D::QCPVector2D() : mX(0), mY(0) {} | |
112 | { |
|
|||
113 | } |
|
|||
114 |
|
112 | |||
115 | /*! |
|
113 | /*! | |
116 | Creates a QCPVector2D object and initializes the \a x and \a y coordinates with the specified |
|
114 | Creates a QCPVector2D object and initializes the \a x and \a y coordinates with the specified | |
117 | values. |
|
115 | values. | |
118 | */ |
|
116 | */ | |
119 | QCPVector2D::QCPVector2D(double x, double y) : mX(x), mY(y) |
|
117 | QCPVector2D::QCPVector2D(double x, double y) : mX(x), mY(y) {} | |
120 | { |
|
|||
121 | } |
|
|||
122 |
|
118 | |||
123 | /*! |
|
119 | /*! | |
124 | Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of |
|
120 | Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of | |
125 | the specified \a point. |
|
121 | the specified \a point. | |
126 | */ |
|
122 | */ | |
127 | QCPVector2D::QCPVector2D(const QPoint &point) : mX(point.x()), mY(point.y()) |
|
123 | QCPVector2D::QCPVector2D(const QPoint &point) : mX(point.x()), mY(point.y()) {} | |
128 | { |
|
|||
129 | } |
|
|||
130 |
|
124 | |||
131 | /*! |
|
125 | /*! | |
132 | Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of |
|
126 | Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of | |
133 | the specified \a point. |
|
127 | the specified \a point. | |
134 | */ |
|
128 | */ | |
135 | QCPVector2D::QCPVector2D(const QPointF &point) : mX(point.x()), mY(point.y()) |
|
129 | QCPVector2D::QCPVector2D(const QPointF &point) : mX(point.x()), mY(point.y()) {} | |
136 | { |
|
|||
137 | } |
|
|||
138 |
|
130 | |||
139 | /*! |
|
131 | /*! | |
140 | Normalizes this vector. After this operation, the length of the vector is equal to 1. |
|
132 | Normalizes this vector. After this operation, the length of the vector is equal to 1. | |
@@ -565,9 +557,7 QCPAbstractPaintBuffer::QCPAbstractPaintBuffer(const QSize &size, double deviceP | |||||
565 | { |
|
557 | { | |
566 | } |
|
558 | } | |
567 |
|
559 | |||
568 | QCPAbstractPaintBuffer::~QCPAbstractPaintBuffer() |
|
560 | QCPAbstractPaintBuffer::~QCPAbstractPaintBuffer() {} | |
569 | { |
|
|||
570 | } |
|
|||
571 |
|
561 | |||
572 | /*! |
|
562 | /*! | |
573 | Sets the paint buffer size. |
|
563 | Sets the paint buffer size. | |
@@ -648,9 +638,7 QCPPaintBufferPixmap::QCPPaintBufferPixmap(const QSize &size, double devicePixel | |||||
648 | QCPPaintBufferPixmap::reallocateBuffer(); |
|
638 | QCPPaintBufferPixmap::reallocateBuffer(); | |
649 | } |
|
639 | } | |
650 |
|
640 | |||
651 | QCPPaintBufferPixmap::~QCPPaintBufferPixmap() |
|
641 | QCPPaintBufferPixmap::~QCPPaintBufferPixmap() {} | |
652 | { |
|
|||
653 | } |
|
|||
654 |
|
642 | |||
655 | /* inherits documentation from base class */ |
|
643 | /* inherits documentation from base class */ | |
656 | QCPPainter *QCPPaintBufferPixmap::startPainting() |
|
644 | QCPPainter *QCPPaintBufferPixmap::startPainting() | |
@@ -1049,8 +1037,9 QCPLayer::~QCPLayer() | |||||
1049 | mChildren.last()->setLayer(0); // removes itself from mChildren via removeChild() |
|
1037 | mChildren.last()->setLayer(0); // removes itself from mChildren via removeChild() | |
1050 |
|
1038 | |||
1051 | if (mParentPlot->currentLayer() == this) |
|
1039 | if (mParentPlot->currentLayer() == this) | |
1052 | qDebug() << Q_FUNC_INFO << "The parent plot's mCurrentLayer will be a dangling pointer. " |
|
1040 | qDebug() << Q_FUNC_INFO | |
1053 | "Should have been set to a valid layer or 0 beforehand."; |
|
1041 | << "The parent plot's mCurrentLayer will be a dangling pointer. " | |
|
1042 | "Should have been set to a valid layer or 0 beforehand."; | |||
1054 | } |
|
1043 | } | |
1055 |
|
1044 | |||
1056 | /*! |
|
1045 | /*! | |
@@ -1574,10 +1563,7 void QCPLayerable::applyAntialiasingHint(QCPPainter *painter, bool localAntialia | |||||
1574 |
|
1563 | |||
1575 | \see initializeParentPlot |
|
1564 | \see initializeParentPlot | |
1576 | */ |
|
1565 | */ | |
1577 | void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot) |
|
1566 | void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot){Q_UNUSED(parentPlot)} | |
1578 | { |
|
|||
1579 | Q_UNUSED(parentPlot) |
|
|||
1580 | } |
|
|||
1581 |
|
1567 | |||
1582 | /*! \internal |
|
1568 | /*! \internal | |
1583 |
|
1569 | |||
@@ -1878,9 +1864,7 const double QCPRange::maxRange = 1e250; | |||||
1878 | /*! |
|
1864 | /*! | |
1879 | Constructs a range with \a lower and \a upper set to zero. |
|
1865 | Constructs a range with \a lower and \a upper set to zero. | |
1880 | */ |
|
1866 | */ | |
1881 | QCPRange::QCPRange() : lower(0), upper(0) |
|
1867 | QCPRange::QCPRange() : lower(0), upper(0) {} | |
1882 | { |
|
|||
1883 | } |
|
|||
1884 |
|
1868 | |||
1885 | /*! \overload |
|
1869 | /*! \overload | |
1886 |
|
1870 | |||
@@ -2200,18 +2184,14 bool QCPRange::validRange(const QCPRange &range) | |||||
2200 | /*! |
|
2184 | /*! | |
2201 | Creates an empty QCPDataRange, with begin and end set to 0. |
|
2185 | Creates an empty QCPDataRange, with begin and end set to 0. | |
2202 | */ |
|
2186 | */ | |
2203 | QCPDataRange::QCPDataRange() : mBegin(0), mEnd(0) |
|
2187 | QCPDataRange::QCPDataRange() : mBegin(0), mEnd(0) {} | |
2204 | { |
|
|||
2205 | } |
|
|||
2206 |
|
2188 | |||
2207 | /*! |
|
2189 | /*! | |
2208 | Creates a QCPDataRange, initialized with the specified \a begin and \a end. |
|
2190 | Creates a QCPDataRange, initialized with the specified \a begin and \a end. | |
2209 |
|
2191 | |||
2210 | No checks or corrections are made to ensure the resulting range is valid (\ref isValid). |
|
2192 | No checks or corrections are made to ensure the resulting range is valid (\ref isValid). | |
2211 | */ |
|
2193 | */ | |
2212 | QCPDataRange::QCPDataRange(int begin, int end) : mBegin(begin), mEnd(end) |
|
2194 | QCPDataRange::QCPDataRange(int begin, int end) : mBegin(begin), mEnd(end) {} | |
2213 | { |
|
|||
2214 | } |
|
|||
2215 |
|
2195 | |||
2216 | /*! |
|
2196 | /*! | |
2217 | Returns a data range that matches this data range, except that parts exceeding \a other are |
|
2197 | Returns a data range that matches this data range, except that parts exceeding \a other are | |
@@ -2354,9 +2334,7 bool QCPDataRange::contains(const QCPDataRange &other) const | |||||
2354 | /*! |
|
2334 | /*! | |
2355 | Creates an empty QCPDataSelection. |
|
2335 | Creates an empty QCPDataSelection. | |
2356 | */ |
|
2336 | */ | |
2357 | QCPDataSelection::QCPDataSelection() |
|
2337 | QCPDataSelection::QCPDataSelection() {} | |
2358 | { |
|
|||
2359 | } |
|
|||
2360 |
|
2338 | |||
2361 | /*! |
|
2339 | /*! | |
2362 | Creates a QCPDataSelection containing the provided \a range. |
|
2340 | Creates a QCPDataSelection containing the provided \a range. | |
@@ -3486,9 +3464,7 int QCPLayoutElement::calculateAutoMargin(QCP::MarginSide side) | |||||
3486 |
|
3464 | |||
3487 | The default implementation does nothing. |
|
3465 | The default implementation does nothing. | |
3488 | */ |
|
3466 | */ | |
3489 | void QCPLayoutElement::layoutChanged() |
|
3467 | void QCPLayoutElement::layoutChanged() {} | |
3490 | { |
|
|||
3491 | } |
|
|||
3492 |
|
3468 | |||
3493 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
|
3469 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
3494 | //////////////////// QCPLayout |
|
3470 | //////////////////// QCPLayout | |
@@ -3567,9 +3543,7 void QCPLayoutElement::layoutChanged() | |||||
3567 | Creates an instance of QCPLayout and sets default values. Note that since QCPLayout |
|
3543 | Creates an instance of QCPLayout and sets default values. Note that since QCPLayout | |
3568 | is an abstract base class, it can't be instantiated directly. |
|
3544 | is an abstract base class, it can't be instantiated directly. | |
3569 | */ |
|
3545 | */ | |
3570 | QCPLayout::QCPLayout() |
|
3546 | QCPLayout::QCPLayout() {} | |
3571 | { |
|
|||
3572 | } |
|
|||
3573 |
|
3547 | |||
3574 | /*! |
|
3548 | /*! | |
3575 | If \a phase is \ref upLayout, calls \ref updateLayout, which subclasses may reimplement to |
|
3549 | If \a phase is \ref upLayout, calls \ref updateLayout, which subclasses may reimplement to | |
@@ -3622,9 +3596,7 QList<QCPLayoutElement *> QCPLayout::elements(bool recursive) const | |||||
3622 | Not all layouts need simplification. For example, QCPLayoutInset doesn't use explicit |
|
3596 | Not all layouts need simplification. For example, QCPLayoutInset doesn't use explicit | |
3623 | simplification while QCPLayoutGrid does. |
|
3597 | simplification while QCPLayoutGrid does. | |
3624 | */ |
|
3598 | */ | |
3625 | void QCPLayout::simplify() |
|
3599 | void QCPLayout::simplify() {} | |
3626 | { |
|
|||
3627 | } |
|
|||
3628 |
|
3600 | |||
3629 | /*! |
|
3601 | /*! | |
3630 | Removes and deletes the element at the provided \a index. Returns true on success. If \a index is |
|
3602 | Removes and deletes the element at the provided \a index. Returns true on success. If \a index is | |
@@ -3712,9 +3684,7 void QCPLayout::sizeConstraintsChanged() const | |||||
3712 |
|
3684 | |||
3713 | \see update |
|
3685 | \see update | |
3714 | */ |
|
3686 | */ | |
3715 | void QCPLayout::updateLayout() |
|
3687 | void QCPLayout::updateLayout() {} | |
3716 | { |
|
|||
3717 | } |
|
|||
3718 |
|
3688 | |||
3719 |
|
3689 | |||
3720 | /*! \internal |
|
3690 | /*! \internal | |
@@ -4724,9 +4694,7 void QCPLayoutGrid::getMaximumRowColSizes(QVector<int> *maxColWidths, | |||||
4724 | /*! |
|
4694 | /*! | |
4725 | Creates an instance of QCPLayoutInset and sets default values. |
|
4695 | Creates an instance of QCPLayoutInset and sets default values. | |
4726 | */ |
|
4696 | */ | |
4727 | QCPLayoutInset::QCPLayoutInset() |
|
4697 | QCPLayoutInset::QCPLayoutInset() {} | |
4728 | { |
|
|||
4729 | } |
|
|||
4730 |
|
4698 | |||
4731 | QCPLayoutInset::~QCPLayoutInset() |
|
4699 | QCPLayoutInset::~QCPLayoutInset() | |
4732 | { |
|
4700 | { | |
@@ -5041,9 +5009,7 void QCPLayoutInset::addElement(QCPLayoutElement *element, const QRectF &rect) | |||||
5041 | /*! |
|
5009 | /*! | |
5042 | Creates a QCPLineEnding instance with default values (style \ref esNone). |
|
5010 | Creates a QCPLineEnding instance with default values (style \ref esNone). | |
5043 | */ |
|
5011 | */ | |
5044 | QCPLineEnding::QCPLineEnding() : mStyle(esNone), mWidth(8), mLength(10), mInverted(false) |
|
5012 | QCPLineEnding::QCPLineEnding() : mStyle(esNone), mWidth(8), mLength(10), mInverted(false) {} | |
5045 | { |
|
|||
5046 | } |
|
|||
5047 |
|
5013 | |||
5048 | /*! |
|
5014 | /*! | |
5049 | Creates a QCPLineEnding instance with the specified values. |
|
5015 | Creates a QCPLineEnding instance with the specified values. | |
@@ -5359,13 +5325,9 void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, double ang | |||||
5359 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created |
|
5325 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created | |
5360 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. |
|
5326 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. | |
5361 | */ |
|
5327 | */ | |
5362 | QCPAxisTicker::QCPAxisTicker() : mTickStepStrategy(tssReadability), mTickCount(5), mTickOrigin(0) |
|
5328 | QCPAxisTicker::QCPAxisTicker() : mTickStepStrategy(tssReadability), mTickCount(5), mTickOrigin(0) {} | |
5363 | { |
|
|||
5364 | } |
|
|||
5365 |
|
5329 | |||
5366 | QCPAxisTicker::~QCPAxisTicker() |
|
5330 | QCPAxisTicker::~QCPAxisTicker() {} | |
5367 | { |
|
|||
5368 | } |
|
|||
5369 |
|
5331 | |||
5370 | /*! |
|
5332 | /*! | |
5371 | Sets which strategy the axis ticker follows when choosing the size of the tick step. For the |
|
5333 | Sets which strategy the axis ticker follows when choosing the size of the tick step. For the | |
@@ -6424,9 +6386,7 void QCPAxisTickerTime::replaceUnit(QString &text, QCPAxisTickerTime::TimeUnit u | |||||
6424 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created |
|
6386 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created | |
6425 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. |
|
6387 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. | |
6426 | */ |
|
6388 | */ | |
6427 | QCPAxisTickerFixed::QCPAxisTickerFixed() : mTickStep(1.0), mScaleStrategy(ssNone) |
|
6389 | QCPAxisTickerFixed::QCPAxisTickerFixed() : mTickStep(1.0), mScaleStrategy(ssNone) {} | |
6428 | { |
|
|||
6429 | } |
|
|||
6430 |
|
6390 | |||
6431 | /*! |
|
6391 | /*! | |
6432 | Sets the fixed tick interval to \a step. |
|
6392 | Sets the fixed tick interval to \a step. | |
@@ -6539,9 +6499,7 double QCPAxisTickerFixed::getTickStep(const QCPRange &range) | |||||
6539 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created |
|
6499 | Constructs the ticker and sets reasonable default values. Axis tickers are commonly created | |
6540 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. |
|
6500 | managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. | |
6541 | */ |
|
6501 | */ | |
6542 | QCPAxisTickerText::QCPAxisTickerText() : mSubTickCount(0) |
|
6502 | QCPAxisTickerText::QCPAxisTickerText() : mSubTickCount(0) {} | |
6543 | { |
|
|||
6544 | } |
|
|||
6545 |
|
6503 | |||
6546 | /*! \overload |
|
6504 | /*! \overload | |
6547 |
|
6505 | |||
@@ -8496,8 +8454,9 void QCPAxis::scaleRange(double factor, double center) | |||||
8496 | mRange = newRange.sanitizedForLogScale(); |
|
8454 | mRange = newRange.sanitizedForLogScale(); | |
8497 | } |
|
8455 | } | |
8498 | else |
|
8456 | else | |
8499 | qDebug() << Q_FUNC_INFO << "Center of scaling operation doesn't lie in same " |
|
8457 | qDebug() << Q_FUNC_INFO | |
8500 | "logarithmic sign domain as range:" |
|
8458 | << "Center of scaling operation doesn't lie in same " | |
|
8459 | "logarithmic sign domain as range:" | |||
8501 | << center; |
|
8460 | << center; | |
8502 | } |
|
8461 | } | |
8503 | emit rangeChanged(mRange); |
|
8462 | emit rangeChanged(mRange); | |
@@ -9283,9 +9242,7 QCPAxisPainterPrivate::QCPAxisPainterPrivate(QCustomPlot *parentPlot) | |||||
9283 | { |
|
9242 | { | |
9284 | } |
|
9243 | } | |
9285 |
|
9244 | |||
9286 | QCPAxisPainterPrivate::~QCPAxisPainterPrivate() |
|
9245 | QCPAxisPainterPrivate::~QCPAxisPainterPrivate() {} | |
9287 | { |
|
|||
9288 | } |
|
|||
9289 |
|
9246 | |||
9290 | /*! \internal |
|
9247 | /*! \internal | |
9291 |
|
9248 | |||
@@ -9394,14 +9351,16 void QCPAxisPainterPrivate::draw(QCPPainter *painter) | |||||
9394 | painter->setBrush(QBrush(basePen.color())); |
|
9351 | painter->setBrush(QBrush(basePen.color())); | |
9395 | QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); |
|
9352 | QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); | |
9396 | if (lowerEnding.style() != QCPLineEnding::esNone) |
|
9353 | if (lowerEnding.style() != QCPLineEnding::esNone) | |
9397 |
lowerEnding.draw(painter, |
|
9354 | lowerEnding.draw(painter, | |
9398 | - baseLineVector.normalized() * lowerEnding.realLength() |
|
9355 | QCPVector2D(baseLine.p1()) | |
9399 | * (lowerEnding.inverted() ? -1 : 1), |
|
9356 | - baseLineVector.normalized() * lowerEnding.realLength() | |
|
9357 | * (lowerEnding.inverted() ? -1 : 1), | |||
9400 | -baseLineVector); |
|
9358 | -baseLineVector); | |
9401 | if (upperEnding.style() != QCPLineEnding::esNone) |
|
9359 | if (upperEnding.style() != QCPLineEnding::esNone) | |
9402 |
upperEnding.draw(painter, |
|
9360 | upperEnding.draw(painter, | |
9403 | + baseLineVector.normalized() * upperEnding.realLength() |
|
9361 | QCPVector2D(baseLine.p2()) | |
9404 | * (upperEnding.inverted() ? -1 : 1), |
|
9362 | + baseLineVector.normalized() * upperEnding.realLength() | |
|
9363 | * (upperEnding.inverted() ? -1 : 1), | |||
9405 | baseLineVector); |
|
9364 | baseLineVector); | |
9406 | painter->setAntialiasing(antialiasingBackup); |
|
9365 | painter->setAntialiasing(antialiasingBackup); | |
9407 |
|
9366 | |||
@@ -9710,14 +9669,16 void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position, | |||||
9710 | bool labelClippedByBorder = false; |
|
9669 | bool labelClippedByBorder = false; | |
9711 | if (tickLabelSide == QCPAxis::lsOutside) { |
|
9670 | if (tickLabelSide == QCPAxis::lsOutside) { | |
9712 | if (QCPAxis::orientation(type) == Qt::Horizontal) |
|
9671 | if (QCPAxis::orientation(type) == Qt::Horizontal) | |
9713 |
labelClippedByBorder = finalPosition.x() |
|
9672 | labelClippedByBorder = finalPosition.x() | |
9714 |
|
|
9673 | + (labelData.rotatedTotalBounds.width() | |
|
9674 | + labelData.rotatedTotalBounds.left()) | |||
9715 | > viewportRect.right() |
|
9675 | > viewportRect.right() | |
9716 | || finalPosition.x() + labelData.rotatedTotalBounds.left() |
|
9676 | || finalPosition.x() + labelData.rotatedTotalBounds.left() | |
9717 | < viewportRect.left(); |
|
9677 | < viewportRect.left(); | |
9718 | else |
|
9678 | else | |
9719 |
labelClippedByBorder = finalPosition.y() |
|
9679 | labelClippedByBorder = finalPosition.y() | |
9720 |
|
|
9680 | + (labelData.rotatedTotalBounds.height() | |
|
9681 | + labelData.rotatedTotalBounds.top()) | |||
9721 | > viewportRect.bottom() |
|
9682 | > viewportRect.bottom() | |
9722 | || finalPosition.y() + labelData.rotatedTotalBounds.top() |
|
9683 | || finalPosition.y() + labelData.rotatedTotalBounds.top() | |
9723 | < viewportRect.top(); |
|
9684 | < viewportRect.top(); | |
@@ -10521,9 +10482,7 QCPSelectionDecorator::QCPSelectionDecorator() | |||||
10521 | { |
|
10482 | { | |
10522 | } |
|
10483 | } | |
10523 |
|
10484 | |||
10524 | QCPSelectionDecorator::~QCPSelectionDecorator() |
|
10485 | QCPSelectionDecorator::~QCPSelectionDecorator() {} | |
10525 | { |
|
|||
10526 | } |
|
|||
10527 |
|
10486 | |||
10528 | /*! |
|
10487 | /*! | |
10529 | Sets the pen that will be used by the parent plottable to draw selected data segments. |
|
10488 | Sets the pen that will be used by the parent plottable to draw selected data segments. | |
@@ -12669,8 +12628,9 double QCPAbstractItem::rectDistance(const QRectF &rect, const QPointF &pos, boo | |||||
12669 | */ |
|
12628 | */ | |
12670 | QPointF QCPAbstractItem::anchorPixelPosition(int anchorId) const |
|
12629 | QPointF QCPAbstractItem::anchorPixelPosition(int anchorId) const | |
12671 | { |
|
12630 | { | |
12672 | qDebug() << Q_FUNC_INFO << "called on item which shouldn't have any anchors (this method not " |
|
12631 | qDebug() << Q_FUNC_INFO | |
12673 | "reimplemented). anchorId" |
|
12632 | << "called on item which shouldn't have any anchors (this method not " | |
|
12633 | "reimplemented). anchorId" | |||
12674 | << anchorId; |
|
12634 | << anchorId; | |
12675 | return QPointF(); |
|
12635 | return QPointF(); | |
12676 | } |
|
12636 | } | |
@@ -13605,9 +13565,10 void QCustomPlot::setOpenGl(bool enabled, int multisampling) | |||||
13605 | setupPaintBuffers(); |
|
13565 | setupPaintBuffers(); | |
13606 | #else |
|
13566 | #else | |
13607 | Q_UNUSED(enabled) |
|
13567 | Q_UNUSED(enabled) | |
13608 | qDebug() << Q_FUNC_INFO << "QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was " |
|
13568 | qDebug() << Q_FUNC_INFO | |
13609 | "not defined during compilation (add 'DEFINES += " |
|
13569 | << "QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was " | |
13610 | "QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)"; |
|
13570 | "not defined during compilation (add 'DEFINES += " | |
|
13571 | "QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)"; | |||
13611 | #endif |
|
13572 | #endif | |
13612 | } |
|
13573 | } | |
13613 |
|
13574 | |||
@@ -13964,8 +13925,9 QCPGraph *QCustomPlot::addGraph(QCPAxis *keyAxis, QCPAxis *valueAxis) | |||||
13964 | if (!valueAxis) |
|
13925 | if (!valueAxis) | |
13965 | valueAxis = yAxis; |
|
13926 | valueAxis = yAxis; | |
13966 | if (!keyAxis || !valueAxis) { |
|
13927 | if (!keyAxis || !valueAxis) { | |
13967 | qDebug() << Q_FUNC_INFO << "can't use default QCustomPlot xAxis or yAxis, because at least " |
|
13928 | qDebug() << Q_FUNC_INFO | |
13968 | "one is invalid (has been deleted)"; |
|
13929 | << "can't use default QCustomPlot xAxis or yAxis, because at least " | |
|
13930 | "one is invalid (has been deleted)"; | |||
13969 | return 0; |
|
13931 | return 0; | |
13970 | } |
|
13932 | } | |
13971 | if (keyAxis->parentPlot() != this || valueAxis->parentPlot() != this) { |
|
13933 | if (keyAxis->parentPlot() != this || valueAxis->parentPlot() != this) { | |
@@ -15398,8 +15360,9 QCPAbstractPaintBuffer *QCustomPlot::createPaintBuffer() | |||||
15398 | return new QCPPaintBufferGlPbuffer(viewport().size(), mBufferDevicePixelRatio, |
|
15360 | return new QCPPaintBufferGlPbuffer(viewport().size(), mBufferDevicePixelRatio, | |
15399 | mOpenGlMultisamples); |
|
15361 | mOpenGlMultisamples); | |
15400 | #else |
|
15362 | #else | |
15401 | qDebug() << Q_FUNC_INFO << "OpenGL enabled even though no support for it compiled in, this " |
|
15363 | qDebug() << Q_FUNC_INFO | |
15402 | "shouldn't have happened. Falling back to pixmap paint buffer."; |
|
15364 | << "OpenGL enabled even though no support for it compiled in, this " | |
|
15365 | "shouldn't have happened. Falling back to pixmap paint buffer."; | |||
15403 | return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); |
|
15366 | return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); | |
15404 | #endif |
|
15367 | #endif | |
15405 | } |
|
15368 | } | |
@@ -16630,8 +16593,9 void QCPColorGradient::updateColorBuffer() | |||||
16630 | hue -= 1.0; |
|
16593 | hue -= 1.0; | |
16631 | if (useAlpha) { |
|
16594 | if (useAlpha) { | |
16632 | const QRgb rgb |
|
16595 | const QRgb rgb | |
16633 |
= QColor::fromHsvF(hue, |
|
16596 | = QColor::fromHsvF(hue, | |
16634 |
|
|
16597 | (1 - t) * lowHsv.saturationF() | |
|
16598 | + t * highHsv.saturationF(), | |||
16635 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) |
|
16599 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) | |
16636 | .rgb(); |
|
16600 | .rgb(); | |
16637 | const float alpha = (1 - t) * lowHsv.alphaF() + t * highHsv.alphaF(); |
|
16601 | const float alpha = (1 - t) * lowHsv.alphaF() + t * highHsv.alphaF(); | |
@@ -16640,8 +16604,9 void QCPColorGradient::updateColorBuffer() | |||||
16640 | } |
|
16604 | } | |
16641 | else { |
|
16605 | else { | |
16642 | mColorBuffer[i] |
|
16606 | mColorBuffer[i] | |
16643 |
= QColor::fromHsvF(hue, |
|
16607 | = QColor::fromHsvF(hue, | |
16644 |
|
|
16608 | (1 - t) * lowHsv.saturationF() | |
|
16609 | + t * highHsv.saturationF(), | |||
16645 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) |
|
16610 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) | |
16646 | .rgb(); |
|
16611 | .rgb(); | |
16647 | } |
|
16612 | } | |
@@ -16703,9 +16668,7 QCPSelectionDecoratorBracket::QCPSelectionDecoratorBracket() | |||||
16703 | { |
|
16668 | { | |
16704 | } |
|
16669 | } | |
16705 |
|
16670 | |||
16706 | QCPSelectionDecoratorBracket::~QCPSelectionDecoratorBracket() |
|
16671 | QCPSelectionDecoratorBracket::~QCPSelectionDecoratorBracket() {} | |
16707 | { |
|
|||
16708 | } |
|
|||
16709 |
|
16672 | |||
16710 | /*! |
|
16673 | /*! | |
16711 | Sets the pen that will be used to draw the brackets at the beginning and end of each selected |
|
16674 | Sets the pen that will be used to draw the brackets at the beginning and end of each selected | |
@@ -18734,7 +18697,7 void QCPLegend::setIconSize(const QSize &size) | |||||
18734 | } |
|
18697 | } | |
18735 |
|
18698 | |||
18736 | /*! \overload |
|
18699 | /*! \overload | |
18737 | */ |
|
18700 | */ | |
18738 | void QCPLegend::setIconSize(int width, int height) |
|
18701 | void QCPLegend::setIconSize(int width, int height) | |
18739 | { |
|
18702 | { | |
18740 | mIconSize.setWidth(width); |
|
18703 | mIconSize.setWidth(width); | |
@@ -20338,16 +20301,12 void QCPColorScaleAxisRectPrivate::axisSelectableChanged(QCPAxis::SelectablePart | |||||
20338 | /*! |
|
20301 | /*! | |
20339 | Constructs a data point with key and value set to zero. |
|
20302 | Constructs a data point with key and value set to zero. | |
20340 | */ |
|
20303 | */ | |
20341 | QCPGraphData::QCPGraphData() : key(0), value(0) |
|
20304 | QCPGraphData::QCPGraphData() : key(0), value(0) {} | |
20342 | { |
|
|||
20343 | } |
|
|||
20344 |
|
20305 | |||
20345 | /*! |
|
20306 | /*! | |
20346 | Constructs a data point with the specified \a key and \a value. |
|
20307 | Constructs a data point with the specified \a key and \a value. | |
20347 | */ |
|
20308 | */ | |
20348 | QCPGraphData::QCPGraphData(double key, double value) : key(key), value(value) |
|
20309 | QCPGraphData::QCPGraphData(double key, double value) : key(key), value(value) {} | |
20349 | { |
|
|||
20350 | } |
|
|||
20351 |
|
20310 | |||
20352 |
|
20311 | |||
20353 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
|
20312 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
@@ -20432,9 +20391,7 QCPGraph::QCPGraph(QCPAxis *keyAxis, QCPAxis *valueAxis) | |||||
20432 | setAdaptiveSampling(true); |
|
20391 | setAdaptiveSampling(true); | |
20433 | } |
|
20392 | } | |
20434 |
|
20393 | |||
20435 | QCPGraph::~QCPGraph() |
|
20394 | QCPGraph::~QCPGraph() {} | |
20436 | { |
|
|||
20437 | } |
|
|||
20438 |
|
20395 | |||
20439 | /*! \overload |
|
20396 | /*! \overload | |
20440 |
|
20397 | |||
@@ -22291,16 +22248,12 int QCPGraph::findIndexBelowY(const QVector<QPointF> *data, double y) const | |||||
22291 | /*! |
|
22248 | /*! | |
22292 | Constructs a curve data point with t, key and value set to zero. |
|
22249 | Constructs a curve data point with t, key and value set to zero. | |
22293 | */ |
|
22250 | */ | |
22294 | QCPCurveData::QCPCurveData() : t(0), key(0), value(0) |
|
22251 | QCPCurveData::QCPCurveData() : t(0), key(0), value(0) {} | |
22295 | { |
|
|||
22296 | } |
|
|||
22297 |
|
22252 | |||
22298 | /*! |
|
22253 | /*! | |
22299 | Constructs a curve data point with the specified \a t, \a key and \a value. |
|
22254 | Constructs a curve data point with the specified \a t, \a key and \a value. | |
22300 | */ |
|
22255 | */ | |
22301 | QCPCurveData::QCPCurveData(double t, double key, double value) : t(t), key(key), value(value) |
|
22256 | QCPCurveData::QCPCurveData(double t, double key, double value) : t(t), key(key), value(value) {} | |
22302 | { |
|
|||
22303 | } |
|
|||
22304 |
|
22257 | |||
22305 |
|
22258 | |||
22306 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
|
22259 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
@@ -22379,9 +22332,7 QCPCurve::QCPCurve(QCPAxis *keyAxis, QCPAxis *valueAxis) | |||||
22379 | setScatterSkip(0); |
|
22332 | setScatterSkip(0); | |
22380 | } |
|
22333 | } | |
22381 |
|
22334 | |||
22382 | QCPCurve::~QCPCurve() |
|
22335 | QCPCurve::~QCPCurve() {} | |
22383 | { |
|
|||
22384 | } |
|
|||
22385 |
|
22336 | |||
22386 | /*! \overload |
|
22337 | /*! \overload | |
22387 |
|
22338 | |||
@@ -24461,16 +24412,12 double QCPBarsGroup::getPixelSpacing(const QCPBars *bars, double keyCoord) | |||||
24461 | /*! |
|
24412 | /*! | |
24462 | Constructs a bar data point with key and value set to zero. |
|
24413 | Constructs a bar data point with key and value set to zero. | |
24463 | */ |
|
24414 | */ | |
24464 | QCPBarsData::QCPBarsData() : key(0), value(0) |
|
24415 | QCPBarsData::QCPBarsData() : key(0), value(0) {} | |
24465 | { |
|
|||
24466 | } |
|
|||
24467 |
|
24416 | |||
24468 | /*! |
|
24417 | /*! | |
24469 | Constructs a bar data point with the specified \a key and \a value. |
|
24418 | Constructs a bar data point with the specified \a key and \a value. | |
24470 | */ |
|
24419 | */ | |
24471 | QCPBarsData::QCPBarsData(double key, double value) : key(key), value(value) |
|
24420 | QCPBarsData::QCPBarsData(double key, double value) : key(key), value(value) {} | |
24472 | { |
|
|||
24473 | } |
|
|||
24474 |
|
24421 | |||
24475 |
|
24422 | |||
24476 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
|
24423 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
@@ -27239,9 +27186,7 void QCPColorMap::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const | |||||
27239 | /*! |
|
27186 | /*! | |
27240 | Constructs a data point with key and all values set to zero. |
|
27187 | Constructs a data point with key and all values set to zero. | |
27241 | */ |
|
27188 | */ | |
27242 | QCPFinancialData::QCPFinancialData() : key(0), open(0), high(0), low(0), close(0) |
|
27189 | QCPFinancialData::QCPFinancialData() : key(0), open(0), high(0), low(0), close(0) {} | |
27243 | { |
|
|||
27244 | } |
|
|||
27245 |
|
27190 | |||
27246 | /*! |
|
27191 | /*! | |
27247 | Constructs a data point with the specified \a key and OHLC values. |
|
27192 | Constructs a data point with the specified \a key and OHLC values. | |
@@ -27343,9 +27288,7 QCPFinancial::QCPFinancial(QCPAxis *keyAxis, QCPAxis *valueAxis) | |||||
27343 | mSelectionDecorator->setBrush(QBrush(QColor(160, 160, 255))); |
|
27288 | mSelectionDecorator->setBrush(QBrush(QColor(160, 160, 255))); | |
27344 | } |
|
27289 | } | |
27345 |
|
27290 | |||
27346 | QCPFinancial::~QCPFinancial() |
|
27291 | QCPFinancial::~QCPFinancial() {} | |
27347 | { |
|
|||
27348 | } |
|
|||
27349 |
|
27292 | |||
27350 | /*! \overload |
|
27293 | /*! \overload | |
27351 |
|
27294 | |||
@@ -28240,16 +28183,12 QRectF QCPFinancial::selectionHitBox(QCPFinancialDataContainer::const_iterator i | |||||
28240 | /*! |
|
28183 | /*! | |
28241 | Constructs an error bar with errors set to zero. |
|
28184 | Constructs an error bar with errors set to zero. | |
28242 | */ |
|
28185 | */ | |
28243 | QCPErrorBarsData::QCPErrorBarsData() : errorMinus(0), errorPlus(0) |
|
28186 | QCPErrorBarsData::QCPErrorBarsData() : errorMinus(0), errorPlus(0) {} | |
28244 | { |
|
|||
28245 | } |
|
|||
28246 |
|
28187 | |||
28247 | /*! |
|
28188 | /*! | |
28248 | Constructs an error bar with equal \a error in both negative and positive direction. |
|
28189 | Constructs an error bar with equal \a error in both negative and positive direction. | |
28249 | */ |
|
28190 | */ | |
28250 | QCPErrorBarsData::QCPErrorBarsData(double error) : errorMinus(error), errorPlus(error) |
|
28191 | QCPErrorBarsData::QCPErrorBarsData(double error) : errorMinus(error), errorPlus(error) {} | |
28251 | { |
|
|||
28252 | } |
|
|||
28253 |
|
28192 | |||
28254 | /*! |
|
28193 | /*! | |
28255 | Constructs an error bar with negative and positive errors set to \a errorMinus and \a errorPlus, |
|
28194 | Constructs an error bar with negative and positive errors set to \a errorMinus and \a errorPlus, | |
@@ -28331,9 +28270,7 QCPErrorBars::QCPErrorBars(QCPAxis *keyAxis, QCPAxis *valueAxis) | |||||
28331 | setBrush(Qt::NoBrush); |
|
28270 | setBrush(Qt::NoBrush); | |
28332 | } |
|
28271 | } | |
28333 |
|
28272 | |||
28334 | QCPErrorBars::~QCPErrorBars() |
|
28273 | QCPErrorBars::~QCPErrorBars() {} | |
28335 | { |
|
|||
28336 | } |
|
|||
28337 |
|
28274 | |||
28338 | /*! \overload |
|
28275 | /*! \overload | |
28339 |
|
28276 | |||
@@ -29228,9 +29165,7 QCPItemStraightLine::QCPItemStraightLine(QCustomPlot *parentPlot) | |||||
29228 | setSelectedPen(QPen(Qt::blue, 2)); |
|
29165 | setSelectedPen(QPen(Qt::blue, 2)); | |
29229 | } |
|
29166 | } | |
29230 |
|
29167 | |||
29231 | QCPItemStraightLine::~QCPItemStraightLine() |
|
29168 | QCPItemStraightLine::~QCPItemStraightLine() {} | |
29232 | { |
|
|||
29233 | } |
|
|||
29234 |
|
29169 | |||
29235 | /*! |
|
29170 | /*! | |
29236 | Sets the pen that will be used to draw the line |
|
29171 | Sets the pen that will be used to draw the line | |
@@ -29419,9 +29354,7 QCPItemLine::QCPItemLine(QCustomPlot *parentPlot) | |||||
29419 | setSelectedPen(QPen(Qt::blue, 2)); |
|
29354 | setSelectedPen(QPen(Qt::blue, 2)); | |
29420 | } |
|
29355 | } | |
29421 |
|
29356 | |||
29422 | QCPItemLine::~QCPItemLine() |
|
29357 | QCPItemLine::~QCPItemLine() {} | |
29423 | { |
|
|||
29424 | } |
|
|||
29425 |
|
29358 | |||
29426 | /*! |
|
29359 | /*! | |
29427 | Sets the pen that will be used to draw the line |
|
29360 | Sets the pen that will be used to draw the line | |
@@ -29657,9 +29590,7 QCPItemCurve::QCPItemCurve(QCustomPlot *parentPlot) | |||||
29657 | setSelectedPen(QPen(Qt::blue, 2)); |
|
29590 | setSelectedPen(QPen(Qt::blue, 2)); | |
29658 | } |
|
29591 | } | |
29659 |
|
29592 | |||
29660 | QCPItemCurve::~QCPItemCurve() |
|
29593 | QCPItemCurve::~QCPItemCurve() {} | |
29661 | { |
|
|||
29662 | } |
|
|||
29663 |
|
29594 | |||
29664 | /*! |
|
29595 | /*! | |
29665 | Sets the pen that will be used to draw the line |
|
29596 | Sets the pen that will be used to draw the line | |
@@ -29817,9 +29748,7 QCPItemRect::QCPItemRect(QCustomPlot *parentPlot) | |||||
29817 | setSelectedBrush(Qt::NoBrush); |
|
29748 | setSelectedBrush(Qt::NoBrush); | |
29818 | } |
|
29749 | } | |
29819 |
|
29750 | |||
29820 | QCPItemRect::~QCPItemRect() |
|
29751 | QCPItemRect::~QCPItemRect() {} | |
29821 | { |
|
|||
29822 | } |
|
|||
29823 |
|
29752 | |||
29824 | /*! |
|
29753 | /*! | |
29825 | Sets the pen that will be used to draw the line of the rectangle |
|
29754 | Sets the pen that will be used to draw the line of the rectangle | |
@@ -29993,9 +29922,7 QCPItemText::QCPItemText(QCustomPlot *parentPlot) | |||||
29993 | setSelectedColor(Qt::blue); |
|
29922 | setSelectedColor(Qt::blue); | |
29994 | } |
|
29923 | } | |
29995 |
|
29924 | |||
29996 | QCPItemText::~QCPItemText() |
|
29925 | QCPItemText::~QCPItemText() {} | |
29997 | { |
|
|||
29998 | } |
|
|||
29999 |
|
29926 | |||
30000 | /*! |
|
29927 | /*! | |
30001 | Sets the color of the text. |
|
29928 | Sets the color of the text. | |
@@ -30351,9 +30278,7 QCPItemEllipse::QCPItemEllipse(QCustomPlot *parentPlot) | |||||
30351 | setSelectedBrush(Qt::NoBrush); |
|
30278 | setSelectedBrush(Qt::NoBrush); | |
30352 | } |
|
30279 | } | |
30353 |
|
30280 | |||
30354 | QCPItemEllipse::~QCPItemEllipse() |
|
30281 | QCPItemEllipse::~QCPItemEllipse() {} | |
30355 | { |
|
|||
30356 | } |
|
|||
30357 |
|
30282 | |||
30358 | /*! |
|
30283 | /*! | |
30359 | Sets the pen that will be used to draw the line of the ellipse |
|
30284 | Sets the pen that will be used to draw the line of the ellipse | |
@@ -30555,9 +30480,7 QCPItemPixmap::QCPItemPixmap(QCustomPlot *parentPlot) | |||||
30555 | setSelectedPen(QPen(Qt::blue)); |
|
30480 | setSelectedPen(QPen(Qt::blue)); | |
30556 | } |
|
30481 | } | |
30557 |
|
30482 | |||
30558 | QCPItemPixmap::~QCPItemPixmap() |
|
30483 | QCPItemPixmap::~QCPItemPixmap() {} | |
30559 | { |
|
|||
30560 | } |
|
|||
30561 |
|
30484 | |||
30562 | /*! |
|
30485 | /*! | |
30563 | Sets the pixmap that will be displayed. |
|
30486 | Sets the pixmap that will be displayed. | |
@@ -30841,9 +30764,7 QCPItemTracer::QCPItemTracer(QCustomPlot *parentPlot) | |||||
30841 | setSelectedPen(QPen(Qt::blue, 2)); |
|
30764 | setSelectedPen(QPen(Qt::blue, 2)); | |
30842 | } |
|
30765 | } | |
30843 |
|
30766 | |||
30844 | QCPItemTracer::~QCPItemTracer() |
|
30767 | QCPItemTracer::~QCPItemTracer() {} | |
30845 | { |
|
|||
30846 | } |
|
|||
30847 |
|
30768 | |||
30848 | /*! |
|
30769 | /*! | |
30849 | Sets the pen that will be used to draw the line of the tracer |
|
30770 | Sets the pen that will be used to draw the line of the tracer | |
@@ -31197,9 +31118,7 QCPItemBracket::QCPItemBracket(QCustomPlot *parentPlot) | |||||
31197 | setSelectedPen(QPen(Qt::blue, 2)); |
|
31118 | setSelectedPen(QPen(Qt::blue, 2)); | |
31198 | } |
|
31119 | } | |
31199 |
|
31120 | |||
31200 | QCPItemBracket::~QCPItemBracket() |
|
31121 | QCPItemBracket::~QCPItemBracket() {} | |
31201 | { |
|
|||
31202 | } |
|
|||
31203 |
|
31122 | |||
31204 | /*! |
|
31123 | /*! | |
31205 | Sets the pen that will be used to draw the bracket. |
|
31124 | Sets the pen that will be used to draw the bracket. |
@@ -57,8 +57,9 AmdaProvider::AmdaProvider() | |||||
57 | qCDebug(LOG_AmdaProvider()) << tr("AmdaProvider::AmdaProvider") << QThread::currentThread(); |
|
57 | qCDebug(LOG_AmdaProvider()) << tr("AmdaProvider::AmdaProvider") << QThread::currentThread(); | |
58 | if (auto app = sqpApp) { |
|
58 | if (auto app = sqpApp) { | |
59 | auto &networkController = app->networkController(); |
|
59 | auto &networkController = app->networkController(); | |
60 | connect(this, SIGNAL(requestConstructed(std::shared_ptr<QNetworkRequest>, QUuid, |
|
60 | connect(this, | |
61 | std::function<void(QNetworkReply *, QUuid)>)), |
|
61 | SIGNAL(requestConstructed(std::shared_ptr<QNetworkRequest>, QUuid, | |
|
62 | std::function<void(QNetworkReply *, QUuid)>)), | |||
62 | &networkController, |
|
63 | &networkController, | |
63 | SLOT(onProcessRequested(std::shared_ptr<QNetworkRequest>, QUuid, |
|
64 | SLOT(onProcessRequested(std::shared_ptr<QNetworkRequest>, QUuid, | |
64 | std::function<void(QNetworkReply *, QUuid)>))); |
|
65 | std::function<void(QNetworkReply *, QUuid)>))); | |
@@ -83,8 +84,8 void AmdaProvider::requestDataLoading(QUuid acqIdentifier, const DataProviderPar | |||||
83 | const auto times = parameters.m_Times; |
|
84 | const auto times = parameters.m_Times; | |
84 | const auto data = parameters.m_Data; |
|
85 | const auto data = parameters.m_Data; | |
85 | for (const auto &dateTime : qAsConst(times)) { |
|
86 | for (const auto &dateTime : qAsConst(times)) { | |
86 | qCDebug(LOG_AmdaProvider()) << tr("TORM AmdaProvider::requestDataLoading ") << acqIdentifier |
|
87 | qCDebug(LOG_AmdaProvider()) | |
87 | << dateTime; |
|
88 | << tr("TORM AmdaProvider::requestDataLoading ") << acqIdentifier << dateTime; | |
88 | this->retrieveData(acqIdentifier, dateTime, data); |
|
89 | this->retrieveData(acqIdentifier, dateTime, data); | |
89 |
|
90 | |||
90 |
|
91 |
@@ -57,7 +57,7 bool compareDataSeries(std::shared_ptr<IDataSeries> candidate, SqpRange candidat | |||||
57 | return false; |
|
57 | return false; | |
58 | } |
|
58 | } | |
59 | } |
|
59 | } | |
60 | } |
|
60 | } // namespace | |
61 |
|
61 | |||
62 | class TestAmdaAcquisition : public QObject { |
|
62 | class TestAmdaAcquisition : public QObject { | |
63 | Q_OBJECT |
|
63 | Q_OBJECT | |
@@ -159,6 +159,6 int main(int argc, char *argv[]) | |||||
159 | return QTest::qExec(&tc, argc, argv); |
|
159 | return QTest::qExec(&tc, argc, argv); | |
160 | } |
|
160 | } | |
161 |
|
161 | |||
162 | // QTEST_MAIN(TestAmdaAcquisition) |
|
162 | // QTEST_MAIN(TestAmdaAcquisition) | |
163 |
|
163 | |||
164 | #include "TestAmdaAcquisition.moc" |
|
164 | #include "TestAmdaAcquisition.moc" |
@@ -142,14 +142,14 void TestAmdaParser::testReadJson_data() | |||||
142 | QTest::newRow("Valid file") << QStringLiteral("ValidFile1.json") << validResults1(); |
|
142 | QTest::newRow("Valid file") << QStringLiteral("ValidFile1.json") << validResults1(); | |
143 |
|
143 | |||
144 | // Invalid files |
|
144 | // Invalid files | |
145 |
QTest::newRow("Invalid file (unexisting file)") |
|
145 | QTest::newRow("Invalid file (unexisting file)") | |
146 | << invalidResults(); |
|
146 | << QStringLiteral("UnexistingFile.json") << invalidResults(); | |
147 |
QTest::newRow("Invalid file (two root objects)") |
|
147 | QTest::newRow("Invalid file (two root objects)") | |
148 | << invalidResults(); |
|
148 | << QStringLiteral("TwoRootsFile.json") << invalidResults(); | |
149 |
QTest::newRow("Invalid file (wrong root key)") |
|
149 | QTest::newRow("Invalid file (wrong root key)") | |
150 | << invalidResults(); |
|
150 | << QStringLiteral("WrongRootKey.json") << invalidResults(); | |
151 |
QTest::newRow("Invalid file (wrong root type)") |
|
151 | QTest::newRow("Invalid file (wrong root type)") | |
152 | << invalidResults(); |
|
152 | << QStringLiteral("WrongRootType.json") << invalidResults(); | |
153 | } |
|
153 | } | |
154 |
|
154 | |||
155 | void TestAmdaParser::testReadJson() |
|
155 | void TestAmdaParser::testReadJson() |
@@ -234,11 +234,11 void TestAmdaResultParser::testReadScalarTxt_data() | |||||
234 | QVector<QDateTime>{}, QVector<double>{}}; |
|
234 | QVector<QDateTime>{}, QVector<double>{}}; | |
235 |
|
235 | |||
236 | // Invalid files |
|
236 | // Invalid files | |
237 |
QTest::newRow("Invalid file (unexisting file)") |
|
237 | QTest::newRow("Invalid file (unexisting file)") | |
238 | << ExpectedResults<ScalarSeries>{}; |
|
238 | << QStringLiteral("UnexistingFile.txt") << ExpectedResults<ScalarSeries>{}; | |
239 |
|
239 | |||
240 |
QTest::newRow("Invalid file (file not found on server)") |
|
240 | QTest::newRow("Invalid file (file not found on server)") | |
241 | << ExpectedResults<ScalarSeries>{}; |
|
241 | << QStringLiteral("FileNotFound.txt") << ExpectedResults<ScalarSeries>{}; | |
242 | } |
|
242 | } | |
243 |
|
243 | |||
244 | void TestAmdaResultParser::testReadScalarTxt() |
|
244 | void TestAmdaResultParser::testReadScalarTxt() |
@@ -145,9 +145,9 std::shared_ptr<IDataSeries> CosinusProvider::retrieveData(QUuid acqIdentifier, | |||||
145 | progress = currentProgress; |
|
145 | progress = currentProgress; | |
146 |
|
146 | |||
147 | emit dataProvidedProgress(acqIdentifier, progress); |
|
147 | emit dataProvidedProgress(acqIdentifier, progress); | |
148 |
qCDebug(LOG_CosinusProvider()) |
|
148 | qCDebug(LOG_CosinusProvider()) | |
149 | << QThread::currentThread()->objectName() |
|
149 | << "TORM: CosinusProvider::retrieveData" | |
150 | << progress; |
|
150 | << QThread::currentThread()->objectName() << progress; | |
151 | // NOTE: Try to use multithread if possible |
|
151 | // NOTE: Try to use multithread if possible | |
152 | } |
|
152 | } | |
153 | } |
|
153 | } | |
@@ -172,8 +172,8 void CosinusProvider::requestDataLoading(QUuid acqIdentifier, | |||||
172 | { |
|
172 | { | |
173 | // TODO: Add Mutex |
|
173 | // TODO: Add Mutex | |
174 | m_VariableToEnableProvider[acqIdentifier] = true; |
|
174 | m_VariableToEnableProvider[acqIdentifier] = true; | |
175 | qCDebug(LOG_CosinusProvider()) << "TORM: CosinusProvider::requestDataLoading" |
|
175 | qCDebug(LOG_CosinusProvider()) | |
176 |
|
|
176 | << "TORM: CosinusProvider::requestDataLoading" << QThread::currentThread()->objectName(); | |
177 | // NOTE: Try to use multithread if possible |
|
177 | // NOTE: Try to use multithread if possible | |
178 | const auto times = parameters.m_Times; |
|
178 | const auto times = parameters.m_Times; | |
179 |
|
179 |
@@ -17,9 +17,9 | |||||
17 | namespace { |
|
17 | namespace { | |
18 |
|
18 | |||
19 | /// Path for the tests |
|
19 | /// Path for the tests | |
20 |
const auto TESTS_RESOURCES_PATH |
|
20 | const auto TESTS_RESOURCES_PATH | |
21 | QString{MOCKPLUGIN_TESTS_RESOURCES_DIR}, |
|
21 | = QFileInfo{QString{MOCKPLUGIN_TESTS_RESOURCES_DIR}, "TestCosinusAcquisition"} | |
22 |
|
|
22 | .absoluteFilePath(); | |
23 |
|
23 | |||
24 | /// Format of dates in data files |
|
24 | /// Format of dates in data files | |
25 | const auto DATETIME_FORMAT = QStringLiteral("yyyy/MM/dd hh:mm:ss:zzz"); |
|
25 | const auto DATETIME_FORMAT = QStringLiteral("yyyy/MM/dd hh:mm:ss:zzz"); |
General Comments 0
You need to be logged in to leave comments.
Login now