X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiInclude.h;h=e5ef7b668907c2d2cf870d01137ca0175939ce30;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=09abe6791bf2736b7b5e126e7482151454a7ced7;hpb=470aba2a0e552f27d55992372c09f15af9725fa8;p=lyx.git diff --git a/src/frontends/qt4/GuiInclude.h b/src/frontends/qt4/GuiInclude.h index 09abe6791b..e5ef7b6689 100644 --- a/src/frontends/qt4/GuiInclude.h +++ b/src/frontends/qt4/GuiInclude.h @@ -4,6 +4,8 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * + * \author Alejandro Aguilar Sierra + * \author Angus Leeming * \author John Levon * * Full author contact details are available in file CREDITS. @@ -13,50 +15,75 @@ #define GUIINCLUDE_H #include "GuiDialog.h" -#include "ControlInclude.h" #include "ui_IncludeUi.h" +#include "insets/InsetCommandParams.h" + + namespace lyx { namespace frontend { -class GuiIncludeDialog : public GuiDialog, public Ui::IncludeUi +class GuiInclude : public GuiDialog, public Ui::IncludeUi { Q_OBJECT public: - GuiIncludeDialog(LyXView & lv); + GuiInclude(GuiView & lv); private Q_SLOTS: void change_adaptor(); - void editClicked(); - void browseClicked(); + /// edit the child document, .lyx file will be opened in lyx + /// other formats will be edited by external applications. + void edit(); + /// browse for a file + void browse(); + /// void typeChanged(int v); /// AFAIK, QValidator only works for QLineEdit so /// I have to validate listingsED (QTextEdit) manually. /// This function displays a hint or error message returned by /// validate_listings_params - void set_listings_msg(); + void setListingsMsg(); private: - void closeEvent(QCloseEvent * e); - /// parent controller - ControlInclude & controller(); + /// + bool initialiseParams(std::string const & data); + /// + void paramsToDialog(InsetCommandParams const & params_); + /// clean-up on hide. + void clearParams() { params_.clear(); } + /// clean-up on hide. + void dispatchParams(); + /// + bool isBufferDependent() const { return true; } + + /// + enum Type { + /// + INPUT, + /// + VERBATIM, + /// + INCLUDE, + /// + LISTINGS, + }; /// void updateLists(); /// validate listings parameters and return an error message, if any docstring validate_listings_params(); - /// bool isValid(); /// Apply changes void applyView(); /// update - void updateContents(); - /// edit the child document, .lyx file will be opened in lyx - /// other formats will be edited by external applications. - void edit(); - /// browse for a file - void browse(); + void updateContents() {} + /// Browse for a file + QString browse(QString const &, Type) const; + +private: + /// + InsetCommandParams params_; }; } // namespace frontend