]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QParagraph.h
delete unneeded Menubar virtual interface.
[lyx.git] / src / frontends / qt4 / QParagraph.h
1 // -*- C++ -*-
2 /**
3  * \file QParagraph.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 QPARAGRAPH_H
14 #define QPARAGRAPH_H
15
16 #include "QDialogView.h"
17
18 #include "Layout.h"
19 #include "ui_ParagraphUi.h"
20
21 #include <QDialog>
22 #include <QCloseEvent>
23
24 #include <map>
25
26 namespace lyx {
27 namespace frontend {
28
29 class QParagraph;
30
31 class QParagraphDialog : public QDialog, public Ui::QParagraphUi {
32         Q_OBJECT
33 public:
34         QParagraphDialog(QParagraph * form);
35         ///
36         void checkAlignmentRadioButtons();
37         ///
38         void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
39         ///
40         LyXAlignment getAlignmentFromDialog();
41 protected:
42         void closeEvent (QCloseEvent * e);
43 private:
44         QParagraph * form_;
45         typedef std::map<LyXAlignment, QRadioButton *> QPRadioMap;
46         QPRadioMap radioMap;
47         typedef std::map<LyXAlignment, docstring> QPAlignmentLabels;
48         QPAlignmentLabels labelMap;
49                 
50 protected Q_SLOTS:
51         ///
52         void change_adaptor();
53         ///
54         void enableLinespacingValue(int);
55 };
56
57
58 class ControlParagraph;
59
60 class QParagraph
61         : public QController<ControlParagraph, QView<QParagraphDialog> >
62 {
63 public:
64         friend class QParagraphDialog;
65
66         QParagraph(Dialog &);
67 private:
68         /// Apply changes
69         virtual void apply();
70         /// update
71         virtual void update_contents();
72         /// build the dialog
73         virtual void build_dialog();
74 };
75
76 } // namespace frontend
77 } // namespace lyx
78
79 #endif // QPARAGRAPH_H