]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiPrefs.h
Amend f441590c
[lyx.git] / src / frontends / qt4 / GuiPrefs.h
index 028ac48a369a6ada5b70243df1cc55edc0b17bf4..4094d0137ed02e7867017344223730a153b771e5 100644 (file)
 
 #include "GuiDialog.h"
 
-#include "ColorCode.h"
 #include "Converter.h"
 #include "Format.h"
-#include "FuncCode.h"
 #include "KeyMap.h"
 #include "LyXRC.h"
 #include "Mover.h"
@@ -33,6 +31,7 @@
 #include "ui_PrefCompletionUi.h"
 #include "ui_PrefColorsUi.h"
 #include "ui_PrefDisplayUi.h"
+#include "ui_PrefDocHandlingUi.h"
 #include "ui_PrefEditUi.h"
 #include "ui_PrefPathsUi.h"
 #include "ui_PrefShortcutsUi.h"
@@ -40,7 +39,6 @@
 #include "ui_PrefConvertersUi.h"
 #include "ui_PrefFileformatsUi.h"
 #include "ui_PrefLanguageUi.h"
-#include "ui_PrefPrinterUi.h"
 #include "ui_PrefUi.h"
 #include "ui_PrefIdentityUi.h"
 #include "ui_ShortcutUi.h"
@@ -65,12 +63,15 @@ class GuiPreferences : public GuiDialog, public Ui::PrefsUi
 public:
        GuiPreferences(GuiView & lv);
 
-       void apply(LyXRC & rc) const;
-       void updateRc(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 public Q_SLOTS:
        void change_adaptor();
 
+Q_SIGNALS:
+       void prefsApplied(LyXRC const & rc);
+
 public:
        /// Apply changes
        void applyView();
@@ -100,10 +101,8 @@ public:
        /// update the screen fonts after change
        void updateScreenFonts();
 
-       /// adjust the prefs paper sizes
-       PAPER_SIZE toPaperSize(int i) const;
-       /// adjust the prefs paper sizes
-       int fromPaperSize(PAPER_SIZE papersize) const;
+       /// update the previews after change
+       void updatePreviews();
 
        LyXRC & rc() { return rc_; }
        Converters & converters() { return converters_; }
@@ -126,8 +125,8 @@ private:
        /// A list of colors to be dispatched
        std::vector<std::string> colors_;
 
-       bool redraw_gui_;
        bool update_screen_font_;
+       bool update_previews_;
 };
 
 
@@ -140,8 +139,8 @@ public:
                : QWidget(form), category_(cat), title_(t), form_(form)
        {}
 
-       virtual void apply(LyXRC & rc) const = 0;
-       virtual void update(LyXRC const & rc) = 0;
+       virtual void applyRC(LyXRC & rc) const = 0;
+       virtual void updateRC(LyXRC const & rc) = 0;
 
        QString const & category() const { return category_; }
        QString const & title() const { return title_; }
@@ -162,8 +161,8 @@ class PrefOutput : public PrefModule, public Ui::PrefOutputUi
 public:
        PrefOutput(GuiPreferences * form);
 
-       virtual void apply(LyXRC & rc) const;
-       virtual void update(LyXRC const & rc);
+       virtual void applyRC(LyXRC & rc) const;
+       virtual void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void on_DateED_textChanged(const QString &);
@@ -176,13 +175,14 @@ class PrefInput : public PrefModule, public Ui::PrefInputUi
 public:
        PrefInput(GuiPreferences * form);
 
-       virtual void apply(LyXRC & rc) const;
-       virtual void update(LyXRC const & rc);
+       virtual void applyRC(LyXRC & rc) const;
+       virtual void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void on_firstKeymapPB_clicked(bool);
        void on_secondKeymapPB_clicked(bool);
        void on_keymapCB_toggled(bool);
+       void on_scrollzoomEnableCB_toggled(bool);
 
 private:
        QString testKeymap(QString const & keymap);
@@ -195,8 +195,8 @@ class PrefCompletion : public PrefModule, public Ui::PrefCompletionUi
 public:
        PrefCompletion(GuiPreferences * form);
 
-       virtual void apply(LyXRC & rc) const;
-       virtual void update(LyXRC const & rc);
+       virtual void applyRC(LyXRC & rc) const;
+       virtual void updateRC(LyXRC const & rc);
        virtual void enableCB();
 private Q_SLOTS:
        void on_popupTextCB_clicked();
@@ -210,8 +210,8 @@ class PrefLatex : public PrefModule, public Ui::PrefLatexUi
 public:
        PrefLatex(GuiPreferences * form);
 
-       virtual void apply(LyXRC & rc) const;
-       virtual void update(LyXRC const & rc);
+       virtual void applyRC(LyXRC & rc) const;
+       virtual void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void on_latexEncodingCB_stateChanged(int state);
@@ -232,13 +232,16 @@ class PrefScreenFonts : public PrefModule, public Ui::PrefScreenFontsUi
 public:
        PrefScreenFonts(GuiPreferences * form);
 
-       virtual void apply(LyXRC & rc) const;
-       virtual void update(LyXRC const & rc);
+       virtual void applyRC(LyXRC & rc) const;
+       virtual void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void selectRoman(const QString&);
        void selectSans(const QString&);
        void selectTypewriter(const QString&);
+
+public Q_SLOTS:
+       void updateScreenFontSizes(LyXRC const & rc);
 };
 
 
@@ -248,11 +251,12 @@ class PrefColors : public PrefModule, public Ui::PrefColorsUi
 public:
        PrefColors(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void changeColor();
+       void changeSysColor();
        void changeLyxObjectsSelection();
 
 private:
@@ -268,8 +272,8 @@ class PrefDisplay : public PrefModule, public Ui::PrefDisplayUi
 public:
        PrefDisplay(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void on_instantPreviewCO_currentIndexChanged(int);
@@ -282,8 +286,8 @@ class PrefPaths : public PrefModule, public Ui::PrefPathsUi
 public:
        PrefPaths(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void selectExampledir();
@@ -304,9 +308,11 @@ class PrefSpellchecker : public PrefModule, public Ui::PrefSpellcheckerUi
 public:
        PrefSpellchecker(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
+private Q_SLOTS:
+       void on_spellcheckerCB_currentIndexChanged(int);
 };
 
 
@@ -316,8 +322,8 @@ class PrefConverters : public PrefModule, public Ui::PrefConvertersUi
 public:
        PrefConverters(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 public Q_SLOTS:
        void updateGui();
@@ -340,8 +346,8 @@ class PrefFileformats : public PrefModule, public Ui::PrefFileformatsUi
 public:
        PrefFileformats(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
        void updateView();
 
 Q_SIGNALS:
@@ -349,9 +355,10 @@ Q_SIGNALS:
 
 private Q_SLOTS:
        void on_copierED_textEdited(const QString & s);
-       void on_extensionED_textEdited(const QString &);
+       void on_extensionsED_textEdited(const QString &);
        void on_viewerED_textEdited(const QString &);
        void on_editorED_textEdited(const QString &);
+       void on_mimeED_textEdited(const QString &);
        void on_shortcutED_textEdited(const QString &);
        void on_formatED_editingFinished();
        void on_formatED_textChanged(const QString &);
@@ -383,48 +390,52 @@ class PrefLanguage : public PrefModule, public Ui::PrefLanguageUi
 public:
        PrefLanguage(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 private Q_SLOTS:
        void on_uiLanguageCO_currentIndexChanged(int);
+       void on_languagePackageCO_currentIndexChanged(int);
 };
 
 
-class PrefPrinter : public PrefModule, public Ui::PrefPrinterUi
+class PrefUserInterface : public PrefModule, public Ui::PrefUi
 {
        Q_OBJECT
 public:
-       PrefPrinter(GuiPreferences * form);
+       PrefUserInterface(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
+
+public Q_SLOTS:
+       void selectUi();
 };
 
 
-class PrefUserInterface : public PrefModule, public Ui::PrefUi
+class PrefDocHandling : public PrefModule, public Ui::PrefDocHandlingUi
 {
        Q_OBJECT
 public:
-       PrefUserInterface(GuiPreferences * form);
+       PrefDocHandling(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 
 public Q_SLOTS:
-       void selectUi();
        void on_clearSessionPB_clicked();
 };
 
 
+
 class PrefEdit : public PrefModule, public Ui::PrefEditUi
 {
        Q_OBJECT
 public:
        PrefEdit(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 };
 
 
@@ -442,8 +453,8 @@ class PrefShortcuts : public PrefModule, public Ui::PrefShortcuts
 public:
        PrefShortcuts(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
        void updateShortcutsTW();
        void modifyShortcut();
        void removeShortcut();
@@ -499,8 +510,8 @@ class PrefIdentity : public PrefModule, public Ui::PrefIdentityUi
 public:
        PrefIdentity(GuiPreferences * form);
 
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const;
+       void updateRC(LyXRC const & rc);
 };