@@ -949,7 +949,7 void VisualizationGraphWidget::mouseMoveEvent(QMouseEvent* event) | |||||
949 | impl->m_RenderingDelegate->updateTooltip(event); |
|
949 | impl->m_RenderingDelegate->updateTooltip(event); | |
950 | } |
|
950 | } | |
951 | // event->accept(); |
|
951 | // event->accept(); | |
952 |
|
|
952 | VisualizationDragWidget::mouseMoveEvent(event); | |
953 | } |
|
953 | } | |
954 |
|
954 | |||
955 | void VisualizationGraphWidget::mouseReleaseEvent(QMouseEvent* event) |
|
955 | void VisualizationGraphWidget::mouseReleaseEvent(QMouseEvent* event) | |
@@ -1061,7 +1061,7 void VisualizationGraphWidget::mousePressEvent(QMouseEvent* event) | |||||
1061 | } |
|
1061 | } | |
1062 | } |
|
1062 | } | |
1063 | // event->accept(); |
|
1063 | // event->accept(); | |
1064 |
|
|
1064 | VisualizationDragWidget::mousePressEvent(event); | |
1065 | } |
|
1065 | } | |
1066 |
|
1066 | |||
1067 | void VisualizationGraphWidget::mouseDoubleClickEvent(QMouseEvent* event) |
|
1067 | void VisualizationGraphWidget::mouseDoubleClickEvent(QMouseEvent* event) |
@@ -220,66 +220,6 VisualizationGraphWidget* VisualizationZoneWidget::createGraph( | |||||
220 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); |
|
220 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); | |
221 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); |
|
221 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); | |
222 |
|
222 | |||
223 |
|
||||
224 | // Lambda to synchronize zone widget |
|
|||
225 | // auto synchronizeZoneWidget = [this, graphWidget](const DateTimeRange &graphRange, |
|
|||
226 | // const DateTimeRange &oldGraphRange) { |
|
|||
227 |
|
||||
228 | // auto zoomType = DateTimeRangeHelper::getTransformationType(oldGraphRange, graphRange); |
|
|||
229 | // auto frameLayout = ui->dragDropContainer->layout(); |
|
|||
230 | // for (auto i = 0; i < frameLayout->count(); ++i) { |
|
|||
231 | // auto graphChild |
|
|||
232 | // = dynamic_cast<VisualizationGraphWidget *>(frameLayout->itemAt(i)->widget()); |
|
|||
233 | // if (graphChild && (graphChild != graphWidget)) { |
|
|||
234 |
|
||||
235 | // auto graphChildRange = graphChild->graphRange(); |
|
|||
236 | // switch (zoomType) { |
|
|||
237 | // case TransformationType::ZoomIn: { |
|
|||
238 | // auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; |
|
|||
239 | // auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; |
|
|||
240 | // graphChildRange.m_TStart += deltaLeft; |
|
|||
241 | // graphChildRange.m_TEnd -= deltaRight; |
|
|||
242 | // break; |
|
|||
243 | // } |
|
|||
244 |
|
||||
245 | // case TransformationType::ZoomOut: { |
|
|||
246 | // auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; |
|
|||
247 | // auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; |
|
|||
248 | // graphChildRange.m_TStart -= deltaLeft; |
|
|||
249 | // graphChildRange.m_TEnd += deltaRight; |
|
|||
250 | // break; |
|
|||
251 | // } |
|
|||
252 | // case TransformationType::PanRight: { |
|
|||
253 | // auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; |
|
|||
254 | // auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; |
|
|||
255 | // graphChildRange.m_TStart += deltaLeft; |
|
|||
256 | // graphChildRange.m_TEnd += deltaRight; |
|
|||
257 | // break; |
|
|||
258 | // } |
|
|||
259 | // case TransformationType::PanLeft: { |
|
|||
260 | // auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; |
|
|||
261 | // auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; |
|
|||
262 | // graphChildRange.m_TStart -= deltaLeft; |
|
|||
263 | // graphChildRange.m_TEnd -= deltaRight; |
|
|||
264 | // break; |
|
|||
265 | // } |
|
|||
266 | // case TransformationType::Unknown: { |
|
|||
267 | // break; |
|
|||
268 | // } |
|
|||
269 | // default: |
|
|||
270 | // qCCritical(LOG_VisualizationZoneWidget()) |
|
|||
271 | // << tr("Impossible to synchronize: zoom type not take into |
|
|||
272 | // account"); |
|
|||
273 | // // No action |
|
|||
274 | // break; |
|
|||
275 | // } |
|
|||
276 | // graphChild->setFlags(GraphFlag::DisableAll); |
|
|||
277 | // graphChild->setGraphRange(graphChildRange, true); |
|
|||
278 | // graphChild->setFlags(GraphFlag::EnableAll); |
|
|||
279 | // } |
|
|||
280 | // } |
|
|||
281 | // }; |
|
|||
282 |
|
||||
283 | // connection for synchronization |
|
223 | // connection for synchronization | |
284 | // connect(graphWidget, &VisualizationGraphWidget::synchronize, synchronizeZoneWidget); |
|
224 | // connect(graphWidget, &VisualizationGraphWidget::synchronize, synchronizeZoneWidget); | |
285 | connect(graphWidget, &VisualizationGraphWidget::variableAdded, this, |
|
225 | connect(graphWidget, &VisualizationGraphWidget::variableAdded, this, |
General Comments 0
You need to be logged in to leave comments.
Login now