Scribus
Open source desktop publishing at your fingertips
api_printer.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 API_PRINTER_H_
8 #define API_PRINTER_H_
9 
10 #include <QObject>
11 #include <QtDebug>
12 #include <QApplication>
13 
14 #include "scripterimpl.h"
15 
16 class PrinterAPI : public QObject
17 {
18  Q_OBJECT
19  Q_PROPERTY(QString printer READ getPrinter WRITE setPrinter)
20  Q_PROPERTY(QString file READ getFile WRITE setFile)
21  Q_PROPERTY(QString cmd READ getCmd WRITE setCmd)
22  Q_PROPERTY(QString separation READ getSeparation WRITE setSeparation)
23  Q_PROPERTY(QList<QVariant> pages READ getPages WRITE setPages)
24  Q_PROPERTY(bool color READ isColor WRITE setColor)
25  Q_PROPERTY(bool useICC READ getUseICC WRITE setUseICC)
26  Q_PROPERTY(int psLevel READ getPsLevel WRITE setPsLevel)
27  Q_PROPERTY(bool mph READ getMph WRITE setMph)
28  Q_PROPERTY(bool mpv READ getMpv WRITE setMpv)
29  Q_PROPERTY(bool ucr READ getUcr WRITE setUcr)
30 public:
31  PrinterAPI();
32  virtual ~PrinterAPI();
33 
34 public slots:
35  void doPrint();
36  QList<QVariant> allPrinters();
37 
38 private:
39  QString getPrinter();
40  void setPrinter(QString name);
41 
42  QString getFile();
43  void setFile(QString name);
44 
45  QString getCmd();
46  void setCmd(QString name);
47 
48  QString getSeparation();
49  void setSeparation(QString name);
50 
51  QList<QVariant> getPages();
52  void setPages(QList<QVariant> list);
53 
54  bool isColor();
55  void setColor(bool value);
56 
57  bool getUseICC();
58  void setUseICC(bool value);
59 
60  int getPsLevel();
61  void setPsLevel(int value);
62 
63  bool getMph();
64  void setMph(bool value);
65 
66  bool getMpv();
67  void setMpv(bool value);
68 
69  bool getUcr();
70  void setUcr(bool value);
71 
72  QString printer;
73  QString file;
74  QString cmd;
75  QList<int> pages;
76  int copies;
77  QString separation;
78  bool color;
79  bool useICC;
80  int pslevel;
81  bool mph;
82  bool mpv;
83  bool ucr;
84 };
85 
86 #endif /*API_PRINTER_H_*/
Definition: api_printer.h:16