20#include "widgetproxy.h"
29class WidgetProxyPrivate
33 : property(0), widget(0), type( Invalid), layout(0)
35 ~WidgetProxyPrivate() {}
47WidgetProxy::WidgetProxy(TQWidget *parent, const char *name)
48 : TQWidget(parent, name)
50 d = new WidgetProxyPrivate();
52 d->layout = new TQHBoxLayout( this, 0, 0);
55WidgetProxy::~WidgetProxy()
61WidgetProxy::setPropertyType( int propertyType)
63 d->type = propertyType;
68WidgetProxy::propertyType() const
74WidgetProxy::value() const
77 return m_editor->value();
83WidgetProxy::setValue( const TQVariant &value)
86 d->widget->setValue(value, false);
90WidgetProxy::setProperty( const char *name, const TQVariant &value)
92 if( strcmp(name, "value") == 0 ) {
93 setPropertyType(( int) value.type() );
98 return TQWidget::setProperty(name, value);
102WidgetProxy::property( const char *name) const
104 if( strcmp( name, "value") == 0 )
107 return TQWidget::property(name);
111WidgetProxy::setWidget()
117 d->widget = Factory::getInstance()->widgetForProperty(p);
120 d->widget->reparent( this, TQPoint(0,0), true);
121 d->layout->addWidget(d->widget);
125#include "widgetproxy.moc"
The base class representing a single property.
const char * name(StdAction id)
Namespace for a set of classes implementing generic properties framework.
@ Invalid invalid property type
|