Skip to content

Commit

Permalink
Clean up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Glowacki committed Jun 4, 2024
1 parent e6cf6d0 commit 20d3ea6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 47 deletions.
29 changes: 2 additions & 27 deletions src/mvc/MapsWorkspaceFilesWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ void MapsWorkspaceFilesWidget::createLayout()
_vlm_tab_widget->appendFilterHelpAction(tiff_file);
_vlm_tab_widget->appendFilterHelpAction(tif_file);

_fit_params_table_model = new FitParamsTableModel();
ComboBoxDelegate *cbDelegate = new ComboBoxDelegate(bound_types);

/*
_fit_params_table = new QTableView();
_fit_params_table->setModel(_fit_params_table_model);
//_fit_params_table->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
//_fit_params_table->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);
_fit_params_table->sortByColumn(0, Qt::AscendingOrder);
_fit_params_table->setItemDelegateForColumn(2, cbDelegate);
*/
QLayout* vlayout = new QVBoxLayout();

_tab_widget->insertTab(0, _h5_tab_widget, "Analyized Data");
Expand All @@ -122,7 +111,7 @@ void MapsWorkspaceFilesWidget::setModel(MapsWorkspaceModel *model)
disconnect(_model, &MapsWorkspaceModel::doneLoadingVLM, this, &MapsWorkspaceFilesWidget::updatedVLM);
disconnect(_model, &MapsWorkspaceModel::doneLoadingImgDat, this, &MapsWorkspaceFilesWidget::updatedHDF);
disconnect(_model, &MapsWorkspaceModel::doneUnloading, this, &MapsWorkspaceFilesWidget::clearLists);
disconnect(_model, &MapsWorkspaceModel::newFitParamsFileLoaded, this, &MapsWorkspaceFilesWidget::loadedFitParams);
//disconnect(_model, &MapsWorkspaceModel::newFitParamsFileLoaded, this, &MapsWorkspaceFilesWidget::loadedFitParams);
}

_model = model;
Expand All @@ -146,7 +135,7 @@ void MapsWorkspaceFilesWidget::setModel(MapsWorkspaceModel *model)
connect(_model, &MapsWorkspaceModel::doneLoadingImgDat, this, &MapsWorkspaceFilesWidget::updatedHDF);
connect(_model, &MapsWorkspaceModel::doneLoadingROIS, this, &MapsWorkspaceFilesWidget::updateROIS);
connect(_model, &MapsWorkspaceModel::doneUnloading, this, &MapsWorkspaceFilesWidget::clearLists);
connect(_model, &MapsWorkspaceModel::newFitParamsFileLoaded, this, &MapsWorkspaceFilesWidget::loadedFitParams);
//connect(_model, &MapsWorkspaceModel::newFitParamsFileLoaded, this, &MapsWorkspaceFilesWidget::loadedFitParams);
connect(_h5_tab_widget, &FileTabWidget::onRefresh, _model, &MapsWorkspaceModel::reload_analyzed);
connect(_vlm_tab_widget, &FileTabWidget::onRefresh, _model, &MapsWorkspaceModel::reload_vlm);
connect(_mda_tab_widget, &FileTabWidget::onRefresh, _model, &MapsWorkspaceModel::reload_raw);
Expand Down Expand Up @@ -206,20 +195,6 @@ void MapsWorkspaceFilesWidget::update_roi_num(QString name, int val)
_mda_tab_widget->set_roi_num(name, val);
}

//---------------------------------------------------------------------------

void MapsWorkspaceFilesWidget::loadedFitParams(int idx)
{
if(idx == -1) //avg fit params
{
data_struct::Fit_Parameters<double>* fit_params = _model->getFitParameters(idx);
if(fit_params != nullptr)
{
_fit_params_table_model->setFitParams(*fit_params);
}
}
}

/*---------------------------------------------------------------------------*/

void MapsWorkspaceFilesWidget::setFileTabActionsEnabled(bool val)
Expand Down
34 changes: 14 additions & 20 deletions src/mvc/MapsWorkspaceFilesWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,35 +67,33 @@ class MapsWorkspaceFilesWidget : public QWidget

public slots:

void updatedMDA();
void updatedMDA();

void updatedVLM();
void updatedVLM();

void updatedHDF();
void updatedHDF();

void updateROIS();
void updateROIS();

void update_roi_num(QString, int);

void clearLists();
void clearLists();

void loadedFitParams(int idx);

void onOpenModel(const QStringList& names_list, MODEL_TYPE mt);
void onOpenModel(const QStringList& names_list, MODEL_TYPE mt);

void onCloseModel(const QStringList& names_list, MODEL_TYPE mt);
void onCloseModel(const QStringList& names_list, MODEL_TYPE mt);

void onCustomContext(const QString& context_label, const QStringList& file_list);
void onCustomContext(const QString& context_label, const QStringList& file_list);

void onPerPixelProcessList(const QStringList& file_list);
void onPerPixelProcessList(const QStringList& file_list);

void onPerPixelProcessListAnalyzed(const QStringList& file_list);

void onBatchRoiList(const QStringList& file_list);
void onPerPixelProcessListAnalyzed(const QStringList& file_list);

void onProcessed_list_update(QStringList file_list);
void onBatchRoiList(const QStringList& file_list);

void onDatasetSelected(const QString name);
void onProcessed_list_update(QStringList file_list);

void onDatasetSelected(const QString name);

protected:

Expand All @@ -118,10 +116,6 @@ public slots:

MapsWorkspaceModel* _model;

QTableView* _fit_params_table;

FitParamsTableModel* _fit_params_table_model;

PerPixelFitWidget* _per_pixel_fit_widget;

BatchRoiFitWidget* _batch_roi_fit_widget;
Expand Down

0 comments on commit 20d3ea6

Please sign in to comment.