]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiParagraph.h
next one
[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 "ControlParagraph.h"
17 #include "Layout.h"
18 #include "ui_ParagraphUi.h"
19
20 #include <QWidget>
21
22 #include <map>
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiParagraph : public QWidget, public Ui::ParagraphUi
28 {
29         Q_OBJECT
30 public:
31         GuiParagraph(ControlParagraph & controller, QWidget * parent = 0);
32
33         /// update
34         void updateView();
35
36 private:
37         ///
38         void checkAlignmentRadioButtons();
39         ///
40         void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
41         ///
42         LyXAlignment getAlignmentFromDialog();
43         ///
44         typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
45         RadioMap radioMap;
46
47         ControlParagraph & controller_;
48
49         QString const alignDefaultLabel;
50 private Q_SLOTS:
51         ///
52         void changed();
53         ///
54         void on_synchronizedViewCB_toggled();
55         ///
56         void on_restorePB_clicked();
57         ///
58         void on_linespacing_activated(int);
59         /// Apply changes
60         void on_applyPB_clicked();
61 };
62
63 } // namespace frontend
64 } // namespace lyx
65
66 #endif // QPARAGRAPH_H