AttrWidgetVectorFloat::AttrWidgetVectorFloat(const XMLAttribute &xmlAttribute,
                                             InspectorWidget *inspectorWidget) :
    AttributeWidget(xmlAttribute, inspectorWidget, false, true, true)
{
    QHBoxLayout *hLayout = new QHBoxLayout();
    m_layout->addLayout(hLayout, 1);
    m_layout->setSpacing(0);
    m_layout->setMargin(0);

    String labels[] = {"X", "Y", "Z", "W"};
    int numberOfFields = xmlAttribute.GetNumberOfFieldsOfType();
    for (unsigned int i = 0; i < numberOfFields; ++i)
    {
        AttrWidgetFloat *s = new AttrWidgetFloat(xmlAttribute, inspectorWidget, true);
        m_floatSlots.PushBack(s);

        QLabel *label = new QLabel(QString::fromStdString(labels[i]));
        if (i != 0)
        {
            hLayout->setSpacing(3);
        }
        hLayout->addWidget(label, 0, Qt::AlignRight | Qt::AlignVCenter);
        hLayout->addWidget(s,     0, Qt::AlignLeft | Qt::AlignVCenter);
    }

    setMinimumWidth(40);
    setFixedHeight(20);
    AfterConstructor();
}