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"
51 typedef std::pair<QString, FontFamily> FamilyPair;
52 typedef std::pair<QString, FontFamily> FamilyPair;
53 typedef std::pair<QString, FontSeries> SeriesPair;
54 typedef std::pair<QString, FontShape> ShapePair;
55 typedef std::pair<QString, FontSize> SizePair;
56 typedef std::pair<QString, FontDeco> BarPair;
57 typedef std::pair<QString, QString> LanguagePair;
59 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
64 GuiCharacter(GuiView & lv);
67 void change_adaptor();
68 void on_emphCB_clicked();
69 void on_nounCB_clicked();
70 void on_nospellcheckCB_clicked();
71 void resetToDefault();
72 void resetToNoChange();
73 void checkRestoreDefaults();
76 /// \name Dialog inherited methods
78 void applyView() override;
79 void updateContents() override;
80 bool initialiseParams(std::string const & data) override;
81 void clearParams() override {}
82 void dispatchParams() override;
83 bool isBufferDependent() const override { return true; }
84 FuncCode getLfun() const override { return LFUN_TEXTSTYLE_UPDATE; }
85 void saveSession(QSettings & settings) const override;
86 void restoreSession() override;
90 void paramsToDialog(Font const & font);
92 void setBar(FontInfo & fi, FontDeco val);
94 void setStrike(FontInfo & fi, FontDeco val);
96 QList<FamilyPair> family;
97 QList<SeriesPair> series;
98 QList<ShapePair> shape;
101 QList<BarPair> strike;
102 QList<ColorCode> color;
103 QList<LanguagePair> language;
115 QAction * resetdefault_ = new QAction(this);
117 QAction * resetnochange_ = new QAction(this);
120 } // namespace frontend
123 #endif // GUICHARACTER_H