Scribus
Open source desktop publishing at your fingertips
preferencesdialog.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 PREFERENCESDIALOG_H
8 #define PREFERENCESDIALOG_H
9 
10 
11 #include <QListWidgetItem>
12 #include <QMap>
13 #include <QStackedWidget>
14 
15 #include "scribusapi.h"
16 #include "prefsstructs.h"
17 #include "ui_preferencesdialogbase.h"
18 
19 #include "ui/prefs_colormanagement.h"
20 #include "ui/prefs_display.h"
21 #include "ui/prefs_documentinformation.h"
22 #include "ui/prefs_documentitemattributes.h"
23 #include "ui/prefs_documentsections.h"
24 #include "ui/prefs_documentsetup.h"
25 #include "ui/prefs_externaltools.h"
26 #include "ui/prefs_fonts.h"
27 #include "ui/prefs_guides.h"
28 #include "ui/prefs_hyphenator.h"
29 #include "ui/prefs_imagecache.h"
30 #include "ui/prefs_itemtools.h"
31 #include "ui/prefs_keyboardshortcuts.h"
32 #include "ui/prefs_miscellaneous.h"
33 #include "ui/prefs_operatortools.h"
34 #include "ui/prefs_pagesizes.h"
35 #include "ui/prefs_paths.h"
36 #include "ui/prefs_pdfexport.h"
37 #include "ui/prefs_plugins.h"
38 #include "ui/prefs_preflightverifier.h"
39 #include "ui/prefs_printer.h"
40 #include "ui/prefs_scrapbook.h"
41 #include "ui/prefs_spelling.h"
42 #include "ui/prefs_tableofcontents.h"
43 #include "ui/prefs_typography.h"
44 #include "ui/prefs_userinterface.h"
45 
46 
47 class PrefsManager;
48 class ScribusMainWindow;
49 class ScribusDoc;
50 
51 
54 class SCRIBUS_API PreferencesDialog : public QDialog, Ui::PreferencesDialog
55 {
56  Q_OBJECT
57 
58  public:
59  PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData, ScribusDoc *doc=NULL);
60  ~PreferencesDialog();
61 
62  virtual void changeEvent(QEvent *e);
63  ApplicationPrefs prefs() const { return localPrefs; }
64  void getResizeDocumentPages(bool &resizePages, bool &resizeMasterPages, bool &resizePageMargins, bool &resizeMasterPageMargins);
65 
66  public slots:
68  virtual void accept();
69  void itemSelected(QListWidgetItem* ic);
70  void newItemSelected();
71  void restoreDefaults();
72  void setupGui();
73  void saveGuiToPrefs();
74  void setNewItemSelected(const QString &s);
75  void changeUnits(int u);
76 
77  protected slots:
78  virtual void languageChange();
79  void applyButtonClicked();
80 
81 
82  protected:
83  int addItem(QString name, QPixmap icon, QWidget *tab);
84  void setupListWidget();
85  void arrangeIcons();
86  void initPreferenceValues();
89  void addPlugins();
90 
91  Prefs_ColorManagement *prefs_ColorManagement;
92  Prefs_Display *prefs_Display;
93  Prefs_DocumentInformation *prefs_DocumentInformation;
94  Prefs_DocumentItemAttributes *prefs_DocumentItemAttributes;
95  Prefs_DocumentSections *prefs_DocumentSections;
96  Prefs_DocumentSetup *prefs_DocumentSetup;
97  Prefs_ExternalTools *prefs_ExternalTools;
98  Prefs_Fonts *prefs_Fonts;
99  Prefs_Guides *prefs_Guides;
100  Prefs_Hyphenator *prefs_Hyphenator;
101  Prefs_ImageCache *prefs_ImageCache;
102  Prefs_ItemTools *prefs_ItemTools;
103  Prefs_KeyboardShortcuts *prefs_KeyboardShortcuts;
104  Prefs_Miscellaneous *prefs_Miscellaneous;
105  Prefs_OperatorTools *prefs_OperatorTools;
106  Prefs_PDFExport *prefs_PDFExport;
107  Prefs_PageSizes *prefs_PageSizes;
108  Prefs_Paths *prefs_Paths;
109  Prefs_Plugins *prefs_Plugins;
110  Prefs_PreflightVerifier *prefs_PreflightVerifier;
111  Prefs_Printer *prefs_Printer;
112  Prefs_Scrapbook *prefs_Scrapbook;
113  Prefs_Spelling *prefs_Spelling;
114  Prefs_TableOfContents *prefs_TableOfContents;
115  Prefs_Typography *prefs_Typography;
116  Prefs_UserInterface *prefs_UserInterface;
117 
118 
119  QMap<QListWidgetItem*, int> stackWidgetMap;
120  int counter;
121  double unitRatio;
122  int docUnitIndex;
123  ScribusMainWindow* mainWin;
124  PrefsManager* prefsManager;
125  ScribusDoc* m_Doc;
126  ApplicationPrefs localPrefs;
127 };
128 
129 #endif
130 
131 
132 
Definition: prefsstructs.h:453
Definition: prefs_paths.h:17
Definition: prefs_itemtools.h:17
Definition: prefs_display.h:17
Definition: prefs_documentitemattributes.h:16
Definition: prefs_userinterface.h:21
Definition: prefs_hyphenator.h:18
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
Definition: prefs_pdfexport.h:19
Definition: prefs_tableofcontents.h:22
the Document Class
Definition: scribusdoc.h:90
Definition: prefs_scrapbook.h:17
Definition: prefs_documentsetup.h:18
Definition: prefs_preflightverifier.h:19
Definition: prefs_miscellaneous.h:17
Manage Scribus preferences here, and here alone Start to move the preferences out of scribus...
Definition: prefsmanager.h:43
Definition: prefs_fonts.h:21