Engauge Digitizer  2
TestExport.cpp
1 #include "CurveConnectAs.h"
2 #include "Document.h"
3 #include "DocumentModelExportFormat.h"
4 #include "ExportFileFunctions.h"
5 #include "ExportFileRelations.h"
6 #include "ExportValuesXOrY.h"
7 #include "LineStyle.h"
8 #include "Logger.h"
9 #include "MainWindow.h"
10 #include "MainWindowModel.h"
11 #include "PointStyle.h"
12 #include <QImage>
13 #include <qmath.h>
14 #include <QtTest/QtTest>
15 #include "Spline.h"
16 #include "SplinePair.h"
17 #include "Test/TestExport.h"
18 #include "Transformation.h"
19 
20 QTEST_MAIN (TestExport)
21 
22 using namespace std;
23 
24 const bool NOT_USING_GNUPLOT = false;
25 const bool EXPORT_ONLY= true;
26 const QString NO_ERROR_REPORT_LOG_FILE;
27 const QString NO_REGRESSION_OPEN_FILE;
28 const bool NO_GNUPLOT_LOG_FILES = false;
29 const bool NO_REGRESSION_IMPORT = false;
30 const bool NO_RESET = false;
31 const bool NO_EXPORT_ONLY = false;
32 const bool NO_EXTRACT_IMAGE_ONLY = false;
33 const QString NO_EXTRACT_IMAGE_EXTENSION;
34 const bool DEBUG_FLAG = false;
35 const QStringList NO_LOAD_STARTUP_FILES;
36 const QStringList NO_COMMAND_LINE;
37 const QString STARTUP_DIG_LOWER_CASE ("/tmp/export_only.dig");
38 const QString STARTUP_DIG_UPPER_CASE ("/tmp/export_only.DIG");
39 const QStringList ONE_LOAD_STARTUP_FILE_LOWER_CASE (STARTUP_DIG_LOWER_CASE);
40 const QStringList ONE_LOAD_STARTUP_FILE_UPPER_CASE (STARTUP_DIG_UPPER_CASE);
41 const bool REGRESSION_IMPORT = true;
42 
43 TestExport::TestExport(QObject *parent) :
44  QObject(parent),
45  m_mainWindow (0),
46  m_document (0)
47 {
48 }
49 
50 bool TestExport::checkCommasInFunctionsForDelimiter (ExportDelimiter delimiter,
51  QLocale::Country country,
52  QString &output)
53 {
54  initData (false,
55  delimiter,
56  country);
57 
58  QTextStream str (&output);
59  bool success = true;
60  QString dummy;
61 
62  try {
63  bool isLogXTheta = (m_modelCoords.coordScaleXTheta() == COORD_SCALE_LOG);
64  bool isLogYRadius = (m_modelCoords.coordScaleYRadius() == COORD_SCALE_LOG);
65  unsigned int numWritesSoFar = 0;
66 
67  ExportFileFunctions exportFile;
68  exportFile.exportAllPerLineXThetaValuesMerged (m_modelExportOverride,
69  *m_document,
70  m_modelMainWindow,
71  m_curvesIncluded,
72  m_xThetaValues,
73  exportDelimiterToText (delimiter, NOT_USING_GNUPLOT),
74  m_transformation,
75  isLogXTheta,
76  isLogYRadius,
77  str,
78  numWritesSoFar);
79  }
80  catch (...)
81  {
82  success = false;
83  }
84 
85  return (success);
86 }
87 
88 bool TestExport::checkCommasInRelationsForDelimiter (ExportDelimiter delimiter,
89  QLocale::Country country,
90  QString &output)
91 {
92  initData (false,
93  delimiter,
94  country);
95 
96  QTextStream str (&output);
97  bool success = true;
98  QString dummy;
99 
100  try {
101  bool isLogXTheta = (m_modelCoords.coordScaleXTheta() == COORD_SCALE_LOG);
102  bool isLogYRadius = (m_modelCoords.coordScaleYRadius() == COORD_SCALE_LOG);
103  unsigned int numWritesSoFar = 0;
104 
105  ExportFileRelations exportFile;
106  exportFile.exportAllPerLineXThetaValuesMerged (m_modelExportOverride,
107  *m_document,
108  m_modelMainWindow,
109  m_curvesIncluded,
110  exportDelimiterToText (delimiter, NOT_USING_GNUPLOT),
111  m_transformation,
112  isLogXTheta,
113  isLogYRadius,
114  str,
115  numWritesSoFar);
116  }
117  catch (...)
118  {
119  success = false;
120  }
121 
122  return (success);
123 }
124 
125 void TestExport::cleanupTestCase ()
126 {
127 }
128 
129 void TestExport::initData (bool isLog,
130  ExportDelimiter delimiter,
131  QLocale::Country country)
132 {
133  const QString CURVE_NAME ("Curve1");
134  const int LINE_WIDTH = 2, POINT_LINE_WIDTH = 1;
135  const ColorPalette LINE_COLOR = COLOR_PALETTE_BLACK, POINT_COLOR = COLOR_PALETTE_BLACK;
136  const int RADIUS = 5;
137 
138  QImage nullImage;
139  m_document = new Document (nullImage);
140 
141  m_curvesIncluded.clear ();
142  m_curvesIncluded << CURVE_NAME;
143 
144  CurveStyles curveStyles (m_document->coordSystem ());
145  CurveStyle curveStyle (LineStyle (LINE_WIDTH,
146  LINE_COLOR,
147  CONNECT_AS_FUNCTION_SMOOTH),
148  PointStyle (POINT_SHAPE_CIRCLE,
149  RADIUS,
150  POINT_LINE_WIDTH,
151  POINT_COLOR));
152  curveStyles.setCurveStyle (CURVE_NAME, curveStyle);
153  if (isLog) {
154  m_modelCoords.setCoordScaleXTheta (COORD_SCALE_LOG);
155  m_modelCoords.setCoordScaleYRadius (COORD_SCALE_LOG);
156  } else {
157  m_modelCoords.setCoordScaleXTheta (COORD_SCALE_LINEAR);
158  m_modelCoords.setCoordScaleYRadius (COORD_SCALE_LINEAR);
159  }
160  m_modelCoords.setCoordsType (COORDS_TYPE_CARTESIAN);
161  m_modelGeneral.setCursorSize (3);
162  m_modelGeneral.setExtraPrecision (1);
163 
164  m_modelExportOverride.setPointsSelectionFunctions (EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE);
165  m_modelExportOverride.setDelimiter (delimiter);
166 
167  m_document->setModelExport (m_modelExportOverride);
168  m_document->setModelCurveStyles (curveStyles);
169  m_document->setModelCoords (m_modelCoords);
170  m_document->setModelGeneral (m_modelGeneral);
171 
172  m_modelMainWindow.setLocale (QLocale::English,
173  country);
174 
175  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (845, 305), "Curve1\t0", 0);
176  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (850, 294), "Curve1\t1", 1);
177  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (862, 272), "Curve1\t2", 2);
178  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (876, 244), "Curve1\t3", 3);
179  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (887, 222), "Curve1\t4", 4);
180  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (899, 200), "Curve1\t5", 5);
181  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (910, 177), "Curve1\t6", 6);
182  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (922, 155), "Curve1\t7", 7);
183  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (933, 133), "Curve1\t8", 8);
184  m_document->addPointGraphWithSpecifiedIdentifier (CURVE_NAME, QPointF (945, 110), "Curve1\t9", 9);
185 
186  m_xThetaValues.clear ();
187  m_xThetaValues << 0.0009999; // Just outside of the coordinates added to the document
188  m_xThetaValues << 0.001;
189  m_xThetaValues << 0.01;
190  m_xThetaValues << 0.1;
191  m_xThetaValues << 1;
192  m_xThetaValues << 10;
193  m_xThetaValues << 100;
194  m_xThetaValues << 1000;
195  QTransform matrixScreen ( 51, 52, 1123,
196  548, 10, 548,
197  1, 1, 1);
198  QTransform matrixGraph (qLn (0.001), qLn (0.001), qLn (1000),
199  qLn ( 1), qLn ( 100), qLn ( 1),
200  1, 1, 1);
201  m_transformation.updateTransformFromMatrices (matrixScreen,
202  matrixGraph);
203  m_transformation.setModelCoords (m_modelCoords,
204  m_modelGeneral,
205  m_modelMainWindow);
206 }
207 
208 void TestExport::initTestCase ()
209 {
210  initializeLogging ("engauge_test",
211  "engauge_test.log",
212  DEBUG_FLAG);
213 
214  m_mainWindow = new MainWindow (NO_ERROR_REPORT_LOG_FILE,
215  NO_REGRESSION_OPEN_FILE,
216  NO_REGRESSION_IMPORT,
217  NO_GNUPLOT_LOG_FILES,
218  NO_RESET,
219  NO_EXPORT_ONLY,
220  NO_EXTRACT_IMAGE_ONLY,
221  NO_EXTRACT_IMAGE_EXTENSION,
222  NO_LOAD_STARTUP_FILES,
223  NO_COMMAND_LINE);
224 
225  m_mainWindow->show ();
226 }
227 
228 void TestExport::testCommasInFunctionsForCommasSwitzerland ()
229 {
230  QString outputExpectedIfCommaSeparator =
231  "x,Curve1\n"
232  "\"0,001\",\"-1,27563\"\n"
233  "\"0,001\",\"-1,27563\"\n"
234  "\"0,01\",\"-1,26683\"\n"
235  "\"0,1\",\"-1,17881\"\n"
236  "1,\"-0,29658\"\n"
237  "10,\"-706,15184\"\n"
238  "100,\"-3997814,14355\"\n"
239  "1000,\"-4541901224,06376\"\n";
240  QString outputExpectedIfPeriodSeparator =
241  "x,Curve1\n"
242  "0.001,-1.27563\n"
243  "0.001,-1.27563\n"
244  "0.01,-1.26683\n"
245  "0.1,-1.17881\n"
246  "1,-0.29658\n"
247  "10,-706.15184\n"
248  "100,-3997814.14355\n"
249  "1000,-4541901224.06376\n";
250 
251  QString outputGot;
252  bool success = checkCommasInFunctionsForDelimiter (EXPORT_DELIMITER_COMMA,
253  QLocale::Switzerland,
254  outputGot);
255  if (!success) {
256  outputGot = "";
257  }
258 
259  QVERIFY (outputGot == outputExpectedIfCommaSeparator ||
260  outputGot == outputExpectedIfPeriodSeparator);
261 }
262 
263 void TestExport::testCommasInFunctionsForCommasUnitedStates ()
264 {
265  QString outputExpected =
266  "x,Curve1\n"
267  "0.001,-1.27563\n"
268  "0.001,-1.27563\n"
269  "0.01,-1.26683\n"
270  "0.1,-1.17881\n"
271  "1,-0.29658\n"
272  "10,-706.15184\n"
273  "100,-3997814.14355\n"
274  "1000,-4541901224.06376\n";
275 
276  QString outputGot;
277  bool success = checkCommasInFunctionsForDelimiter (EXPORT_DELIMITER_COMMA,
278  QLocale::UnitedStates,
279  outputGot);
280  if (!success) {
281  outputGot = "";
282  }
283 
284  QVERIFY (outputGot == outputExpected);
285 }
286 
287 void TestExport::testCommasInFunctionsForTabsSwitzerland ()
288 {
289  QString outputExpectedIfCommaSeparator =
290  "x\tCurve1\n"
291  "0,001\t-1,27563\n"
292  "0,001\t-1,27563\n"
293  "0,01\t-1,26683\n"
294  "0,1\t-1,17881\n"
295  "1\t-0,29658\n"
296  "10\t-706,15184\n"
297  "100\t-3997814,14355\n"
298  "1000\t-4541901224,06376\n";
299  QString outputExpectedIfPeriodSeparator =
300  "x\tCurve1\n"
301  "0.001\t-1.27563\n"
302  "0.001\t-1.27563\n"
303  "0.01\t-1.26683\n"
304  "0.1\t-1.17881\n"
305  "1\t-0.29658\n"
306  "10\t-706.15184\n"
307  "100\t-3997814.14355\n"
308  "1000\t-4541901224.06376\n";
309 
310  QString outputGot;
311  bool success = checkCommasInFunctionsForDelimiter (EXPORT_DELIMITER_TAB,
312  QLocale::Switzerland,
313  outputGot);
314  if (!success) {
315  outputGot = "";
316  }
317 
318  QVERIFY (outputGot == outputExpectedIfCommaSeparator ||
319  outputGot == outputExpectedIfPeriodSeparator);
320 }
321 
322 void TestExport::testCommasInFunctionsForTabsUnitedStates ()
323 {
324  QString outputExpected =
325  "x\tCurve1\n"
326  "0.001\t-1.27563\n"
327  "0.001\t-1.27563\n"
328  "0.01\t-1.26683\n"
329  "0.1\t-1.17881\n"
330  "1\t-0.29658\n"
331  "10\t-706.15184\n"
332  "100\t-3997814.14355\n"
333  "1000\t-4541901224.06376\n";
334 
335  QString outputGot;
336  bool success = checkCommasInFunctionsForDelimiter (EXPORT_DELIMITER_TAB,
337  QLocale::UnitedStates,
338  outputGot);
339  if (!success) {
340  outputGot = "";
341  }
342 
343  QVERIFY (outputGot == outputExpected);
344 }
345 
346 void TestExport::testCommasInRelationsForCommasSwitzerland ()
347 {
348  QString outputExpectedIfCommaSeparator =
349  "x,Curve1\n"
350  "\"3,3192\",\"2,08003\"\n"
351  "\"3,3723\",\"2,15796\"\n"
352  "\"3,432\",\"2,23368\"\n"
353  "\"3,4935\",\"2,30883\"\n"
354  "\"3,5539\",\"2,38438\"\n"
355  "\"3,6113\",\"2,46094\"\n"
356  "\"3,6687\",\"2,5375\"\n"
357  "\"3,7261\",\"2,61406\"\n"
358  "\"3,7836\",\"2,69062\"\n"
359  "\"3,841\",\"2,76718\"\n"
360  "\"3,9012\",\"2,84276\"\n"
361  "\"3,9628\",\"2,91791\"\n"
362  "\"4,0231\",\"2,99345\"\n"
363  "\"4,0785\",\"3,07067\"\n"
364  "\"4,1339\",\"3,14789\"\n"
365  "\"4,1932\",\"3,22378\"\n"
366  "\"4,2547\",\"3,29893\"\n"
367  "\"4,3156\",\"3,37426\"\n"
368  "\"4,3731\",\"3,45082\"\n"
369  "\"4,4305\",\"3,52738\"\n"
370  "\"4,4892\",\"3,60349\"\n"
371  "\"4,5486\",\"3,67938\"\n";
372  QString outputExpectedIfPeriodSeparator =
373  "x,Curve1\n"
374  "3.3192,2.08003\n"
375  "3.3723,2.15796\n"
376  "3.432,2.23368\n"
377  "3.4935,2.30883\n"
378  "3.5539,2.38438\n"
379  "3.6113,2.46094\n"
380  "3.6687,2.5375\n"
381  "3.7261,2.61406\n"
382  "3.7836,2.69062\n"
383  "3.841,2.76718\n"
384  "3.9012,2.84276\n"
385  "3.9628,2.91791\n"
386  "4.0231,2.99345\n"
387  "4.0785,3.07067\n"
388  "4.1339,3.14789\n"
389  "4.1932,3.22378\n"
390  "4.2547,3.29893\n"
391  "4.3156,3.37426\n"
392  "4.3731,3.45082\n"
393  "4.4305,3.52738\n"
394  "4.4892,3.60349\n"
395  "4.5486,3.67938\n";
396 
397  QString outputGot;
398  bool success = checkCommasInRelationsForDelimiter (EXPORT_DELIMITER_COMMA,
399  QLocale::Switzerland,
400  outputGot);
401  if (!success) {
402  outputGot = "";
403  }
404 
405  QVERIFY (outputGot == outputExpectedIfCommaSeparator ||
406  outputGot == outputExpectedIfPeriodSeparator);
407 }
408 
409 void TestExport::testCommasInRelationsForCommasUnitedStates ()
410 {
411  QString outputExpected =
412  "x,Curve1\n"
413  "3.3192,2.08003\n"
414  "3.3723,2.15796\n"
415  "3.432,2.23368\n"
416  "3.4935,2.30883\n"
417  "3.5539,2.38438\n"
418  "3.6113,2.46094\n"
419  "3.6687,2.5375\n"
420  "3.7261,2.61406\n"
421  "3.7836,2.69062\n"
422  "3.841,2.76718\n"
423  "3.9012,2.84276\n"
424  "3.9628,2.91791\n"
425  "4.0231,2.99345\n"
426  "4.0785,3.07067\n"
427  "4.1339,3.14789\n"
428  "4.1932,3.22378\n"
429  "4.2547,3.29893\n"
430  "4.3156,3.37426\n"
431  "4.3731,3.45082\n"
432  "4.4305,3.52738\n"
433  "4.4892,3.60349\n"
434  "4.5486,3.67938\n";
435 
436  QString outputGot;
437  bool success = checkCommasInRelationsForDelimiter (EXPORT_DELIMITER_COMMA,
438  QLocale::UnitedStates,
439  outputGot);
440  if (!success) {
441  outputGot = "";
442  }
443 
444  QVERIFY (outputGot == outputExpected);
445 }
446 
447 void TestExport::testCommasInRelationsForTabsSwitzerland ()
448 {
449  QString outputExpectedIfCommaSeparator =
450  "x\tCurve1\n"
451  "3,3192\t2,08003\n"
452  "3,3723\t2,15796\n"
453  "3,432\t2,23368\n"
454  "3,4935\t2,30883\n"
455  "3,5539\t2,38438\n"
456  "3,6113\t2,46094\n"
457  "3,6687\t2,5375\n"
458  "3,7261\t2,61406\n"
459  "3,7836\t2,69062\n"
460  "3,841\t2,76718\n"
461  "3,9012\t2,84276\n"
462  "3,9628\t2,91791\n"
463  "4,0231\t2,99345\n"
464  "4,0785\t3,07067\n"
465  "4,1339\t3,14789\n"
466  "4,1932\t3,22378\n"
467  "4,2547\t3,29893\n"
468  "4,3156\t3,37426\n"
469  "4,3731\t3,45082\n"
470  "4,4305\t3,52738\n"
471  "4,4892\t3,60349\n"
472  "4,5486\t3,67938\n";
473  QString outputExpectedIfPeriodSeparator =
474  "x\tCurve1\n"
475  "3.3192\t2.08003\n"
476  "3.3723\t2.15796\n"
477  "3.432\t2.23368\n"
478  "3.4935\t2.30883\n"
479  "3.5539\t2.38438\n"
480  "3.6113\t2.46094\n"
481  "3.6687\t2.5375\n"
482  "3.7261\t2.61406\n"
483  "3.7836\t2.69062\n"
484  "3.841\t2.76718\n"
485  "3.9012\t2.84276\n"
486  "3.9628\t2.91791\n"
487  "4.0231\t2.99345\n"
488  "4.0785\t3.07067\n"
489  "4.1339\t3.14789\n"
490  "4.1932\t3.22378\n"
491  "4.2547\t3.29893\n"
492  "4.3156\t3.37426\n"
493  "4.3731\t3.45082\n"
494  "4.4305\t3.52738\n"
495  "4.4892\t3.60349\n"
496  "4.5486\t3.67938\n";
497 
498  QString outputGot;
499  bool success = checkCommasInRelationsForDelimiter (EXPORT_DELIMITER_TAB,
500  QLocale::Switzerland,
501  outputGot);
502  if (!success) {
503  outputGot = "";
504  }
505 
506  QVERIFY (outputGot == outputExpectedIfCommaSeparator ||
507  outputGot == outputExpectedIfPeriodSeparator);
508 }
509 
510 void TestExport::testCommasInRelationsForTabsUnitedStates ()
511 {
512  QString outputExpected =
513  "x\tCurve1\n"
514  "3.3192\t2.08003\n"
515  "3.3723\t2.15796\n"
516  "3.432\t2.23368\n"
517  "3.4935\t2.30883\n"
518  "3.5539\t2.38438\n"
519  "3.6113\t2.46094\n"
520  "3.6687\t2.5375\n"
521  "3.7261\t2.61406\n"
522  "3.7836\t2.69062\n"
523  "3.841\t2.76718\n"
524  "3.9012\t2.84276\n"
525  "3.9628\t2.91791\n"
526  "4.0231\t2.99345\n"
527  "4.0785\t3.07067\n"
528  "4.1339\t3.14789\n"
529  "4.1932\t3.22378\n"
530  "4.2547\t3.29893\n"
531  "4.3156\t3.37426\n"
532  "4.3731\t3.45082\n"
533  "4.4305\t3.52738\n"
534  "4.4892\t3.60349\n"
535  "4.5486\t3.67938\n";
536 
537  QString outputGot;
538  bool success = checkCommasInRelationsForDelimiter (EXPORT_DELIMITER_TAB,
539  QLocale::UnitedStates,
540  outputGot);
541  if (!success) {
542  outputGot = "";
543  }
544 
545  QVERIFY (outputGot == outputExpected);
546 }
547 
548 void TestExport::testExportOnlyNonRegressionLowerCase ()
549 {
550  m_mainWindow->m_isErrorReportRegressionTest = NO_REGRESSION_IMPORT;
551  m_mainWindow->setCurrentFile (STARTUP_DIG_LOWER_CASE);
552 
553  QString outputGot = m_mainWindow->fileNameForExportOnly ();
554  QString outputWanted = STARTUP_DIG_LOWER_CASE;
555  outputWanted = outputWanted.replace (".dig", ".csv");
556 
557  QVERIFY (outputGot == outputWanted);
558 }
559 
560 void TestExport::testExportOnlyNonRegressionUpperCase ()
561 {
562  m_mainWindow->m_isErrorReportRegressionTest = NO_REGRESSION_IMPORT;
563  m_mainWindow->setCurrentFile (STARTUP_DIG_UPPER_CASE);
564 
565  QString outputGot = m_mainWindow->fileNameForExportOnly ();
566  QString outputWanted = STARTUP_DIG_UPPER_CASE;
567  outputWanted = outputWanted.replace (".DIG", ".csv");
568 
569  QVERIFY (outputGot == outputWanted);
570 }
571 
572 void TestExport::testExportOnlyRegressionLowerCase ()
573 {
574  m_mainWindow->m_isErrorReportRegressionTest = REGRESSION_IMPORT;
575  m_mainWindow->m_regressionFile = STARTUP_DIG_LOWER_CASE;
576 
577  QString outputGot = m_mainWindow->fileNameForExportOnly ();
578  QString outputWanted = STARTUP_DIG_LOWER_CASE;
579  outputWanted = outputWanted.replace (".dig", ".csv_actual_1");
580 
581  QVERIFY (outputGot == outputWanted);
582 }
583 
584 void TestExport::testExportOnlyRegressionUpperCase ()
585 {
586  m_mainWindow->m_isErrorReportRegressionTest = REGRESSION_IMPORT;
587  m_mainWindow->m_regressionFile = STARTUP_DIG_UPPER_CASE;
588 
589  QString outputGot = m_mainWindow->fileNameForExportOnly ();
590  QString outputWanted = STARTUP_DIG_UPPER_CASE;
591  outputWanted = outputWanted.replace (".DIG", ".csv_actual_1");
592 
593  QVERIFY (outputGot == outputWanted);
594 }
595 
596 void TestExport::testLogExtrapolationFunctionsAll ()
597 {
598  initData (true,
599  EXPORT_DELIMITER_COMMA,
600  QLocale::UnitedStates);
601 
602  bool success = true;
603  QString dummy;
604  QTextStream str (&dummy);
605 
606  try {
607  bool isLogXTheta = (m_modelCoords.coordScaleXTheta() == COORD_SCALE_LOG);
608  bool isLogYRadius = (m_modelCoords.coordScaleYRadius() == COORD_SCALE_LOG);
609  unsigned int numWritesSoFar = 0;
610 
611  ExportFileFunctions exportFile;
612  exportFile.exportAllPerLineXThetaValuesMerged (m_modelExportOverride,
613  *m_document,
614  m_modelMainWindow,
615  m_curvesIncluded,
616  m_xThetaValues,
617  " ",
618  m_transformation,
619  isLogXTheta,
620  isLogYRadius,
621  str,
622  numWritesSoFar);
623  }
624  catch (...)
625  {
626  success = false;
627  }
628 
629  QVERIFY (success);
630 }
void setPointsSelectionFunctions(ExportPointsSelectionFunctions exportPointsSelectionFunctions)
Set method for point selection for functions.
const CoordSystem & coordSystem() const
Currently active CoordSystem.
Definition: Document.cpp:296
void setCursorSize(int cursorSize)
Set method for effective cursor size.
void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
Definition: Document.cpp:1010
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition: CurveStyles.h:22
void addPointGraphWithSpecifiedIdentifier(const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal)
Add a single graph point with the specified point identifer. Note that PointStyle is not applied to t...
Definition: Document.cpp:204
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.
Definition: Document.cpp:972
void setDelimiter(ExportDelimiter exportDelimiter)
Set method for delimiter.
void setLocale(QLocale::Language language, QLocale::Country country)
Set method for locale given attributes.
Unit test of Export classes.
Definition: TestExport.h:16
TestExport(QObject *parent=0)
Single constructor.
Definition: TestExport.cpp:43
void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
Definition: Document.cpp:1003
Details for a specific Point.
Definition: PointStyle.h:20
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
void setModelCurveStyles(const CurveStyles &modelCurveStyles)
Set method for CurveStyles.
Definition: Document.cpp:979
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
Container for LineStyle and PointStyle for one Curve.
Definition: CurveStyle.h:18
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
Details for a specific Line.
Definition: LineStyle.h:19
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
void setExtraPrecision(int extraPrecision)
Set method for extra digits of precision.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:91
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.
void setCoordsType(CoordsType coordsType)
Set method for coordinates type.