Vespucci  1.0.0
classicalleastsquaresdialog.cpp
Go to the documentation of this file.
2 #include "ui_classicalleastsquaresdialog.h"
4 
5 ClassicalLeastSquaresDialog::ClassicalLeastSquaresDialog(QWidget *parent, QSharedPointer<VespucciWorkspace> ws, QSharedPointer<AbstractDataAnalyzer> analyzer) :
6  QDialog(parent),
8  workspace_(ws),
9  analyzer_(analyzer)
10 {
11  ui->setupUi(this);
12  matrix_selection_dialog_ = new MatrixSelectionDialog(this, workspace_->dataset_tree_model());
13  connect(matrix_selection_dialog_, &MatrixSelectionDialog::MatrixSelected,
15 }
16 
18 {
19  delete ui;
20 }
21 
23 {
24  matrix_keys_ = keys;
25  ui->matrixLabel->setText(matrix_keys_.last());
26  raise();
27 }
28 
29 void ClassicalLeastSquaresDialog::on_buttonBox_accepted()
30 {
31  if (!analyzer_.isNull()){
32  QString name = ui->nameLineEdit->text();
33  try{
34  analyzer_->ClassicalLeastSquares(name, matrix_keys_);
35  }catch(exception e){
36  workspace_->main_window()->DisplayExceptionWarning(e);
37  }
38  }
39  analyzer_.clear();
40  close();
41 }
42 
43 void ClassicalLeastSquaresDialog::on_selectPushButton_clicked()
44 {
45  matrix_selection_dialog_->show();
46 }
Definition: ahcadialog.h:26
ClassicalLeastSquaresDialog(QWidget *parent, QSharedPointer< VespucciWorkspace > ws, QSharedPointer< AbstractDataAnalyzer > analyzer)
void MatrixSelected(QStringList keys)