Auto status change to "Under Review"
@@ -1,257 +1,257 | |||||
1 | #include "Visualization/VisualizationZoneWidget.h" |
|
1 | #include "Visualization/VisualizationZoneWidget.h" | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | #include "Visualization/IVisualizationWidgetVisitor.h" |
|
4 | #include "Visualization/IVisualizationWidgetVisitor.h" | |
5 | #include "Visualization/VisualizationGraphWidget.h" |
|
5 | #include "Visualization/VisualizationGraphWidget.h" | |
6 | #include "ui_VisualizationZoneWidget.h" |
|
6 | #include "ui_VisualizationZoneWidget.h" | |
7 |
|
7 | |||
8 | #include <Data/SqpRange.h> |
|
8 | #include <Data/SqpRange.h> | |
9 | #include <Variable/Variable.h> |
|
9 | #include <Variable/Variable.h> | |
10 | #include <Variable/VariableController.h> |
|
10 | #include <Variable/VariableController.h> | |
11 |
|
11 | |||
12 | #include <cmath> |
|
|||
13 | #include <QUuid> |
|
12 | #include <QUuid> | |
14 | #include <SqpApplication.h> |
|
13 | #include <SqpApplication.h> | |
|
14 | #include <cmath> | |||
15 |
|
15 | |||
16 | Q_LOGGING_CATEGORY(LOG_VisualizationZoneWidget, "VisualizationZoneWidget") |
|
16 | Q_LOGGING_CATEGORY(LOG_VisualizationZoneWidget, "VisualizationZoneWidget") | |
17 |
|
17 | |||
18 | namespace { |
|
18 | namespace { | |
19 |
|
19 | |||
20 | /// Minimum height for graph added in zones (in pixels) |
|
20 | /// Minimum height for graph added in zones (in pixels) | |
21 | const auto GRAPH_MINIMUM_HEIGHT = 300; |
|
21 | const auto GRAPH_MINIMUM_HEIGHT = 300; | |
22 |
|
22 | |||
23 | /// Generates a default name for a new graph, according to the number of graphs already displayed in |
|
23 | /// Generates a default name for a new graph, according to the number of graphs already displayed in | |
24 | /// the zone |
|
24 | /// the zone | |
25 | QString defaultGraphName(const QLayout &layout) |
|
25 | QString defaultGraphName(const QLayout &layout) | |
26 | { |
|
26 | { | |
27 | auto count = 0; |
|
27 | auto count = 0; | |
28 | for (auto i = 0; i < layout.count(); ++i) { |
|
28 | for (auto i = 0; i < layout.count(); ++i) { | |
29 | if (dynamic_cast<VisualizationGraphWidget *>(layout.itemAt(i)->widget())) { |
|
29 | if (dynamic_cast<VisualizationGraphWidget *>(layout.itemAt(i)->widget())) { | |
30 | count++; |
|
30 | count++; | |
31 | } |
|
31 | } | |
32 | } |
|
32 | } | |
33 |
|
33 | |||
34 | return QObject::tr("Graph %1").arg(count + 1); |
|
34 | return QObject::tr("Graph %1").arg(count + 1); | |
35 | } |
|
35 | } | |
36 |
|
36 | |||
37 | } // namespace |
|
37 | } // namespace | |
38 |
|
38 | |||
39 | struct VisualizationZoneWidget::VisualizationZoneWidgetPrivate { |
|
39 | struct VisualizationZoneWidget::VisualizationZoneWidgetPrivate { | |
40 |
|
40 | |||
41 | explicit VisualizationZoneWidgetPrivate() : m_SynchronisationGroupId{QUuid::createUuid()} {} |
|
41 | explicit VisualizationZoneWidgetPrivate() : m_SynchronisationGroupId{QUuid::createUuid()} {} | |
42 | QUuid m_SynchronisationGroupId; |
|
42 | QUuid m_SynchronisationGroupId; | |
43 | }; |
|
43 | }; | |
44 |
|
44 | |||
45 | VisualizationZoneWidget::VisualizationZoneWidget(const QString &name, QWidget *parent) |
|
45 | VisualizationZoneWidget::VisualizationZoneWidget(const QString &name, QWidget *parent) | |
46 | : QWidget{parent}, |
|
46 | : QWidget{parent}, | |
47 | ui{new Ui::VisualizationZoneWidget}, |
|
47 | ui{new Ui::VisualizationZoneWidget}, | |
48 | impl{spimpl::make_unique_impl<VisualizationZoneWidgetPrivate>()} |
|
48 | impl{spimpl::make_unique_impl<VisualizationZoneWidgetPrivate>()} | |
49 | { |
|
49 | { | |
50 | ui->setupUi(this); |
|
50 | ui->setupUi(this); | |
51 |
|
51 | |||
52 | ui->zoneNameLabel->setText(name); |
|
52 | ui->zoneNameLabel->setText(name); | |
53 |
|
53 | |||
54 | // 'Close' options : widget is deleted when closed |
|
54 | // 'Close' options : widget is deleted when closed | |
55 | setAttribute(Qt::WA_DeleteOnClose); |
|
55 | setAttribute(Qt::WA_DeleteOnClose); | |
56 | connect(ui->closeButton, &QToolButton::clicked, this, &VisualizationZoneWidget::close); |
|
56 | connect(ui->closeButton, &QToolButton::clicked, this, &VisualizationZoneWidget::close); | |
57 | ui->closeButton->setIcon(sqpApp->style()->standardIcon(QStyle::SP_TitleBarCloseButton)); |
|
57 | ui->closeButton->setIcon(sqpApp->style()->standardIcon(QStyle::SP_TitleBarCloseButton)); | |
58 |
|
58 | |||
59 | // Synchronisation id |
|
59 | // Synchronisation id | |
60 | QMetaObject::invokeMethod(&sqpApp->variableController(), "onAddSynchronizationGroupId", |
|
60 | QMetaObject::invokeMethod(&sqpApp->variableController(), "onAddSynchronizationGroupId", | |
61 | Qt::QueuedConnection, Q_ARG(QUuid, impl->m_SynchronisationGroupId)); |
|
61 | Qt::QueuedConnection, Q_ARG(QUuid, impl->m_SynchronisationGroupId)); | |
62 | } |
|
62 | } | |
63 |
|
63 | |||
64 | VisualizationZoneWidget::~VisualizationZoneWidget() |
|
64 | VisualizationZoneWidget::~VisualizationZoneWidget() | |
65 | { |
|
65 | { | |
66 | delete ui; |
|
66 | delete ui; | |
67 | } |
|
67 | } | |
68 |
|
68 | |||
69 | void VisualizationZoneWidget::addGraph(VisualizationGraphWidget *graphWidget) |
|
69 | void VisualizationZoneWidget::addGraph(VisualizationGraphWidget *graphWidget) | |
70 | { |
|
70 | { | |
71 | ui->visualizationZoneFrame->layout()->addWidget(graphWidget); |
|
71 | ui->visualizationZoneFrame->layout()->addWidget(graphWidget); | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<Variable> variable) |
|
74 | VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<Variable> variable) | |
75 | { |
|
75 | { | |
76 | auto graphWidget = new VisualizationGraphWidget{ |
|
76 | auto graphWidget = new VisualizationGraphWidget{ | |
77 | defaultGraphName(*ui->visualizationZoneFrame->layout()), this}; |
|
77 | defaultGraphName(*ui->visualizationZoneFrame->layout()), this}; | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | // Set graph properties |
|
80 | // Set graph properties | |
81 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); |
|
81 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); | |
82 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); |
|
82 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | // Lambda to synchronize zone widget |
|
85 | // Lambda to synchronize zone widget | |
86 | auto synchronizeZoneWidget = [this, graphWidget](const SqpRange &graphRange, |
|
86 | auto synchronizeZoneWidget = [this, graphWidget](const SqpRange &graphRange, | |
87 | const SqpRange &oldGraphRange) { |
|
87 | const SqpRange &oldGraphRange) { | |
88 |
|
88 | |||
89 | auto zoomType = VariableController::getZoomType(graphRange, oldGraphRange); |
|
89 | auto zoomType = VariableController::getZoomType(graphRange, oldGraphRange); | |
90 | auto frameLayout = ui->visualizationZoneFrame->layout(); |
|
90 | auto frameLayout = ui->visualizationZoneFrame->layout(); | |
91 | for (auto i = 0; i < frameLayout->count(); ++i) { |
|
91 | for (auto i = 0; i < frameLayout->count(); ++i) { | |
92 | auto graphChild |
|
92 | auto graphChild | |
93 | = dynamic_cast<VisualizationGraphWidget *>(frameLayout->itemAt(i)->widget()); |
|
93 | = dynamic_cast<VisualizationGraphWidget *>(frameLayout->itemAt(i)->widget()); | |
94 | if (graphChild && (graphChild != graphWidget)) { |
|
94 | if (graphChild && (graphChild != graphWidget)) { | |
95 |
|
95 | |||
96 | auto graphChildRange = graphChild->graphRange(); |
|
96 | auto graphChildRange = graphChild->graphRange(); | |
97 | switch (zoomType) { |
|
97 | switch (zoomType) { | |
98 | case AcquisitionZoomType::ZoomIn: { |
|
98 | case AcquisitionZoomType::ZoomIn: { | |
99 | auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; |
|
99 | auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; | |
100 | auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; |
|
100 | auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; | |
101 | graphChildRange.m_TStart += deltaLeft; |
|
101 | graphChildRange.m_TStart += deltaLeft; | |
102 | graphChildRange.m_TEnd -= deltaRight; |
|
102 | graphChildRange.m_TEnd -= deltaRight; | |
103 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); |
|
103 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); | |
104 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft") |
|
104 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft") | |
105 | << deltaLeft; |
|
105 | << deltaLeft; | |
106 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") |
|
106 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") | |
107 | << deltaRight; |
|
107 | << deltaRight; | |
108 | qCCritical(LOG_VisualizationZoneWidget()) |
|
108 | qCCritical(LOG_VisualizationZoneWidget()) | |
109 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; |
|
109 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
110 |
|
110 | |||
111 | break; |
|
111 | break; | |
112 | } |
|
112 | } | |
113 |
|
113 | |||
114 | case AcquisitionZoomType::ZoomOut: { |
|
114 | case AcquisitionZoomType::ZoomOut: { | |
115 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut"); |
|
115 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut"); | |
116 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; |
|
116 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
117 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; |
|
117 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
118 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft") |
|
118 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft") | |
119 | << deltaLeft; |
|
119 | << deltaLeft; | |
120 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") |
|
120 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") | |
121 | << deltaRight; |
|
121 | << deltaRight; | |
122 | qCCritical(LOG_VisualizationZoneWidget()) |
|
122 | qCCritical(LOG_VisualizationZoneWidget()) | |
123 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; |
|
123 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
124 | graphChildRange.m_TStart -= deltaLeft; |
|
124 | graphChildRange.m_TStart -= deltaLeft; | |
125 | graphChildRange.m_TEnd += deltaRight; |
|
125 | graphChildRange.m_TEnd += deltaRight; | |
126 | break; |
|
126 | break; | |
127 | } |
|
127 | } | |
128 | case AcquisitionZoomType::PanRight: { |
|
128 | case AcquisitionZoomType::PanRight: { | |
129 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanRight"); |
|
129 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanRight"); | |
130 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; |
|
130 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
131 | graphChildRange.m_TStart += deltaRight; |
|
131 | graphChildRange.m_TStart += deltaRight; | |
132 | graphChildRange.m_TEnd += deltaRight; |
|
132 | graphChildRange.m_TEnd += deltaRight; | |
133 | qCCritical(LOG_VisualizationZoneWidget()) |
|
133 | qCCritical(LOG_VisualizationZoneWidget()) | |
134 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; |
|
134 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
135 | break; |
|
135 | break; | |
136 | } |
|
136 | } | |
137 | case AcquisitionZoomType::PanLeft: { |
|
137 | case AcquisitionZoomType::PanLeft: { | |
138 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanLeft"); |
|
138 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanLeft"); | |
139 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; |
|
139 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
140 | graphChildRange.m_TStart -= deltaLeft; |
|
140 | graphChildRange.m_TStart -= deltaLeft; | |
141 | graphChildRange.m_TEnd -= deltaLeft; |
|
141 | graphChildRange.m_TEnd -= deltaLeft; | |
142 | break; |
|
142 | break; | |
143 | } |
|
143 | } | |
144 | case AcquisitionZoomType::Unknown: { |
|
144 | case AcquisitionZoomType::Unknown: { | |
145 | qCCritical(LOG_VisualizationZoneWidget()) |
|
145 | qCCritical(LOG_VisualizationZoneWidget()) | |
146 | << tr("Impossible to synchronize: zoom type unknown"); |
|
146 | << tr("Impossible to synchronize: zoom type unknown"); | |
147 | break; |
|
147 | break; | |
148 | } |
|
148 | } | |
149 | default: |
|
149 | default: | |
150 | qCCritical(LOG_VisualizationZoneWidget()) |
|
150 | qCCritical(LOG_VisualizationZoneWidget()) | |
151 | << tr("Impossible to synchronize: zoom type not take into account"); |
|
151 | << tr("Impossible to synchronize: zoom type not take into account"); | |
152 | // No action |
|
152 | // No action | |
153 | break; |
|
153 | break; | |
154 | } |
|
154 | } | |
155 | graphChild->enableAcquisition(false); |
|
155 | graphChild->enableAcquisition(false); | |
156 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ") |
|
156 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ") | |
157 | << graphChild->graphRange(); |
|
157 | << graphChild->graphRange(); | |
158 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ") |
|
158 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ") | |
159 | << graphChildRange; |
|
159 | << graphChildRange; | |
160 | qCCritical(LOG_VisualizationZoneWidget()) |
|
160 | qCCritical(LOG_VisualizationZoneWidget()) | |
161 | << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; |
|
161 | << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; | |
162 | graphChild->setGraphRange(graphChildRange); |
|
162 | graphChild->setGraphRange(graphChildRange); | |
163 | graphChild->enableAcquisition(true); |
|
163 | graphChild->enableAcquisition(true); | |
164 | } |
|
164 | } | |
165 | } |
|
165 | } | |
166 | }; |
|
166 | }; | |
167 |
|
167 | |||
168 | // connection for synchronization |
|
168 | // connection for synchronization | |
169 | connect(graphWidget, &VisualizationGraphWidget::synchronize, synchronizeZoneWidget); |
|
169 | connect(graphWidget, &VisualizationGraphWidget::synchronize, synchronizeZoneWidget); | |
170 | connect(graphWidget, &VisualizationGraphWidget::variableAdded, this, |
|
170 | connect(graphWidget, &VisualizationGraphWidget::variableAdded, this, | |
171 | &VisualizationZoneWidget::onVariableAdded); |
|
171 | &VisualizationZoneWidget::onVariableAdded); | |
172 |
|
172 | |||
173 | auto range = SqpRange{}; |
|
173 | auto range = SqpRange{}; | |
174 |
|
174 | |||
175 | // Apply visitor to graph children |
|
175 | // Apply visitor to graph children | |
176 | auto layout = ui->visualizationZoneFrame->layout(); |
|
176 | auto layout = ui->visualizationZoneFrame->layout(); | |
177 | if (layout->count() > 0) { |
|
177 | if (layout->count() > 0) { | |
178 | // Case of a new graph in a existant zone |
|
178 | // Case of a new graph in a existant zone | |
179 | if (auto visualizationGraphWidget |
|
179 | if (auto visualizationGraphWidget | |
180 | = dynamic_cast<VisualizationGraphWidget *>(layout->itemAt(0)->widget())) { |
|
180 | = dynamic_cast<VisualizationGraphWidget *>(layout->itemAt(0)->widget())) { | |
181 | range = visualizationGraphWidget->graphRange(); |
|
181 | range = visualizationGraphWidget->graphRange(); | |
182 | } |
|
182 | } | |
183 | } |
|
183 | } | |
184 | else { |
|
184 | else { | |
185 | // Case of a new graph as the first of the zone |
|
185 | // Case of a new graph as the first of the zone | |
186 | range = variable->range(); |
|
186 | range = variable->range(); | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
189 | this->addGraph(graphWidget); |
|
189 | this->addGraph(graphWidget); | |
190 |
|
190 | |||
191 | graphWidget->addVariable(variable, range); |
|
191 | graphWidget->addVariable(variable, range); | |
192 |
|
192 | |||
193 | // get y using variable range |
|
193 | // get y using variable range | |
194 | if (auto dataSeries = variable->dataSeries()) { |
|
194 | if (auto dataSeries = variable->dataSeries()) { | |
195 | auto valuesBounds = dataSeries->valuesBounds(range.m_TStart, range.m_TEnd); |
|
195 | auto valuesBounds = dataSeries->valuesBounds(range.m_TStart, range.m_TEnd); | |
196 | auto end = dataSeries->cend(); |
|
196 | auto end = dataSeries->cend(); | |
197 | if (valuesBounds.first != end && valuesBounds.second != end) { |
|
197 | if (valuesBounds.first != end && valuesBounds.second != end) { | |
198 | auto rangeValue = [](const auto &value) { return std::isnan(value) ? 0. : value; }; |
|
198 | auto rangeValue = [](const auto &value) { return std::isnan(value) ? 0. : value; }; | |
199 |
|
199 | |||
200 | auto minValue = rangeValue(valuesBounds.first->minValue()); |
|
200 | auto minValue = rangeValue(valuesBounds.first->minValue()); | |
201 | auto maxValue = rangeValue(valuesBounds.second->maxValue()); |
|
201 | auto maxValue = rangeValue(valuesBounds.second->maxValue()); | |
202 |
|
202 | |||
203 | graphWidget->setYRange(SqpRange{minValue, maxValue}); |
|
203 | graphWidget->setYRange(SqpRange{minValue, maxValue}); | |
204 | } |
|
204 | } | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | return graphWidget; |
|
207 | return graphWidget; | |
208 | } |
|
208 | } | |
209 |
|
209 | |||
210 | void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
210 | void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor) | |
211 | { |
|
211 | { | |
212 | if (visitor) { |
|
212 | if (visitor) { | |
213 | visitor->visitEnter(this); |
|
213 | visitor->visitEnter(this); | |
214 |
|
214 | |||
215 | // Apply visitor to graph children |
|
215 | // Apply visitor to graph children | |
216 | auto layout = ui->visualizationZoneFrame->layout(); |
|
216 | auto layout = ui->visualizationZoneFrame->layout(); | |
217 | for (auto i = 0; i < layout->count(); ++i) { |
|
217 | for (auto i = 0; i < layout->count(); ++i) { | |
218 | if (auto item = layout->itemAt(i)) { |
|
218 | if (auto item = layout->itemAt(i)) { | |
219 | // Widgets different from graphs are not visited (no action) |
|
219 | // Widgets different from graphs are not visited (no action) | |
220 | if (auto visualizationGraphWidget |
|
220 | if (auto visualizationGraphWidget | |
221 | = dynamic_cast<VisualizationGraphWidget *>(item->widget())) { |
|
221 | = dynamic_cast<VisualizationGraphWidget *>(item->widget())) { | |
222 | visualizationGraphWidget->accept(visitor); |
|
222 | visualizationGraphWidget->accept(visitor); | |
223 | } |
|
223 | } | |
224 | } |
|
224 | } | |
225 | } |
|
225 | } | |
226 |
|
226 | |||
227 | visitor->visitLeave(this); |
|
227 | visitor->visitLeave(this); | |
228 | } |
|
228 | } | |
229 | else { |
|
229 | else { | |
230 | qCCritical(LOG_VisualizationZoneWidget()) << tr("Can't visit widget : the visitor is null"); |
|
230 | qCCritical(LOG_VisualizationZoneWidget()) << tr("Can't visit widget : the visitor is null"); | |
231 | } |
|
231 | } | |
232 | } |
|
232 | } | |
233 |
|
233 | |||
234 | bool VisualizationZoneWidget::canDrop(const Variable &variable) const |
|
234 | bool VisualizationZoneWidget::canDrop(const Variable &variable) const | |
235 | { |
|
235 | { | |
236 | // A tab can always accomodate a variable |
|
236 | // A tab can always accomodate a variable | |
237 | Q_UNUSED(variable); |
|
237 | Q_UNUSED(variable); | |
238 | return true; |
|
238 | return true; | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | bool VisualizationZoneWidget::contains(const Variable &variable) const |
|
241 | bool VisualizationZoneWidget::contains(const Variable &variable) const | |
242 | { |
|
242 | { | |
243 | Q_UNUSED(variable); |
|
243 | Q_UNUSED(variable); | |
244 | return false; |
|
244 | return false; | |
245 | } |
|
245 | } | |
246 |
|
246 | |||
247 | QString VisualizationZoneWidget::name() const |
|
247 | QString VisualizationZoneWidget::name() const | |
248 | { |
|
248 | { | |
249 | return ui->zoneNameLabel->text(); |
|
249 | return ui->zoneNameLabel->text(); | |
250 | } |
|
250 | } | |
251 |
|
251 | |||
252 | void VisualizationZoneWidget::onVariableAdded(std::shared_ptr<Variable> variable) |
|
252 | void VisualizationZoneWidget::onVariableAdded(std::shared_ptr<Variable> variable) | |
253 | { |
|
253 | { | |
254 | QMetaObject::invokeMethod(&sqpApp->variableController(), "onAddSynchronized", |
|
254 | QMetaObject::invokeMethod(&sqpApp->variableController(), "onAddSynchronized", | |
255 | Qt::QueuedConnection, Q_ARG(std::shared_ptr<Variable>, variable), |
|
255 | Qt::QueuedConnection, Q_ARG(std::shared_ptr<Variable>, variable), | |
256 | Q_ARG(QUuid, impl->m_SynchronisationGroupId)); |
|
256 | Q_ARG(QUuid, impl->m_SynchronisationGroupId)); | |
257 | } |
|
257 | } |
General Comments 3
Pull request updated. Auto status change to "Under Review"
Changed commits: * 1 added * 0 removed Changed files: * M core/include/Data/AcquisitionRequest.h * M core/include/Variable/VariableAcquisitionWorker.h * M core/include/Variable/VariableCacheStrategy.h * M core/include/Variable/VariableController.h * M core/src/Variable/VariableAcquisitionWorker.cpp * M core/src/Variable/VariableCacheStrategy.cpp * M core/src/Variable/VariableController.cpp * M gui/src/Visualization/VisualizationZoneWidget.cpp * M plugins/amda/include/AmdaPlugin.h * M plugins/amda/src/AmdaProvider.cpp * M plugins/amda/tests/TestAmdaAcquisition.cpp * M plugins/mockplugin/include/MockPlugin.h * R COPYING * R app/src/MainWindow.cpp * R app/ui/MainWindow.ui * R cmake/sciqlop_package_qt.cmake * R core/include/Common/DateUtils.h * R core/include/Common/MetaTypes.h * R core/include/Common/SortUtils.h * R core/include/CoreGlobal.h * R core/include/Data/AcquisitionDataPacket.h * R core/include/Data/ArrayData.h * R core/include/Data/DataProviderParameters.h * R core/include/Data/DataSeries.h * R core/include/Data/DataSeriesIterator.h * R core/include/Data/IDataProvider.h * R core/include/Data/IDataSeries.h * R core/include/Data/ScalarSeries.h * R core/include/Data/SqpRange.h * R core/include/Data/VectorSeries.h * R core/include/DataSource/DataSourceItemAction.h * R core/include/Network/NetworkController.h * R core/include/Plugin/PluginManager.h * R core/include/Settings/ISqpSettingsBindable.h * R core/include/Settings/SqpSettingsDefs.h * R core/include/Time/TimeController.h * R core/include/Variable/Variable.h * R core/include/Variable/VariableCacheController.h * R core/include/Variable/VariableModel.h * R core/include/Variable/VariableSynchronizationGroup.h * R core/include/Visualization/VisualizationController.h * R core/src/Common/DateUtils.cpp * R core/src/Data/DataSeriesIterator.cpp * R core/src/Data/ScalarSeries.cpp * R core/src/Data/VectorSeries.cpp * R core/src/DataSource/DataSourceItemAction.cpp * R core/src/Network/NetworkController.cpp * R core/src/Plugin/PluginManager.cpp * R core/src/Settings/SqpSettingsDefs.cpp * R core/src/Time/TimeController.cpp * R core/src/Variable/Variable.cpp * R core/src/Variable/VariableCacheController.cpp * R core/src/Variable/VariableModel.cpp * R core/src/Variable/VariableSynchronizationGroup.cpp * R core/src/Visualization/VisualizationController.cpp * R core/tests/Data/TestDataSeries.cpp * R core/tests/Data/TestOneDimArrayData.cpp * R core/tests/Data/TestTwoDimArrayData.cpp * R core/tests/Variable/TestVariable.cpp * R core/tests/Variable/TestVariableCacheController.cpp * R gui/include/Common/ColorUtils.h * R gui/include/DataSource/DataSourceTreeWidgetHelper.h * R gui/include/DataSource/DataSourceTreeWidgetItem.h * R gui/include/DataSource/DataSourceWidget.h * R gui/include/Settings/SqpSettingsDialog.h * R gui/include/Settings/SqpSettingsGeneralWidget.h * R gui/include/SidePane/SqpSidePane.h * R gui/include/TimeWidget/TimeWidget.h * R gui/include/Variable/VariableInspectorWidget.h * R gui/include/Variable/VariableMenuHeaderWidget.h * R gui/include/Visualization/IVariableContainer.h * R gui/include/Visualization/IVisualizationWidget.h * R gui/include/Visualization/IVisualizationWidgetVisitor.h * R gui/include/Visualization/VisualizationDefs.h * R gui/include/Visualization/VisualizationGraphHelper.h * R gui/include/Visualization/VisualizationGraphRenderingDelegate.h * R gui/include/Visualization/VisualizationGraphWidget.h * R gui/include/Visualization/VisualizationTabWidget.h * R gui/include/Visualization/VisualizationWidget.h * R gui/include/Visualization/VisualizationZoneWidget.h * R gui/include/Visualization/operations/GenerateVariableMenuOperation.h * R gui/include/Visualization/operations/MenuBuilder.h * R gui/include/Visualization/operations/RemoveVariableOperation.h * R gui/include/Visualization/operations/RescaleAxeOperation.h * R gui/include/Visualization/qcustomplot.h * R gui/resources/icones/dataSourceComponent.png * R gui/resources/icones/dataSourceNode.png * R gui/resources/icones/dataSourceProduct.png * R gui/resources/icones/dataSourceRoot.png * R gui/resources/icones/delete.png * R gui/resources/icones/next.png * R gui/resources/icones/openInspector.png * R gui/resources/icones/plot.png * R gui/resources/icones/previous.png * R gui/resources/icones/sciqlop2PNG_1024.png * R gui/resources/icones/unplot.png * R gui/resources/sqpguiresources.qrc * R gui/src/Common/ColorUtils.cpp * R gui/src/DataSource/DataSourceTreeWidgetHelper.cpp * R gui/src/DataSource/DataSourceTreeWidgetItem.cpp * R gui/src/DataSource/DataSourceWidget.cpp * R gui/src/Settings/SqpSettingsDialog.cpp * R gui/src/Settings/SqpSettingsGeneralWidget.cpp * R gui/src/SidePane/SqpSidePane.cpp * R gui/src/TimeWidget/TimeWidget.cpp * R gui/src/Variable/VariableInspectorWidget.cpp * R gui/src/Variable/VariableMenuHeaderWidget.cpp * R gui/src/Visualization/VisualizationGraphHelper.cpp * R gui/src/Visualization/VisualizationGraphRenderingDelegate.cpp * R gui/src/Visualization/VisualizationGraphWidget.cpp * R gui/src/Visualization/VisualizationTabWidget.cpp * R gui/src/Visualization/VisualizationWidget.cpp * R gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp * R gui/src/Visualization/operations/MenuBuilder.cpp * R gui/src/Visualization/operations/RemoveVariableOperation.cpp * R gui/src/Visualization/operations/RescaleAxeOperation.cpp * R gui/src/Visualization/qcustomplot.cpp * R gui/ui/DataSource/DataSourceWidget.ui * R gui/ui/Settings/SqpSettingsDialog.ui * R gui/ui/Settings/SqpSettingsGeneralWidget.ui * R gui/ui/SidePane/SqpSidePane.ui * R gui/ui/TimeWidget/TimeWidget.ui * R gui/ui/Variable/VariableInspectorWidget.ui * R gui/ui/Variable/VariableMenuHeaderWidget.ui * R gui/ui/Visualization/VisualizationGraphWidget.ui * R gui/ui/Visualization/VisualizationTabWidget.ui * R gui/ui/Visualization/VisualizationWidget.ui * R gui/ui/Visualization/VisualizationZoneWidget.ui * R gui/vera-exclusions/exclusions.txt * R plugin/CMakeLists.txt * R plugin/cmake/Findsciqlop-plugin.cmake * R plugin/include/Plugin/IPlugin.h * R plugins/amda/CMakeLists.txt * R plugins/amda/cmake/Findsciqlop-amda.cmake * R plugins/amda/include/AmdaDefs.h * R plugins/amda/include/AmdaGlobal.h * R plugins/amda/include/AmdaParser.h * R plugins/amda/include/AmdaProvider.h * R plugins/amda/include/AmdaResultParser.h * R plugins/amda/resources/amda.json * R plugins/amda/resources/amdaresources.qrc * R plugins/amda/resources/samples/AmdaSample.json * R plugins/amda/resources/samples/AmdaSampleV2.json * R plugins/amda/src/AmdaDefs.cpp * R plugins/amda/src/AmdaParser.cpp * R plugins/amda/src/AmdaPlugin.cpp * R plugins/amda/src/AmdaResultParser.cpp * R plugins/amda/tests-resources/TestAmdaAcquisition/AmdaData-2012-01-01-12-00-00_2012-01-03-12-00-00.txt * R plugins/amda/tests-resources/TestAmdaParser/TwoRootsFile.json * R plugins/amda/tests-resources/TestAmdaParser/ValidFile1.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootKey.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootType.json * R plugins/amda/tests-resources/TestAmdaResultParser/FileNotFound.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NaNValue.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NaNX.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NoUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/TooManyValues.txt * R plugins/amda/tests-resources/TestAmdaResultParser/ValidScalar1.txt * R plugins/amda/tests-resources/TestAmdaResultParser/ValidVector1.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongDate.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongValue.txt * R plugins/amda/tests/TestAmdaParser.cpp * R plugins/amda/tests/TestAmdaResultParser.cpp * R plugins/mockplugin/CMakeLists.txt * R plugins/mockplugin/cmake/Findsciqlop-mockplugin.cmake * R plugins/mockplugin/include/CosinusProvider.h * R plugins/mockplugin/include/MockPluginGlobal.h * R plugins/mockplugin/resources/mockplugin.json * R plugins/mockplugin/src/CosinusProvider.cpp * R plugins/mockplugin/src/MockPlugin.cpp * R README.md * R app/CMakeLists.txt * R app/include/MainWindow.h * R app/src/Main.cpp * R app/vera-exclusions/exclusions.txt * R cmake/sciqlop.cmake * R cmake/sciqlop_applications.cmake * R cmake/sciqlop_package.cmake * R cmake/sciqlop_params.cmake * R core/CMakeLists.txt * R core/include/Common/spimpl.h * R core/include/DataSource/DataSourceController.h * R core/include/DataSource/DataSourceItem.h * R core/src/DataSource/DataSourceController.cpp * R core/src/DataSource/DataSourceItem.cpp * R core/tests/DataSource/TestDataSourceController.cpp * R core/vera-exclusions/exclusions.txt * R formatting/cmake/use_clangformat.cmake * R formatting/vera-exclusions/exclusions.txt * R gui/CMakeLists.txt * R gui/include/SqpApplication.h * R gui/src/SqpApplication.cpp * R LICENSE * R app/src/mainwindow.cpp * R app/src/mainwindow.ui
Status change > Approved
You need to be logged in to leave comments.
Login now