3 * \file InsetParamsWidget.cpp
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
14 #include "InsetParamsWidget.h"
16 #include "insets/Inset.h"
17 #include "qt_helpers.h"
25 CheckedWidget::CheckedWidget(QLineEdit * input, QWidget * label)
26 : input_(input), label_(label)
31 bool CheckedWidget::check() const
33 // Ignore if widget is disabled.
34 if (!input_->isEnabled())
37 bool const valid = input_->hasAcceptableInput();
39 setValid(input_, valid);
41 setValid(label_, valid);
46 QString InsetParamsWidget::dialogTitle() const
48 return toqstr(insetName(insetCode()));
52 void InsetParamsWidget::addCheckedWidget(QLineEdit * input, QWidget * label)
54 checked_widgets_.append(CheckedWidget(input, label));
58 bool InsetParamsWidget::checkWidgets(bool) const
61 Q_FOREACH(CheckedWidget const & le, checked_widgets_)
66 } // namespace frontend
69 #include "moc_InsetParamsWidget.cpp"