]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiParagraph.h
renaming of some methods that hurt the eyes + removal of:
[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 "GuiDialogView.h"
17 #include "ControlParagraph.h"
18 #include "Layout.h"
19 #include "ui_ParagraphUi.h"
20
21 #include <QDialog>
22
23 #include <map>
24
25 namespace lyx {
26 namespace frontend {
27
28 class GuiParagraph;
29
30 class GuiParagraphDialog : public QDialog, public Ui::ParagraphUi {
31         Q_OBJECT
32 public:
33         GuiParagraphDialog(GuiParagraph * form);
34         ///
35         void checkAlignmentRadioButtons();
36         ///
37         void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
38         ///
39         LyXAlignment getAlignmentFromDialog();
40 protected:
41         void closeEvent (QCloseEvent * e);
42 private:
43         GuiParagraph * form_;
44         typedef std::map<LyXAlignment, QRadioButton *> QPRadioMap;
45         QPRadioMap radioMap;
46         typedef std::map<LyXAlignment, docstring> QPAlignmentLabels;
47         QPAlignmentLabels labelMap;
48                 
49 protected Q_SLOTS:
50         ///
51         void change_adaptor();
52         ///
53         void enableLinespacingValue(int);
54 };
55
56
57 class GuiParagraph : public GuiView<GuiParagraphDialog>
58 {
59 public:
60         friend class GuiParagraphDialog;
61
62         GuiParagraph(GuiDialog &);
63         /// parent controller
64         ControlParagraph & controller()
65         { return static_cast<ControlParagraph &>(this->getController()); }
66         /// parent controller
67         ControlParagraph const & controller() const
68         { return static_cast<ControlParagraph const &>(this->getController()); }
69 private:
70         /// Apply changes
71         virtual void applyView();
72         /// update
73         virtual void update_contents();
74         /// build the dialog
75         virtual void build_dialog();
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // QPARAGRAPH_H