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 void enableView(bool enable);
52 bool isBufferDependent() const { return true; }
53 virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
58 void checkAlignmentRadioButtons();
60 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
62 LyXAlignment getAlignmentFromDialog();
64 ParagraphParameters & params();
66 ParagraphParameters const & params() const;
68 bool haveMultiParSelection();
70 bool canIndent() const;
72 LyXAlignment alignPossible() const;
74 LyXAlignment alignDefault() const;
80 void on_synchronizedViewCB_toggled();
82 void on_restorePB_clicked();
84 void on_linespacing_activated(int);
86 void on_applyPB_clicked();
90 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
94 typedef std::map<LyXAlignment, docstring> AlignmentLabels;
96 AlignmentLabels labelMap;
98 QString const alignDefaultLabel;
100 ParagraphParameters multiparsel_;
103 } // namespace frontend
106 #endif // QPARAGRAPH_H