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 "qt_helpers.h"
24 CheckedWidget::CheckedWidget(QLineEdit * input, QWidget * label)
25 : input_(input), label_(label)
30 bool CheckedWidget::check() const
32 // Ignore if widget is disabled.
33 if (!input_->isEnabled())
36 bool const valid = input_->hasAcceptableInput();
38 setValid(input_, valid);
40 setValid(label_, valid);
46 InsetParamsWidget::InsetParamsWidget(QWidget * parent) : QWidget(parent)
51 void InsetParamsWidget::addCheckedWidget(QLineEdit * input, QWidget * label)
53 checked_widgets_.append(CheckedWidget(input, label));
57 bool InsetParamsWidget::checkWidgets(bool) const
60 Q_FOREACH(CheckedWidget const & le, checked_widgets_)
65 } // namespace frontend
68 #include "moc_InsetParamsWidget.cpp"