예제 #1
0
void GeneratorWidget::refresh()
{

  if (mp_SignInstance != nullptr)
  {
    setAvailableWare(true);

    QString DimStr = tr("scalar");
    if (static_cast<const openfluid::fluidx::GeneratorDescriptor*>(mp_Desc)->getVariableSize() > 1)
      DimStr = tr("vector");

    ui->NameLabel->setText(
        tr("Produces %1 variable %2 on %3 (%4)")
        .arg(DimStr)
        .arg(QString::fromStdString(static_cast<const openfluid::fluidx::GeneratorDescriptor*>(mp_Desc)
                                    ->getVariableName()))
        .arg(QString::fromStdString(static_cast<const openfluid::fluidx::GeneratorDescriptor*>(mp_Desc)
                                    ->getUnitsClass()))
        .arg(QString::fromStdString(mp_SignInstance->Signature->Name)));

    // TODO add produced variable in signature
    ui->InfosSideWidget->update(mp_SignInstance);

    updateParams();
  }
  else
  {
    setAvailableWare(false);
    ui->NameLabel->setText("");
  }

}
예제 #2
0
void GeneratorWidget::refresh()
{

    if (mp_SignInstance != NULL)
    {
        setAvailableWare(true);
        ui->NameLabel->setText(QString::fromStdString(mp_SignInstance->Signature->Name));

        // TODO add produced variable in signature
        ui->InfosSideWidget->update(mp_SignInstance);

        updateParams();
    }
    else
    {
        setAvailableWare(false);
        ui->NameLabel->setText("");
    }

}