]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiCharacter.h
6283b6fc2cdaf6fe8bbcca9d154fccadb4f242fe
[lyx.git] / src / frontends / qt4 / GuiCharacter.h
1 // -*- C++ -*-
2 /**
3  * \file GuiCharacter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUICHARACTER_H
14 #define GUICHARACTER_H
15
16 #include "GuiDialog.h"
17 #include "ControlCharacter.h"
18 #include "ui_CharacterUi.h"
19 #include "frontend_helpers.h" // for LanguagePair
20
21 #include <vector>
22
23 namespace lyx {
24 namespace frontend {
25
26 typedef std::pair<QString, Font::FONT_FAMILY> FamilyPair;
27 typedef std::pair<QString, Font::FONT_SERIES> SeriesPair;
28 typedef std::pair<QString, Font::FONT_SHAPE>  ShapePair;
29 typedef std::pair<QString, Font::FONT_SIZE>   SizePair;
30 typedef std::pair<QString, FONT_STATE> BarPair;
31 typedef std::pair<QString, Color_color> ColorPair;
32
33 class GuiCharacterDialog : public GuiDialog, public Ui::CharacterUi
34 {
35         Q_OBJECT
36
37 public:
38         GuiCharacterDialog(LyXView & lv);
39
40 protected Q_SLOTS:
41         void change_adaptor();
42
43 private:
44         void closeEvent(QCloseEvent * e);
45         /// parent controller
46         ControlCharacter & controller();
47         /// Apply changes
48         void applyView();
49         /// update
50         void updateContents();
51
52         std::vector<FamilyPair> family;
53         std::vector<SeriesPair> series;
54         std::vector<ShapePair>  shape;
55         std::vector<SizePair>   size;
56         std::vector<BarPair>    bar;
57         std::vector<ColorPair>  color;
58         std::vector<LanguagePair> language;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // GUICHARACTER_H