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 "QDialogView.h"
16 #include "ui_ListingsUi.h"
19 #include <QCloseEvent>
26 class QListingsDialog : public QDialog, public Ui::QListingsUi {
29 QListingsDialog(QListings * form);
30 /// get values from all the widgets and form a string
31 std::string construct_params();
32 /// validate listings parameters and return an error message, if any
33 docstring validate_listings_params();
35 virtual void change_adaptor();
36 /// AFAIK, QValidator only works for QLineEdit so
37 /// I have to validate listingsED (QTextEdit) manually.
38 /// This function displays a hint or error message returned by
39 /// validate_listings_params
40 void set_listings_msg();
41 /// turn off inline when float is clicked
42 void on_floatCB_stateChanged(int state);
43 /// turn off float when inline is clicked
44 void on_inlineCB_stateChanged(int state);
45 /// turn off numbering options when none is selected
46 void on_numberSideCO_currentIndexChanged(int);
47 /// show dialect when language is chosen
48 void on_languageCO_currentIndexChanged(int);
50 virtual void closeEvent(QCloseEvent * e);
56 class ControlListings;
58 class QListings : public QController<ControlListings, QView<QListingsDialog> > {
60 friend class QListingsDialog;
67 virtual void update_contents();
69 virtual void build_dialog();
71 /// return false if validate_listings_params returns error
72 virtual bool isValid();
75 } // namespace frontend