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