51 #include <QHBoxLayout>
53 #include <QPushButton>
55 #include "stringWidget.hh"
72 QHBoxLayout *hL =
new QHBoxLayout;
74 line_ =
new QLineEdit;
76 if (_hints.contains (
"default"))
77 default_ = _hints[
"default"];
79 line_->setText (default_);
81 hL->addWidget (line_);
98 return "\"" + line_->text () +
"\"";
106 if (_from.isEmpty ())
113 _from.remove (_from.length () - 1, 1);
115 line_->setText (_from);
123 line_->setText (default_);
QString toValue()
Convert current value to string.
StringWidget(QMap< QString, QString > &_hints, QString _typeName, QWidget *_parent=NULL)
Constructor.
void fromValue(QString _from)
Read value from string.
void toDefault()
Reset to default.
~StringWidget()
Destructor.