4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
14 #ifndef GUICHARACTER_H
15 #define GUICHARACTER_H
17 #include "GuiDialog.h"
18 #include "ui_CharacterUi.h"
49 typedef std::pair<QString, FontFamily> FamilyPair;
50 typedef std::pair<QString, FontFamily> FamilyPair;
51 typedef std::pair<QString, FontSeries> SeriesPair;
52 typedef std::pair<QString, FontShape> ShapePair;
53 typedef std::pair<QString, FontSize> SizePair;
54 typedef std::pair<QString, FontDeco> BarPair;
55 typedef std::pair<QString, QString> LanguagePair;
57 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
62 GuiCharacter(GuiView & lv);
65 void change_adaptor();
66 void on_emphCB_clicked();
67 void on_nounCB_clicked();
68 void on_nospellcheckCB_clicked();
69 void slotRestoreDefaults();
70 void checkRestoreDefaults();
73 /// \name Dialog inherited methods
76 void updateContents();
77 bool initialiseParams(std::string const & data);
79 void dispatchParams();
80 bool isBufferDependent() const { return true; }
81 FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
82 void saveSession(QSettings & settings) const;
83 void restoreSession();
87 void paramsToDialog(Font const & font);
89 void setBar(FontInfo & fi, FontDeco val);
91 void setStrike(FontInfo & fi, FontDeco val);
93 QList<FamilyPair> family;
94 QList<SeriesPair> series;
95 QList<ShapePair> shape;
98 QList<BarPair> strike;
99 QList<ColorCode> color;
100 QList<LanguagePair> language;
112 } // namespace frontend
115 #endif // GUICHARACTER_H