-// -*- C++ -*-\r
-/**\r
- * \file InsetParamsWidget.h\r
- * This file is part of LyX, the document processor.\r
- * Licence details can be found in the file COPYING.\r
- *\r
- * \author Abdelrazak Younes\r
- *\r
- * Full author contact details are available in file CREDITS.\r
- */\r
-\r
-#ifndef INSET_PARAMS_WIDGET_H\r
-#define INSET_PARAMS_WIDGET_H\r
-\r
-#include "insets/InsetCode.h"\r
-\r
-#include "FuncCode.h"\r
-\r
-#include "support/strfwd.h"\r
-\r
-#include <QWidget>\r
-\r
-class QLineEdit;\r
-\r
-namespace lyx {\r
-\r
-class Inset;\r
-\r
-namespace frontend {\r
-\r
-/// CheckedWidget\r
-// FIXME: Get rid of CheckedLineEdit in ButtonController and rename this one\r
-// to it.\r
-class CheckedWidget\r
-{\r
-public:\r
- CheckedWidget(QLineEdit * input, QWidget * label = 0);\r
- /// \r
- bool check() const;\r
-\r
-private:\r
- // non-owned\r
- QLineEdit * input_;\r
- QWidget * label_;\r
-};\r
-\r
-\r
-typedef QList<CheckedWidget> CheckedWidgets;\r
-\r
-class InsetParamsWidget : public QWidget\r
-{\r
- Q_OBJECT\r
-\r
-Q_SIGNALS:\r
- void changed();\r
-public:\r
- InsetParamsWidget(QWidget * parent);\r
- /// This is a base class; destructor must exist and be virtual.\r
- virtual ~InsetParamsWidget() {}\r
- ///\r
- virtual InsetCode insetCode() const = 0;\r
- ///\r
- virtual FuncCode creationCode() const = 0;\r
- ///\r
- virtual void paramsToDialog(Inset const *) = 0;\r
- ///\r
- virtual docstring dialogToParams() const = 0;\r
- ///\r
- virtual bool initialiseParams(std::string const & /*data*/)\r
- { return false; }\r
-\r
- /// \return true if all CheckedWidgets are in a valid state.\r
- virtual bool checkWidgets() const;\r
-\r
-protected:\r
- /// Add a widget to the list of all widgets whose validity should\r
- /// be checked explicitly when the buttons are refreshed.\r
- void addCheckedWidget(QLineEdit * input, QWidget * label = 0);\r
-private:\r
- ///\r
- CheckedWidgets checked_widgets_;\r
-};\r
-\r
-} // namespace frontend\r
-} // namespace lyx\r
-\r
-#endif // INSET_PARAMS_WIDGET_H\r
+// -*- C++ -*-
+/**
+ * \file InsetParamsWidget.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Abdelrazak Younes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef INSET_PARAMS_WIDGET_H
+#define INSET_PARAMS_WIDGET_H
+
+#include "insets/InsetCode.h"
+
+#include "FuncCode.h"
+
+#include "support/strfwd.h"
+
+#include <QWidget>
+
+class QLineEdit;
+
+namespace lyx {
+
+class Inset;
+
+namespace frontend {
+
+/// CheckedWidget
+// FIXME: Get rid of CheckedLineEdit in ButtonController and rename this one
+// to it.
+class CheckedWidget
+{
+public:
+ CheckedWidget(QLineEdit * input, QWidget * label = 0);
+ ///
+ bool check() const;
+
+private:
+ // non-owned
+ QLineEdit * input_;
+ QWidget * label_;
+};
+
+
+typedef QList<CheckedWidget> CheckedWidgets;
+
+class InsetParamsWidget : public QWidget
+{
+ Q_OBJECT
+
+Q_SIGNALS:
+ void changed();
+public:
+ InsetParamsWidget(QWidget * parent);
+ /// This is a base class; destructor must exist and be virtual.
+ virtual ~InsetParamsWidget() {}
+ ///
+ virtual InsetCode insetCode() const = 0;
+ ///
+ virtual FuncCode creationCode() const = 0;
+ ///
+ virtual void paramsToDialog(Inset const *) = 0;
+ ///
+ virtual docstring dialogToParams() const = 0;
+ ///
+ virtual bool initialiseParams(std::string const & /*data*/)
+ { return false; }
+
+ /// \return true if all CheckedWidgets are in a valid state.
+ virtual bool checkWidgets() const;
+
+protected:
+ /// Add a widget to the list of all widgets whose validity should
+ /// be checked explicitly when the buttons are refreshed.
+ void addCheckedWidget(QLineEdit * input, QWidget * label = 0);
+private:
+ ///
+ CheckedWidgets checked_widgets_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif // INSET_PARAMS_WIDGET_H