3 * \file InsetParamsWidget.h
\r
4 * This file is part of LyX, the document processor.
\r
5 * Licence details can be found in the file COPYING.
\r
7 * \author Abdelrazak Younes
\r
9 * Full author contact details are available in file CREDITS.
\r
12 #ifndef INSET_PARAMS_WIDGET_H
\r
13 #define INSET_PARAMS_WIDGET_H
\r
15 #include "insets/InsetCode.h"
\r
17 #include "FuncCode.h"
\r
19 #include "support/strfwd.h"
\r
29 namespace frontend {
\r
32 // FIXME: Get rid of CheckedLineEdit in ButtonController and rename this one
\r
37 CheckedWidget(QLineEdit * input, QWidget * label = 0);
\r
48 typedef QList<CheckedWidget> CheckedWidgets;
\r
50 class InsetParamsWidget : public QWidget
\r
57 InsetParamsWidget(QWidget * parent);
\r
58 /// This is a base class; destructor must exist and be virtual.
\r
59 virtual ~InsetParamsWidget() {}
\r
61 virtual InsetCode insetCode() const = 0;
\r
63 virtual FuncCode creationCode() const = 0;
\r
65 virtual void paramsToDialog(Inset const *) = 0;
\r
67 virtual docstring dialogToParams() const = 0;
\r
69 /// \return true if all CheckedWidgets are in a valid state.
\r
70 bool checkWidgets() const;
\r
73 /// Add a widget to the list of all widgets whose validity should
\r
74 /// be checked explicitly when the buttons are refreshed.
\r
75 void addCheckedWidget(QLineEdit * input, QWidget * label = 0);
\r
78 CheckedWidgets checked_widgets_;
\r
81 } // namespace frontend
\r
84 #endif // INSET_PARAMS_WIDGET_H
\r