@@ -111,8 +111,8 void TestOptionalAxis::testSize_data() | |||||
111 | QTest::newRow("data1") << axis({}) << 0; |
|
111 | QTest::newRow("data1") << axis({}) << 0; | |
112 | QTest::newRow("data2") << axis({1, 2, 3}) << 3; |
|
112 | QTest::newRow("data2") << axis({1, 2, 3}) << 3; | |
113 | QTest::newRow("data3") << axis({1, 2, 3, 4}) << 4; |
|
113 | QTest::newRow("data3") << axis({1, 2, 3, 4}) << 4; | |
114 | QTest::newRow("data4 (axis not defined)") |
|
114 | QTest::newRow("data4 (axis not defined)") << OptionalAxis{} | |
115 |
|
|
115 | << 0; // Expects 0 for undefined axis | |
116 | } |
|
116 | } | |
117 |
|
117 | |||
118 | void TestOptionalAxis::testSize() |
|
118 | void TestOptionalAxis::testSize() | |
@@ -135,8 +135,8 void TestOptionalAxis::testUnit_data() | |||||
135 |
|
135 | |||
136 | QTest::newRow("data1") << axis(Unit{"Hz"}) << Unit{"Hz"}; |
|
136 | QTest::newRow("data1") << axis(Unit{"Hz"}) << Unit{"Hz"}; | |
137 | QTest::newRow("data2") << axis(Unit{"t", true}) << Unit{"t", true}; |
|
137 | QTest::newRow("data2") << axis(Unit{"t", true}) << Unit{"t", true}; | |
138 | QTest::newRow("data3 (axis not defined)") |
|
138 | QTest::newRow("data3 (axis not defined)") << OptionalAxis{} | |
139 |
|
|
139 | << Unit{}; // Expects default unit for undefined axis | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | void TestOptionalAxis::testUnit() |
|
142 | void TestOptionalAxis::testUnit() |
@@ -173,18 +173,18 void TestScalarSeries::testMergeWithVector_data() | |||||
173 | { |
|
173 | { | |
174 | testMergeDifferentTypes_struct<VectorSeries, ScalarSeries>(); |
|
174 | testMergeDifferentTypes_struct<VectorSeries, ScalarSeries>(); | |
175 |
|
175 | |||
176 | QTest::newRow("mergeVectorInScalar") |
|
176 | QTest::newRow("mergeVectorInScalar") << ScalarBuilder{} | |
177 | << ScalarBuilder{} |
|
177 | .setX({1., 2., 3., 4., 5.}) | |
178 |
.set |
|
178 | .setValues({100., 200., 300., 400., 500.}) | |
179 | .setValues({100., 200., 300., 400., 500.}) |
|
179 | .build() | |
180 | .build() |
|
180 | << VectorBuilder{} | |
181 | << VectorBuilder{} |
|
181 | .setX({6., 7., 8., 9., 10.}) | |
182 | .setX({6., 7., 8., 9., 10.}) |
|
182 | .setXValues({600., 700., 800., 900., 1000.}) | |
183 |
.set |
|
183 | .setYValues({610., 710., 810., 910., 1010.}) | |
184 |
.set |
|
184 | .setZValues({620., 720., 820., 920., 1020.}) | |
185 | .setZValues({620., 720., 820., 920., 1020.}) |
|
185 | .build() | |
186 | .build() |
|
186 | << DataContainer{1., 2., 3., 4., 5.} | |
187 |
|
|
187 | << DataContainer{100., 200., 300., 400., 500.}; | |
188 | } |
|
188 | } | |
189 |
|
189 | |||
190 | void TestScalarSeries::testMergeWithVector() |
|
190 | void TestScalarSeries::testMergeWithVector() | |
@@ -278,12 +278,12 void TestScalarSeries::testPurge_data() | |||||
278 | .build() |
|
278 | .build() | |
279 | << 2. << 4. << DataContainer{2., 3., 4.} |
|
279 | << 2. << 4. << DataContainer{2., 3., 4.} | |
280 | << std::vector<DataContainer>{{200., 300., 400.}}; |
|
280 | << std::vector<DataContainer>{{200., 300., 400.}}; | |
281 | QTest::newRow("purgeScalar1 (min/max swap)") |
|
281 | QTest::newRow("purgeScalar1 (min/max swap)") << ScalarBuilder{} | |
282 | << ScalarBuilder{} |
|
282 | .setX({1., 2., 3., 4., 5.}) | |
283 | .setX({1., 2., 3., 4., 5.}) |
|
283 | .setValues({100., 200., 300., 400., 500.}) | |
284 | .setValues({100., 200., 300., 400., 500.}) |
|
284 | .build() | |
285 | .build() |
|
285 | << 4. << 2. << DataContainer{2., 3., 4.} | |
286 |
|
|
286 | << std::vector<DataContainer>{{200., 300., 400.}}; | |
287 | QTest::newRow("purgeScalar2") << ScalarBuilder{} |
|
287 | QTest::newRow("purgeScalar2") << ScalarBuilder{} | |
288 | .setX({1., 2., 3., 4., 5.}) |
|
288 | .setX({1., 2., 3., 4., 5.}) | |
289 | .setValues({100., 200., 300., 400., 500.}) |
|
289 | .setValues({100., 200., 300., 400., 500.}) | |
@@ -324,12 +324,12 void TestScalarSeries::testXAxisRange_data() | |||||
324 | .build() |
|
324 | .build() | |
325 | << -1. << 3.2 << DataContainer{1., 2., 3.} |
|
325 | << -1. << 3.2 << DataContainer{1., 2., 3.} | |
326 | << DataContainer{100., 200., 300.}; |
|
326 | << DataContainer{100., 200., 300.}; | |
327 | QTest::newRow("xAxisRange1 (min/max swap)") |
|
327 | QTest::newRow("xAxisRange1 (min/max swap)") << ScalarBuilder{} | |
328 | << ScalarBuilder{} |
|
328 | .setX({1., 2., 3., 4., 5.}) | |
329 | .setX({1., 2., 3., 4., 5.}) |
|
329 | .setValues({100., 200., 300., 400., 500.}) | |
330 | .setValues({100., 200., 300., 400., 500.}) |
|
330 | .build() | |
331 | .build() |
|
331 | << 3.2 << -1. << DataContainer{1., 2., 3.} | |
332 |
|
|
332 | << DataContainer{100., 200., 300.}; | |
333 | QTest::newRow("xAxisRange2") << ScalarBuilder{} |
|
333 | QTest::newRow("xAxisRange2") << ScalarBuilder{} | |
334 | .setX({1., 2., 3., 4., 5.}) |
|
334 | .setX({1., 2., 3., 4., 5.}) | |
335 | .setValues({100., 200., 300., 400., 500.}) |
|
335 | .setValues({100., 200., 300., 400., 500.}) | |
@@ -401,10 +401,10 void TestScalarSeries::testValuesBounds_data() | |||||
401 | .setValues({100., 200., 300., 400., 500.}) |
|
401 | .setValues({100., 200., 300., 400., 500.}) | |
402 | .build() |
|
402 | .build() | |
403 | << 5.1 << 6. << false << nan << nan; |
|
403 | << 5.1 << 6. << false << nan << nan; | |
404 | QTest::newRow("scalarBounds5") |
|
404 | QTest::newRow("scalarBounds5") << ScalarBuilder{}.setX({1.}).setValues({100.}).build() << 0. | |
405 | << ScalarBuilder{}.setX({1.}).setValues({100.}).build() << 0. << 2. << true << 100. << 100.; |
|
405 | << 2. << true << 100. << 100.; | |
406 | QTest::newRow("scalarBounds6") |
|
406 | QTest::newRow("scalarBounds6") << ScalarBuilder{}.setX({}).setValues({}).build() << 0. << 2. | |
407 | << ScalarBuilder{}.setX({}).setValues({}).build() << 0. << 2. << false << nan << nan; |
|
407 | << false << nan << nan; | |
408 |
|
408 | |||
409 | // Tests with NaN values: NaN values are not included in min/max search |
|
409 | // Tests with NaN values: NaN values are not included in min/max search | |
410 | QTest::newRow("scalarBounds7") << ScalarBuilder{} |
|
410 | QTest::newRow("scalarBounds7") << ScalarBuilder{} |
@@ -9,7 +9,9 | |||||
9 |
|
9 | |||
10 | #include <QMimeData> |
|
10 | #include <QMimeData> | |
11 |
|
11 | |||
12 |
DataSourceTreeWidget::DataSourceTreeWidget(QWidget *parent) : QTreeWidget(parent) |
|
12 | DataSourceTreeWidget::DataSourceTreeWidget(QWidget *parent) : QTreeWidget(parent) | |
|
13 | { | |||
|
14 | } | |||
13 |
|
15 | |||
14 | QMimeData *DataSourceTreeWidget::mimeData(const QList<QTreeWidgetItem *> items) const |
|
16 | QMimeData *DataSourceTreeWidget::mimeData(const QList<QTreeWidgetItem *> items) const | |
15 | { |
|
17 | { |
@@ -97,7 +97,9 struct DragDropHelper::DragDropHelperPrivate { | |||||
97 | }; |
|
97 | }; | |
98 |
|
98 | |||
99 |
|
99 | |||
100 |
DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()} |
|
100 | DragDropHelper::DragDropHelper() : impl{spimpl::make_unique_impl<DragDropHelperPrivate>()} | |
|
101 | { | |||
|
102 | } | |||
101 |
|
103 | |||
102 | DragDropHelper::~DragDropHelper() |
|
104 | DragDropHelper::~DragDropHelper() | |
103 | { |
|
105 | { |
@@ -3,7 +3,9 | |||||
3 | #include "DragAndDrop/DragDropHelper.h" |
|
3 | #include "DragAndDrop/DragDropHelper.h" | |
4 | #include "SqpApplication.h" |
|
4 | #include "SqpApplication.h" | |
5 |
|
5 | |||
6 |
VariableInspectorTableView::VariableInspectorTableView(QWidget *parent) : QTableView(parent) |
|
6 | VariableInspectorTableView::VariableInspectorTableView(QWidget *parent) : QTableView(parent) | |
|
7 | { | |||
|
8 | } | |||
7 |
|
9 | |||
8 | void VariableInspectorTableView::startDrag(Qt::DropActions supportedActions) |
|
10 | void VariableInspectorTableView::startDrag(Qt::DropActions supportedActions) | |
9 | { |
|
11 | { |
General Comments 0
You need to be logged in to leave comments.
Login now