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"
31 #include <QGridLayout>
40 : public DialogView, public Ui::ParagraphUi
44 GuiParagraph(GuiView & lv);
46 /// Dialog inherited methods
49 void dispatchParams();
50 void enableView(bool enable);
51 bool isBufferDependent() const { return true; }
52 virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
57 void checkAlignmentRadioButtons();
59 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
61 LyXAlignment getAlignmentFromDialog();
63 ParagraphParameters & params();
65 ParagraphParameters const & params() const;
67 bool haveMultiParSelection();
69 bool canIndent() const;
71 LyXAlignment alignPossible() const;
73 LyXAlignment alignDefault() const;
79 void on_synchronizedViewCB_toggled();
81 void on_restorePB_clicked();
83 void on_linespacing_activated(int);
85 void on_applyPB_clicked();
89 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
93 typedef std::map<LyXAlignment, docstring> AlignmentLabels;
95 AlignmentLabels labelMap;
97 QString const alignDefaultLabel;
99 ParagraphParameters multiparsel_;
102 } // namespace frontend
105 #endif // QPARAGRAPH_H