Engauge Digitizer  2
TestExport.h
Go to the documentation of this file.
1 #ifndef TEST_EXPORT_H
2 #define TEST_EXPORT_H
3 
4 #include "DocumentModelCoords.h"
6 #include "DocumentModelGeneral.h"
7 #include "ExportValuesXOrY.h"
8 #include "MainWindowModel.h"
9 #include <QObject>
10 #include "Transformation.h"
11 
12 class Document;
13 class MainWindow;
14 
16 class TestExport : public QObject
17 {
18  Q_OBJECT
19 public:
21  explicit TestExport(QObject *parent = 0);
22 
23 signals:
24 
25 private slots:
26  void cleanupTestCase ();
27  void initTestCase ();
28 
29  // For Switzerland cases below we are testing for case when comma is used,
30  // but on some computers that locale will use period instead so we handle
31  // both cases (to prevent false alarms)
32  void testCommasInFunctionsForCommasSwitzerland ();
33  void testCommasInFunctionsForCommasUnitedStates ();
34  void testCommasInFunctionsForTabsSwitzerland ();
35  void testCommasInFunctionsForTabsUnitedStates ();
36  void testCommasInRelationsForCommasSwitzerland ();
37  void testCommasInRelationsForCommasUnitedStates ();
38  void testCommasInRelationsForTabsSwitzerland ();
39  void testCommasInRelationsForTabsUnitedStates ();
40  void testExportOnlyNonRegressionLowerCase ();
41  void testExportOnlyNonRegressionUpperCase ();
42  void testExportOnlyRegressionLowerCase ();
43  void testExportOnlyRegressionUpperCase ();
44  void testLogExtrapolationFunctionsAll ();
45 
46 private:
47  bool checkCommasInFunctionsForDelimiter (ExportDelimiter delimiter,
48  QLocale::Country country,
49  QString &output);
50  bool checkCommasInRelationsForDelimiter (ExportDelimiter delimiter,
51  QLocale::Country country,
52  QString &output);
53  void initData (bool isLog,
54  ExportDelimiter delimiter,
55  QLocale::Country country);
56 
57  MainWindow *m_mainWindow;
58  Document *m_document;
59  DocumentModelCoords m_modelCoords;
60  DocumentModelExportFormat m_modelExportOverride; // Values from constructor, loaded before settings reset, are overwritten
61  DocumentModelGeneral m_modelGeneral;
62  MainWindowModel m_modelMainWindow;
63  Transformation m_transformation;
64  ExportValuesXOrY m_xThetaValues;
65  QStringList m_curvesIncluded;
66 };
67 
68 #endif // TEST_EXPORT_H
Model for DlgSettingsGeneral and CmdSettingsGeneral.
ExportDelimiter
Delimiter values that may or may not be overridden by DOCUMENT_SERIALIZE_EXPORT_DELIMITER_OVERRIDE_CS...
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
Unit test of Export classes.
Definition: TestExport.h:16
TestExport(QObject *parent=0)
Single constructor.
Definition: TestExport.cpp:44
Affine transformation between screen and graph coordinates, based on digitized axis points...
Model for DlgSettingsMainWindow.
QList< double > ExportValuesXOrY
Model for DlgSettingsCoords and CmdSettingsCoords.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:91