From dbfa1a6f46c77eeeb926a16dbc9e9fbc8d23791f Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 4 Feb 2008 17:06:34 +0000 Subject: [PATCH] cleanup DialogView based classes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22775 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/DialogView.h | 7 ++++ src/frontends/qt4/GuiParagraph.cpp | 7 ---- src/frontends/qt4/GuiParagraph.h | 52 ++++++++++++------------------ 3 files changed, 28 insertions(+), 38 deletions(-) diff --git a/src/frontends/qt4/DialogView.h b/src/frontends/qt4/DialogView.h index 959423281f..9036960305 100644 --- a/src/frontends/qt4/DialogView.h +++ b/src/frontends/qt4/DialogView.h @@ -42,6 +42,13 @@ public: protected: /// void setViewTitle(docstring const & title); + + /// Dialog inherited methods + //@{ + void applyView() {} + bool initialiseParams(std::string const & /*data*/) { return true; } + void clearParams() {} + //@} }; } // namespace frontend diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index e2fbc78f3a..007531cccf 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -19,8 +19,6 @@ #include "BufferParams.h" #include "BufferView.h" #include "Cursor.h" -//#include "DialogView.h" -//#include "DockView.h" #include "FuncRequest.h" #include "GuiView.h" #include "Lexer.h" @@ -209,11 +207,6 @@ void GuiParagraph::on_restorePB_clicked() } -void GuiParagraph::enableView(bool enable) -{ -} - - void GuiParagraph::updateView() { on_synchronizedViewCB_toggled(); diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index feddbbd709..07f0c4863d 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -44,8 +44,12 @@ class GuiParagraph public: GuiParagraph(GuiView & lv); - /// update + /// Dialog inherited methods + //@{ void updateView(); + void dispatchParams(); + bool isBufferDependent() const { return true; } + //@} private: /// @@ -55,20 +59,17 @@ private: /// LyXAlignment getAlignmentFromDialog(); /// - 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 & params(); + /// + ParagraphParameters const & params() const; + /// + bool haveMulitParSelection(); + /// + bool canIndent() const; + /// + LyXAlignment alignPossible() const; + /// + LyXAlignment alignDefault() const; private Q_SLOTS: /// @@ -84,27 +85,16 @@ private Q_SLOTS: private: /// - bool initialiseParams(std::string const & /*data*/) { return true; } - /// clean-up on hide. - void clearParams() {} + typedef std::map RadioMap; /// - void dispatchParams(); + RadioMap radioMap; /// - bool isBufferDependent() const { return true; } + typedef std::map AlignmentLabels; /// - ParagraphParameters & params(); + AlignmentLabels labelMap; /// - ParagraphParameters const & params() const; + QString const alignDefaultLabel; /// - bool haveMulitParSelection(); - /// - bool canIndent() const; - /// - LyXAlignment alignPossible() const; - /// - LyXAlignment alignDefault() const; - -private: ParagraphParameters multiparsel_; };