4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
14 #ifndef GUIPARAGRAPH_H
15 #define GUIPARAGRAPH_H
17 #include "DialogView.h"
19 #include "qt_helpers.h"
20 #include "ui_ParagraphUi.h"
23 #include "ParagraphParameters.h"
25 #include "support/debug.h"
30 #include <QGridLayout>
39 : public DialogView, public Ui::ParagraphUi
43 GuiParagraph(GuiView & lv);
45 /// Dialog inherited methods
48 void dispatchParams();
49 void enableView(bool enable);
50 bool isBufferDependent() const { return true; }
51 virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
56 void checkAlignmentRadioButtons();
58 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
60 LyXAlignment getAlignmentFromDialog();
62 ParagraphParameters & params();
64 ParagraphParameters const & params() const;
66 bool haveMultiParSelection();
68 bool canIndent() const;
70 LyXAlignment alignPossible() const;
72 LyXAlignment alignDefault() const;
78 void on_synchronizedViewCB_toggled();
80 void on_restorePB_clicked();
82 void on_linespacing_activated(int);
84 void on_applyPB_clicked();
88 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
92 typedef std::map<LyXAlignment, docstring> AlignmentLabels;
94 AlignmentLabels labelMap;
96 QString const alignDefaultLabel;
98 ParagraphParameters multiparsel_;
101 } // namespace frontend
104 #endif // QPARAGRAPH_H