3 * \file InsetParamsWidget.cpp
\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
14 #include "InsetParamsWidget.h"
\r
16 #include "qt_helpers.h"
\r
18 #include <QLineEdit>
\r
22 namespace frontend {
\r
24 CheckedWidget::CheckedWidget(QLineEdit * input, QWidget * label)
\r
25 : input_(input), label_(label)
\r
30 bool CheckedWidget::check() const
\r
32 bool const valid = input_->hasAcceptableInput();
\r
34 setValid(input_, valid);
\r
36 setValid(label_, valid);
\r
42 InsetParamsWidget::InsetParamsWidget(QWidget * parent) : QWidget(parent)
\r
47 void InsetParamsWidget::addCheckedWidget(QLineEdit * input, QWidget * label)
\r
49 checked_widgets_.append(CheckedWidget(input, label));
\r
53 bool InsetParamsWidget::checkWidgets() const
\r
56 Q_FOREACH(CheckedWidget const & le, checked_widgets_)
\r
57 valid &= le.check();
\r
61 } // namespace frontend
\r
64 #include "moc_InsetParamsWidget.cpp"
\r