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"
27 #include <QGridLayout>
35 : public DialogView, public Ui::ParagraphUi
39 GuiParagraph(GuiView & lv);
41 /// Dialog inherited methods
45 void dispatchParams();
46 void enableView(bool enable);
47 bool isBufferDependent() const { return true; }
48 virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
49 void saveSession() const;
50 void restoreSession();
55 void checkAlignmentRadioButtons();
57 void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT);
59 LyXAlignment getAlignmentFromDialog() const;
61 ParagraphParameters const & params() const;
63 bool haveMultiParSelection() const;
65 bool canIndent() const;
67 bool hasLabelwidth() const;
69 LyXAlignment alignPossible() const;
71 LyXAlignment alignDefault() const;
77 void on_synchronizedViewCB_toggled();
79 void on_restorePB_clicked();
81 void on_linespacing_activated(int);
83 void on_applyPB_clicked();
84 /// Apply changes and close
85 void on_okPB_clicked();
86 /// Close/Cancel dialog
87 void on_closePB_clicked();
91 typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
96 QString alignDefaultLabel_;
98 ParagraphParameters params_;
101 } // namespace frontend
104 #endif // QPARAGRAPH_H