Scribus
Open source desktop publishing at your fingertips
export.h
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 _SCRIBUS_PIXMAPEXPORT_H_
8 #define _SCRIBUS_PIXMAPEXPORT_H_
9 
10 #include <QString>
11 #include <QFileDialog>
12 #include <pluginapi.h>
13 #include <loadsaveplugin.h>
14 #include <vector>
15 
16 class ScrAction;
17 
18 class PLUGIN_API PixmapExportPlugin : public ScActionPlugin
19 {
20  Q_OBJECT
21 
22  public:
23  // Standard plugin implementation
25  virtual ~PixmapExportPlugin();
26  virtual bool run(ScribusDoc* doc, QString target = QString::null);
27  virtual const QString fullTrName() const;
28  virtual const AboutData* getAboutData() const;
29  virtual void deleteAboutData(const AboutData* about) const;
30  virtual void languageChange();
32 
33  // Special features (none)
34 };
35 
36 extern "C" PLUGIN_API int scribusexportpixmap_getPluginAPIVersion();
37 extern "C" PLUGIN_API ScPlugin* scribusexportpixmap_getPlugin();
38 extern "C" PLUGIN_API void scribusexportpixmap_freePlugin(ScPlugin* plugin);
39 
40 
41 
43 class ExportBitmap: public QObject
44 {
45  Q_OBJECT
46 public:
48  ExportBitmap();
50  ~ExportBitmap();
51 
53  QString bitmapType;
55  int pageDPI;
57  double enlargement;
59  int quality;
61  QString exportDir;
63  bool overwrite;
65  QString filenamePrefix;
66 
69  bool exportCurrent(ScribusDoc* doc, bool background);
73  bool exportInterval(ScribusDoc* doc, std::vector<int> &pageNs, bool background);
74 private:
76  QString getFileName(ScribusDoc* doc, uint pageNr);
82  bool exportPage(ScribusDoc* doc, uint pageNr, bool background, bool single);
83 };
84 
85 #endif
A plug-in that performs a single action.
Definition: scplugin.h:248
~ExportBitmap()
nothing doing destructor.
Definition: export.cpp:172
Definition: export.h:18
Handles export.
Definition: export.h:43
virtual const QString fullTrName() const =0
Plug-in's human-readable, translated name.
bool exportInterval(ScribusDoc *doc, std::vector< int > &pageNs, bool background)
Exports chosen interval of the pages.
Definition: export.cpp:234
double enlargement
Enlargement of the exported image... 2x 3x etc.
Definition: export.h:57
Abstract super class for all Scribus plug-ins.
Definition: scplugin.h:90
int pageDPI
Dpi of the exported image.
Definition: export.h:55
ExportBitmap()
Initializing the default export variables and attributes.
Definition: export.cpp:157
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
virtual bool run(ScribusDoc *doc, QString target=QString::null)=0
Run the plug-in's main action.
QString bitmapType
Type of the exported image.
Definition: export.h:53
virtual void languageChange()=0
Update all user-visible text to reflect current UI language.
the Document Class
Definition: scribusdoc.h:90
QString exportDir
A place for stored images.
Definition: export.h:61
ScPlugin provides an interface to ask plugins for information about themselves.
Definition: scplugin.h:103
bool exportCurrent(ScribusDoc *doc, bool background)
Exports only the actual page.
Definition: export.cpp:229
virtual void addToMainWindowMenu(ScribusMainWindow *)
Allow plugins to add to a main menu.
Definition: export.h:31
int quality
Quality of the image <0; 100>
Definition: export.h:59
Definition: scraction.h:33
QString filenamePrefix
Prefix for filenames.
Definition: export.h:65
bool overwrite
Overwrite the existing files?
Definition: export.h:63
virtual const AboutData * getAboutData() const =0
Return descriptive information about the plug-in.