Engauge Digitizer  2
TestExport.h
1 #ifndef TEST_EXPORT_H
2 #define TEST_EXPORT_H
3 
4 #include "DocumentModelCoords.h"
5 #include "DocumentModelExportFormat.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 
15 class TestExport : public QObject
16 {
17  Q_OBJECT
18 public:
20  explicit TestExport(QObject *parent = 0);
21 
22 signals:
23 
24 private slots:
25  void cleanupTestCase ();
26  void initTestCase ();
27 
28  // For Switzerland cases below we are testing for case when comma is used,
29  // but on some computers that locale will use period instead so we handle
30  // both cases (to prevent false alarms)
31  void testCommasInFunctionsForCommasSwitzerland ();
32  void testCommasInFunctionsForCommasUnitedStates ();
33  void testCommasInFunctionsForTabsSwitzerland ();
34  void testCommasInFunctionsForTabsUnitedStates ();
35  void testCommasInRelationsForCommasSwitzerland ();
36  void testCommasInRelationsForCommasUnitedStates ();
37  void testCommasInRelationsForTabsSwitzerland ();
38  void testCommasInRelationsForTabsUnitedStates ();
39  void testLogExtrapolationFunctionsAll ();
40 
41 private:
42  bool checkCommasInFunctionsForDelimiter (ExportDelimiter delimiter,
43  QLocale::Country country,
44  QString &output);
45  bool checkCommasInRelationsForDelimiter (ExportDelimiter delimiter,
46  QLocale::Country country,
47  QString &output);
48  void initData (bool isLog,
49  ExportDelimiter delimiter,
50  QLocale::Country country);
51 
52  Document *m_document;
53  DocumentModelCoords m_modelCoords;
54  DocumentModelExportFormat m_modelExportOverride;
55  DocumentModelGeneral m_modelGeneral;
56  MainWindowModel m_modelMainWindow;
57  Transformation m_transformation;
58  ExportValuesXOrY m_xThetaValues;
59  QStringList m_curvesIncluded;
60 };
61 
62 #endif // TEST_EXPORT_H
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
Unit test of Export classes.
Definition: TestExport.h:15
TestExport(QObject *parent=0)
Single constructor.
Definition: TestExport.cpp:26
Affine transformation between screen and graph coordinates, based on digitized axis points...
Model for DlgSettingsMainWindow.
Model for DlgSettingsCoords and CmdSettingsCoords.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41