X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiWrap.h;h=2cb1265d8cb49775cedf4518d256948097cba545;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=2956f7ddcfd054101011ca4cc4cf6b9223db725c;hpb=212386be8a1573fb52b5da718961835816a3c8e2;p=lyx.git diff --git a/src/frontends/qt4/GuiWrap.h b/src/frontends/qt4/GuiWrap.h index 2956f7ddcf..2cb1265d8c 100644 --- a/src/frontends/qt4/GuiWrap.h +++ b/src/frontends/qt4/GuiWrap.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Jürgen Spitzmüller + * \author Jürgen Spitzmüller * * Full author contact details are available in file CREDITS. */ @@ -12,50 +12,40 @@ #ifndef GUIWRAP_H #define GUIWRAP_H -#include "GuiDialogView.h" -#include "ControlWrap.h" +#include "GuiDialog.h" #include "ui_WrapUi.h" -#include +#include "insets/InsetWrap.h" namespace lyx { namespace frontend { -class GuiWrap; - -class GuiWrapDialog : public QDialog, public Ui::WrapUi +class GuiWrap : public GuiDialog, public Ui::WrapUi { Q_OBJECT -public: - GuiWrapDialog(GuiWrap * form); -protected Q_SLOTS: - virtual void change_adaptor(); -protected: - virtual void closeEvent(QCloseEvent * e); -private: - GuiWrap * form_; -}; - -class GuiWrap : public GuiView -{ public: - friend class GuiWrapDialog; + GuiWrap(GuiView & lv); + +private Q_SLOTS: + void change_adaptor(); - GuiWrap(GuiDialog &); - /// parent controller - ControlWrap & controller() - { return static_cast(this->getController()); } - /// parent controller - ControlWrap const & controller() const - { return static_cast(this->getController()); } private: - /// Apply changes - virtual void apply(); - /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); + /// Dialog inherited methods + //@{ + void applyView(); + void updateContents() {} + bool initialiseParams(std::string const & data); + void clearParams(); + void dispatchParams(); + bool isBufferDependent() const { return true; } + //@} + + /// + void paramsToDialog(InsetWrapParams const & params); + + /// + InsetWrapParams params_; }; } // namespace frontend