Back to index

scribus-ng  1.3.4.dfsg+svn20071115
export.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef _SCRIBUS_PIXMAPEXPORT_H_
00008 #define _SCRIBUS_PIXMAPEXPORT_H_
00009 
00010 #include <qstring.h>
00011 #include <qfiledialog.h>
00012 #include <pluginapi.h>
00013 #include <loadsaveplugin.h>
00014 #include <vector>
00015 
00016 class ScrAction;
00017 
00018 class PLUGIN_API PixmapExportPlugin : public ScActionPlugin
00019 {
00020        Q_OBJECT
00021 
00022        public:
00023               // Standard plugin implementation
00024               PixmapExportPlugin();
00025               virtual ~PixmapExportPlugin();
00026               virtual bool run(ScribusDoc* doc, QString target = QString::null);
00027               virtual const QString fullTrName() const;
00028               virtual const AboutData* getAboutData() const;
00029               virtual void deleteAboutData(const AboutData* about) const;
00030               virtual void languageChange();
00031               virtual void addToMainWindowMenu(ScribusMainWindow *) {};
00032 
00033               // Special features (none)
00034 };
00035 
00036 extern "C" PLUGIN_API int scribusexportpixmap_getPluginAPIVersion();
00037 extern "C" PLUGIN_API ScPlugin* scribusexportpixmap_getPlugin();
00038 extern "C" PLUGIN_API void scribusexportpixmap_freePlugin(ScPlugin* plugin);
00039 
00040 
00041 
00043 class ExportBitmap: public QObject
00044 {
00045        Q_OBJECT
00046 public:
00048        ExportBitmap();
00050        ~ExportBitmap();
00051 
00053        QString bitmapType;
00055        int pageDPI;
00057        double enlargement;
00059        int quality;
00061        QString exportDir;
00063        bool overwrite;
00064 
00067        bool exportCurrent(ScribusDoc* doc);
00071        bool exportInterval(ScribusDoc* doc, std::vector<int> &pageNs);
00072 private:
00074        QString getFileName(ScribusDoc* doc, uint pageNr);
00080        bool exportPage(ScribusDoc* doc, uint pageNr, bool single);
00081 };
00082 
00083 //whats this for?ScrAction *fileNewFromTemplateAction;
00084 
00085 #endif