void ItemHandlerSpinboxRange::Handle (const QDomElement& item,
			QWidget *pwidget)
	{
		QGridLayout *lay = qobject_cast<QGridLayout*> (pwidget->layout ());
		QLabel *label = new QLabel (XSD_->GetLabel (item));
		label->setWordWrap (false);

		RangeWidget *widget = new RangeWidget ();
		XSD_->SetTooltip (widget, item);
		widget->setObjectName (item.attribute ("property"));
		widget->SetMinimum (item.attribute ("minimum").toInt ());
		widget->SetMaximum (item.attribute ("maximum").toInt ());

		const QVariant& value = XSD_->GetValue (item);

		widget->SetRange (value);
		connect (widget,
				SIGNAL (changed ()),
				this,
				SLOT (updatePreferences ()));

		widget->setProperty ("ItemHandler", QVariant::fromValue<QObject*> (this));
		widget->setProperty ("SearchTerms", label->text ());

		int row = lay->rowCount ();
		lay->addWidget (label, row, 0, Qt::AlignRight);
		lay->addWidget (widget, row, 1);
	}
	void ItemHandlerSpinboxRange::Handle (const QDomElement& item,
			QWidget *pwidget)
	{
		QFormLayout *lay = qobject_cast<QFormLayout*> (pwidget->layout ());
		QLabel *label = new QLabel (XSD_->GetLabel (item));
		label->setWordWrap (false);
		RangeWidget *widget = new RangeWidget ();
		widget->setObjectName (item.attribute ("property"));
		widget->SetMinimum (item.attribute ("minimum").toInt ());
		widget->SetMaximum (item.attribute ("maximum").toInt ());

		QVariant value = XSD_->GetValue (item);

		widget->SetRange (value);
		connect (widget,
				SIGNAL (changed ()),
				this,
				SLOT (updatePreferences ()));

		widget->setProperty ("ItemHandler",
				QVariant::fromValue<QObject*> (this));

		lay->addRow (label, widget);
	}