Scribus
Open source desktop publishing at your fingertips
preview.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 PRVIEW_H
8 #define PRVIEW_H
9 
10 #include <QDialog>
11 #include <QCheckBox>
12 #include <QMap>
13 
14 class QHBoxLayout;
15 class QVBoxLayout;
16 class QGroupBox;
17 class QTableWidget;
18 class QScrollArea;
19 class QLabel;
20 class QPushButton;
21 class QComboBox;
22 #include "ui/scrspinbox.h"
23 #include "scribusapi.h"
24 #include "scribusstructs.h"
25 
26 class PageSelector;
27 class ScribusDoc;
28 class ScribusView;
29 class ScImage;
30 class ScColor;
31 class PrefsManager;
32 // enum PrintEngine;
33 
34 
35 
37 class SCRIBUS_API PPreview : public QDialog
38 {
39  Q_OBJECT
40 
41 public:
51  PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, QString printer, PrintEngine engine );
52  ~PPreview() {};
60  int RenderPreview(int Seite, int Res);
61  int RenderPreviewSep(int Seite, int Res);
62  void blendImages(QImage &target, ScImage &source, ScColor col);
63  void blendImagesSumUp(QImage &target, ScImage &scsource);
64  static bool usePostscriptPreview(QString printerName, PrintEngine engine);
72  QPixmap CreatePreview(int Seite, int Res);
73  PageSelector *PGSel;
74  QCheckBox* AntiAlias;
75  QCheckBox* AliasTr;
76  QCheckBox* EnableCMYK;
77  QCheckBox* EnableCMYK_C;
78  QCheckBox* EnableCMYK_M;
79  QCheckBox* EnableCMYK_Y;
80  QCheckBox* EnableCMYK_K;
81  QCheckBox* EnableGCR;
82  QCheckBox* MirrorHor;
83  QCheckBox* MirrorVert;
84  QCheckBox* ClipMarg;
85  QCheckBox* spotColors;
86  QCheckBox* useGray;
87  QCheckBox* EnableInkCover;
88  ScrSpinBox* CoverThresholdValue;
89  QLabel* ThresLabel;
90  QScrollArea* Anzeige;
91  QLabel* Anz;
92  QGroupBox* devTitle;
93  QGroupBox* jobTitle;
94  QPushButton *closeButton;
95  QPushButton *printButton;
97  QLabel* scaleLabel;
98  QComboBox* scaleBox;
99  ScribusView *view;
100  ScribusDoc *doc;
101  bool HavePngAlpha;
102  bool HaveTiffSep;
103  int APage;
104  int MPage;
105  int SMode;
106  int GsMajor;
107  int GsMinor;
108  int inkMax;
109  bool CMode;
110  bool GsAl;
111  bool Trans;
112  bool GMode;
113  bool mHor;
114  bool mVer;
115  bool fClip;
116  bool fSpot;
117  bool fGray;
118  bool postscriptPreview;
119  QMap<QString, int> sepsToFileNum;
120  QMap<QString, QCheckBox*> flagsVisible;
121  QTableWidget* Table;
122 
123 public slots:
129  void ToSeite(int num);
134  void redisplay();
139  void ToggleCMYK();
144  void ToggleCMYK_Colour();
145  void doSpotTable(int row);
146  void toggleAllfromHeader();
153  void scaleBox_valueChanged(int value);
154 
155 signals:
156  void doPrint();
157 
158 protected:
160  double scaleFactor;
161  QVBoxLayout* PLayout;
162  QVBoxLayout* Layout1;
163  QVBoxLayout* Layout2;
164  QHBoxLayout* Layout5;
165  QHBoxLayout* Layout6;
166  QHBoxLayout* Layout7;
167  QVBoxLayout* settingsBarLayout;
168  PrefsManager *prefsManager;
169 
170  void setValues();
171  void getUserSelection(int);
172  void imageLoadError(QPixmap &, int);
173 
175  void resizeEvent(QResizeEvent * event);
176 
177 };
178 
179 #endif
Definition: sccolor.h:51
double scaleFactor
Percentage value of the scaling widget.
Definition: preview.h:160
QLabel * scaleLabel
Definition: preview.h:97
Definition: scimage.h:36
the Document Class
Definition: scribusdoc.h:90
Definition: pageselector.h:24
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3.
Definition: scrspinbox.h:21
Print Preview dialog.
Definition: preview.h:37
Definition: scribusview.h:87
Manage Scribus preferences here, and here alone Start to move the preferences out of scribus...
Definition: prefsmanager.h:43