+class PrefModule;
+
+class GuiPreferences : public GuiDialog, public Ui::PrefsUi
+{
+ Q_OBJECT
+public:
+ GuiPreferences(GuiView & lv);
+
+ void apply(LyXRC & rc) const;
+ void updateRc(LyXRC const & rc);
+
+public Q_SLOTS:
+ void change_adaptor();
+
+public:
+ /// Apply changes
+ void applyView();
+
+ std::vector<PrefModule *> modules_;
+
+ ///
+ bool initialiseParams(std::string const &);
+ ///
+ void clearParams() {}
+ ///
+ void dispatchParams();
+ ///
+ bool isBufferDependent() const { return false; }
+
+ /// various file pickers
+ QString browsebind(QString const & file) const;
+ QString browseUI(QString const & file) const;
+ QString browsekbmap(QString const & file) const;
+ QString browsedict(QString const & file) const;
+
+ /// general browse
+ QString browse(QString const & file, QString const & title) const;
+
+ /// set a color
+ void setColor(ColorCode col, QString const & hex);
+
+ /// 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_; }
+ Movers & movers() { return movers_; }
+
+private:
+ ///
+ void addModule(PrefModule * module);
+
+ /// temporary lyxrc
+ LyXRC rc_;
+ /// temporary converters
+ Converters converters_;
+ /// temporary formats
+ Formats formats_;
+ /// temporary movers
+ Movers movers_;
+
+ /// A list of colors to be dispatched
+ std::vector<std::string> colors_;
+
+ bool redraw_gui_;
+ bool update_screen_font_;
+};
+