X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiBox.h;h=813454a4d493598700c3f4e0fc79b5623e7bc5ae;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=1cd65f96c544187f85ac524e657cee6e2f105082;hpb=212386be8a1573fb52b5da718961835816a3c8e2;p=lyx.git diff --git a/src/frontends/qt4/GuiBox.h b/src/frontends/qt4/GuiBox.h index 1cd65f96c5..813454a4d4 100644 --- a/src/frontends/qt4/GuiBox.h +++ b/src/frontends/qt4/GuiBox.h @@ -4,8 +4,8 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Jürgen Spitzmüller - * \ author Martin Vermeer + * \author Jürgen Spitzmüller + * \author Martin Vermeer (with useful hints from Angus Leeming) * * Full author contact details are available in file CREDITS. */ @@ -13,68 +13,59 @@ #ifndef GUIBOX_H #define GUIBOX_H -#include "GuiDialogView.h" -#include "ControlBox.h" +#include "GuiDialog.h" #include "ui_BoxUi.h" - -#include - -#include +#include "insets/InsetBox.h" namespace lyx { namespace frontend { -class GuiBox; - -class GuiBoxDialog : public QDialog, public Ui::BoxUi { +class GuiBox : public GuiDialog, public Ui::BoxUi +{ Q_OBJECT + public: - GuiBoxDialog(GuiBox * form); -protected Q_SLOTS: - virtual void change_adaptor(); - virtual void innerBoxChanged(const QString &); - virtual void typeChanged(int); - virtual void restoreClicked(); -protected: - virtual void closeEvent(QCloseEvent * e); -private: - GuiBox * form_; -}; + GuiBox(GuiView & lv); +private Q_SLOTS: + void change_adaptor(); + void innerBoxChanged(QString const &); + void typeChanged(int); + void restoreClicked(); + void pagebreakClicked(); -class GuiBox : public GuiView -{ -public: - /// - GuiBox(GuiDialog &); - /// parent controller - ControlBox & controller() - { return static_cast(this->getController()); } - /// parent controller - ControlBox const & controller() const - { return static_cast(this->getController()); } +private: /// add and remove special lengths void setSpecial(bool ibox); /// only show valid inner box items void setInnerType(bool frameless, int i); -private: - /// - friend class GuiBoxDialog; + /// Apply changes - virtual void apply(); + void applyView(); /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); + void updateContents(); + + /// + bool initialiseParams(std::string const & data); /// - std::vector ids_; + void clearParams(); /// - std::vector gui_names_; + void dispatchParams(); /// - std::vector ids_spec_; + bool isBufferDependent() const { return true; } + + /// + QStringList ids_; + /// + QStringList gui_names_; + /// + QStringList ids_spec_; + /// + QStringList gui_names_spec_; + /// - std::vector gui_names_spec_; + InsetBoxParams params_; }; } // namespace frontend