//                                               -*- C++ -*-
/**
 *  @brief QMdiSubWindow to display the input sample of the designs of experiments
 *
 *  Copyright 2015-2025 EDF-Phimeca
 *
 *  This library is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
#include "persalys/DesignOfExperimentInputWindow.hxx"

#include "persalys/DesignOfExperimentEvaluation.hxx"

namespace PERSALYS
{

DesignOfExperimentInputWindow::DesignOfExperimentInputWindow(AnalysisItem * item, QWidget * parent)
  : DataAnalysisWindow(item, parent)
{
  designOfExperiment_.setInputSample(dynamic_cast<DesignOfExperimentEvaluation*>(item->getAnalysis().getImplementation().get())->getOriginalInputSample());

  titleLabel_->setText(tr("Design of experiments input sample"));
  titleLabel_->setDocLink("user_manual/graphical_interface/deterministic_analysis/user_manual_deterministic_analysis.html#doeinputwindow");

  // parameters widget
  setParameters(item->getAnalysis(), tr("Design of experiments creation parameters"));

  buildInterface();
}


void DesignOfExperimentInputWindow::updateVariablesListVisibility(int indexTab)
{
  // if indextab == summary : variablesGroupBox_ is visible
  variablesGroupBox_->setVisible(indexTab == 0);
}
}
