Subversion Repositories Scribus

Rev

Rev 22635 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19249 fschmid 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
7
#ifndef IMPORTCDR_H
8
#define IMPORTCDR_H
9
 
10
#include <QObject>
11
#include <QString>
12
 
13
#include "pluginapi.h"
14
#include "pageitem.h"
15
#include "sccolor.h"
16
#include "fpointarray.h"
17
#include "vgradient.h"
18
#include <QList>
19
#include <QTransform>
20
#include <QMultiMap>
21
#include <QVector>
22
 
23
class MultiProgressDialog;
24
class ScribusDoc;
25
class Selection;
26
class TransactionSettings;
27
 
28
//! \brief CDR importer plugin
29
class CdrPlug : public QObject
30
{
31
        Q_OBJECT
32
 
33
public:
34
        /*!
35
        \author Franz Schmid
36
        \date
37
        \brief Create the Cdr importer window.
38
        \param fName QString
39
        \param flags combination of loadFlags
40
        \param showProgress if progress must be displayed
41
        \retval EPSPlug plugin
42
        */
43
        CdrPlug( ScribusDoc* doc, int flags );
44
        ~CdrPlug();
45
 
46
        /*!
47
        \author Franz Schmid
48
        \date
49
        \brief Perform import.
50
        \param fn QString
51
        \param trSettings undo transaction settings
52
        \param flags combination of loadFlags
53
        \param showProgress if progress must be displayed
54
        \retval bool true if import was ok
55
         */
22635 craig 56
        bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
22609 craig 57
        QImage readThumbnail(const QString& fn);
19249 fschmid 58
 
59
private:
22609 craig 60
        bool convert(const QString& fn);
19249 fschmid 61
 
24744 jghali 62
        double baseX { 0.0 };
63
        double baseY { 0.0 };
64
        double docWidth { 1.0 };
65
        double docHeight { 1.0 };
66
 
19249 fschmid 67
        QList<PageItem*> Elements;
68
        QStringList importedColors;
69
        QStringList importedPatterns;
70
 
24744 jghali 71
        bool interactive { false };
72
        bool cancel { false };
73
        int  importerFlags { 0 };
19249 fschmid 74
 
24744 jghali 75
        MultiProgressDialog* progressDialog { nullptr };
76
        ScribusDoc* m_Doc { nullptr };
77
        Selection* tmpSel { nullptr };
78
 
19249 fschmid 79
public slots:
80
        void cancelRequested() { cancel = true; }
81
};
82
 
83
#endif