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 // Uncomment this if you prefer dock widget
18 //#define USE_DOCK_WIDGET
21 #include "ui_ParagraphUi.h"
22 #include "DialogView.h"
23 #include "ParagraphParameters.h"
25 #include "qt_helpers.h"
26 #include "support/debug.h"
28 #include <QCloseEvent>
32 #include <QGridLayout>
41 : public DialogView, public Ui::ParagraphUi
45 GuiParagraph(GuiView & lv);
47 /// Dialog inherited methods
50 void dispatchParams();
51 bool isBufferDependent() const { return true; }
56 void checkAlignmentRadioButtons();
58 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
60 LyXAlignment getAlignmentFromDialog();
62 ParagraphParameters & params();
64 ParagraphParameters const & params() const;
66 bool haveMulitParSelection();
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