X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiBox.h;h=813454a4d493598700c3f4e0fc79b5623e7bc5ae;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=2763a591c64a8b555aac0cc4a7f9b943e3cd2255;hpb=a1cec91afaca91968b46e695533c10ad2a3f73d3;p=lyx.git diff --git a/src/frontends/qt4/GuiBox.h b/src/frontends/qt4/GuiBox.h index 2763a591c6..813454a4d4 100644 --- a/src/frontends/qt4/GuiBox.h +++ b/src/frontends/qt4/GuiBox.h @@ -4,78 +4,71 @@ * 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. */ -#ifndef QBOX_H -#define QBOX_H - -#include "GuiDialogView.h" +#ifndef GUIBOX_H +#define GUIBOX_H +#include "GuiDialog.h" #include "ui_BoxUi.h" - -#include -#include - -#include +#include "insets/InsetBox.h" namespace lyx { namespace frontend { -class ControlBox; -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 QController > -{ -public: - /// - friend class GuiBoxDialog; - /// - GuiBox(Dialog &); +private: /// add and remove special lengths void setSpecial(bool ibox); /// only show valid inner box items void setInnerType(bool frameless, int i); -private: + /// 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 } // namespace lyx -#endif // QBOX_H +#endif // GUIBOX_H