Subversion Repositories Scribus

Rev

Rev 5851 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 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
*/
1641 cbradney 7
#ifndef PREFS_H
8
#define PREFS_H
9
 
2969 craig 10
#include "scribusapi.h"
1641 cbradney 11
#include "scribusstructs.h"
12
#include "scribus.h"
13
#include "prefsdialogbase.h"
5851 subik 14
 
1641 cbradney 15
class TabTypograpy;
16
class HySettings;
17
class CMSPrefs;
18
class TabGuides;
19
class TabTools;
20
class TabCheckDoc;
21
class TabPDFOptions;
22
class FontPrefs;
23
class DocumentItemAttributes;
1701 cbradney 24
class TOCIndexPrefs;
2769 fschmid 25
class MarginWidget;
2834 cbradney 26
class PrefsManager;
2901 fschmid 27
class PageLayouts;
5326 cbradney 28
class TabExternalToolsWidget;
5352 cbradney 29
class TabKeyboardShortcutsWidget;
5556 subik 30
class PluginManagerPrefsGui;
5851 subik 31
class TabGeneral;
32
class TabDisplay;
33
class TabDocument;
34
class TabMiscellaneous;
35
class TabScrapbook;
7109 fschmid 36
class TabPrinter;
1641 cbradney 37
 
38
 
5851 subik 39
/*! \brief A Preferences dialog.
40
It's modular now. You can see a lot of special widgets here
41
but no QWidget itself. Most of the "panels" are converted
42
into UI files with Scribus's standard convention:
43
foobase - foo inherited.
44
\author Petr Vanek <petr@scribus.info>
45
*/
2969 craig 46
class SCRIBUS_API Preferences : public PrefsDialogBase
1641 cbradney 47
{
48
        Q_OBJECT
49
 
50
public:
4645 subik 51
 
52
        /*!
53
        \author Franz Schmid
54
        \brief Constructor for Preferences dialog box
55
        \param parent QWidget pointer to parent window
56
        */
2834 cbradney 57
        Preferences( QWidget* parent);
4645 subik 58
        ~Preferences(){};
5851 subik 59
 
2873 cbradney 60
        void updatePreferences();
1641 cbradney 61
 
3213 craig 62
signals:
4645 subik 63
        /// \brief Panels listen to this and save their changes when they get it.
3213 craig 64
        void accepted();
1641 cbradney 65
 
66
public slots:
4645 subik 67
        /// \brief Overridden to emit accepted(), which plugin panels use
3213 craig 68
        void accept();
69
 
4645 subik 70
        /*!
71
        \author Franz Schmid
72
        \brief Preferences (Document / Page Size), switches default between Facing Pages and swaps text labels for margin guides
73
         */
2901 fschmid 74
        void setDS(int layout);
4645 subik 75
        /*!
76
        \author Franz Schmid
77
        \brief Preferences (General, Units). Sets scaling factors and units descriptions when default units are changed. Updates preference values
78
        */
1641 cbradney 79
        void unitChange();
5851 subik 80
 
1641 cbradney 81
        void switchCMS(bool enable);
82
 
3213 craig 83
protected:
5851 subik 84
        TabGeneral* tabGeneral;
85
        TabGuides* tabGuides;
86
        TabTypograpy* tabTypo;
87
        TabDisplay* tabView;
88
        TabTools* tabTools;
89
        HySettings* tabHyphenator;
90
        FontPrefs* tabFonts;
7109 fschmid 91
        TabPrinter* tabPrinter;
5851 subik 92
        TabCheckDoc* tabDocChecker;
93
        CMSPrefs* tabColorManagement;
94
        TabPDFOptions* tabPDF;
95
        DocumentItemAttributes* tabDefaultItemAttributes;
96
        TOCIndexPrefs* tabDefaultTOCIndexPrefs;
97
        TabExternalToolsWidget* tabExtTools;
98
        TabKeyboardShortcutsWidget* tabKeyboardShortcuts;
99
        TabScrapbook* tabScrapbook;
100
        TabDocument* tabDocument;
101
        TabMiscellaneous* tabMiscellaneous;
102
        PluginManagerPrefsGui* pluginManagerPrefsGui;
2925 cbradney 103
 
5851 subik 104
        double unitRatio;
105
        int docUnitIndex;
106
        ScribusMainWindow *ap;
107
        PrefsManager* prefsManager;
108
 
109
        /*! \brief Scans plugins for those that want to add a prefs widget and
110
        hooks them up to the dialog. */
3213 craig 111
        void addPlugins();
2784 subik 112
 
5562 subik 113
        //! \brief Resets the PrefsManager. Then call setupGui().
114
        void restoreDefaults();
5507 subik 115
        //! \brief Setup the GUI widgets by values taken from PrefsManager.
5562 subik 116
        void setupGui();
5763 subik 117
        void enableSignals(bool);
5507 subik 118
 
1701 cbradney 119
protected slots:
5851 subik 120
        //! \brief Method to be called when user selects the icon.
121
        virtual void showWidgetInStack(QWidget *widgetToShow);
1641 cbradney 122
        void setActionHistoryLength();
5504 subik 123
        virtual void applyChangesButton_clicked();
5507 subik 124
        virtual void backToDefaults_clicked();
1641 cbradney 125
};
126
 
127
#endif // PREFS_H