]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiParagraph.h
This is the last of a series of patches that merges the layout modules development...
[lyx.git] / src / frontends / qt4 / GuiParagraph.h
1 // -*- C++ -*-
2 /**
3  * \file GuiParagraph.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 GUIPARAGRAPH_H
14 #define GUIPARAGRAPH_H
15
16 #include "GuiDialog.h"
17 #include "ControlParagraph.h"
18 #include "Layout.h"
19 #include "ui_ParagraphUi.h"
20
21 #include <map>
22
23 namespace lyx {
24 namespace frontend {
25
26 class GuiParagraphDialog : public GuiDialog, public Ui::ParagraphUi
27 {
28         Q_OBJECT
29 public:
30         GuiParagraphDialog(LyXView & lv);
31         ///
32         void checkAlignmentRadioButtons();
33         ///
34         void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
35         ///
36         LyXAlignment getAlignmentFromDialog();
37 private:
38         ///
39         void closeEvent(QCloseEvent * e);
40         ///
41         typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
42         RadioMap radioMap;
43         ///
44         typedef std::map<LyXAlignment, docstring> AlignmentLabels;
45         AlignmentLabels labelMap;
46                 
47 private Q_SLOTS:
48         ///
49         void change_adaptor();
50         ///
51         void enableLinespacingValue(int);
52         /// parent controller
53         ControlParagraph & controller();
54         /// Apply changes
55         void applyView();
56         /// update
57         void updateContents();
58 };
59
60 } // namespace frontend
61 } // namespace lyx
62
63 #endif // QPARAGRAPH_H