cleanup DialogView based classes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22775 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-04 17:06:34 +00:00
parent 1ccb7f1f8b
commit dbfa1a6f46
3 changed files with 28 additions and 38 deletions

View File

@ -42,6 +42,13 @@ public:
protected: protected:
/// ///
void setViewTitle(docstring const & title); void setViewTitle(docstring const & title);
/// Dialog inherited methods
//@{
void applyView() {}
bool initialiseParams(std::string const & /*data*/) { return true; }
void clearParams() {}
//@}
}; };
} // namespace frontend } // namespace frontend

View File

@ -19,8 +19,6 @@
#include "BufferParams.h" #include "BufferParams.h"
#include "BufferView.h" #include "BufferView.h"
#include "Cursor.h" #include "Cursor.h"
//#include "DialogView.h"
//#include "DockView.h"
#include "FuncRequest.h" #include "FuncRequest.h"
#include "GuiView.h" #include "GuiView.h"
#include "Lexer.h" #include "Lexer.h"
@ -209,11 +207,6 @@ void GuiParagraph::on_restorePB_clicked()
} }
void GuiParagraph::enableView(bool enable)
{
}
void GuiParagraph::updateView() void GuiParagraph::updateView()
{ {
on_synchronizedViewCB_toggled(); on_synchronizedViewCB_toggled();

View File

@ -44,8 +44,12 @@ class GuiParagraph
public: public:
GuiParagraph(GuiView & lv); GuiParagraph(GuiView & lv);
/// update /// Dialog inherited methods
//@{
void updateView(); void updateView();
void dispatchParams();
bool isBufferDependent() const { return true; }
//@}
private: private:
/// ///
@ -55,20 +59,17 @@ private:
/// ///
LyXAlignment getAlignmentFromDialog(); LyXAlignment getAlignmentFromDialog();
/// ///
typedef std::map<LyXAlignment, QRadioButton *> RadioMap; ParagraphParameters & params();
RadioMap radioMap; ///
typedef std::map<LyXAlignment, docstring> AlignmentLabels; ParagraphParameters const & params() const;
AlignmentLabels labelMap; ///
bool haveMulitParSelection();
QString const alignDefaultLabel; ///
bool canIndent() const;
void applyView() {} ///
void enableView(bool enable); LyXAlignment alignPossible() const;
///
std::string name() const { return "paragraph"; } LyXAlignment alignDefault() const;
private:
QString name_;
private Q_SLOTS: private Q_SLOTS:
/// ///
@ -84,27 +85,16 @@ private Q_SLOTS:
private: private:
/// ///
bool initialiseParams(std::string const & /*data*/) { return true; } typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
/// clean-up on hide.
void clearParams() {}
/// ///
void dispatchParams(); RadioMap radioMap;
/// ///
bool isBufferDependent() const { return true; } typedef std::map<LyXAlignment, docstring> 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_; ParagraphParameters multiparsel_;
}; };