Back to index

scribus-ng  1.3.4.dfsg+svn20071115
tabpdfoptions.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 TABPDF_OPTS_H
00008 #define TABPDF_OPTS_H
00009 
00010 #include <qtabwidget.h>
00011 #include <qwidget.h>
00012 #include <qlayout.h>
00013 #include <qtooltip.h>
00014 #include <qlistbox.h>
00015 #include <qmap.h>
00016 #include <qvaluelist.h>
00017 #include <qbuttongroup.h>
00018 #include <qgroupbox.h>
00019 #include <qcheckbox.h>
00020 #include <qcombobox.h>
00021 #include <qradiobutton.h>
00022 #include <qspinbox.h>
00023 #include <qtabwidget.h>
00024 #include <qwidget.h>
00025 #include <qpushbutton.h>
00026 #include <qtoolbutton.h>
00027 #include <qlineedit.h>
00028 #include <qlabel.h>
00029 
00030 #include "scribusapi.h"
00031 #include "bookmwin.h"
00032 #include "mspinbox.h"
00033 
00034 class PDFOptions;
00035 class PDFExportDialog;
00036 class ScribusDoc;
00037 
00038 class SCRIBUS_API TabPDFOptions : public QTabWidget
00039 {
00040        Q_OBJECT
00041 
00042 public:
00043        TabPDFOptions(  QWidget* parent, PDFOptions & Optionen,
00044                        const SCFonts &AllFonts,
00045                        const ProfilesL & PDFXProfiles,
00046                        const QMap<QString, int> & DocFonts,
00047                        const QValueList<PDFPresentationData> & Eff,
00048                        int unitIndex, double PageH, double PageB,
00049                        ScribusDoc *mdoc = 0, bool exporting = false);
00050        ~TabPDFOptions() {};
00051        void restoreDefaults(PDFOptions & Optionen,
00052                                            const SCFonts &AllFonts,
00053                                            const ProfilesL & PDFXProfiles,
00054                                            const QMap<QString, int> & DocFonts,
00055                                            const QValueList<PDFPresentationData> & Eff,
00056                                            int unitIndex, double PageH, double PageB,
00057                                            ScribusDoc *mdoc, bool exporting);
00058 
00059        void unitChange(QString unit, int docUnitIndex, int decimals, double invUnitConversion);
00060 
00061        // GUI member pointers
00062        // Remember to initialize these in the initializer list of the ctor when
00063        // you add new ones. Add them in the same order here and in the initalizer
00064        // list. To help out, the members are sorted alphabetically by name.
00065        QCheckBox* AddSec;
00066        QCheckBox* Article;
00067        MSpinBox* BleedBottom;
00068        MSpinBox* BleedLeft;
00069        MSpinBox* BleedRight;
00070        MSpinBox* BleedTop;
00071        QCheckBox* CheckBM;
00072        QCheckBox* CheckBox1;
00073        QComboBox* CMethod;
00074        QCheckBox* ClipMarg;
00075        QComboBox* ComboBind;
00076        QCheckBox* Compression;
00077        QRadioButton* continuousPages;
00078        QCheckBox* CopySec;
00079        QComboBox* CQuality;
00080        QRadioButton* doublePageLeft;
00081        QRadioButton* doublePageRight;
00082        QCheckBox* DSColor;
00083        QCheckBox* EmbedProfs;
00084        QCheckBox* EmbedProfs2;
00085        QCheckBox* Encry;
00086        QComboBox* ImageP;
00087        QComboBox* IntendI;
00088        QComboBox* IntendS;
00089        QToolButton* MirrorH;
00090        QToolButton* MirrorV;
00091        QCheckBox* ModifySec;
00092        QCheckBox* NoEmbedded;
00093        QComboBox* OutCombo;
00094        QListBox* Pages;
00095        QLineEdit* PassOwner;
00096        QLineEdit* PassUser;
00097        QComboBox* PDFVersionCombo;
00098        QComboBox* PrintProfC;
00099        QCheckBox* PrintSec;
00100        QSpinBox* Resolution;
00101        QComboBox* RotateDeg;
00102        QRadioButton* singlePage;
00103        QComboBox* SolidPr;
00104        QRadioButton* useBookmarks;
00105        QRadioButton* useFullScreen;
00106        QCheckBox* useLayers;
00107        QRadioButton* useLayers2;
00108        QCheckBox* UseLPI;
00109        QCheckBox* useSpot;
00110        QCheckBox* overprintMode;
00111        QRadioButton* useThumbnails;
00112        QSpinBox* ValC;
00113        // End GUI member pointers
00114 
00115 signals:
00116        void noInfo();
00117        void hasInfo();
00118 
00119 public slots:
00120        void doDocBleeds();
00121        void ToggleEncr();
00122        void EnablePDFX(int a);
00123        void DoDownsample();
00124        void RemoveEmbed();
00125        void PutToEmbed();
00126        void RemoveOutline();
00127        void PutToOutline();
00128        void SelAFont(QListBoxItem*);
00129        void SelEFont(QListBoxItem*);
00130        void SelSFont(QListBoxItem*);
00131        void EmbedAll();
00132        void OutlineAll();
00133        void PagePr();
00134        void SetPgEff(int nr);
00135        void SetEffOpts(int nr);
00136        void ValidDI(int nr);
00137        void PDFMirror();
00138        void Rotation(int value);
00139        void DoEffects();
00140        void EffectOnAll();
00141        void SelRange(bool e);
00142        void EnablePr(int a);
00143        void EnablePG();
00144        void EnablePGI();
00145        void EnablePGI2();
00146        void EnableLPI(int a);
00147        void EnableLPI2();
00148        void SelLPIcol(int);
00149        void enableCMS(bool enable);
00150        void checkInfo();
00151 
00152 protected slots:
00153        void createPageNumberRange();
00154 
00155 protected:
00156        // PDFExportDialog should really privately inherit from us, but it can't
00157        // since it needs to be a dialog not a tab widget. Allow it access to
00158        // protected and private members instead. If we ever clean up the direct
00159        // widget access in this class, it might be able to privately inheirit and
00160        // be added to a very thin dialog class instead.
00161        friend class PDFExportDialog;
00162        int PgSel;
00163        QValueList<PDFPresentationData> EffVal;
00164        QString SelLPIcolor;
00165        QValueList<QString> FontsToEmbed;
00166        QValueList<QString> FontsToOutline;
00167 
00168        // PDFExportDialog needs access to these GUI members
00169        // but they don't need to be exposed to the rest of Scribus.
00170        QComboBox* actionCombo;
00171        QRadioButton* AllPages;
00172        QCheckBox* CheckBox10;
00173        QComboBox* EDirection;
00174        QComboBox* EDirection_2;
00175        QComboBox* EDirection_2_2;
00176        QSpinBox* EffectTime;
00177        QComboBox* EffectType;
00178        QCheckBox* fitWindow;
00179        QCheckBox* hideMenuBar;
00180        QCheckBox* hideToolBar;
00181        QLineEdit* InfoString;
00182        QSpinBox* LPIangle;
00183        QSpinBox* LPIfreq;
00184        QComboBox* LPIfunc;
00185        QLineEdit* PageNr;
00186        QSpinBox* PageTime;
00187 
00188 private:
00189        // Private GUI member pointers, should not be used outside the class its
00190        // self.  Please ry to keep members here genuinely private, ie don't use
00191        // them even from friends. If you need to access it from a friend like
00192        // PDFExportDialog please move it to the protected section.
00193 
00194        QLabel* actionLabel;
00195        QListBox* AvailFlist;
00196        QGroupBox* BleedGroup;
00197        QGridLayout* BleedGroupLayout;
00198        QGroupBox* MarkGroup;
00199        QGridLayout* MarkGroupLayout;
00200        QCheckBox* cropMarks;
00201        QCheckBox* bleedMarks;
00202        QCheckBox* registrationMarks;
00203        QCheckBox* colorMarks;
00204        QCheckBox* docInfoMarks;
00205        MSpinBox* markOffset;
00206        QGroupBox* CBox;
00207        QGridLayout* CBoxLayout;
00208        QGroupBox* ColorGroup;
00209        QHBoxLayout* ColorGroupLayout;
00210        QLabel* ColorText1;
00211        QGroupBox* Effects;
00212        QGridLayout* EffectsLayout;
00213        QPushButton* EmbedFonts;
00214        QListBox* EmbedList;
00215        QPushButton* EonAllPg;
00216        QPushButton* FromEmbed;
00217        QPushButton* FromOutline;
00218        QGroupBox* GroupBox1;
00219        QGridLayout* GroupBox1Layout;
00220        QGridLayout* GroupBox2Layout;
00221        QGroupBox* GroupBox9;
00222        QGridLayout* GroupBox9Layout;
00223        QGroupBox* groupDisplay;
00224        QVBoxLayout* groupDisplayLayout;
00225        QGroupBox* GroupFont;
00226        QHBoxLayout* GroupFontLayout;
00227        QGroupBox* groupJava;
00228        QHBoxLayout* groupJavaLayout;
00229        QButtonGroup* groupNavigation;
00230        QVBoxLayout* groupNavigationLayout;
00231        QGroupBox* GroupPass;
00232        QGridLayout* GroupPassLayout;
00233        QGroupBox* GroupSecSet;
00234        QVBoxLayout* GroupSecSetLayout;
00235        QGridLayout* Layout11;
00236        QHBoxLayout *pageNumberSelectorLayout;
00237        QGridLayout* Layout11a;
00238        QHBoxLayout* Layout13;
00239        QHBoxLayout* Layout2;
00240        QVBoxLayout* Layout3;
00241        QVBoxLayout* Layout4_2;
00242        QVBoxLayout* Layout5_2;
00243        QHBoxLayout* Layout5_2a;
00244        QVBoxLayout* Layout6;
00245        QHBoxLayout* LayoutSpecial;
00246        QComboBox* LPIcolor;
00247        QGroupBox* LPIgroup;
00248        QGridLayout* LPIgroupLayout;
00249        QRadioButton* OnlySome;
00250        QButtonGroup* pageLayout;
00251        QVBoxLayout* pageLayoutLayout;
00252        QCheckBox* PagePrev;
00253        QLabel* PDFX1;
00254        QLabel* PDFX2;
00255        QCheckBox* PrintSec2;
00256        QGroupBox* ProfsGroup;
00257        QGridLayout* ProfsGroupLayout;
00258        QLabel* ProfsTxt1;
00259        QLabel* ProfsTxt2;
00260        QLabel* ProfsTxt3;
00261        QLabel* ProfsTxt4;
00262        QLabel* BleedTxt1;
00263        QLabel* BleedTxt2;
00264        QLabel* BleedTxt3;
00265        QLabel* BleedTxt4;
00266        QLabel* MarkTxt1;
00267        QCheckBox *docBleeds;
00268        QButtonGroup* RangeGroup;
00269        QVBoxLayout* RangeGroupLayout;
00270        QHBoxLayout* RotationLayout;
00271        QPushButton* OutlineFonts;
00272        QListBox* OutlineList;
00273        QWidget* tabColor;
00274        QVBoxLayout* tabColorLayout;
00275        QWidget* tabFonts;
00276        QWidget* tabGeneral;
00277        QVBoxLayout* tabLayout;
00278        QVBoxLayout* tabLayout_3;
00279        QGridLayout* tabLayout_5;
00280        QGridLayout* tabOptionsGridLayout;
00281        QWidget* tabPDFX;
00282        QVBoxLayout* tabPDFXLayout;
00283        QWidget* tabPresentation;
00284        QWidget* tabSecurity;
00285        QVBoxLayout* tabSecurityLayout;
00286        QWidget* tabSpecial;
00287        QVBoxLayout* tabSpecialLayout;
00288        QLabel* TextCom1;
00289        QLabel* TextCom2;
00290        QLabel* TextFont1;
00291        QLabel* TextFont1_2;
00292        QLabel* TextFont1_2a;
00293        QLabel* TextLabel1;
00294        QLabel* TextLabel1e;
00295        QLabel* TextLabel1x;
00296        QLabel* TextLabel2;
00297        QLabel* TextLabel2e;
00298        QLabel* TextLabel3;
00299        QLabel* TextLabel3e;
00300        QLabel* TextLabel4e;
00301        QLabel* TextLabel5e;
00302        QLabel* TextLabel6e;
00303        QLabel* textLPI1;
00304        QLabel* textLPI2;
00305        QLabel* textLPI3;
00306        QLabel* TextSec1;
00307        QLabel* TextSec2;
00308        QPushButton* pageNrButton;
00309        QPushButton* ToEmbed;
00310        QPushButton* ToOutline;
00311        QRadioButton* useViewDefault;
00312        QGroupBox* X3Group;
00313        QGridLayout* X3GroupLayout;
00314        // end protected GUI member pointers
00315 
00316        // Non-GUI protected members
00317        QString unit;
00318        int precision;
00319        double unitRatio;
00320        bool pdfExport;
00321        ScribusDoc* const doc;
00322        const SCFonts & AllFonts;
00323        PDFOptions & Opts;
00324        double pageH;
00325        double pageB;
00326        bool cms;
00327        QMap<QString, QString> AnnotationFonts;
00328 
00329 };
00330 #endif