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