X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiParagraph.h;h=408765bbe433c0472641b62ecd9ba28ad63e1f4a;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=9e4604c56bfeef7c3f80221bb54de1bb6753d2c6;hpb=738d5b06ba27f238dfdae4a7bd708d9be6b8fd49;p=lyx.git diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index 9e4604c56b..408765bbe4 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -6,6 +6,7 @@ * * \author Edwin Leuven * \author John Levon + * \author Abdelrazak Younes * * Full author contact details are available in file CREDITS. */ @@ -13,25 +14,41 @@ #ifndef GUIPARAGRAPH_H #define GUIPARAGRAPH_H -#include "ControlParagraph.h" -#include "Layout.h" +#include "DialogView.h" +#include "GuiView.h" +#include "qt_helpers.h" #include "ui_ParagraphUi.h" -#include +#include "Layout.h" +#include "ParagraphParameters.h" + +#include +#include +#include #include namespace lyx { namespace frontend { -class GuiParagraph : public QWidget, public Ui::ParagraphUi +class GuiParagraph + : public DialogView, public Ui::ParagraphUi { Q_OBJECT public: - GuiParagraph(ControlParagraph & controller, QWidget * parent = 0); + GuiParagraph(GuiView & lv); - /// update + /// Dialog inherited methods + //@{ + void applyView(); void updateView(); + void dispatchParams(); + void enableView(bool enable); + bool isBufferDependent() const { return true; } + virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; } + void saveSession() const; + void restoreSession(); + //@} private: /// @@ -39,14 +56,20 @@ private: /// void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT); /// - LyXAlignment getAlignmentFromDialog(); + LyXAlignment getAlignmentFromDialog() const; /// - typedef std::map RadioMap; - RadioMap radioMap; - - ControlParagraph & controller_; + ParagraphParameters const & params() const; + /// + bool haveMultiParSelection() const; + /// + bool canIndent() const; + /// + bool hasLabelwidth() const; + /// + LyXAlignment alignPossible() const; + /// + LyXAlignment alignDefault() const; - QString const alignDefaultLabel; private Q_SLOTS: /// void changed(); @@ -58,6 +81,21 @@ private Q_SLOTS: void on_linespacing_activated(int); /// Apply changes void on_applyPB_clicked(); + /// Apply changes and close + void on_okPB_clicked(); + /// Close/Cancel dialog + void on_closePB_clicked(); + +private: + /// + typedef std::map RadioMap; + /// + RadioMap radioMap_; + + /// + QString alignDefaultLabel_; + /// + ParagraphParameters params_; }; } // namespace frontend