void
AttributesEditor::nameChanged()
{
  BasicBox * box = _scene->getBox(_boxEdited);
  if (box != NULL) {
      box->setName(_boxName->text());
      _scene->update(box->getTopLeft().x(), box->getTopLeft().y(), box->width(), box->height() + 10);
    }
}
void
AttributesEditor::updateWidgets(bool boxModified)
{
  Q_UNUSED(boxModified);

  BasicBox * box = _scene->getBox(_boxEdited);

  if (box != NULL) {
      box->update();
      box->centerWidget();

      _boxStartValue->setValue(box->beginPos() * MaquetteScene::MS_PER_PIXEL / S_TO_MS);
      _boxLengthValue->setValue(box->width() * MaquetteScene::MS_PER_PIXEL / S_TO_MS);

      _boxName->setText(box->name());
      _colorButtonPixmap->fill(box->currentColor());
      _generalColorButton->setIcon(QIcon(*_colorButtonPixmap));
  }

  update();
}