]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiListings.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiListings.h
index 6ffee237a396b11a870ceaf2efd47bd8f73f0d32..b9717d35e7b8a671f301bf32e317bedb33b9716c 100644 (file)
 #define GUILISTINGS_H
 
 #include "GuiDialog.h"
-#include "ControlListings.h"
 #include "ui_ListingsUi.h"
+#include "insets/InsetListingsParams.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiListingsDialog : public GuiDialog, public Ui::ListingsUi
+class GuiListings : public GuiDialog, public Ui::ListingsUi
 {
        Q_OBJECT
 public:
-       GuiListingsDialog(LyXView & lv);
+       GuiListings(GuiView & lv);
        /// get values from all the widgets and form a string
        std::string construct_params();
        /// validate listings parameters and return an error message, if any
@@ -34,7 +34,7 @@ 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();
        /// turn off inline when float is clicked
        void on_floatCB_stateChanged(int state);
        /// turn off float when inline is clicked
@@ -44,15 +44,25 @@ private Q_SLOTS:
        /// show dialect when language is chosen
        void on_languageCO_currentIndexChanged(int);
 private:
-       void closeEvent(QCloseEvent * e);
-       /// parent controller
-       ControlListings & controller() const;
        /// return false if validate_listings_params returns error
        bool isValid();
        /// Apply changes
        void applyView();
        /// update
-       void update_contents();
+       void updateContents();
+       ///
+       bool initialiseParams(std::string const & data);
+       /// clean-up on hide.
+       void clearParams();
+       /// clean-up on hide.
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+       ///
+       void setParams(InsetListingsParams const &);
+
+       ///
+       InsetListingsParams params_;
 };
 
 } // namespace frontend