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);
52 void checkAlignmentRadioButtons();
54 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
56 LyXAlignment getAlignmentFromDialog();
58 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
60 typedef std::map<LyXAlignment, docstring> AlignmentLabels;
61 AlignmentLabels labelMap;
63 QString const alignDefaultLabel;
66 void enableView(bool enable);
68 std::string name() const { return "paragraph"; }
77 void on_synchronizedViewCB_toggled();
79 void on_restorePB_clicked();
81 void on_linespacing_activated(int);
83 void on_applyPB_clicked();
87 bool initialiseParams(std::string const & /*data*/) { return true; }
91 void dispatchParams();
93 bool isBufferDependent() const { return true; }
95 ParagraphParameters & params();
97 ParagraphParameters const & params() const;
99 bool haveMulitParSelection();
101 bool canIndent() const;
103 LyXAlignment alignPossible() const;
105 LyXAlignment alignDefault() const;
108 ParagraphParameters multiparsel_;
111 } // namespace frontend
114 #endif // QPARAGRAPH_H