Engauge Digitizer  2
NonPdf.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef NON_PDF_H
8 #define NON_PDF_H
9 
10 #include "ImportCropping.h"
11 
12 namespace Poppler {
13  class Document;
14 }
15 class QImage;
16 class QString;
17 
19 enum NonPdfReturn {
20  NON_PDF_RETURN_CANCELED,
21  NON_PDF_RETURN_FAILED,
22  NON_PDF_RETURN_SUCCESS
23 };
24 
26 class NonPdf
27 {
28 public:
30  NonPdf();
31 
33  NonPdfReturn load (const QString &fileName,
34  QImage &image,
35  ImportCropping importCropping,
36  bool isErrorReportRegressionTest) const;
37 
38 private:
39 
40  NonPdfReturn loadWithCropping (const QString &fileName,
41  QImage &image) const; // Dialog is used when not testing
42  NonPdfReturn loadWithoutCropping (const QString &fileName,
43  QImage &image) const; // No dialog is used during testing. Entire image will be loadedd
44 
45 };
46 
47 #endif // NON_PDF_H
Wrapper around the QImage class for read and importing non-PDF files.
Definition: NonPdf.h:26
Storage of one imported image and the data attached to that image.
Definition: Document.h:41