4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "GuiDialog.h"
16 #include "ui_ListingsUi.h"
17 #include "insets/InsetListingsParams.h"
22 class GuiListings : public GuiDialog, public Ui::ListingsUi
26 GuiListings(GuiView & lv);
27 /// get values from all the widgets and form a string
28 std::string construct_params();
29 /// validate listings parameters and return an error message, if any
30 docstring validate_listings_params();
32 void change_adaptor();
33 /// AFAIK, QValidator only works for QLineEdit so
34 /// I have to validate listingsED (QTextEdit) manually.
35 /// This function displays a hint or error message returned by
36 /// validate_listings_params
37 void setListingsMsg();
38 /// turn off inline when float is clicked
39 void on_floatCB_stateChanged(int state);
40 /// turn off float when inline is clicked
41 void on_inlineCB_stateChanged(int state);
42 /// turn off numbering options when none is selected
43 void on_numberSideCO_currentIndexChanged(int);
44 /// show dialect when language is chosen
45 void on_languageCO_currentIndexChanged(int);
47 /// return false if validate_listings_params returns error
52 void updateContents();
54 bool initialiseParams(std::string const & data);
58 void dispatchParams();
60 bool isBufferDependent() const { return true; }
62 void setParams(InsetListingsParams const &);
65 InsetListingsParams params_;
68 } // namespace frontend
71 #endif // GUILISTINGS_H