4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
13 #ifndef GUIPARAGRAPH_H
14 #define GUIPARAGRAPH_H
16 #include "GuiDialogView.h"
17 #include "ControlParagraph.h"
19 #include "ui_ParagraphUi.h"
30 class GuiParagraphDialog : public QDialog, public Ui::ParagraphUi {
33 GuiParagraphDialog(GuiParagraph * form);
35 void checkAlignmentRadioButtons();
37 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
39 LyXAlignment getAlignmentFromDialog();
41 void closeEvent (QCloseEvent * e);
44 typedef std::map<LyXAlignment, QRadioButton *> QPRadioMap;
46 typedef std::map<LyXAlignment, docstring> QPAlignmentLabels;
47 QPAlignmentLabels labelMap;
51 void change_adaptor();
53 void enableLinespacingValue(int);
57 class GuiParagraph : public GuiView<GuiParagraphDialog>
60 friend class GuiParagraphDialog;
62 GuiParagraph(GuiDialog &);
64 ControlParagraph & controller()
65 { return static_cast<ControlParagraph &>(this->getController()); }
67 ControlParagraph const & controller() const
68 { return static_cast<ControlParagraph const &>(this->getController()); }
73 virtual void update_contents();
75 virtual void build_dialog();
78 } // namespace frontend
81 #endif // QPARAGRAPH_H