home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / preview.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-02-06  |  4.0 KB  |  182 lines

  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. class QSpinBox;
  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.  
  36. //! \brief Print Preview dialog
  37. class SCRIBUS_API PPreview : public QDialog
  38. {
  39.     Q_OBJECT
  40.  
  41. public:
  42.     /*!
  43.     \author Franz Schmid
  44.     \brief Create the Print Preview window
  45.     \param parent QWidget *
  46.     \param vin ScribusView *
  47.     \param docu ScribusDoc *
  48.     \param printer a name of the printer
  49.     \param engine a printer engine
  50.     */
  51.     PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, QString printer, PrintEngine engine );
  52.     ~PPreview() {};
  53.     /*!
  54.     \author Franz Schmid
  55.     \brief Renders the Preview to a file on Disk
  56.     \param Seite int page number
  57.     \param Res int
  58.     \retval int Flag indicating error
  59.     */
  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);
  65.     /*!
  66.     \author Franz Schmid
  67.     \brief Creates the Preview of the Actual Page
  68.     \param Seite int page number
  69.     \param Res int
  70.     \retval Bild QPixmap print preview
  71.     */
  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* UseICC;
  88.     QCheckBox* EnableInkCover;
  89.     QSpinBox* CoverThresholdValue;
  90.     QLabel* ThresLabel;
  91.     QScrollArea* Anzeige;
  92.     QLabel* Anz;
  93.     QGroupBox* devTitle;
  94.     QGroupBox* jobTitle;
  95.     QPushButton *closeButton;
  96.     QPushButton *printButton;
  97.     /*! scaling GUI */
  98.     QLabel* scaleLabel;
  99.     QComboBox* scaleBox;
  100.     ScribusView *view;
  101.     ScribusDoc *doc;
  102.     bool HavePngAlpha;
  103.     bool HaveTiffSep;
  104.     int APage;
  105.     int MPage;
  106.     int SMode;
  107.     int GsMajor;
  108.     int GsMinor;
  109.     int inkMax;
  110.     bool CMode;
  111.     bool GsAl;
  112.     bool Trans;
  113.     bool GMode;
  114.     bool mHor;
  115.     bool mVer;
  116.     bool fClip;
  117.     bool fSpot;
  118.     bool fGray;
  119.     bool fICC;
  120.     bool postscriptPreview;
  121.     QMap<QString, int> sepsToFileNum;
  122.     QMap<QString, QCheckBox*> flagsVisible;
  123.     QTableWidget* Table;
  124.  
  125. public slots:
  126.     /*!
  127.     \author Franz Schmid
  128.     \brief Jump to newly selected page and create the new preview
  129.     \param num int Page Number
  130.     */
  131.     void ToSeite(int num);
  132.     /*!
  133.     \author Franz Schmid
  134.     \brief Create the new preview
  135.     */
  136.     void redisplay();
  137.     /*!
  138.     \author Craig Bradney
  139.     \brief When CMYK preview is toggled, (dis)enable the CMYK controls and create the new preview
  140.     */
  141.     void ToggleCMYK();
  142.     /*!
  143.     \author Craig Bradney
  144.     \brief If CMYK preview is enabled, create a new preview with the new CMYK plate settings
  145.     */
  146.     void ToggleCMYK_Colour();
  147.     void doSpotTable(int row);
  148.     void toggleAllfromHeader();
  149.     /*!
  150.     \author Petr Vanek
  151.     \date 09/03/2005
  152.     \brief Recompute scaling factor of the preview image
  153.     \param value spinbox value from signal
  154.     */
  155.     void scaleBox_valueChanged(int value);
  156.  
  157. signals:
  158.     void doPrint();
  159.  
  160. protected:
  161.     /*! \brief Percentage value of the scaling widget */
  162.     double scaleFactor;
  163.     QVBoxLayout* PLayout;
  164.     QVBoxLayout* Layout1;
  165.     QVBoxLayout* Layout2;
  166.     QHBoxLayout* Layout5;
  167.     QHBoxLayout* Layout6;
  168.     QHBoxLayout* Layout7;
  169.     QVBoxLayout* settingsBarLayout;
  170.     PrefsManager *prefsManager;
  171.  
  172.     void setValues();
  173.     void getUserSelection(int);
  174.     void imageLoadError(QPixmap &, int);
  175.  
  176.     //! \brief repaint sample on the dialog change
  177.     void resizeEvent(QResizeEvent * event);
  178.  
  179. };
  180.  
  181. #endif
  182.