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 IMPORTXARPLUGIN_H 8 #define IMPORTXARPLUGIN_H 9 10 #include "pluginapi.h" 11 #include "loadsaveplugin.h" 12 #include "../../formatidlist.h" 13 14 class ScrAction; 15 16 class PLUGIN_API ImportXarPlugin : public LoadSavePlugin 17 { 18 Q_OBJECT 19 20 public: 21 // Standard plugin implementation 22 ImportXarPlugin(); 23 virtual ~ImportXarPlugin(); 24 /*! 25 \author Franz Schmid 26 \date 27 \brief Returns name of plugin 28 \retval QString containing name of plugin: Import EPS/PDF/PS... 29 */ 30 QString fullTrName() const override; 31 const AboutData* getAboutData() const override; 32 void deleteAboutData(const AboutData* about) const override; 33 void languageChange() override; 34 bool fileSupported(QIODevice* file, const QString & fileName=QString()) const override; 35 bool loadFile(const QString & fileName, const FileFormat & fmt, int flags, int index = 0) override; 36 QImage readThumbnail(const QString& fileName) override; 37 bool readColors(const QString& fileName, ColorList & colors) override; addToMainWindowMenu(ScribusMainWindow *)38 void addToMainWindowMenu(ScribusMainWindow *) override {}; 39 40 public slots: 41 /*! 42 \author Franz Schmid 43 \date 44 \brief Run the EPS import 45 \param fileName input filename, or QString() to prompt. 46 \retval bool always true 47 */ 48 virtual bool import(QString fileName = QString(), int flags = lfUseCurrentPage|lfInteractive); 49 50 private: 51 void registerFormats(); 52 ScrAction* importAction; 53 }; 54 55 extern "C" PLUGIN_API int importxar_getPluginAPIVersion(); 56 extern "C" PLUGIN_API ScPlugin* importxar_getPlugin(); 57 extern "C" PLUGIN_API void importxar_freePlugin(ScPlugin* plugin); 58 59 #endif 60