// -*- C++ -*- /** * \file QPrefsDialog.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author John Levon * \author Abdelrazak Younes * * Full author contact details are available in file CREDITS. */ #ifndef QPREFSDIALOG_H #define QPREFSDIALOG_H #include "LColor.h" #include "lyxrc.h" #include "ui/QPrefsUi.h" #include #include #include #include "ui/QPrefAsciiUi.h" #include "ui/QPrefDateUi.h" #include "ui/QPrefKeyboardUi.h" #include "ui/QPrefLatexUi.h" #include "ui/QPrefScreenFontsUi.h" #include "ui/QPrefColorsUi.h" #if defined(__CYGWIN__) || defined(__CYGWIN32__) #include "ui/QPrefCygwinPathUi.h" #endif #include "ui/QPrefDisplayUi.h" #include "ui/QPrefPathsUi.h" #include "ui/QPrefSpellcheckerUi.h" #include "ui/QPrefConvertersUi.h" #include "ui/QPrefCopiersUi.h" #include "ui/QPrefFileformatsUi.h" #include "ui/QPrefLanguageUi.h" #include "ui/QPrefPrinterUi.h" #include "ui/QPrefUi.h" #include "ui/QPrefIdentityUi.h" template class UiWidget: public QWidget, public UI { public: UiWidget(QWidget * Parent = 0): QWidget(Parent) { UI::setupUi(this); } }; namespace lyx { namespace frontend { class QPrefs; /// class QPrefsDialog : public QDialog, public Ui::QPrefsUi { Q_OBJECT public: QPrefsDialog(QPrefs *); ~QPrefsDialog(); void apply(LyXRC & rc) const; void update(LyXRC const & rc); protected: void updateConverters(); void updateConverterButtons(); void updateCopiers(); void updateCopierButtons(); void updateFormats(); void updateFormatsButtons(); public slots: void change_adaptor(); void switch_format(int); void fileformat_changed(); void new_format(); void modify_format(); void remove_format(); void switch_converter(int); void converter_changed(); void new_converter(); void modify_converter(); void remove_converter(); void switch_copierLB(int nr); void switch_copierCO(int nr); void copiers_changed(); void new_copier(); void modify_copier(); void remove_copier(); void change_color(); void select_ui(); void select_bind(); void select_keymap1(); void select_keymap2(); void select_dict(); void select_templatedir(); void select_tempdir(); void select_backupdir(); void select_workingdir(); void select_lyxpipe(); void select_roman(const QString&); void select_sans(const QString&); void select_typewriter(const QString&); protected: void closeEvent(QCloseEvent * e); private: /// languages std::vector lang_; std::vector lcolors_; std::vector prefcolors_; std::vector newcolors_; UiWidget * asciiModule; UiWidget * dateModule; UiWidget * keyboardModule; UiWidget * latexModule; UiWidget * screenfontsModule; UiWidget * colorsModule; #if defined(__CYGWIN__) || defined(__CYGWIN32__) UiWidget * cygwinpathModule; #endif UiWidget * displayModule; UiWidget * pathsModule; UiWidget * spellcheckerModule; UiWidget * convertersModule; UiWidget * copiersModule; UiWidget * fileformatsModule; UiWidget * languageModule; UiWidget * printerModule; UiWidget * uiModule; UiWidget * identityModule; QPrefs * form_; }; } // namespace frontend } // namespace lyx #endif // PREFSDIALOG_H