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"
31 : public DialogView, public Ui::ParagraphUi
35 GuiParagraph(GuiView & lv);
37 /// Dialog inherited methods
41 void dispatchParams();
42 void enableView(bool enable);
43 bool isBufferDependent() const { return true; }
44 virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
45 void saveSession() const;
46 void restoreSession();
51 void checkAlignmentRadioButtons();
53 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
55 LyXAlignment getAlignmentFromDialog() const;
57 ParagraphParameters const & params() const;
59 bool haveMultiParSelection() const;
61 bool canIndent() const;
63 bool hasLabelwidth() const;
65 LyXAlignment alignPossible() const;
67 LyXAlignment alignDefault() const;
73 void on_synchronizedViewCB_toggled();
75 void on_restorePB_clicked();
77 void on_linespacing_activated(int);
79 void on_applyPB_clicked();
80 /// Apply changes and close
81 void on_okPB_clicked();
82 /// Close/Cancel dialog
83 void on_closePB_clicked();
87 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
92 QString alignDefaultLabel_;
94 ParagraphParameters params_;
97 } // namespace frontend
100 #endif // QPARAGRAPH_H