Rev 22609 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
18712 | 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 IMPORTVSD_H |
||
8 | #define IMPORTVSD_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 | |||
19235 | fschmid | 28 | //! \brief VSD importer plugin |
18712 | fschmid | 29 | class VsdPlug : public QObject |
30 | { |
||
31 | Q_OBJECT |
||
32 | |||
33 | public: |
||
34 | /*! |
||
35 | \author Franz Schmid |
||
36 | \date |
||
19235 | fschmid | 37 | \brief Create the VSD importer window. |
18712 | fschmid | 38 | \param fName QString |
39 | \param flags combination of loadFlags |
||
40 | \param showProgress if progress must be displayed |
||
41 | \retval EPSPlug plugin |
||
42 | */ |
||
43 | VsdPlug( ScribusDoc* doc, int flags ); |
||
44 | ~VsdPlug(); |
||
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); |
18712 | fschmid | 58 | |
59 | private: |
||
22609 | craig | 60 | bool convert(const QString& fn); |
18712 | fschmid | 61 | |
62 | QList<PageItem*> Elements; |
||
63 | double baseX, baseY; |
||
64 | double docWidth; |
||
65 | double docHeight; |
||
66 | |||
67 | QStringList importedColors; |
||
68 | QStringList importedPatterns; |
||
69 | |||
70 | bool interactive; |
||
71 | MultiProgressDialog * progressDialog; |
||
72 | bool cancel; |
||
73 | ScribusDoc* m_Doc; |
||
74 | Selection* tmpSel; |
||
75 | int importerFlags; |
||
76 | |||
77 | public slots: |
||
78 | void cancelRequested() { cancel = true; } |
||
79 | }; |
||
80 | |||
81 | #endif |