##// END OF EJS Templates
MR for linux compilation
perrinel -
r848:89fbdd3d4a7b
parent child
Show More
@@ -93,7 +93,6 bool DragDropScroller::eventFilter(QObject *obj, QEvent *event)
93 }
93 }
94 }
94 }
95 else if (event->type() == QEvent::DragLeave) {
95 else if (event->type() == QEvent::DragLeave) {
96 auto w = static_cast<QWidget *>(obj);
97 if (impl->m_CurrentScrollArea) {
96 if (impl->m_CurrentScrollArea) {
98 if (!QRect(QPoint(), impl->m_CurrentScrollArea->size())
97 if (!QRect(QPoint(), impl->m_CurrentScrollArea->size())
99 .contains(impl->m_CurrentScrollArea->mapFromGlobal(QCursor::pos()))) {
98 .contains(impl->m_CurrentScrollArea->mapFromGlobal(QCursor::pos()))) {
@@ -104,7 +103,6 bool DragDropScroller::eventFilter(QObject *obj, QEvent *event)
104 }
103 }
105 }
104 }
106 else if (event->type() == QEvent::Drop) {
105 else if (event->type() == QEvent::Drop) {
107 auto w = static_cast<QWidget *>(obj);
108 if (impl->m_CurrentScrollArea) {
106 if (impl->m_CurrentScrollArea) {
109 impl->m_CurrentScrollArea = nullptr;
107 impl->m_CurrentScrollArea = nullptr;
110 impl->m_Direction = DragDropScrollerPrivate::ScrollDirection::unknown;
108 impl->m_Direction = DragDropScrollerPrivate::ScrollDirection::unknown;
@@ -167,7 +165,9 struct DragDropHelper::DragDropHelperPrivate {
167 };
165 };
168
166
169
167
170 DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()} {}
168 DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()}
169 {
170 }
171
171
172 DragDropHelper::~DragDropHelper()
172 DragDropHelper::~DragDropHelper()
173 {
173 {
@@ -120,9 +120,13 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 }
124
126
125 void SqpApplication::initialize() {}
127 void SqpApplication::initialize()
128 {
129 }
126
130
127 DataSourceController &SqpApplication::dataSourceController() noexcept
131 DataSourceController &SqpApplication::dataSourceController() noexcept
128 {
132 {
@@ -7,6 +7,7
7 #include <QDragEnterEvent>
7 #include <QDragEnterEvent>
8 #include <QVBoxLayout>
8 #include <QVBoxLayout>
9
9
10 #include <cmath>
10 #include <memory>
11 #include <memory>
11
12
12 struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate {
13 struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate {
@@ -72,10 +72,9 VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget
72 &VisualizationGraphWidget::onMouseRelease);
72 &VisualizationGraphWidget::onMouseRelease);
73 connect(ui->widget, &QCustomPlot::mouseMove, this, &VisualizationGraphWidget::onMouseMove);
73 connect(ui->widget, &QCustomPlot::mouseMove, this, &VisualizationGraphWidget::onMouseMove);
74 connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel);
74 connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel);
75 connect(
75 connect(ui->widget->xAxis, static_cast<void (QCPAxis::*)(const QCPRange &, const QCPRange &)>(
76 ui->widget->xAxis,
76 &QCPAxis::rangeChanged),
77 static_cast<void (QCPAxis::*)(const QCPRange &, const QCPRange &)>(&QCPAxis::rangeChanged),
77 this, &VisualizationGraphWidget::onRangeChanged, Qt::DirectConnection);
78 this, &VisualizationGraphWidget::onRangeChanged, Qt::DirectConnection);
79
78
80 // Activates menu when right clicking on the graph
79 // Activates menu when right clicking on the graph
81 ui->widget->setContextMenuPolicy(Qt::CustomContextMenu);
80 ui->widget->setContextMenuPolicy(Qt::CustomContextMenu);
@@ -290,9 +289,9 void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept
290
289
291 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2)
290 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2)
292 {
291 {
293 qCDebug(LOG_VisualizationGraphWidget())
292 qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: VisualizationGraphWidget::onRangeChanged")
294 << tr("TORM: VisualizationGraphWidget::onRangeChanged")
293 << QThread::currentThread()->objectName() << "DoAcqui"
295 << QThread::currentThread()->objectName() << "DoAcqui" << impl->m_DoAcquisition;
294 << impl->m_DoAcquisition;
296
295
297 auto graphRange = SqpRange{t1.lower, t1.upper};
296 auto graphRange = SqpRange{t1.lower, t1.upper};
298 auto oldGraphRange = SqpRange{t2.lower, t2.upper};
297 auto oldGraphRange = SqpRange{t2.lower, t2.upper};
@@ -148,10 +148,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V
148 graphChildRange.m_TStart += deltaLeft;
148 graphChildRange.m_TStart += deltaLeft;
149 graphChildRange.m_TEnd -= deltaRight;
149 graphChildRange.m_TEnd -= deltaRight;
150 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn");
150 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn");
151 qCDebug(LOG_VisualizationZoneWidget())
151 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft")
152 << tr("TORM: deltaLeft") << deltaLeft;
152 << deltaLeft;
153 qCDebug(LOG_VisualizationZoneWidget())
153 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight")
154 << tr("TORM: deltaRight") << deltaRight;
154 << deltaRight;
155 qCDebug(LOG_VisualizationZoneWidget())
155 qCDebug(LOG_VisualizationZoneWidget())
156 << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart;
156 << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart;
157
157
@@ -162,10 +162,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V
162 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut");
162 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut");
163 auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart;
163 auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart;
164 auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd;
164 auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd;
165 qCDebug(LOG_VisualizationZoneWidget())
165 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft")
166 << tr("TORM: deltaLeft") << deltaLeft;
166 << deltaLeft;
167 qCDebug(LOG_VisualizationZoneWidget())
167 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight")
168 << tr("TORM: deltaRight") << deltaRight;
168 << deltaRight;
169 qCDebug(LOG_VisualizationZoneWidget())
169 qCDebug(LOG_VisualizationZoneWidget())
170 << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart;
170 << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart;
171 graphChildRange.m_TStart -= deltaLeft;
171 graphChildRange.m_TStart -= deltaLeft;
@@ -202,10 +202,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V
202 break;
202 break;
203 }
203 }
204 graphChild->enableAcquisition(false);
204 graphChild->enableAcquisition(false);
205 qCDebug(LOG_VisualizationZoneWidget())
205 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ")
206 << tr("TORM: Range before: ") << graphChild->graphRange();
206 << graphChild->graphRange();
207 qCDebug(LOG_VisualizationZoneWidget())
207 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ")
208 << tr("TORM: Range after : ") << graphChildRange;
208 << graphChildRange;
209 qCDebug(LOG_VisualizationZoneWidget())
209 qCDebug(LOG_VisualizationZoneWidget())
210 << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart;
210 << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart;
211 graphChild->setGraphRange(graphChildRange);
211 graphChild->setGraphRange(graphChildRange);
General Comments 6
Approved

Status change > Approved

You need to be logged in to leave comments. Login now