X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiParagraph.h;h=408765bbe433c0472641b62ecd9ba28ad63e1f4a;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=feddbbd709f967e072e362bc4ff0fe217d6304a2;hpb=604c1148ea8beedaebbe0bdbe5a0adc76237a697;p=lyx.git diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index feddbbd709..408765bbe4 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -14,25 +14,19 @@ #ifndef GUIPARAGRAPH_H #define GUIPARAGRAPH_H -// Uncomment this if you prefer dock widget -//#define USE_DOCK_WIDGET - -#include "Layout.h" -#include "ui_ParagraphUi.h" #include "DialogView.h" -#include "ParagraphParameters.h" #include "GuiView.h" #include "qt_helpers.h" -#include "support/debug.h" +#include "ui_ParagraphUi.h" + +#include "Layout.h" +#include "ParagraphParameters.h" -#include #include -#include #include #include #include -#include namespace lyx { namespace frontend { @@ -44,8 +38,17 @@ class GuiParagraph public: 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: /// @@ -53,22 +56,19 @@ private: /// void alignmentToRadioButtons(LyXAlignment align = LYX_ALIGN_LAYOUT); /// - LyXAlignment getAlignmentFromDialog(); + LyXAlignment getAlignmentFromDialog() const; /// - typedef std::map RadioMap; - RadioMap radioMap; - typedef std::map AlignmentLabels; - AlignmentLabels labelMap; - - QString const alignDefaultLabel; - - void applyView() {} - void enableView(bool enable); - - std::string name() const { return "paragraph"; } - -private: - QString name_; + ParagraphParameters const & params() const; + /// + bool haveMultiParSelection() const; + /// + bool canIndent() const; + /// + bool hasLabelwidth() const; + /// + LyXAlignment alignPossible() const; + /// + LyXAlignment alignDefault() const; private Q_SLOTS: /// @@ -81,31 +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: /// - bool initialiseParams(std::string const & /*data*/) { return true; } - /// clean-up on hide. - void clearParams() {} - /// - void dispatchParams(); - /// - bool isBufferDependent() const { return true; } - /// - ParagraphParameters & params(); - /// - ParagraphParameters const & params() const; - /// - bool haveMulitParSelection(); + typedef std::map RadioMap; /// - bool canIndent() const; + RadioMap radioMap_; + /// - LyXAlignment alignPossible() const; + QString alignDefaultLabel_; /// - LyXAlignment alignDefault() const; - -private: - ParagraphParameters multiparsel_; + ParagraphParameters params_; }; } // namespace frontend