27PLineEdit::PLineEdit(MultiProperty *property, TQWidget *parent,
const char *name)
28 :PropertyWidget(property, parent, name)
30 TQHBoxLayout *l =
new TQHBoxLayout(
this, 0, 0);
31 m_edit =
new KLineEdit(
this);
32 m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
35 connect(m_edit, TQ_SIGNAL(textChanged(
const TQString&)),
this, TQ_SLOT(updateProperty(
const TQString&)));
38TQVariant PLineEdit::value()
const
40 return TQVariant(m_edit->text());
43void PLineEdit::setValue(
const TQVariant &value,
bool emitChange)
45 disconnect(m_edit, TQ_SIGNAL(textChanged(
const TQString&)),
this, TQ_SLOT(updateProperty(
const TQString&)));
46 m_edit->setText(value.toString());
47 connect(m_edit, TQ_SIGNAL(textChanged(
const TQString&)),
this, TQ_SLOT(updateProperty(
const TQString&)));
49 emit propertyChanged(m_property, value);
52void PLineEdit::updateProperty(
const TQString& val)
54 emit propertyChanged(m_property, TQVariant(val));
60#include "plineedit.moc"
Namespace which contain property editing classes.