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"
28 #include <QGridLayout>
36 : public DialogView, public Ui::ParagraphUi
40 GuiParagraph(GuiView & lv);
42 /// Dialog inherited methods
46 void dispatchParams();
47 void enableView(bool enable);
48 bool isBufferDependent() const { return true; }
49 virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
54 void checkAlignmentRadioButtons();
56 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
58 LyXAlignment getAlignmentFromDialog();
60 ParagraphParameters & params();
62 ParagraphParameters const & params() const;
64 bool haveMultiParSelection();
66 bool canIndent() const;
68 LyXAlignment alignPossible() const;
70 LyXAlignment alignDefault() const;
76 void on_synchronizedViewCB_toggled();
78 void on_restorePB_clicked();
80 void on_linespacing_activated(int);
82 void on_applyPB_clicked();
83 /// Apply changes and close
84 void on_okPB_clicked();
85 /// Close/Cancel dialog
86 void on_closePB_clicked();
90 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
95 QString alignDefaultLabel_;
97 ParagraphParameters multiparsel_;
100 } // namespace frontend
103 #endif // QPARAGRAPH_H