Subversion Repositories Scribus

Rev

Rev 3207 | Rev 3389 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1641 cbradney 1
#ifndef PREFS_H
2
#define PREFS_H
3
 
4
#include <qdialog.h>
5
#include <qbuttongroup.h>
6
#include <qcombobox.h>
7
#include <qgroupbox.h>
8
#include <qlabel.h>
9
#include <qpushbutton.h>
10
#include <qradiobutton.h>
11
#include <qspinbox.h>
12
#include <qwidget.h>
13
#include <qlayout.h>
14
#include <qtoolbutton.h>
15
#include <qframe.h>
16
#include <qcheckbox.h>
17
#include <qwidgetstack.h>
18
#include <qpixmap.h>
19
#include <qslider.h>
20
#include <qlineedit.h>
21
#include <qfiledialog.h>
22
 
23
class QListView;
24
 
2969 craig 25
#include "scribusapi.h"
1641 cbradney 26
#include "scribusstructs.h"
27
 
28
#include "mspinbox.h"
29
#include "scribus.h"
30
#include "prefsdialogbase.h"
31
class TabTypograpy;
32
class HySettings;
33
class CMSPrefs;
34
class KeyManager;
35
class TabGuides;
36
class TabTools;
37
class TabCheckDoc;
38
class TabPDFOptions;
39
class FontPrefs;
40
class DocumentItemAttributes;
1701 cbradney 41
class TOCIndexPrefs;
2769 fschmid 42
class MarginWidget;
2834 cbradney 43
class PrefsManager;
2901 fschmid 44
class PageLayouts;
1641 cbradney 45
 
46
#include "langmgr.h"
47
 
2969 craig 48
class SCRIBUS_API Preferences : public PrefsDialogBase
1641 cbradney 49
{
50
        Q_OBJECT
51
 
52
public:
2834 cbradney 53
        Preferences( QWidget* parent);
1641 cbradney 54
        ~Preferences();
2873 cbradney 55
        void drawRuler();
56
        void updatePreferences();
1641 cbradney 57
 
58
        QString prefsPageSizeName;
59
        //const QString getSelectedGUILang( void );
60
        QString selectedGUILang;
61
 
2873 cbradney 62
 
1641 cbradney 63
        QWidget* tab;
64
        QLabel* TextLabel1_2;
65
        QSpinBox* SpinBox3;
66
        QSpinBox* Recen;
67
        QButtonGroup* ButtonGroup1;
68
        QLabel* guiLangLabel;
69
        QLabel* TextGstil;
70
        QLabel* TextGstil2;
71
        QSpinBox* GFsize;
72
        QComboBox* guiLangCombo;
73
        QComboBox* GUICombo;
74
        QComboBox* UnitCombo;
75
        QLabel* unitComboText;
76
        QGroupBox* GroupBox200;
77
        QLabel* PfadText;
78
        QLineEdit* Docs;
79
        QToolButton* FileC;
80
        QLabel* PfadText2;
81
        QLineEdit* ProPfad;
82
        QToolButton* FileC2;
83
        QLabel* PfadText3;
84
        QLineEdit* ScriptPfad;
85
        QToolButton* FileC3;
86
        QLabel* PfadText4;
2093 cbradney 87
        QLineEdit* DocumentTemplateDir;
1641 cbradney 88
        QToolButton* FileC4;
89
 
90
        TabGuides* tabGuides;
91
 
92
        QLabel* TextLabel4c;
93
 
94
        TabTypograpy* tabTypo;
95
 
96
        QWidget* tabView;
97
        QButtonGroup* pageBackground;
98
        QLabel* textLabel9;
99
        QCheckBox* checkLink;
100
        QCheckBox* checkFrame;
101
        QCheckBox* checkPictures;
2353 fschmid 102
        QCheckBox* checkControl;
2863 fschmid 103
        QCheckBox* checkRuler;
1641 cbradney 104
        QPushButton* backColor;
105
        QCheckBox* checkUnprintable;
106
        QGroupBox* groupScratch;
107
        MSpinBox* topScratch;
108
        MSpinBox* bottomScratch;
109
        MSpinBox* leftScratch;
110
        MSpinBox* rightScratch;
111
        QLabel* TextLabel7s;
112
        QLabel* TextLabel5s;
113
        QLabel* Linkss;
114
        QLabel* Rechtss;
2872 fschmid 115
        QGroupBox* groupGap;
116
        MSpinBox* gapVertical;
117
        MSpinBox* gapHorizontal;
118
        QLabel* TextLabel5sg;
119
        QLabel* TextLabel7sg;
1641 cbradney 120
 
121
        TabTools* tabTools;
122
 
123
        HySettings* tabHyphenator;
124
        FontPrefs* tabFonts;
125
        TabCheckDoc* tabDocChecker;
126
        CMSPrefs* tabColorManagement;
127
        TabPDFOptions* tabPDF;
128
        DocumentItemAttributes* tabDefaultItemAttributes;
1701 cbradney 129
        TOCIndexPrefs* tabDefaultTOCIndexPrefs;
1641 cbradney 130
        KeyManager* tabKeys;
131
 
132
        QLabel* textLabelP;
133
        QWidget* tab_5;
134
        QGroupBox* saving;
135
        QCheckBox* SaveAtQuit;
136
        QGroupBox* preview;
137
        QComboBox* PreviewSize;
138
        QWidget* tab_7;
139
        QButtonGroup* GroupSize;
140
        QLabel* GZText2;
141
        QComboBox* GZComboF;
142
        QComboBox* GZComboO;
143
        QLabel* GZText1;
144
        QLabel* GZText3;
145
        QLabel* GZText4;
146
        MSpinBox* pageWidth;
147
        MSpinBox* pageHeight;
2901 fschmid 148
        PageLayouts* docLayout;
2769 fschmid 149
        MarginWidget* GroupRand;
1641 cbradney 150
        QGroupBox* GroupAS;
151
        QCheckBox* ASon;
152
        QLabel* ASText;
153
        QSpinBox* ASTime;
154
        QGroupBox* urGroup;
155
        QLabel* urLabel;
156
        QSpinBox* urSpinBox;
157
        QGroupBox* CaliGroup;
158
        QLabel* CaliText;
159
        QLabel* CaliRuler;
160
        QSlider* CaliSlider;
161
        QLabel* CaliAnz;
162
        QWidget* ExtTool;
2925 cbradney 163
        QGroupBox* ghostscriptGroup;
164
        QLabel* ghostscriptLabel;
165
        QLineEdit* ghostscriptLineEdit;
166
        QToolButton* ghostscriptChangeButton;
1641 cbradney 167
        QCheckBox* GSantiText;
168
        QCheckBox* GSantiGraph;
2703 fschmid 169
        QSpinBox* GSResolution;
170
        QLabel* GSResText;
2925 cbradney 171
        QGroupBox* groupImageEditor;
172
        QLabel* imageEditorLabel;
173
        QLineEdit* imageEditorLineEdit;
174
        QToolButton* imageEditorChangeButton;
1641 cbradney 175
        QWidget* Misc;
176
        QGroupBox* groupPrint;
177
        QCheckBox* ClipMarg;
178
        QCheckBox* DoGCR;
179
        QCheckBox* AskForSubs;
2263 fschmid 180
        QCheckBox* stylePreview;
2833 fschmid 181
        QCheckBox* startUpDialog;
2784 subik 182
        //! lorem ipsum
183
        QGroupBox* groupLI;
184
        QCheckBox* useStandardLI;
185
        QSpinBox* paragraphsLI;
186
        QLabel* paraLabelLI;
1641 cbradney 187
 
1790 cbradney 188
        double unitRatio;
1641 cbradney 189
        double PFactor;
190
        double Pagebr;
191
        double Pageho;
2901 fschmid 192
        int choosenLayout;
1641 cbradney 193
        int docUnitIndex;
194
        double DisScale;
195
        ScribusApp *ap;
196
        QColor colorPaper;
197
 
3213 craig 198
signals:
199
        /// Panels listen to this and save their changes when they get it.
200
        void accepted();
1641 cbradney 201
 
202
public slots:
3213 craig 203
        /// Overridden to emit accepted(), which plugin panels use
204
        void accept();
205
 
1641 cbradney 206
        void changeDocs();
207
        void changeProfs();
208
        void changeScripts();
2093 cbradney 209
        void changeDocumentTemplates();
2925 cbradney 210
        void changeGhostscript();
211
        void changeImageEditor();
212
        virtual void changePaperColor();
213
 
2901 fschmid 214
        void setDS(int layout);
1641 cbradney 215
        void setPageWidth(int v);
216
        void setPageHeight(int v);
2923 fschmid 217
        void setPageSize();
1641 cbradney 218
        void setSize(const QString &);
219
        void setOrien(int ori);
220
        void unitChange();
221
        void setDisScale();
222
        void switchCMS(bool enable);
223
 
3213 craig 224
protected:
2925 cbradney 225
 
3213 craig 226
        // Scans plugins for those that want to add a prefs widget and
227
        // hooks them up to the dialog.
228
        void addPlugins();
2925 cbradney 229
 
230
        QHBoxLayout* groupImageEditorLayout;
231
        QVBoxLayout* groupGhostScriptLayout;
232
        QHBoxLayout* ghostscriptLayout;
233
 
1641 cbradney 234
        QGridLayout* tabLayout;
235
        QGridLayout* ButtonGroup1Layout;
236
        QGridLayout* GroupBox200Layout;
237
        QGridLayout* tabLayout_5;
238
        QHBoxLayout* savingLayout;
239
        QHBoxLayout* previewLayout;
240
        QHBoxLayout* Layout3;
241
        QHBoxLayout* tabLayout_7;
242
        QVBoxLayout* Layout21;
243
        QVBoxLayout* GroupSizeLayout;
244
        QGridLayout* Layout6;
245
        QHBoxLayout* Layout5_2;
246
        QGridLayout* GroupASLayout;
247
        QVBoxLayout* CaliGroupLayout;
248
        QHBoxLayout* layout15ca;
249
        QVBoxLayout* ExtToolLayout;
2925 cbradney 250
 
251
 
2703 fschmid 252
        QHBoxLayout* GSlayout2;
1641 cbradney 253
        QVBoxLayout* MiscLayout;
254
        QVBoxLayout* groupPrintLayout;
2784 subik 255
        //! layout of the lorem ipsum group
256
        QVBoxLayout* groupLILayout;
1641 cbradney 257
        QVBoxLayout* tabViewLayout;
2872 fschmid 258
        QGridLayout* pageBackgroundLayout;
1641 cbradney 259
        QHBoxLayout* layout10;
260
        QHBoxLayout* groupScratchLayout;
261
        QGridLayout* Layout4s;
2872 fschmid 262
        QHBoxLayout* groupGapLayout;
263
        QGridLayout* layout4sg;
2901 fschmid 264
        QHBoxLayout* dsLayout4p;
265
        QVBoxLayout* dsLayout4pv;
2784 subik 266
 
1701 cbradney 267
        QStringList defaultAttributesList;
1641 cbradney 268
 
3213 craig 269
        LanguageManager langMgr;
270
        PrefsManager* prefsManager;
271
 
1701 cbradney 272
protected slots:
273
        virtual void setTOCIndexData(QWidget *widgetToShow);
1641 cbradney 274
        void setSelectedGUILang( const QString &newLang );
275
        void setActionHistoryLength();
276
};
277
 
278
#endif // PREFS_H