]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiInclude.h
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / GuiInclude.h
index df33c26ee2424e686dc63c9e1e3d0e5aa83e76a6..1e65812f91416db12b085dac705a68826fbe751c 100644 (file)
 
 #include "insets/InsetCommandParams.h"
 
-#include "support/docstring.h"
-
 
 namespace lyx {
 namespace frontend {
 
-class GuiInclude : public GuiCommand, public Ui::IncludeUi
+class GuiInclude : public GuiDialog, public Ui::IncludeUi
 {
        Q_OBJECT
 
@@ -45,9 +43,20 @@ private Q_SLOTS:
        /// 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:
+       ///
+       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 {
                ///
@@ -57,24 +66,24 @@ private:
                ///
                INCLUDE,
                ///
-               LISTINGS,
+               LISTINGS
        };
        ///
        void updateLists();
        /// validate listings parameters and return an error message, if any
        docstring validate_listings_params();
        ///
-       void edit(std::string const & file);
-       ///
        bool isValid();
        /// Apply changes
        void applyView();
        /// update
-       void updateContents();
-       ///
-       bool isBufferDependent() const { return true; }
+       void updateContents() {}
        /// Browse for a file
-       docstring browse(docstring const &, Type) const;
+       QString browse(QString const &, Type) const;
+
+private:
+       ///
+       InsetCommandParams params_;
 };
 
 } // namespace frontend