]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiPrefs.h
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / GuiPrefs.h
index 571cb9c76df19d9ad3aae3be7821e7eea2ec0f4f..e57d1dd9d780642ba7c2e4adfc7d06601a4115fc 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,8 +63,8 @@ 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();
@@ -103,11 +101,6 @@ 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;
-
        LyXRC & rc() { return rc_; }
        Converters & converters() { return converters_; }
        Formats & formats() { return formats_; }
@@ -129,7 +122,6 @@ private:
        /// A list of colors to be dispatched
        std::vector<std::string> colors_;
 
-       bool redraw_gui_;
        bool update_screen_font_;
 };
 
@@ -143,8 +135,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_; }
@@ -165,8 +157,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 &);
@@ -179,8 +171,8 @@ 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);
@@ -199,8 +191,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();
@@ -214,8 +206,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);
@@ -236,8 +228,8 @@ 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&);
@@ -255,8 +247,8 @@ 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();
@@ -276,12 +268,11 @@ 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);
-       void on_displayGraphicsCB_toggled(bool);
 };
 
 
@@ -291,8 +282,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();
@@ -313,8 +304,8 @@ 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);
@@ -327,8 +318,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();
@@ -351,8 +342,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:
@@ -363,6 +354,7 @@ private Q_SLOTS:
        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 &);
@@ -394,8 +386,8 @@ 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);
@@ -403,40 +395,43 @@ private Q_SLOTS:
 };
 
 
-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);
 };
 
 
@@ -454,8 +449,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();
@@ -511,8 +506,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);
 };