From f3c2ee3c7dddb68ea976ed25b1f6f24d6404e4ce Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Wed, 12 Jun 2024 15:38:37 -0500 Subject: [PATCH 01/18] Added motor coordinates to be displayed --- src/gstar/MotorLookupTransformer.cpp | 135 +++++++++++++++++++++++++++ src/gstar/MotorLookupTransformer.h | 107 +++++++++++++++++++++ src/mvc/MapsElementsWidget.cpp | 4 + src/mvc/MapsElementsWidget.h | 4 + 4 files changed, 250 insertions(+) create mode 100644 src/gstar/MotorLookupTransformer.cpp create mode 100644 src/gstar/MotorLookupTransformer.h diff --git a/src/gstar/MotorLookupTransformer.cpp b/src/gstar/MotorLookupTransformer.cpp new file mode 100644 index 0000000..5842ad1 --- /dev/null +++ b/src/gstar/MotorLookupTransformer.cpp @@ -0,0 +1,135 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include +#include + +using namespace gstar; + +/*---------------------------------------------------------------------------*/ + +#define STR_MOTOR_X "X" +#define STR_MOTOR_Y "Y" + +/*---------------------------------------------------------------------------*/ + +MotorLookupTransformer::MotorLookupTransformer() : ITransformer() +{ + + _motor_x = 0; + _motor_y = 0; + _rows = 0; + _cols = 0; + +} + +/*---------------------------------------------------------------------------*/ + +MotorLookupTransformer::~MotorLookupTransformer() +{ + +} + +/*---------------------------------------------------------------------------*/ + +bool MotorLookupTransformer::Init(QMap globalVars) +{ + + return true; + +} + +/*---------------------------------------------------------------------------*/ + +QMap MotorLookupTransformer::getAllCoef() +{ + + QMap coefs; + + coefs.insert(STR_MOTOR_X, _motor_x); + coefs.insert(STR_MOTOR_Y, _motor_y); + + return coefs; + +} + +/*---------------------------------------------------------------------------*/ + +void MotorLookupTransformer::setMotors(const std::vector& motor_x, const std::vector& motor_y) +{ + _motor_x_arr = motor_x; + _motor_y_arr = motor_y; + _rows = motor_y.size(); + _cols = motor_x.size(); +} + +/*---------------------------------------------------------------------------*/ + +bool MotorLookupTransformer::getVariable(QString name, double *val) +{ + + if(name == STR_MOTOR_X) + { + *val = _motor_x; + return true; + } + else if(name == STR_MOTOR_Y) + { + *val = _motor_y; + return true; + } + + return false; + +} + +/*---------------------------------------------------------------------------*/ + +bool MotorLookupTransformer::setVariable(QString name, double val) +{ + + if(name == STR_MOTOR_X) + { + _motor_x = val; + return true; + } + else if(name == STR_MOTOR_Y) + { + _motor_y = val; + return true; + } + + return false; + +} + +/*---------------------------------------------------------------------------*/ + +void MotorLookupTransformer::transformCommand(double inX, + double inY, + double inZ, + double *outX, + double *outY, + double *outZ) +{ + int col = (int)inX; + int row = (int)inY; + + if(row > -1 && row < _rows && col > -1 && col < _cols) + { + *outX = _motor_x_arr[col]; + *outY = _motor_y_arr[row]; + } + else + { + *outX = 0.0; + *outY = 0.0; + } + + *outZ = 0; + +} + +/*---------------------------------------------------------------------------*/ diff --git a/src/gstar/MotorLookupTransformer.h b/src/gstar/MotorLookupTransformer.h new file mode 100644 index 0000000..55fc45a --- /dev/null +++ b/src/gstar/MotorLookupTransformer.h @@ -0,0 +1,107 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef MOTOR_LOOKUP_TRANSFORMER_H +#define MOTOR_LOOKUP_TRANSFORMER_H + +/*---------------------------------------------------------------------------*/ + +#include "gstar/ITransformer.h" +#include "mvc/MapsH5Model.h" +#include +#include +#include + +/*---------------------------------------------------------------------------*/ + +namespace gstar +{ + +/** + * @brief + * + */ +class MotorLookupTransformer : public ITransformer +{ + +public: + + /** + * Constructor. + */ + MotorLookupTransformer(); + + /** + * Destructor. + */ + virtual ~MotorLookupTransformer(); + + /** + * Init variables + */ + virtual bool Init(QMap globalVars); + + /** + * @brief getAllCoef + * @return + */ + virtual QMap getAllCoef(); + + /** + * @brief getVariable + * @param name + * @param val + * @return + */ + virtual bool getVariable(QString name, double *val); + + /** + * @brief setVariable + * @param name + * @param val + * @return + */ + virtual bool setVariable(QString name, double val); + + void setMotors(const std::vector& motor_x, const std::vector& motor_y); + + /** + * @brief transformCommand + * @param inX + * @param inY + * @param inZ + * @param outX + * @param outY + */ + virtual void transformCommand(double inX, + double inY, + double inZ, + double *outX, + double *outY, + double *outZ); + + //const data_struct::ArrayXXr* get_motor_array() { return &_counts_arr; } + +protected: + + double _motor_x; + + double _motor_y; + + int _rows; + + int _cols; + + std::vector _motor_x_arr; + + std::vector _motor_y_arr; +}; + +} +/*---------------------------------------------------------------------------*/ + +#endif + +/*---------------------------------------------------------------------------*/ diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index 8f2148f..5cdb6d9 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -352,6 +352,8 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) restoreGeometry(Preferences::inst()->getValue(STR_MAPS_WIDGET_GEOMETRY).toByteArray()); //restoreState(Preferences::inst()->getValue(STR_MAPS_WIDGET_WINDOWSTATE).toByteArray()); + setCoordinateModel(new gstar::CoordinateModel(&_motor_trans)); + setLayout(layout); @@ -948,6 +950,8 @@ void MapsElementsWidget::setModel(MapsH5Model* model) _scatter_plot_widget->setAnalysisType(analysis_text); } + _motor_trans.setMotors(_model->get_x_axis(), _model->get_y_axis()); + annoTabChanged(m_tabWidget->currentIndex()); } m_imageWidgetToolBar->clickFill(); diff --git a/src/mvc/MapsElementsWidget.h b/src/mvc/MapsElementsWidget.h index 9015265..04b478c 100644 --- a/src/mvc/MapsElementsWidget.h +++ b/src/mvc/MapsElementsWidget.h @@ -28,6 +28,7 @@ #include #include #include +#include using gstar::AbstractGraphicsItem; /*---------------------------------------------------------------------------*/ @@ -243,6 +244,9 @@ public slots: QDockWidget* _extra_dock; std::map< QString, QDockWidget*> _dockMap; + + gstar::MotorLookupTransformer _motor_trans; + }; From b9ab7ec8abeae13a7ade2d5714a92ea9958a4a05 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Thu, 13 Jun 2024 09:33:15 -0500 Subject: [PATCH 02/18] started working on batch processing --- src/core/uProbeX.cpp | 93 +++++++++++++++++++++++++--- src/core/uProbeX.h | 22 +++++++ src/mvc/FileTabWidget.cpp | 11 +++- src/mvc/FileTabWidget.h | 2 + src/mvc/FileTableModel.h | 33 ++++++++++ src/mvc/MapsWorkspaceController.h | 2 + src/mvc/MapsWorkspaceFilesWidget.cpp | 34 +++++++++- src/mvc/MapsWorkspaceFilesWidget.h | 2 + src/mvc/MapsWorkspaceModel.cpp | 71 ++++++++++++++++++++- src/mvc/MapsWorkspaceModel.h | 12 ++++ 10 files changed, 270 insertions(+), 12 deletions(-) diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index 34a0865..9f2494a 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -231,13 +231,19 @@ void uProbeX::createMenuBar() connect(m_menuFile, SIGNAL(aboutToShow()), this, SLOT(menuBarEnable())); // Batch menu - //m_menuBatch = new QMenu(tr("Batch Processing")); - //action = m_menuBatch->addAction("Per Pixel Processing"); - //connect(action, SIGNAL(triggered()), this, SLOT(perPixel())); - //action = "Export Images" - //action = "Roi Stats" - //m_menu->addMenu(m_menuBatch); + m_menuBatch = new QMenu(tr("Batch Processing")); + _action_per_pixel = m_menuBatch->addAction("Per Pixel Processing"); + connect(_action_per_pixel, SIGNAL(triggered()), this, SLOT(batchPerPixel())); + _action_export_images = m_menuBatch->addAction("Export Images"); + connect(_action_export_images, SIGNAL(triggered()), this, SLOT(BatchExportImages())); + _action_roi_stats = m_menuBatch->addAction("Roi Stats"); + connect(_action_roi_stats, SIGNAL(triggered()), this, SLOT(BatchRoiStats())); + _action_gen_scan_vlm = m_menuBatch->addAction("Generate Scan VLM"); + connect(_action_gen_scan_vlm, SIGNAL(triggered()), this, SLOT(BatcGenScanVlm())); + m_menu->addMenu(m_menuBatch); + + setBatchActionsEnabled(false); // Stream menu m_menuStream = new QMenu(tr("Live Stream")); @@ -254,7 +260,71 @@ void uProbeX::createMenuBar() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void uProbeX::setBatchActionsEnabled(bool val) +{ + /* + _action_per_pixel->setEnabled(val); + _action_export_images->setEnabled(val); + _action_roi_stats->setEnabled(val); + _action_gen_scan_vlm->setEnabled(val); + */ + m_menuBatch->setEnabled(val); +} + +//--------------------------------------------------------------------------- + +void uProbeX::batchPerPixel() +{ + if(_mapsWorkspaceControllers.size() > 0) + { + MapsWorkspaceController *controller = _mapsWorkspaceControllers.first(); + if(controller != nullptr) + { + MapsWorkspaceModel* model = controller->get_model(); + if(model != nullptr) + { + model->unload_all_H5_Model(); + model->unload_all_RAW_Model(); + _per_pixel_fit_widget.setDir(model->get_directory_name().toStdString()); + _per_pixel_fit_widget.updateFileList(model->get_raw_names_as_qstringlist()); + _per_pixel_fit_widget.show(); + } + else + { + logW<<"Model is nullptr\n"; + } + } + else + { + logW<<"Controller is nullptr\n"; + } + } +} + +//--------------------------------------------------------------------------- + +void uProbeX::BatchExportImages() +{ + +} + +//--------------------------------------------------------------------------- + +void uProbeX::BatchRoiStats() +{ + +} + +//--------------------------------------------------------------------------- + +void uProbeX::BatcGenScanVlm() +{ + +} + +//--------------------------------------------------------------------------- void uProbeX::openLiveStreamViewer() { @@ -569,8 +639,13 @@ void uProbeX::mapsControllerClosed(MapsWorkspaceController* controller) if (controller != nullptr) { delete controller; + int i = _mapsWorkspaceControllers.indexOf(controller); + _mapsWorkspaceControllers.removeAt(i); + } + if(_mapsWorkspaceControllers.size() == 0) + { + setBatchActionsEnabled(false); } - controller = nullptr; } /*---------------------------------------------------------------------------*/ @@ -768,8 +843,10 @@ void uProbeX::openMapsWorkspace(QString dirName) MapsWorkspaceController* mapsWorkspaceController = new MapsWorkspaceController(this); connect(mapsWorkspaceController, SIGNAL(controllerClosed(MapsWorkspaceController*)), this, SLOT(mapsControllerClosed(MapsWorkspaceController*))); + _mapsWorkspaceControllers.append(mapsWorkspaceController); mapsWorkspaceController->setWorkingDir(dirName); + setBatchActionsEnabled(true); } diff --git a/src/core/uProbeX.h b/src/core/uProbeX.h index e226b47..907b7e6 100644 --- a/src/core/uProbeX.h +++ b/src/core/uProbeX.h @@ -208,6 +208,14 @@ private slots: void upgradeV9Rois(); + void batchPerPixel(); + + void BatchExportImages(); + + void BatchRoiStats(); + + void BatcGenScanVlm(); + private: /** @@ -261,6 +269,8 @@ private slots: */ bool saveActivatedXmlRequired(); + void setBatchActionsEnabled(bool val); + private: /** @@ -312,6 +322,18 @@ private slots: UpgradeRoiDialog _upgradeRoiDialog; + QAction* _action_per_pixel; + + QAction* _action_export_images; + + QAction* _action_roi_stats; + + QAction* _action_gen_scan_vlm; + + PerPixelFitWidget _per_pixel_fit_widget; + + QList _mapsWorkspaceControllers; + }; /*---------------------------------------------------------------------------*/ diff --git a/src/mvc/FileTabWidget.cpp b/src/mvc/FileTabWidget.cpp index 5db09be..e5a3435 100644 --- a/src/mvc/FileTabWidget.cpp +++ b/src/mvc/FileTabWidget.cpp @@ -359,14 +359,21 @@ void FileTabWidget::filterTextChanged(const QString &filter_text) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::loaded_file_status_changed(File_Loaded_Status status, const QString& filename) { _file_list_model->updateStatus(status, filename); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void FileTabWidget::loaded_file_status_changed_all(File_Loaded_Status status) +{ + _file_list_model->updateAllStatus(status); +} + +//--------------------------------------------------------------------------- void FileTabWidget::filterBtnClicked() { diff --git a/src/mvc/FileTabWidget.h b/src/mvc/FileTabWidget.h index 20be129..49b5107 100644 --- a/src/mvc/FileTabWidget.h +++ b/src/mvc/FileTabWidget.h @@ -90,6 +90,8 @@ public slots: void loaded_file_status_changed(File_Loaded_Status status, const QString& filename); + void loaded_file_status_changed_all(File_Loaded_Status status); + void load_all_visible(); void unload_all_visible(); diff --git a/src/mvc/FileTableModel.h b/src/mvc/FileTableModel.h index 92810a3..9b343e2 100644 --- a/src/mvc/FileTableModel.h +++ b/src/mvc/FileTableModel.h @@ -188,12 +188,16 @@ class FileTableModel : public QAbstractTableModel // Return empty data return QVariant(); } + //--------------------------------------------------------------------------- + Qt::ItemFlags flags(const QModelIndex &index) const { return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } + //--------------------------------------------------------------------------- + void updateStatus(File_Loaded_Status status, const QString& filename) { int i=0; @@ -223,6 +227,35 @@ class FileTableModel : public QAbstractTableModel i++; } } + //--------------------------------------------------------------------------- + + void updateAllStatus(File_Loaded_Status status) + { + int i=0; + for(auto &itr : _data) + { + QModelIndex index = createIndex(i, 0, &itr); + itr.status = status; + switch(status) + { + case UNLOADED: + itr.icon = QIcon(":/images/circle_gray.png"); + emit dataChanged(index, index); + break; + case LOADED: + itr.icon = QIcon(":/images/circle_green.png"); + emit dataChanged(index, index); + break; + case FAILED_LOADING: + itr.icon = QIcon(":/images/circle_red.png"); + emit dataChanged(index, index); + break; + } + break; + } + i++; + } + //--------------------------------------------------------------------------- void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override { diff --git a/src/mvc/MapsWorkspaceController.h b/src/mvc/MapsWorkspaceController.h index f13da11..5c0f104 100644 --- a/src/mvc/MapsWorkspaceController.h +++ b/src/mvc/MapsWorkspaceController.h @@ -36,6 +36,8 @@ class MapsWorkspaceController : public QObject void update_file_list() {if(_imgStackControllWidget!= nullptr){_imgStackControllWidget->update_file_list();}} + MapsWorkspaceModel* get_model(){ return _mapsWorkspaceModel;} + signals: void controllerClosed(MapsWorkspaceController*); diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index 3a126d2..d8af43c 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -367,7 +367,39 @@ void MapsWorkspaceFilesWidget::onOpenModel(const QStringList& names_list, MODEL_ setFileTabActionsEnabled(true); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void MapsWorkspaceFilesWidget::closeAllModels(MODEL_TYPE mt) +{ + setFileTabActionsEnabled(false); + File_Loaded_Status load_status = UNLOADED; + QStringList names_list; + if (_model != nullptr) + { + switch (mt) + { + case MODEL_TYPE::MAPS_H5: + _model->unload_all_H5_Model(); + _h5_tab_widget->loaded_file_status_changed_all(load_status); + names_list = _model->get_h5_names_as_qstringlist(); + break; + case MODEL_TYPE::RAW: + _model->unload_all_RAW_Model(); + _mda_tab_widget->loaded_file_status_changed_all(load_status); + break; + case MODEL_TYPE::VLM: + _model->unload_all_VLM_Model(); + _vlm_tab_widget->loaded_file_status_changed_all(load_status); + break; + } + + } + + setFileTabActionsEnabled(true); + emit unloadList_model(names_list, mt); +} + +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onCloseModel(const QStringList& names_list, MODEL_TYPE mt) { diff --git a/src/mvc/MapsWorkspaceFilesWidget.h b/src/mvc/MapsWorkspaceFilesWidget.h index e3c044d..a453c5b 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.h +++ b/src/mvc/MapsWorkspaceFilesWidget.h @@ -83,6 +83,8 @@ public slots: void onCloseModel(const QStringList& names_list, MODEL_TYPE mt); + void closeAllModels(MODEL_TYPE mt); + void onCustomContext(const QString& context_label, const QStringList& file_list); void onPerPixelProcessList(const QStringList& file_list); diff --git a/src/mvc/MapsWorkspaceModel.cpp b/src/mvc/MapsWorkspaceModel.cpp index e31d3e0..42786db 100644 --- a/src/mvc/MapsWorkspaceModel.cpp +++ b/src/mvc/MapsWorkspaceModel.cpp @@ -510,7 +510,43 @@ std::vector MapsWorkspaceModel::get_loaded_vlm_names() return ret; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +QStringList MapsWorkspaceModel::get_raw_names_as_qstringlist() +{ + QStringList ret; + for (auto& itr : _raw_fileinfo_list) + { + ret.push_back(itr.first); + } + return ret; +} + +//--------------------------------------------------------------------------- + +QStringList MapsWorkspaceModel::get_h5_names_as_qstringlist() +{ + QStringList ret; + for (auto& itr : _h5_fileinfo_list) + { + ret.push_back(itr.first); + } + return ret; +} + +//--------------------------------------------------------------------------- + +QStringList MapsWorkspaceModel::get_vlm_names_as_qstringlist() +{ + QStringList ret; + for (auto& itr : _vlm_fileinfo_list) + { + ret.push_back(itr.first); + } + return ret; +} + +//--------------------------------------------------------------------------- void MapsWorkspaceModel::unload_H5_Model(QString name) { @@ -522,6 +558,17 @@ void MapsWorkspaceModel::unload_H5_Model(QString name) } } +//--------------------------------------------------------------------------- + +void MapsWorkspaceModel::unload_all_H5_Model() +{ + for(auto &itr : _h5_models) + { + delete itr.second; + } + _h5_models.clear(); +} + /*---------------------------------------------------------------------------*/ void MapsWorkspaceModel::unload_RAW_Model(QString name) @@ -534,6 +581,17 @@ void MapsWorkspaceModel::unload_RAW_Model(QString name) } } +//--------------------------------------------------------------------------- + +void MapsWorkspaceModel::unload_all_RAW_Model() +{ + for(auto &itr : _raw_models) + { + delete itr.second; + } + _raw_models.clear(); +} + /*---------------------------------------------------------------------------*/ void MapsWorkspaceModel::unload_VLM_Model(QString name) @@ -546,6 +604,17 @@ void MapsWorkspaceModel::unload_VLM_Model(QString name) } } +//--------------------------------------------------------------------------- + +void MapsWorkspaceModel::unload_all_VLM_Model() +{ + for(auto &itr : _vlm_models) + { + delete itr.second; + } + _vlm_models.clear(); +} + /*---------------------------------------------------------------------------*/ QString MapsWorkspaceModel::get_directory_name() diff --git a/src/mvc/MapsWorkspaceModel.h b/src/mvc/MapsWorkspaceModel.h index 848ea10..f797ef6 100644 --- a/src/mvc/MapsWorkspaceModel.h +++ b/src/mvc/MapsWorkspaceModel.h @@ -75,6 +75,12 @@ class MapsWorkspaceModel : public QObject void unload_VLM_Model(QString name); + void unload_all_H5_Model(); + + void unload_all_RAW_Model(); + + void unload_all_VLM_Model(); + data_struct::Fit_Parameters* getFitParameters(int idx); data_struct::Fit_Element_Map_Dict* getElementToFit(int idx); @@ -97,6 +103,12 @@ class MapsWorkspaceModel : public QObject std::vector get_loaded_vlm_names(); + QStringList get_raw_names_as_qstringlist(); + + QStringList get_h5_names_as_qstringlist(); + + QStringList get_vlm_names_as_qstringlist(); + QDir get_directory() { return *_dir; } signals: From 775a0ca9dddc5adc9bfd9e55fba5e1d5e2242ce4 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Thu, 13 Jun 2024 13:24:36 -0500 Subject: [PATCH 03/18] Populate file list and start loading x y motor pos --- src/core/uProbeX.cpp | 22 +++++++ src/core/uProbeX.h | 3 + src/mvc/GenScanVlmWidget.cpp | 120 +++++++++++++++++++++++++++++++++++ src/mvc/GenScanVlmWidget.h | 92 +++++++++++++++++++++++++++ src/mvc/MapsH5Model.cpp | 89 +++++++++++++++++++++++++- src/mvc/MapsH5Model.h | 2 + 6 files changed, 327 insertions(+), 1 deletion(-) create mode 100644 src/mvc/GenScanVlmWidget.cpp create mode 100644 src/mvc/GenScanVlmWidget.h diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index 9f2494a..0861b30 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -321,6 +321,28 @@ void uProbeX::BatchRoiStats() void uProbeX::BatcGenScanVlm() { + if(_mapsWorkspaceControllers.size() > 0) + { + MapsWorkspaceController *controller = _mapsWorkspaceControllers.first(); + if(controller != nullptr) + { + MapsWorkspaceModel* model = controller->get_model(); + if(model != nullptr) + { + _gen_scan_vlm_widget.setDir(model->get_directory_name()); + _gen_scan_vlm_widget.updateFileList(model->get_hdf5_file_list()); + _gen_scan_vlm_widget.show(); + } + else + { + logW<<"Model is nullptr\n"; + } + } + else + { + logW<<"Controller is nullptr\n"; + } + } } diff --git a/src/core/uProbeX.h b/src/core/uProbeX.h index 907b7e6..45833c1 100644 --- a/src/core/uProbeX.h +++ b/src/core/uProbeX.h @@ -28,6 +28,7 @@ #include #include #include "mvc/UpgradeRoiDialog.h" +#include class SubWindow; class AbstractWindowController; @@ -334,6 +335,8 @@ private slots: QList _mapsWorkspaceControllers; + GenScanVlmWidget _gen_scan_vlm_widget; + }; /*---------------------------------------------------------------------------*/ diff --git a/src/mvc/GenScanVlmWidget.cpp b/src/mvc/GenScanVlmWidget.cpp new file mode 100644 index 0000000..f4ec3e3 --- /dev/null +++ b/src/mvc/GenScanVlmWidget.cpp @@ -0,0 +1,120 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include + +//--------------------------------------------------------------------------- + +GenScanVlmWidget::GenScanVlmWidget(QWidget *parent) : QWidget(parent) +{ + + _processing = false; + createLayout(); + +} + +//--------------------------------------------------------------------------- + +GenScanVlmWidget::~GenScanVlmWidget() +{ + + +} + +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::createLayout() +{ + _progressBarFiles = new QProgressBar(); + + _btn_gen = new QPushButton("Generate"); + connect(_btn_gen, &QPushButton::released, this, &GenScanVlmWidget::runProcessing); + _btn_cancel = new QPushButton("Cancel"); + connect(_btn_cancel, &QPushButton::released, this, &GenScanVlmWidget::setStoped); + + _file_list_model = new QStandardItemModel(); + _file_list_view = new QListView(); + _file_list_view->setModel(_file_list_model); + _file_list_view->setEditTriggers(QAbstractItemView::NoEditTriggers); + + QHBoxLayout* buttonlayout = new QHBoxLayout(); + buttonlayout->addWidget(_btn_gen); + buttonlayout->addWidget(_btn_cancel); + + QVBoxLayout* layout = new QVBoxLayout(); + //layout->addItem(detector_hbox); + //layout->addItem(_proc_save_layout); + layout->addWidget(_file_list_view); + layout->addItem(buttonlayout); + layout->addWidget(_progressBarFiles); + + setLayout(layout); + +} + +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::setDir(QString directory) +{ + _directory_name = directory; +} + +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::updateFileList(const std::map& file_map) +{ + _file_list_model->clear(); + _file_map.clear(); + + for(auto &itr : file_map) + { + if(_file_map.count(itr.second.baseName()) == 0) + { + _file_map[itr.second.baseName()] = itr.second; + _file_list_model->appendRow(new QStandardItem(QIcon(":/images/circle_gray.png"), itr.second.baseName())); + } + } + _progressBarFiles->setRange(0, _file_map.size()); +} + +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::setStoped() +{ + if(false == _processing) + { + QWidget::close(); + } + _processing = false; +} + +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::runProcessing() +{ + _btn_gen->setEnabled(false); + _processing = true; + int i=0; + for(auto& itr: _file_map) + { + data_struct::ArrayTr x_arr; + data_struct::ArrayTr y_arr; + if(false == _processing) + { + break; + } + if(MapsH5Model::load_x_y_motors_only(itr.second.absoluteFilePath(), x_arr, y_arr)) + { + + } + i++; + _progressBarFiles->setValue(i); + } + _processing = false; + _btn_gen->setEnabled(true); + +} + +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/GenScanVlmWidget.h b/src/mvc/GenScanVlmWidget.h new file mode 100644 index 0000000..6ca42e6 --- /dev/null +++ b/src/mvc/GenScanVlmWidget.h @@ -0,0 +1,92 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef GEN_SCAN_VLM_WIDGET_H +#define GEN_SCAN_VLM_WIDGET_H + +//--------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include "gstar/Annotation/UProbeRegionGraphicsItem.h" + +//--------------------------------------------------------------------------- + + +class GenScanVlmWidget : public QWidget +{ + + Q_OBJECT + +public: + + /** + * Constructor. + */ + GenScanVlmWidget(QWidget *parent = nullptr); + + /** + * Destructor. + */ + ~GenScanVlmWidget(); + + void updateFileList(const std::map& file_map); + + void setDir(QString directory); + +signals: + + void processed_list_update(QStringList); + +public slots: + + void runProcessing(); + + void setStoped(); + +protected: + + /** + * @brief Create layout + */ + void createLayout(); + + bool _processing; + + QString _directory_name; + + std::map _file_map; + + QProgressBar *_progressBarFiles; + + QPushButton* _btn_gen; + + QPushButton* _btn_cancel; + + QStandardItemModel* _file_list_model; + + QListView* _file_list_view; + +}; + + +//--------------------------------------------------------------------------- + +#endif + +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsH5Model.cpp b/src/mvc/MapsH5Model.cpp index 94aa23c..59ef65a 100644 --- a/src/mvc/MapsH5Model.cpp +++ b/src/mvc/MapsH5Model.cpp @@ -501,13 +501,100 @@ void MapsH5Model::update_from_stream_block(data_struct::Stream_Block* blo } } +//--------------------------------------------------------------------------- + void MapsH5Model::getIntegratedSpectra(data_struct::Spectra& out_spectra) { std::lock_guard lock(_mutex); out_spectra = _integrated_spectra; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +bool MapsH5Model::load_x_y_motors_only(QString filepath, data_struct::ArrayTr &x_arr, data_struct::ArrayTr &y_arr) +{ + std::string x_axis_loc_9 = "/MAPS/x_axis"; + std::string x_axis_loc_10 = "/MAPS/Scan/x_axis"; + std::string y_axis_loc_9 = "/MAPS/y_axis"; + std::string y_axis_loc_10 = "/MAPS/Scan/y_axis"; + hid_t file_id, x_id, y_id; + file_id = H5Fopen(filepath.toStdString().c_str(), H5F_ACC_RDONLY, H5P_DEFAULT); + if(file_id < 0) + { + logW<<"Error opening file "< -1 && y_id > -1) + { + hid_t x_space_id = H5Dget_space(x_id); + hid_t y_space_id = H5Dget_space(y_id); + + hsize_t x_dims_in[1] = { 0 }; + hsize_t y_dims_in[1] = { 0 }; + int xstatus_n = H5Sget_simple_extent_dims(x_space_id, &x_dims_in[0], nullptr); + int ystatus_n = H5Sget_simple_extent_dims(y_space_id, &y_dims_in[0], nullptr); + if (xstatus_n > -1 && ystatus_n > -1) + { + x_arr.resize(x_dims_in[0]); + hid_t error = H5Dread(x_id, H5T_NATIVE_FLOAT, x_space_id, x_space_id, H5P_DEFAULT, x_arr.data()); + if (error > 0) + { + logW << "Could not load x_axis\n"; + } + y_arr.resize(y_dims_in[0]); + error = H5Dread(y_id, H5T_NATIVE_FLOAT, y_space_id, y_space_id, H5P_DEFAULT, y_arr.data()); + if (error > 0) + { + logW << "Could not load y_axis\n"; + } + } + + if (x_space_id > -1) + { + H5Sclose(x_space_id); + } + if (y_space_id > -1) + { + H5Sclose(y_space_id); + } + + H5Dclose(x_id); + H5Dclose(y_id); + + } + + H5Fclose(file_id); + return true; +} + +//--------------------------------------------------------------------------- bool MapsH5Model::load(QString filepath) { diff --git a/src/mvc/MapsH5Model.h b/src/mvc/MapsH5Model.h index 7ad4949..2786420 100644 --- a/src/mvc/MapsH5Model.h +++ b/src/mvc/MapsH5Model.h @@ -195,6 +195,8 @@ class MapsH5Model : public QObject const std::unordered_map < std::string, Element_Quant*>& get_quant_fit_info(std::string analysis_type, std::string scaler_name); + static bool load_x_y_motors_only(QString filepath, data_struct::ArrayTr &x_arr, data_struct::ArrayTr &y_arr); + signals: void model_data_updated(); From c3a692352f0ec25d07b63211bf3e6aa5fead793d Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 14 Jun 2024 09:15:43 -0500 Subject: [PATCH 04/18] more work on genscanwidget --- src/mvc/FileTabWidget.h | 2 + src/mvc/GenScanVlmWidget.cpp | 111 ++++++++++++++++++++++++++- src/mvc/GenScanVlmWidget.h | 17 ++++ src/mvc/MapsWorkspaceFilesWidget.cpp | 2 + 4 files changed, 128 insertions(+), 4 deletions(-) diff --git a/src/mvc/FileTabWidget.h b/src/mvc/FileTabWidget.h index 49b5107..9343ef0 100644 --- a/src/mvc/FileTabWidget.h +++ b/src/mvc/FileTabWidget.h @@ -52,6 +52,8 @@ class FileTabWidget : public QWidget void setProcessButtonVisible(bool val) { _process_btn->setVisible(val); } + void setROIButtonVisible(bool val) { _batch_roi_btn->setVisible(val); } + void setActionsAndButtonsEnabled(bool val); signals: diff --git a/src/mvc/GenScanVlmWidget.cpp b/src/mvc/GenScanVlmWidget.cpp index f4ec3e3..7d096a0 100644 --- a/src/mvc/GenScanVlmWidget.cpp +++ b/src/mvc/GenScanVlmWidget.cpp @@ -4,6 +4,7 @@ *---------------------------------------------------------------------------*/ #include +#include //--------------------------------------------------------------------------- @@ -20,7 +21,8 @@ GenScanVlmWidget::GenScanVlmWidget(QWidget *parent) : QWidget(parent) GenScanVlmWidget::~GenScanVlmWidget() { - + _clear_regions(); + } //--------------------------------------------------------------------------- @@ -43,9 +45,48 @@ void GenScanVlmWidget::createLayout() buttonlayout->addWidget(_btn_gen); buttonlayout->addWidget(_btn_cancel); + QLabel* gen_name_label = new QLabel("File Name:"); + _gen_name_le = new QLineEdit("ScanArea"); + QHBoxLayout* name_hbox = new QHBoxLayout(); + name_hbox->addWidget(gen_name_label); + name_hbox->addWidget(_gen_name_le); + + _scene_width = new QLineEdit("5000"); + _scene_heigh = new QLineEdit("5000"); + _scene_motor_x_start = new QLineEdit("0"); + _scene_motor_x_end = new QLineEdit("10"); + _scene_motor_y_start = new QLineEdit("0"); + _scene_motor_y_end = new QLineEdit("10"); + + QHBoxLayout* scene_box = new QHBoxLayout(); + scene_box->addWidget(new QLabel("Scene Width:")); + scene_box->addWidget(_scene_width); + scene_box->addWidget(new QLabel("px ")); + scene_box->addWidget(new QLabel("Scene Height:")); + scene_box->addWidget(_scene_heigh); + scene_box->addWidget(new QLabel("px")); + + QHBoxLayout* motor_box = new QHBoxLayout(); + motor_box->addWidget(new QLabel("Motor X Start:")); + motor_box->addWidget(_scene_motor_x_start); + motor_box->addWidget(new QLabel("mm ")); + motor_box->addWidget(new QLabel("Motor X End:")); + motor_box->addWidget(_scene_motor_x_end); + motor_box->addWidget(new QLabel("mm")); + QHBoxLayout* motor_y_box = new QHBoxLayout(); + motor_y_box->addWidget(new QLabel("Motor Y Start:")); + motor_y_box->addWidget(_scene_motor_y_start); + motor_y_box->addWidget(new QLabel("mm ")); + motor_y_box->addWidget(new QLabel("Motor Y End:")); + motor_y_box->addWidget(_scene_motor_y_end); + motor_y_box->addWidget(new QLabel("mm")); + + QVBoxLayout* layout = new QVBoxLayout(); - //layout->addItem(detector_hbox); - //layout->addItem(_proc_save_layout); + layout->addItem(name_hbox); + layout->addItem(scene_box); + layout->addItem(motor_box); + layout->addItem(motor_y_box); layout->addWidget(_file_list_view); layout->addItem(buttonlayout); layout->addWidget(_progressBarFiles); @@ -92,10 +133,34 @@ void GenScanVlmWidget::setStoped() //--------------------------------------------------------------------------- +void GenScanVlmWidget::_clear_regions() +{ + for (auto& itr : _dataset_region_map) + { + delete itr.second; + } + + _dataset_region_map.clear(); +} + +//--------------------------------------------------------------------------- + void GenScanVlmWidget::runProcessing() { _btn_gen->setEnabled(false); _processing = true; + + _clear_regions(); + float min_x_val = std::numeric_limits::max(); + float max_x_val = std::numeric_limits::min(); + float min_y_val = std::numeric_limits::max(); + float max_y_val = std::numeric_limits::min(); + + int x_amt = 0; + int y_amt = 0; + float avg_x_diff = 0; + float avg_y_diff = 0; + int idx = 0; int i=0; for(auto& itr: _file_map) { @@ -107,11 +172,49 @@ void GenScanVlmWidget::runProcessing() } if(MapsH5Model::load_x_y_motors_only(itr.second.absoluteFilePath(), x_arr, y_arr)) { - + // only load rect greater than 9x9 + if (x_arr.size() > 9 && y_arr.size() > 9) + { + idx = x_arr.size() / 2; + avg_x_diff += std::abs(x_arr[idx + 1] - x_arr[idx]); + x_amt++; + + idx = y_arr.size() / 2; + avg_y_diff += std::abs(y_arr[idx + 1] - y_arr[idx]); + y_amt++; + + min_x_val = std::min(min_x_val, x_arr.minCoeff()); + max_x_val = std::max(max_x_val, x_arr.maxCoeff()); + + min_y_val = std::min(min_y_val, y_arr.minCoeff()); + max_y_val = std::max(max_y_val, y_arr.maxCoeff()); + + gstar::UProbeRegionGraphicsItem* region = new gstar::UProbeRegionGraphicsItem(); + region->setHeight(y_arr.size()); + region->setWidth(x_arr.size()); + + //region->setPos(QPointF(marker[gstar::UPROBE_REAL_POS_X].toDouble(), marker[gstar::UPROBE_REAL_POS_Y].toDouble())); + region->setPropertyValue(gstar::UPROBE_NAME, QVariant(itr.first)); + region->setPropertyValue(gstar::UPROBE_PRED_POS_X, QVariant(x_arr[0])); + region->setPropertyValue(gstar::UPROBE_PRED_POS_Y, QVariant(y_arr[0])); + + _dataset_region_map[itr.first] = region; + } } i++; _progressBarFiles->setValue(i); } + + if (x_amt > 0) + { + avg_x_diff /= (float)(x_amt); + } + + if (y_amt > 0) + { + avg_y_diff /= (float)(y_amt); + } + _processing = false; _btn_gen->setEnabled(true); diff --git a/src/mvc/GenScanVlmWidget.h b/src/mvc/GenScanVlmWidget.h index 6ca42e6..49bd4f7 100644 --- a/src/mvc/GenScanVlmWidget.h +++ b/src/mvc/GenScanVlmWidget.h @@ -61,6 +61,8 @@ public slots: protected: + void _clear_regions(); + /** * @brief Create layout */ @@ -70,6 +72,20 @@ public slots: QString _directory_name; + QLineEdit* _gen_name_le; + + QLineEdit* _scene_width; + + QLineEdit* _scene_heigh; + + QLineEdit* _scene_motor_x_start; + + QLineEdit* _scene_motor_x_end; + + QLineEdit* _scene_motor_y_start; + + QLineEdit* _scene_motor_y_end; + std::map _file_map; QProgressBar *_progressBarFiles; @@ -82,6 +98,7 @@ public slots: QListView* _file_list_view; + std::map _dataset_region_map; }; diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index d8af43c..9ab767a 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -78,6 +78,7 @@ void MapsWorkspaceFilesWidget::createLayout() _vlm_tab_widget = new FileTabWidget(); _vlm_tab_widget->setProcessButtonVisible(false); + _vlm_tab_widget->setROIButtonVisible(false); QAction* sws_file = new QAction("SWS | *.sws", this); connect(sws_file, &QAction::triggered, [this](bool val) { _vlm_tab_widget->filterTextChanged("*.sws"); }); QAction* tiff_file = new QAction("TIFF | *.tiff", this); @@ -165,6 +166,7 @@ void MapsWorkspaceFilesWidget::updatedVLM() { _vlm_tab_widget->loaded_file_status_changed(File_Loaded_Status::LOADED, itr); } + //_vlm_tab_widget->set_roi_num_list(_model->get_region_num_list()); } /*---------------------------------------------------------------------------*/ From e3232da45d4ff98386913fac5fc8d40acc995778 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 14 Jun 2024 13:36:39 -0500 Subject: [PATCH 05/18] Updated logic of loading all or selected files. Moved logic out of filetabwidget --- src/mvc/FileTabWidget.cpp | 170 ++++++++++++++++++--------- src/mvc/FileTabWidget.h | 35 +++--- src/mvc/MapsWorkspaceFilesWidget.cpp | 74 +++++++++--- src/mvc/MapsWorkspaceFilesWidget.h | 7 ++ src/preferences/Preferences.cpp | 3 +- src/preferences/Preferences.h | 1 + 6 files changed, 205 insertions(+), 85 deletions(-) diff --git a/src/mvc/FileTabWidget.cpp b/src/mvc/FileTabWidget.cpp index e5a3435..5083224 100644 --- a/src/mvc/FileTabWidget.cpp +++ b/src/mvc/FileTabWidget.cpp @@ -64,28 +64,36 @@ FileTabWidget::FileTabWidget(QWidget* parent) : QWidget(parent) hlayout1->addWidget(_filter_line); hlayout1->addWidget(_filter_suggest_btn); - - _process_btn = new QPushButton("Process All"); - connect(_process_btn, SIGNAL(released()), this, SLOT(process_all_visible())); - _batch_roi_btn = new QPushButton("Batch ROI"); - connect(_batch_roi_btn, SIGNAL(released()), this, SLOT(batch_roi_visible())); - _load_all_btn = new QPushButton("Load All"); + bool rad_opt = Preferences::inst()->getValue(STR_PREF_RADIO_LOAD_SELECTED_OPTION).toBool(); + + _radio_all_files = new QRadioButton("All Visible Files"); + _radio_all_files->setChecked(!rad_opt); + _radio_all_files->setAutoExclusive(true); + connect(_radio_all_files, &QAbstractButton::toggled, this, &FileTabWidget::onRadioAllChanged); + _selected_all_files = new QRadioButton("Selected Files"); + _selected_all_files->setChecked(rad_opt); + _selected_all_files->setAutoExclusive(true); + connect(_selected_all_files, &QAbstractButton::toggled, this, &FileTabWidget::onRadioSelectChanged); + QHBoxLayout* hbox_radios = new QHBoxLayout(); + hbox_radios->addWidget(_radio_all_files); + hbox_radios->addWidget(_selected_all_files); + + _load_all_btn = new QPushButton("Load"); connect(_load_all_btn, SIGNAL(released()), this, SLOT(load_all_visible())); - _unload_all_btn = new QPushButton("Unload All"); + _unload_all_btn = new QPushButton("Unload"); connect(_unload_all_btn, SIGNAL(released()), this, SLOT(unload_all_visible())); QHBoxLayout* hlayout2 = new QHBoxLayout(); hlayout2->addWidget(_load_all_btn); hlayout2->addWidget(_unload_all_btn); - QHBoxLayout* hlayout3 = new QHBoxLayout(); - hlayout3->addWidget(_process_btn); - hlayout3->addWidget(_batch_roi_btn); + _custom_btn_box = new QVBoxLayout(); QLayout* vlayout = new QVBoxLayout(); vlayout->addItem(hlayout1); + vlayout->addItem(hbox_radios); vlayout->addItem(hlayout2); - vlayout->addItem(hlayout3); + vlayout->addItem(_custom_btn_box); vlayout->addWidget(_file_list_view); setLayout(vlayout); @@ -105,63 +113,77 @@ void FileTabWidget::_gen_visible_list(QStringList *sl) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -void FileTabWidget::onUpdateFilter() +void FileTabWidget::onRadioAllChanged(bool val) { - filterTextChanged(_filter_line->text()); + Preferences::inst()->setValue(STR_PREF_RADIO_LOAD_SELECTED_OPTION, !val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -void FileTabWidget::load_all_visible() +void FileTabWidget::onRadioSelectChanged(bool val) { - - - QStringList sl; - _gen_visible_list(&sl); - emit loadList(sl); - + Preferences::inst()->setValue(STR_PREF_RADIO_LOAD_SELECTED_OPTION, val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -void FileTabWidget::unload_all_visible() +void FileTabWidget::onUpdateFilter() { - - - QStringList sl; - _gen_visible_list(&sl); - emit unloadList(sl); - + filterTextChanged(_filter_line->text()); } /*---------------------------------------------------------------------------*/ -void FileTabWidget::process_all_visible() +void FileTabWidget::load_all_visible() { QStringList sl; - _gen_visible_list(&sl); - emit processList(sl); + if(_radio_all_files->isChecked()) + { + _gen_visible_list(&sl); + } + else + { + QModelIndexList list = _file_list_view->selectionModel()->selectedIndexes(); + for(int i =0; igetNameAtRow(idx.row())); + } + } + emit loadList(sl); } /*---------------------------------------------------------------------------*/ -void FileTabWidget::batch_roi_visible() +void FileTabWidget::unload_all_visible() { QStringList sl; - _gen_visible_list(&sl); - emit batchRoiList(sl); + if(_radio_all_files->isChecked()) + { + _gen_visible_list(&sl); + } + else + { + QModelIndexList list = _file_list_view->selectionModel()->selectedIndexes(); + for(int i =0; igetNameAtRow(idx.row())); + } + } + emit unloadList(sl); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::unload_all() { _file_list_model->clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::set_file_list(const std::map& fileinfo_list) { @@ -282,20 +304,20 @@ void FileTabWidget::setActionsAndButtonsEnabled(bool val) _action_load->setEnabled(val); _action_unload->setEnabled(val); _action_refresh->setEnabled(val); - _process_btn->setEnabled(val); - _batch_roi_btn->setEnabled(val); for (QAction* act : _custom_action_list) { act->setEnabled(val); } + for (QPushButton* btn : _custom_button_list) + { + btn->setEnabled(val); + } } /*---------------------------------------------------------------------------*/ void FileTabWidget::onLoadFile() { - - QStringList sl; QModelIndexList list = _file_list_view->selectionModel()->selectedIndexes(); for(int i =0; iselectionModel()->selectedIndexes(); for(int i =0; itrigger(); } - } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -void FileTabWidget::addCustomContext(QString Id, QString label) +void FileTabWidget::addCustomContext(QString label) { QAction* action = _contextMenu->addAction(label); _custom_action_list.append(action); - action->setData(Id); connect(action, SIGNAL(triggered()), this, SLOT(onCustomContext())); } - -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::onCustomContext() { @@ -407,11 +424,58 @@ void FileTabWidget::onCustomContext() sl.append(_file_list_model->getNameAtRow(idx.row())); } QAction *act = qobject_cast(sender()); - QVariant v = act->data(); - emit customContext(v.toString(), sl); + emit customContext(act->text(), sl); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void FileTabWidget::addCustomButtonRow(QString label) +{ + QPushButton* btn = new QPushButton(label, this); + _custom_btn_box->addWidget(btn); + _custom_button_list.append(btn); + connect(btn, &QPushButton::pressed, this, &FileTabWidget::onCustomButton); +} + +//--------------------------------------------------------------------------- + +void FileTabWidget::addCustomButtonRow(QString label, QString label2) +{ + QPushButton* btn = new QPushButton(label, this); + QPushButton* btn2 = new QPushButton(label2, this); + QHBoxLayout *hbox = new QHBoxLayout(); + hbox->addWidget(btn); + hbox->addWidget(btn2); + _custom_button_list.append(btn); + _custom_button_list.append(btn2); + _custom_btn_box->addItem(hbox); + connect(btn, &QPushButton::pressed, this, &FileTabWidget::onCustomButton); + connect(btn2, &QPushButton::pressed, this, &FileTabWidget::onCustomButton); +} + +//--------------------------------------------------------------------------- + +void FileTabWidget::onCustomButton() +{ + QStringList sl; + if(_radio_all_files->isChecked()) + { + _gen_visible_list(&sl); + } + else + { + QModelIndexList list = _file_list_view->selectionModel()->selectedIndexes(); + for(int i =0; igetNameAtRow(idx.row())); + } + } + QPushButton *btn = qobject_cast(sender()); + emit customButton(btn->text(), sl); +} + +//--------------------------------------------------------------------------- void FileTabWidget::onFileRowChange(const QModelIndex& current, const QModelIndex& previous) { diff --git a/src/mvc/FileTabWidget.h b/src/mvc/FileTabWidget.h index 9343ef0..8921800 100644 --- a/src/mvc/FileTabWidget.h +++ b/src/mvc/FileTabWidget.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -48,11 +49,11 @@ class FileTabWidget : public QWidget void appendFilterHelpAction(QAction * action) { _filterHelpMenu->addAction(action); } - void addCustomContext(QString Id, QString label); + void addCustomContext(QString label); - void setProcessButtonVisible(bool val) { _process_btn->setVisible(val); } + void addCustomButtonRow(QString label); - void setROIButtonVisible(bool val) { _batch_roi_btn->setVisible(val); } + void addCustomButtonRow(QString label, QString label2); void setActionsAndButtonsEnabled(bool val); @@ -65,12 +66,10 @@ class FileTabWidget : public QWidget void unloadList(QStringList); - void processList(const QStringList&); - - void batchRoiList(const QStringList&); - void customContext(QString, QStringList); + void customButton(QString, QStringList); + void onRefresh(); void selectNewRow(const QString&); @@ -82,10 +81,6 @@ public slots: void onUnloadFile(); - void process_all_visible(); - - void batch_roi_visible(); - void filterTextChanged(const QString &); void ShowContextMenu(const QPoint &); @@ -102,10 +97,16 @@ public slots: void onCustomContext(); + void onCustomButton(); + void onFileRowChange(const QModelIndex& current, const QModelIndex& previous); void onUpdateFilter(); + void onRadioAllChanged(bool val); + + void onRadioSelectChanged(bool val); + protected: void _gen_visible_list(QStringList *sl); @@ -114,6 +115,12 @@ public slots: FileTableModel* _file_list_model; + QLayout* _custom_btn_box; + + QRadioButton *_radio_all_files; + + QRadioButton *_selected_all_files; + QMenu *_contextMenu; QMenu *_filterHelpMenu; @@ -124,10 +131,6 @@ public slots: QPushButton *_unload_all_btn; - QPushButton* _process_btn; - - QPushButton* _batch_roi_btn; - QPushButton * _filter_suggest_btn; QAction* _action_load; @@ -138,6 +141,8 @@ public slots: QList _custom_action_list; + QList _custom_button_list; + }; /*---------------------------------------------------------------------------*/ diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index 9ab767a..2e3e877 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -15,10 +15,12 @@ #include #include "core/GlobalThreadPool.h" -const QString STR_PROCESS("process"); -const QString STR_PROCESS_ANALYZED("process_analyzed"); -const QString STR_BATCH_ROI("batch_roi"); -const QString STR_H5_EXPORT("hdf5_export"); +const static QString STR_PROCESS("Per Pixel Process"); +const static QString STR_PROCESS_ANALYZED("Per Pixel ReProcess"); +const static QString STR_PROCESS_ANALYZED_ALL("Per Pixel ReProcess All"); +const static QString STR_BATCH_ROI("Process ROI's"); +const static QString STR_H5_EXPORT("hdf5_export"); +const static QString STR_GEN_SCAN_AREA("Generate Scan Area"); /*---------------------------------------------------------------------------*/ @@ -55,30 +57,29 @@ void MapsWorkspaceFilesWidget::createLayout() _h5_tab_widget->appendFilterHelpAction(h5avg_file); _h5_tab_widget->appendFilterHelpAction(h5det_file); - _h5_tab_widget->addCustomContext(STR_PROCESS_ANALYZED, "Per Pixel Process"); - _h5_tab_widget->addCustomContext(STR_BATCH_ROI, "Process ROI's"); + _h5_tab_widget->addCustomContext(STR_PROCESS_ANALYZED); + _h5_tab_widget->addCustomContext(STR_BATCH_ROI); + _h5_tab_widget->addCustomButtonRow(STR_PROCESS_ANALYZED, STR_BATCH_ROI); // TODO: need to implement //_h5_tab_widget->addCustomContext(STR_H5_EXPORT, "Export Images"); connect(_h5_tab_widget, &FileTabWidget::loadList, [this](const QStringList& sl) { this->onOpenModel(sl, MODEL_TYPE::MAPS_H5); }); connect(_h5_tab_widget, &FileTabWidget::unloadList, [this](const QStringList& sl) { this->onCloseModel(sl, MODEL_TYPE::MAPS_H5); }); - connect(_h5_tab_widget, &FileTabWidget::processList, this, &MapsWorkspaceFilesWidget::onPerPixelProcessListAnalyzed); - connect(_h5_tab_widget, &FileTabWidget::batchRoiList, this, &MapsWorkspaceFilesWidget::onBatchRoiList); connect(_h5_tab_widget, &FileTabWidget::customContext, this, &MapsWorkspaceFilesWidget::onCustomContext); + connect(_h5_tab_widget, &FileTabWidget::customButton, this, &MapsWorkspaceFilesWidget::onCustomButton); connect(_h5_tab_widget, &FileTabWidget::selectNewRow, this, &MapsWorkspaceFilesWidget::onDatasetSelected); _mda_tab_widget = new FileTabWidget(); connect(_mda_tab_widget, &FileTabWidget::loadList, [this](const QStringList& sl) { this->onOpenModel(sl, MODEL_TYPE::RAW); }); connect(_mda_tab_widget, &FileTabWidget::unloadList, [this](const QStringList& sl) { this->onCloseModel(sl, MODEL_TYPE::RAW); }); - connect(_mda_tab_widget, &FileTabWidget::processList, this, &MapsWorkspaceFilesWidget::onPerPixelProcessList); - connect(_mda_tab_widget, &FileTabWidget::batchRoiList, this, &MapsWorkspaceFilesWidget::onBatchRoiList); connect(_mda_tab_widget, &FileTabWidget::customContext, this, &MapsWorkspaceFilesWidget::onCustomContext); + connect(_mda_tab_widget, &FileTabWidget::customButton, this, &MapsWorkspaceFilesWidget::onCustomButton); connect(_mda_tab_widget, &FileTabWidget::selectNewRow, this, &MapsWorkspaceFilesWidget::onDatasetSelected); - _mda_tab_widget->addCustomContext(STR_PROCESS, "Per Pixel Process"); + _mda_tab_widget->addCustomContext(STR_PROCESS); + _mda_tab_widget->addCustomContext(STR_BATCH_ROI); + _mda_tab_widget->addCustomButtonRow(STR_PROCESS, STR_BATCH_ROI); _vlm_tab_widget = new FileTabWidget(); - _vlm_tab_widget->setProcessButtonVisible(false); - _vlm_tab_widget->setROIButtonVisible(false); QAction* sws_file = new QAction("SWS | *.sws", this); connect(sws_file, &QAction::triggered, [this](bool val) { _vlm_tab_widget->filterTextChanged("*.sws"); }); QAction* tiff_file = new QAction("TIFF | *.tiff", this); @@ -87,10 +88,14 @@ void MapsWorkspaceFilesWidget::createLayout() connect(tif_file, &QAction::triggered, [this](bool val) { _vlm_tab_widget->filterTextChanged("*.tif"); }); connect(_vlm_tab_widget, &FileTabWidget::loadList, [this](const QStringList& sl) { this->onOpenModel(sl, MODEL_TYPE::VLM); }); connect(_vlm_tab_widget, &FileTabWidget::unloadList, [this](const QStringList& sl) { this->onCloseModel(sl, MODEL_TYPE::VLM); }); + connect(_vlm_tab_widget, &FileTabWidget::customContext, this, &MapsWorkspaceFilesWidget::onCustomContext); + connect(_vlm_tab_widget, &FileTabWidget::customButton, this, &MapsWorkspaceFilesWidget::onCustomButton); connect(_vlm_tab_widget, &FileTabWidget::selectNewRow, this, &MapsWorkspaceFilesWidget::onDatasetSelected); _vlm_tab_widget->appendFilterHelpAction(sws_file); _vlm_tab_widget->appendFilterHelpAction(tiff_file); _vlm_tab_widget->appendFilterHelpAction(tif_file); + _vlm_tab_widget->addCustomContext(STR_GEN_SCAN_AREA); + _vlm_tab_widget->addCustomButtonRow(STR_GEN_SCAN_AREA); QLayout* vlayout = new QVBoxLayout(); @@ -442,7 +447,7 @@ void MapsWorkspaceFilesWidget::clearLists() _vlm_tab_widget->unload_all(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onCustomContext(const QString& context_label, const QStringList& file_list) { @@ -462,10 +467,35 @@ void MapsWorkspaceFilesWidget::onCustomContext(const QString& context_label, con { //onExportImages(file_list); } + else if (context_label == STR_GEN_SCAN_AREA) + { + onGenScanArea(file_list); + } +} +//--------------------------------------------------------------------------- + +void MapsWorkspaceFilesWidget::onCustomButton(const QString& context_label, const QStringList& file_list) +{ + if (context_label == STR_PROCESS) + { + onPerPixelProcessList(file_list); + } + if (context_label == STR_PROCESS_ANALYZED) + { + onPerPixelProcessListAnalyzed(file_list); + } + else if (context_label == STR_BATCH_ROI) + { + onBatchRoiList(file_list); + } + else if (context_label == STR_GEN_SCAN_AREA) + { + onGenScanArea(file_list); + } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onPerPixelProcessList(const QStringList& file_list) { @@ -512,7 +542,7 @@ void MapsWorkspaceFilesWidget::onPerPixelProcessListAnalyzed(const QStringList& _per_pixel_fit_widget->show(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onBatchRoiList(const QStringList& file_list) { @@ -556,6 +586,18 @@ void MapsWorkspaceFilesWidget::onBatchRoiList(const QStringList& file_list) } +//--------------------------------------------------------------------------- + +void MapsWorkspaceFilesWidget::onGenScanArea(const QStringList& file_list) +{ + if(_model!= nullptr) + { + _gen_scan_vlm_widget.setDir(_model->get_directory_name()); + _gen_scan_vlm_widget.updateFileList(_model->get_hdf5_file_list()); + } + _gen_scan_vlm_widget.show(); +} + /*---------------------------------------------------------------------------*/ void MapsWorkspaceFilesWidget::onProcessed_list_update(QStringList file_list) diff --git a/src/mvc/MapsWorkspaceFilesWidget.h b/src/mvc/MapsWorkspaceFilesWidget.h index a453c5b..335dfb9 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.h +++ b/src/mvc/MapsWorkspaceFilesWidget.h @@ -23,6 +23,7 @@ #include "mvc/FileTabWidget.h" #include "mvc/PerPixelFitWidget.h" #include "mvc/BatchRoiFitWidget.h" +#include enum class MODEL_TYPE { MAPS_H5, RAW, VLM }; @@ -87,6 +88,8 @@ public slots: void onCustomContext(const QString& context_label, const QStringList& file_list); + void onCustomButton(const QString& context_label, const QStringList& file_list); + void onPerPixelProcessList(const QStringList& file_list); void onPerPixelProcessListAnalyzed(const QStringList& file_list); @@ -97,6 +100,8 @@ public slots: void onDatasetSelected(const QString name); + void onGenScanArea(const QStringList& file_list); + protected: /** @@ -121,6 +126,8 @@ public slots: PerPixelFitWidget* _per_pixel_fit_widget; BatchRoiFitWidget* _batch_roi_fit_widget; + + GenScanVlmWidget _gen_scan_vlm_widget; }; diff --git a/src/preferences/Preferences.cpp b/src/preferences/Preferences.cpp index c346d75..c062933 100644 --- a/src/preferences/Preferences.cpp +++ b/src/preferences/Preferences.cpp @@ -90,7 +90,8 @@ Preferences::Preferences() {STR_EXTRA_DOCK, QVariant()}, {STR_PRF_STRICT_REGEX, QVariant()}, {STR_PRF_FILE_SIZE, QVariant()}, - {STR_PRF_SHOW_DATASET_ON_LOAD, QVariant()} + {STR_PRF_SHOW_DATASET_ON_LOAD, QVariant()}, + {STR_PREF_RADIO_LOAD_SELECTED_OPTION, QVariant()} }; load(); } diff --git a/src/preferences/Preferences.h b/src/preferences/Preferences.h index 259c043..749962c 100644 --- a/src/preferences/Preferences.h +++ b/src/preferences/Preferences.h @@ -85,6 +85,7 @@ #define STR_PRF_STRICT_REGEX "StrictRegEx" #define STR_PRF_FILE_SIZE "FileSize" #define STR_PRF_SHOW_DATASET_ON_LOAD "ShowOnLoad" +#define STR_PREF_RADIO_LOAD_SELECTED_OPTION "Load_Selected_Opt" /** * @brief Read and save preferences between application restarts, the vaule key From c23b7acd34fb97f73148b23bb330845f3dbc72eb Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 14 Jun 2024 13:36:58 -0500 Subject: [PATCH 06/18] Updated to add more info to genscanvlm --- src/mvc/GenScanVlmWidget.cpp | 119 +++++++++++++++++++++++++++-------- src/mvc/GenScanVlmWidget.h | 14 ++++- 2 files changed, 105 insertions(+), 28 deletions(-) diff --git a/src/mvc/GenScanVlmWidget.cpp b/src/mvc/GenScanVlmWidget.cpp index 7d096a0..0210a5d 100644 --- a/src/mvc/GenScanVlmWidget.cpp +++ b/src/mvc/GenScanVlmWidget.cpp @@ -5,6 +5,7 @@ #include #include +#include //--------------------------------------------------------------------------- @@ -30,9 +31,14 @@ GenScanVlmWidget::~GenScanVlmWidget() void GenScanVlmWidget::createLayout() { _progressBarFiles = new QProgressBar(); + _progressBarFiles->setRange(0,100); + _btn_scan = new QPushButton("Scan"); + _btn_scan->setEnabled(false); + connect(_btn_scan, &QPushButton::released, this, &GenScanVlmWidget::runProcessing); + _btn_gen = new QPushButton("Generate"); - connect(_btn_gen, &QPushButton::released, this, &GenScanVlmWidget::runProcessing); + connect(_btn_gen, &QPushButton::released, this, &GenScanVlmWidget::_generate); _btn_cancel = new QPushButton("Cancel"); connect(_btn_cancel, &QPushButton::released, this, &GenScanVlmWidget::setStoped); @@ -42,15 +48,24 @@ void GenScanVlmWidget::createLayout() _file_list_view->setEditTriggers(QAbstractItemView::NoEditTriggers); QHBoxLayout* buttonlayout = new QHBoxLayout(); + buttonlayout->addWidget(_btn_scan); buttonlayout->addWidget(_btn_gen); buttonlayout->addWidget(_btn_cancel); - QLabel* gen_name_label = new QLabel("File Name:"); + QLabel* gen_name_label = new QLabel("VLM Scene Name: "); _gen_name_le = new QLineEdit("ScanArea"); QHBoxLayout* name_hbox = new QHBoxLayout(); name_hbox->addWidget(gen_name_label); name_hbox->addWidget(_gen_name_le); + _btn_browse = new QPushButton("Browse"); + connect(_btn_browse, &QPushButton::released, this, &GenScanVlmWidget::on_browse); + _background_img_loc_le = new QLineEdit(""); + QHBoxLayout* img_hbox = new QHBoxLayout(); + img_hbox->addWidget(new QLabel("Background Image Loc: ")); + img_hbox->addWidget(_background_img_loc_le); + img_hbox->addWidget(_btn_browse); + _scene_width = new QLineEdit("5000"); _scene_heigh = new QLineEdit("5000"); _scene_motor_x_start = new QLineEdit("0"); @@ -59,31 +74,31 @@ void GenScanVlmWidget::createLayout() _scene_motor_y_end = new QLineEdit("10"); QHBoxLayout* scene_box = new QHBoxLayout(); - scene_box->addWidget(new QLabel("Scene Width:")); + scene_box->addWidget(new QLabel("Scene Width: ")); scene_box->addWidget(_scene_width); scene_box->addWidget(new QLabel("px ")); - scene_box->addWidget(new QLabel("Scene Height:")); + scene_box->addWidget(new QLabel("Scene Height: ")); scene_box->addWidget(_scene_heigh); scene_box->addWidget(new QLabel("px")); QHBoxLayout* motor_box = new QHBoxLayout(); - motor_box->addWidget(new QLabel("Motor X Start:")); + motor_box->addWidget(new QLabel("Motor X Start: ")); motor_box->addWidget(_scene_motor_x_start); motor_box->addWidget(new QLabel("mm ")); - motor_box->addWidget(new QLabel("Motor X End:")); + motor_box->addWidget(new QLabel("Motor X End: ")); motor_box->addWidget(_scene_motor_x_end); motor_box->addWidget(new QLabel("mm")); QHBoxLayout* motor_y_box = new QHBoxLayout(); - motor_y_box->addWidget(new QLabel("Motor Y Start:")); + motor_y_box->addWidget(new QLabel("Motor Y Start: ")); motor_y_box->addWidget(_scene_motor_y_start); motor_y_box->addWidget(new QLabel("mm ")); - motor_y_box->addWidget(new QLabel("Motor Y End:")); + motor_y_box->addWidget(new QLabel("Motor Y End: ")); motor_y_box->addWidget(_scene_motor_y_end); motor_y_box->addWidget(new QLabel("mm")); - QVBoxLayout* layout = new QVBoxLayout(); layout->addItem(name_hbox); + layout->addItem(img_hbox); layout->addItem(scene_box); layout->addItem(motor_box); layout->addItem(motor_y_box); @@ -97,6 +112,21 @@ void GenScanVlmWidget::createLayout() //--------------------------------------------------------------------------- +void GenScanVlmWidget::on_browse() +{ + QString fileName = QFileDialog::getOpenFileName(this, + "Open Background image", + _directory_name, + "VLM (*.tiff *.tif *.sws)"); + + // Dialog returns a nullptr string if user press cancel. + if (fileName.isNull() || fileName.isEmpty()) return; + + _background_img_loc_le->setText(fileName); +} + +//--------------------------------------------------------------------------- + void GenScanVlmWidget::setDir(QString directory) { _directory_name = directory; @@ -117,7 +147,11 @@ void GenScanVlmWidget::updateFileList(const std::map& file_m _file_list_model->appendRow(new QStandardItem(QIcon(":/images/circle_gray.png"), itr.second.baseName())); } } - _progressBarFiles->setRange(0, _file_map.size()); + if(_file_map.size() > 0) + { + _btn_scan->setEnabled(true); + _progressBarFiles->setRange(0, _file_map.size()); + } } //--------------------------------------------------------------------------- @@ -160,9 +194,9 @@ void GenScanVlmWidget::runProcessing() int y_amt = 0; float avg_x_diff = 0; float avg_y_diff = 0; - int idx = 0; - int i=0; - for(auto& itr: _file_map) + int xidx = 0; + int yidx = 0; + for (int i = 0; i < _file_list_model->rowCount(); ++i) { data_struct::ArrayTr x_arr; data_struct::ArrayTr y_arr; @@ -170,17 +204,21 @@ void GenScanVlmWidget::runProcessing() { break; } - if(MapsH5Model::load_x_y_motors_only(itr.second.absoluteFilePath(), x_arr, y_arr)) + + QString fname = _file_list_model->item(i)->data(Qt::DisplayRole).toString(); + QFileInfo finfo = _file_map.at(fname); + + if(MapsH5Model::load_x_y_motors_only(finfo.absoluteFilePath(), x_arr, y_arr)) { // only load rect greater than 9x9 if (x_arr.size() > 9 && y_arr.size() > 9) { - idx = x_arr.size() / 2; - avg_x_diff += std::abs(x_arr[idx + 1] - x_arr[idx]); + xidx = x_arr.size() / 2; + avg_x_diff += std::abs(x_arr[xidx + 1] - x_arr[xidx]); x_amt++; - idx = y_arr.size() / 2; - avg_y_diff += std::abs(y_arr[idx + 1] - y_arr[idx]); + yidx = y_arr.size() / 2; + avg_y_diff += std::abs(y_arr[yidx + 1] - y_arr[yidx]); y_amt++; min_x_val = std::min(min_x_val, x_arr.minCoeff()); @@ -190,19 +228,26 @@ void GenScanVlmWidget::runProcessing() max_y_val = std::max(max_y_val, y_arr.maxCoeff()); gstar::UProbeRegionGraphicsItem* region = new gstar::UProbeRegionGraphicsItem(); + region->setPropertyValue(gstar::UPROBE_PRED_POS_X, QVariant(x_arr[xidx])); + region->setPropertyValue(gstar::UPROBE_PRED_POS_Y, QVariant(y_arr[yidx])); region->setHeight(y_arr.size()); region->setWidth(x_arr.size()); - //region->setPos(QPointF(marker[gstar::UPROBE_REAL_POS_X].toDouble(), marker[gstar::UPROBE_REAL_POS_Y].toDouble())); - region->setPropertyValue(gstar::UPROBE_NAME, QVariant(itr.first)); - region->setPropertyValue(gstar::UPROBE_PRED_POS_X, QVariant(x_arr[0])); - region->setPropertyValue(gstar::UPROBE_PRED_POS_Y, QVariant(y_arr[0])); - - _dataset_region_map[itr.first] = region; + region->setPropertyValue(gstar::UPROBE_NAME, QVariant(fname)); + + _dataset_region_map[fname] = region; + _file_list_model->item(i)->setData(QIcon(":/images/circle_green.png"), Qt::DecorationRole); } + else + { + _file_list_model->item(i)->setData(QIcon(":/images/circle_red.png"), Qt::DecorationRole); + } + } + else + { + _file_list_model->item(i)->setData(QIcon(":/images/circle_red.png"), Qt::DecorationRole); } - i++; - _progressBarFiles->setValue(i); + _progressBarFiles->setValue(i+1); } if (x_amt > 0) @@ -215,9 +260,31 @@ void GenScanVlmWidget::runProcessing() avg_y_diff /= (float)(y_amt); } + float diff_x = max_x_val - min_x_val; + float diff_y = max_y_val - min_y_val; + + min_x_val = min_x_val - (diff_x * .1); + max_x_val = max_x_val + (diff_x * .1); + + min_y_val = min_y_val - (diff_y * .1); + max_y_val = max_y_val + (diff_y * .1); + + _scene_motor_x_start->setText(QString::number(min_x_val)); + _scene_motor_x_end->setText(QString::number(max_x_val)); + + _scene_motor_y_start->setText(QString::number(min_y_val)); + _scene_motor_y_end->setText(QString::number(max_y_val)); + _processing = false; _btn_gen->setEnabled(true); } +//--------------------------------------------------------------------------- + +void GenScanVlmWidget::_generate() +{ + +} + //--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/GenScanVlmWidget.h b/src/mvc/GenScanVlmWidget.h index 49bd4f7..0bee58e 100644 --- a/src/mvc/GenScanVlmWidget.h +++ b/src/mvc/GenScanVlmWidget.h @@ -55,13 +55,17 @@ class GenScanVlmWidget : public QWidget public slots: - void runProcessing(); + void runProcessing(); void setStoped(); + void on_browse(); + protected: - void _clear_regions(); + void _generate(); + + void _clear_regions(); /** * @brief Create layout @@ -72,6 +76,10 @@ public slots: QString _directory_name; + QLineEdit *_background_img_loc_le; + + QPushButton *_btn_browse; + QLineEdit* _gen_name_le; QLineEdit* _scene_width; @@ -90,6 +98,8 @@ public slots: QProgressBar *_progressBarFiles; + QPushButton* _btn_scan; + QPushButton* _btn_gen; QPushButton* _btn_cancel; From ee14fa3e07d0ca6ca8b88e331493764de77cd643 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Thu, 20 Jun 2024 09:58:35 -0500 Subject: [PATCH 07/18] Generates tif and xml for scan area. Calib markers are displayed in correct area but not region markers --- src/mvc/GenScanVlmWidget.cpp | 181 ++++++++++++++++++++++++--- src/mvc/GenScanVlmWidget.h | 8 +- src/mvc/MapsWorkspaceFilesWidget.cpp | 19 ++- src/mvc/MapsWorkspaceFilesWidget.h | 2 + src/mvc/TIFF_Model.cpp | 46 ++++++- src/mvc/TIFF_Model.h | 4 + src/mvc/VLM_Model.cpp | 82 +++++++++++- src/mvc/VLM_Model.h | 6 + src/mvc/VLM_Widget.cpp | 70 +++++++---- src/mvc/VLM_Widget.h | 13 +- 10 files changed, 378 insertions(+), 53 deletions(-) diff --git a/src/mvc/GenScanVlmWidget.cpp b/src/mvc/GenScanVlmWidget.cpp index 0210a5d..e006f77 100644 --- a/src/mvc/GenScanVlmWidget.cpp +++ b/src/mvc/GenScanVlmWidget.cpp @@ -6,6 +6,7 @@ #include #include #include +#include "mvc/TIFF_Model.h" //--------------------------------------------------------------------------- @@ -52,8 +53,11 @@ void GenScanVlmWidget::createLayout() buttonlayout->addWidget(_btn_gen); buttonlayout->addWidget(_btn_cancel); + QDateTime date = QDateTime::currentDateTime(); + QString formattedTime = date.toString("yyyy_MM_dd_hh_mm_ss"); + QLabel* gen_name_label = new QLabel("VLM Scene Name: "); - _gen_name_le = new QLineEdit("ScanArea"); + _gen_name_le = new QLineEdit("ScanArea_"+formattedTime); QHBoxLayout* name_hbox = new QHBoxLayout(); name_hbox->addWidget(gen_name_label); name_hbox->addWidget(_gen_name_le); @@ -68,9 +72,9 @@ void GenScanVlmWidget::createLayout() _scene_width = new QLineEdit("5000"); _scene_heigh = new QLineEdit("5000"); - _scene_motor_x_start = new QLineEdit("0"); + _scene_motor_x_start = new QLineEdit("-10"); _scene_motor_x_end = new QLineEdit("10"); - _scene_motor_y_start = new QLineEdit("0"); + _scene_motor_y_start = new QLineEdit("-10"); _scene_motor_y_end = new QLineEdit("10"); QHBoxLayout* scene_box = new QHBoxLayout(); @@ -169,11 +173,7 @@ void GenScanVlmWidget::setStoped() void GenScanVlmWidget::_clear_regions() { - for (auto& itr : _dataset_region_map) - { - delete itr.second; - } - + _dataset_calib_map.clear(); _dataset_region_map.clear(); } @@ -227,6 +227,19 @@ void GenScanVlmWidget::runProcessing() min_y_val = std::min(min_y_val, y_arr.minCoeff()); max_y_val = std::max(max_y_val, y_arr.maxCoeff()); + QMap region_map; + region_map[gstar::UPROBE_PRED_POS_X] = QString::number(x_arr[xidx]); + region_map[gstar::UPROBE_PRED_POS_Y] = QString::number(y_arr[yidx]); + region_map[gstar::UPROBE_WIDTH] = QString::number(x_arr.size()); + region_map[gstar::UPROBE_RECT_W] = QString::number(x_arr.size()); + region_map[gstar::UPROBE_HEIGHT] = QString::number(y_arr.size()); + region_map[gstar::UPROBE_RECT_H] = QString::number(y_arr.size()); + region_map[gstar::UPROBE_MICRO_POS_X] = QString::number(x_arr[xidx]); + region_map[gstar::UPROBE_MICRO_POS_Y] = QString::number(y_arr[yidx]); + region_map[gstar::UPROBE_NAME] = fname; + _dataset_region_map[fname] = region_map; + + /* gstar::UProbeRegionGraphicsItem* region = new gstar::UProbeRegionGraphicsItem(); region->setPropertyValue(gstar::UPROBE_PRED_POS_X, QVariant(x_arr[xidx])); region->setPropertyValue(gstar::UPROBE_PRED_POS_Y, QVariant(y_arr[yidx])); @@ -236,6 +249,7 @@ void GenScanVlmWidget::runProcessing() region->setPropertyValue(gstar::UPROBE_NAME, QVariant(fname)); _dataset_region_map[fname] = region; + */ _file_list_model->item(i)->setData(QIcon(":/images/circle_green.png"), Qt::DecorationRole); } else @@ -263,17 +277,68 @@ void GenScanVlmWidget::runProcessing() float diff_x = max_x_val - min_x_val; float diff_y = max_y_val - min_y_val; - min_x_val = min_x_val - (diff_x * .1); - max_x_val = max_x_val + (diff_x * .1); - - min_y_val = min_y_val - (diff_y * .1); - max_y_val = max_y_val + (diff_y * .1); - - _scene_motor_x_start->setText(QString::number(min_x_val)); - _scene_motor_x_end->setText(QString::number(max_x_val)); - - _scene_motor_y_start->setText(QString::number(min_y_val)); - _scene_motor_y_end->setText(QString::number(max_y_val)); + float pad_min_x_val = min_x_val - (diff_x * .1); + float pad_max_x_val = max_x_val + (diff_x * .1); + + float pad_min_y_val = min_y_val - (diff_y * .1); + float pad_max_y_val = max_y_val + (diff_y * .1); + + _scene_motor_x_start->setText(QString::number(pad_min_x_val)); + _scene_motor_x_end->setText(QString::number(pad_max_x_val)); + + _scene_motor_y_start->setText(QString::number(pad_min_y_val)); + _scene_motor_y_end->setText(QString::number(pad_max_y_val)); + + // + // A B + // + // C D + // + + QMap a_marker; + a_marker[gstar::UPROBE_NAME] = "a"; + a_marker[gstar::UPROBE_LIGHT_POS_X] = "0.0"; + a_marker[gstar::UPROBE_LIGHT_POS_Y] = "0.0"; + a_marker[gstar::UPROBE_LIGHT_POS_Z] = "0.0"; + a_marker[gstar::UPROBE_PRED_POS_X] = QString::number(min_x_val); + a_marker[gstar::UPROBE_PRED_POS_Y] = QString::number(min_y_val); + a_marker[gstar::UPROBE_MICRO_POS_X] = QString::number(min_x_val); + a_marker[gstar::UPROBE_MICRO_POS_Y] = QString::number(min_y_val); + + QMap b_marker; + b_marker[gstar::UPROBE_NAME] = "b"; + b_marker[gstar::UPROBE_LIGHT_POS_X] = "0.0"; + b_marker[gstar::UPROBE_LIGHT_POS_Y] = "0.0"; + b_marker[gstar::UPROBE_LIGHT_POS_Z] = "0.0"; + b_marker[gstar::UPROBE_PRED_POS_X] = QString::number(max_x_val); + b_marker[gstar::UPROBE_PRED_POS_Y] = QString::number(min_y_val); + b_marker[gstar::UPROBE_MICRO_POS_X] = QString::number(max_x_val); + b_marker[gstar::UPROBE_MICRO_POS_Y] = QString::number(min_y_val); + + QMap c_marker; + c_marker[gstar::UPROBE_NAME] = "c"; + c_marker[gstar::UPROBE_LIGHT_POS_X] = "0.0"; + c_marker[gstar::UPROBE_LIGHT_POS_Y] = "0.0"; + c_marker[gstar::UPROBE_LIGHT_POS_Z] = "0.0"; + c_marker[gstar::UPROBE_PRED_POS_X] = QString::number(min_x_val); + c_marker[gstar::UPROBE_PRED_POS_Y] = QString::number(max_y_val); + c_marker[gstar::UPROBE_MICRO_POS_X] = QString::number(min_x_val); + c_marker[gstar::UPROBE_MICRO_POS_Y] = QString::number(max_y_val); + + QMap d_marker; + d_marker[gstar::UPROBE_NAME] = "d"; + d_marker[gstar::UPROBE_LIGHT_POS_X] = "0.0"; + d_marker[gstar::UPROBE_LIGHT_POS_Y] = "0.0"; + d_marker[gstar::UPROBE_LIGHT_POS_Z] = "0.0"; + d_marker[gstar::UPROBE_PRED_POS_X] = QString::number(max_x_val); + d_marker[gstar::UPROBE_PRED_POS_Y] = QString::number(max_y_val); + d_marker[gstar::UPROBE_MICRO_POS_X] = QString::number(max_x_val); + d_marker[gstar::UPROBE_MICRO_POS_Y] = QString::number(max_y_val); + + _dataset_calib_map["A"] = a_marker; + _dataset_calib_map["B"] = b_marker; + _dataset_calib_map["C"] = c_marker; + _dataset_calib_map["D"] = d_marker; _processing = false; _btn_gen->setEnabled(true); @@ -284,7 +349,83 @@ void GenScanVlmWidget::runProcessing() void GenScanVlmWidget::_generate() { - + QString xml_name =_directory_name+QDir::separator()+"vlm"+QDir::separator()+_gen_name_le->text()+".xml"; + QString tif_name =_directory_name+QDir::separator()+"vlm"+QDir::separator()+_gen_name_le->text()+".tif"; + TIFF_Model model; + if(_background_img_loc_le->text().size() > 0) + { + //QImage img(_background_img_loc_le->text()); + //model.set_background_img(img); + // copy tiff to vlm folder as name + } + else + { + QImage img(QSize(_scene_width->text().toInt(), _scene_heigh->text().toInt()), QImage::Format_RGB32); + img.fill(Qt::gray); + model.set_background_img(img); + } + float f_scene_w = _scene_width->text().toFloat(); + float f_scene_h = _scene_heigh->text().toFloat(); + + float w10 = f_scene_w * .1; + float h10 = f_scene_h * .1; + _dataset_calib_map["A"][gstar::UPROBE_LIGHT_POS_X] = QString::number(w10); + _dataset_calib_map["A"][gstar::UPROBE_REAL_POS_X] = QString::number(w10); + _dataset_calib_map["A"][gstar::UPROBE_LIGHT_POS_Y] = QString::number(h10); + _dataset_calib_map["A"][gstar::UPROBE_REAL_POS_Y] = QString::number(h10); + _dataset_calib_map["B"][gstar::UPROBE_LIGHT_POS_X] = QString::number(f_scene_w - w10); + _dataset_calib_map["B"][gstar::UPROBE_REAL_POS_X] = QString::number(f_scene_w - w10); + _dataset_calib_map["B"][gstar::UPROBE_LIGHT_POS_Y] = QString::number(h10); + _dataset_calib_map["B"][gstar::UPROBE_REAL_POS_Y] = QString::number(h10); + _dataset_calib_map["C"][gstar::UPROBE_LIGHT_POS_X] = QString::number(w10); + _dataset_calib_map["C"][gstar::UPROBE_REAL_POS_X] = QString::number(w10); + _dataset_calib_map["C"][gstar::UPROBE_LIGHT_POS_Y] = QString::number(f_scene_h - h10); + _dataset_calib_map["C"][gstar::UPROBE_REAL_POS_Y] = QString::number(f_scene_h - h10); + _dataset_calib_map["D"][gstar::UPROBE_LIGHT_POS_X] = QString::number(f_scene_w - w10); + _dataset_calib_map["D"][gstar::UPROBE_REAL_POS_X] = QString::number(f_scene_w - w10); + _dataset_calib_map["D"][gstar::UPROBE_LIGHT_POS_Y] = QString::number(f_scene_h - h10); + _dataset_calib_map["D"][gstar::UPROBE_REAL_POS_Y] = QString::number(f_scene_h - h10); + + float min_x_mot = _scene_motor_x_start->text().toFloat(); + float max_x_mot = _scene_motor_x_end->text().toFloat(); + + float x_tot_mot = std::abs(max_x_mot - min_x_mot); + + float min_y_mot = _scene_motor_y_start->text().toFloat(); + float max_y_mot = _scene_motor_y_end->text().toFloat(); + + float y_tot_mot = std::abs(max_y_mot - min_y_mot); + + for (auto itr : _dataset_calib_map) + { + model.add_calib_marker(itr.second); + } + for (auto itr : _dataset_region_map) + { + float mx = itr.second[gstar::UPROBE_MICRO_POS_X].toFloat(); + float per_x = std::abs( mx - min_x_mot) / x_tot_mot; + float px = per_x * f_scene_w; + int width = itr.second[gstar::UPROBE_WIDTH].toInt(); + int tlx = px - (width * 0.5); + itr.second[gstar::UPROBE_REAL_POS_X] = QString::number(px); + itr.second[gstar::UPROBE_LIGHT_POS_X] = QString::number(px); + itr.second[gstar::UPROBE_RECT_TLX] = QString::number(tlx); + float my = itr.second[gstar::UPROBE_MICRO_POS_Y].toFloat(); + float per_y = std::abs( my - min_y_mot) / y_tot_mot; + float py = per_y * f_scene_h; + int height = itr.second[gstar::UPROBE_HEIGHT].toInt(); + int tly = py - (height * 0.5); + itr.second[gstar::UPROBE_REAL_POS_Y] = QString::number(py); + itr.second[gstar::UPROBE_LIGHT_POS_Y] = QString::number(py); + itr.second[gstar::UPROBE_RECT_TLY] = QString::number(tly); + model.add_region_marker(itr.second); + } + if(model.save_img(tif_name)) + { + model.save_xml(xml_name); + } + emit new_scan_area(tif_name); + close(); } //--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/GenScanVlmWidget.h b/src/mvc/GenScanVlmWidget.h index 0bee58e..ea1fa0d 100644 --- a/src/mvc/GenScanVlmWidget.h +++ b/src/mvc/GenScanVlmWidget.h @@ -19,11 +19,9 @@ #include #include #include -//#include #include #include #include -#include "gstar/Annotation/UProbeRegionGraphicsItem.h" //--------------------------------------------------------------------------- @@ -53,6 +51,8 @@ class GenScanVlmWidget : public QWidget void processed_list_update(QStringList); + void new_scan_area(const QString &); + public slots: void runProcessing(); @@ -108,7 +108,9 @@ public slots: QListView* _file_list_view; - std::map _dataset_region_map; + std::map > _dataset_calib_map; + + std::map > _dataset_region_map; }; diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index 2e3e877..905cf59 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -97,6 +97,9 @@ void MapsWorkspaceFilesWidget::createLayout() _vlm_tab_widget->addCustomContext(STR_GEN_SCAN_AREA); _vlm_tab_widget->addCustomButtonRow(STR_GEN_SCAN_AREA); + + connect(&_gen_scan_vlm_widget, &GenScanVlmWidget::new_scan_area, this, &MapsWorkspaceFilesWidget::newScanArea); + QLayout* vlayout = new QVBoxLayout(); _tab_widget->insertTab(0, _h5_tab_widget, "Analyized Data"); @@ -598,7 +601,21 @@ void MapsWorkspaceFilesWidget::onGenScanArea(const QStringList& file_list) _gen_scan_vlm_widget.show(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void MapsWorkspaceFilesWidget::newScanArea(const QString &name) +{ + QStringList vlm_list; + vlm_list.append(name); + if(_model != nullptr) + { + _model->reload_vlm(); + } + onOpenModel(vlm_list, MODEL_TYPE::VLM); + +} + +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onProcessed_list_update(QStringList file_list) { diff --git a/src/mvc/MapsWorkspaceFilesWidget.h b/src/mvc/MapsWorkspaceFilesWidget.h index 335dfb9..c5f9edb 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.h +++ b/src/mvc/MapsWorkspaceFilesWidget.h @@ -102,6 +102,8 @@ public slots: void onGenScanArea(const QStringList& file_list); + void newScanArea(const QString& name); + protected: /** diff --git a/src/mvc/TIFF_Model.cpp b/src/mvc/TIFF_Model.cpp index 252542d..e97b45d 100644 --- a/src/mvc/TIFF_Model.cpp +++ b/src/mvc/TIFF_Model.cpp @@ -102,10 +102,13 @@ bool TIFF_Model::load(QString filepath) val = 0.f; break; } - //float val = mat.at(h, w); _pixel_values(h, w) = val; - val = (val - minVal) / range; - int c = val * 255; + int c = val; + if(range > 0) + { + val = (val - minVal) / range; + c = val * 255; + } _img.setPixelColor(w, h, QColor(c, c, c, 255)); } } @@ -204,7 +207,7 @@ int TIFF_Model::getNumberOfImages() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int TIFF_Model::getRank() { @@ -213,5 +216,38 @@ int TIFF_Model::getRank() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +bool TIFF_Model::save_img(QString filename) +{ + QImageWriter writer(filename); + if (false == writer.write(_img)) + { + cv::Mat mat(_img.height(), _img.width(), CV_8UC4); + for (int h = 0; h < mat.rows; ++h) + { + for (int w = 0; w < mat.cols; ++w) + { + QColor c = _img.pixelColor(w,h); + cv::Vec4b& bgra = mat.at(h, w); + bgra[0] = c.blue(); // blue + bgra[1] = c.green(); // Green + bgra[2] = c.red(); // Red + bgra[3] = UCHAR_MAX; // Alpha + } + } + + try + { + return imwrite(filename.toStdString(), mat); + } + catch (const cv::Exception& ex) + { + logW<<"Exception converting image to PNG format: "<< ex.what()<<"\n"; + return false; + } + } + return true; +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/TIFF_Model.h b/src/mvc/TIFF_Model.h index 66c342f..59369ac 100644 --- a/src/mvc/TIFF_Model.h +++ b/src/mvc/TIFF_Model.h @@ -77,6 +77,10 @@ class TIFF_Model : public VLM_Model */ virtual QImage* getImage() { return &_img; } + bool save_img(QString filename); + + void set_background_img(QImage img) {_img = img;} + protected: virtual void _initializeCoordModel(); diff --git a/src/mvc/VLM_Model.cpp b/src/mvc/VLM_Model.cpp index 917f9ed..5573175 100644 --- a/src/mvc/VLM_Model.cpp +++ b/src/mvc/VLM_Model.cpp @@ -7,6 +7,7 @@ #include #include #include +#include "core/defines.h" const QString STR_MARKERS = "markers"; const QString STR_MARKER = "marker"; @@ -34,7 +35,21 @@ VLM_Model::~VLM_Model() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void VLM_Model::add_calib_marker(const QMap& marker) +{ + _markersLoaded.append(marker); +} + +//--------------------------------------------------------------------------- + +void VLM_Model::add_region_marker(const QMap& marker) +{ + _regionMarkersLoaded.append(marker); +} + +//--------------------------------------------------------------------------- void VLM_Model::_load_xml_markers_and_regions() { @@ -93,6 +108,71 @@ void VLM_Model::_load_xml_markers_and_regions() } +//--------------------------------------------------------------------------- + +void VLM_Model::save_xml(QString filename) +{ + QFile file(filename); + + if (!file.open(QIODevice::WriteOnly)) + { + QMessageBox::warning(0, "Read only", "The file is in read only mode"); + return; + } + QXmlStreamWriter* xmlWriter = new QXmlStreamWriter(); + xmlWriter->setDevice(&file); + + xmlWriter->writeStartDocument(); + xmlWriter->writeStartElement("markers"); + + // Get the crossing marker information + for (auto itr :_markersLoaded) + { + xmlWriter->writeStartElement("marker"); + xmlWriter->writeAttribute(gstar::UPROBE_COLOR,itr.value(gstar::UPROBE_COLOR, "#ff007f")); + xmlWriter->writeAttribute(gstar::UPROBE_LIGHT_POS_X,itr.value(gstar::UPROBE_LIGHT_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_LIGHT_POS_Y,itr.value(gstar::UPROBE_LIGHT_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_LIGHT_POS_Z,itr.value(gstar::UPROBE_LIGHT_POS_Z, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_REAL_POS_X,itr.value(gstar::UPROBE_REAL_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_REAL_POS_Y,itr.value(gstar::UPROBE_REAL_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_PRED_POS_X,itr.value(gstar::UPROBE_PRED_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_PRED_POS_Y,itr.value(gstar::UPROBE_PRED_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_MICRO_POS_X,itr.value(gstar::UPROBE_MICRO_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_MICRO_POS_Y,itr.value(gstar::UPROBE_MICRO_POS_Y, "0")); + xmlWriter->writeCharacters (itr.value(gstar::UPROBE_NAME, "_")); + xmlWriter->writeEndElement(); + } + + // Get the region marker information + for (auto itr :_regionMarkersLoaded) + { + xmlWriter->writeStartElement("regionmarker"); + + xmlWriter->writeAttribute(gstar::UPROBE_COLOR,itr.value(gstar::UPROBE_COLOR, "#ff007f")); + xmlWriter->writeAttribute(gstar::UPROBE_PRED_POS_X,itr.value(gstar::UPROBE_PRED_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_PRED_POS_Y,itr.value(gstar::UPROBE_PRED_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_WIDTH,itr.value(gstar::UPROBE_WIDTH, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_HEIGHT,itr.value(gstar::UPROBE_HEIGHT, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_MICRO_POS_X,itr.value(gstar::UPROBE_MICRO_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_MICRO_POS_Y,itr.value(gstar::UPROBE_MICRO_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_REAL_POS_X,itr.value(gstar::UPROBE_REAL_POS_X, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_REAL_POS_Y,itr.value(gstar::UPROBE_REAL_POS_Y, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_RECT_TLX,itr.value(gstar::UPROBE_RECT_TLX, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_RECT_TLY,itr.value(gstar::UPROBE_RECT_TLY, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_RECT_W,itr.value(gstar::UPROBE_RECT_W, "0")); + xmlWriter->writeAttribute(gstar::UPROBE_RECT_H,itr.value(gstar::UPROBE_RECT_H, "0")); + + //xmlWriter->writeAttribute(gstar::UPROBE_SIZE,itr.value(gstar::UPROBE_SIZE, "20")); + xmlWriter->writeCharacters (itr.value(gstar::UPROBE_NAME)); + xmlWriter->writeEndElement(); + } + + xmlWriter->writeEndElement(); + xmlWriter->writeEndDocument(); + + delete xmlWriter; +} + /*---------------------------------------------------------------------------*/ /* void VLM_Model::check_and_load_autosave() diff --git a/src/mvc/VLM_Model.h b/src/mvc/VLM_Model.h index 91d6b19..e6da791 100644 --- a/src/mvc/VLM_Model.h +++ b/src/mvc/VLM_Model.h @@ -40,6 +40,8 @@ class VLM_Model : public AbstractWindowModel */ virtual bool load(QString filepath) = 0; + void save_xml(QString filename); + virtual bool loaded() = 0; /** @@ -56,6 +58,10 @@ class VLM_Model : public AbstractWindowModel const QList< QMap >& getRegionMarkers() {return _regionMarkersLoaded;} + void add_calib_marker(const QMap& marker); + + void add_region_marker(const QMap& marker); + protected: virtual void _initializeCoordModel() = 0; diff --git a/src/mvc/VLM_Widget.cpp b/src/mvc/VLM_Widget.cpp index 6a3a2bb..f68e27b 100644 --- a/src/mvc/VLM_Widget.cpp +++ b/src/mvc/VLM_Widget.cpp @@ -59,35 +59,25 @@ enum TabIndex{ static const int ID_NELDER_MEAD = 0; static const int ID_PYTHON = 1; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- VLM_Widget::VLM_Widget(QWidget* parent) : AbstractImageWidget(1,1,parent) { - m_microProbePvSet = false; -// m_pvXHandler = nullptr; -// m_pvYHandler = nullptr; - m_solverWidget = nullptr; - m_calSelectionModel = nullptr; - m_lightToMicroCoordModel = nullptr; - m_coordinateModel = nullptr; - m_solver = nullptr; - m_solverParameterParse = new SolverParameterParse(); + _init(); - checkMicroProbePVs(); - createLayout(); - createActions(); - createMicroProbeMenu(); - _createSolver(); - m_imageViewWidget->clickFill(true); +} - m_grabbingPvsX = false; - m_grabbingPvsY = false; +//--------------------------------------------------------------------------- +VLM_Widget::VLM_Widget(QString dataset_name, QWidget* parent) : AbstractImageWidget(1,1,parent) +{ + m_datasetPath = dataset_name; + _init(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- VLM_Widget::~VLM_Widget() { @@ -119,7 +109,32 @@ VLM_Widget::~VLM_Widget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- + +void VLM_Widget::_init() +{ + m_microProbePvSet = false; +// m_pvXHandler = nullptr; +// m_pvYHandler = nullptr; + m_solverWidget = nullptr; + m_calSelectionModel = nullptr; + m_lightToMicroCoordModel = nullptr; + m_coordinateModel = nullptr; + m_solver = nullptr; + m_solverParameterParse = new SolverParameterParse(); + + checkMicroProbePVs(); + createLayout(); + createActions(); + createMicroProbeMenu(); + _createSolver(); + m_imageViewWidget->clickFill(true); + + m_grabbingPvsX = false; + m_grabbingPvsY = false; +} + +//--------------------------------------------------------------------------- void VLM_Widget::addCalibration() { @@ -213,7 +228,7 @@ void VLM_Widget::addTopWindowPoints() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::addMicroProbeRegion() { @@ -229,9 +244,20 @@ void VLM_Widget::addMicroProbeRegion() } +//--------------------------------------------------------------------------- + +void VLM_Widget::addMicroProbeRegion(gstar::UProbeRegionGraphicsItem* annotation) +{ + annotation->setMouseOverPixelCoordModel(m_coordinateModel); + annotation->setLightToMicroCoordModel(m_lightToMicroCoordModel); + insertAndSelectAnnotation(m_mpTreeModel, + m_mpAnnoTreeView, + m_mpSelectionModel, + annotation); +} -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::_createLightToMicroCoords(int id) { diff --git a/src/mvc/VLM_Widget.h b/src/mvc/VLM_Widget.h index 73c0e56..f3c69f0 100644 --- a/src/mvc/VLM_Widget.h +++ b/src/mvc/VLM_Widget.h @@ -62,6 +62,10 @@ class VLM_Widget */ VLM_Widget(QWidget* parent = nullptr); + /** + * Constructor. + */ + VLM_Widget(QString dataset_name, QWidget* parent = nullptr); /** * Destructor. @@ -147,6 +151,11 @@ class VLM_Widget */ void widgetChanged(bool enable); + /** + * @brief addMicroProbeRegion + */ + void addMicroProbeRegion(gstar::UProbeRegionGraphicsItem* annotation); + public slots: /** @@ -283,6 +292,8 @@ protected slots: protected: + void _init(); + /** * @brief callbackPvXUpdatedFloat * @param val @@ -382,7 +393,7 @@ protected slots: void onLinkRegionToDataset(QString, QString, QImage); -private: +private: /** * @brief saveXMLCoordinateInfo From 3db75dd0d438c15093f636636996404a082e8845 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 21 Jun 2024 08:03:29 -0500 Subject: [PATCH 08/18] Renamed CoordianteTransformer to SV_CoordTransformer. Added LinearCoordTransformer but it is just a shell. Worked on exporting gnescan more. It loads the markers and regions but does not transform them properly yet --- src/mvc/GenScanVlmWidget.cpp | 19 +- src/mvc/SWSModel.cpp | 4 - src/mvc/ScatterPlotWidget.cpp | 2 +- src/mvc/SolverProfileWidget.cpp | 2 +- src/mvc/SolverProfileWidget.h | 2 +- src/mvc/TIFF_Model.cpp | 9 - src/mvc/VLM_Model.cpp | 10 +- src/mvc/VLM_Widget.cpp | 229 +++++++++--------- src/mvc/VLM_Widget.h | 3 +- src/preferences/PreferencesSolverOption.cpp | 2 +- src/preferences/PreferencesSolverOption.h | 6 +- src/preferences/SolverParameterParse.h | 5 - src/solver/LinearCoordTransformer.cpp | 129 ++++++++++ src/solver/LinearCoordTransformer.h | 100 ++++++++ ...ransformer.cpp => SV_CoordTransformer.cpp} | 16 +- ...ateTransformer.h => SV_CoordTransformer.h} | 10 +- 16 files changed, 393 insertions(+), 155 deletions(-) create mode 100644 src/solver/LinearCoordTransformer.cpp create mode 100644 src/solver/LinearCoordTransformer.h rename src/solver/{CoordinateTransformer.cpp => SV_CoordTransformer.cpp} (93%) rename src/solver/{CoordinateTransformer.h => SV_CoordTransformer.h} (93%) diff --git a/src/mvc/GenScanVlmWidget.cpp b/src/mvc/GenScanVlmWidget.cpp index e006f77..5f94a43 100644 --- a/src/mvc/GenScanVlmWidget.cpp +++ b/src/mvc/GenScanVlmWidget.cpp @@ -277,11 +277,11 @@ void GenScanVlmWidget::runProcessing() float diff_x = max_x_val - min_x_val; float diff_y = max_y_val - min_y_val; - float pad_min_x_val = min_x_val - (diff_x * .1); - float pad_max_x_val = max_x_val + (diff_x * .1); + float pad_min_x_val = min_x_val - (diff_x * .05); + float pad_max_x_val = max_x_val + (diff_x * .05); - float pad_min_y_val = min_y_val - (diff_y * .1); - float pad_max_y_val = max_y_val + (diff_y * .1); + float pad_min_y_val = min_y_val - (diff_y * .05); + float pad_max_y_val = max_y_val + (diff_y * .05); _scene_motor_x_start->setText(QString::number(pad_min_x_val)); _scene_motor_x_end->setText(QString::number(pad_max_x_val)); @@ -349,6 +349,9 @@ void GenScanVlmWidget::runProcessing() void GenScanVlmWidget::_generate() { + _btn_browse->setEnabled(false); + _btn_gen->setEnabled(false); + _btn_scan->setEnabled(false); QString xml_name =_directory_name+QDir::separator()+"vlm"+QDir::separator()+_gen_name_le->text()+".xml"; QString tif_name =_directory_name+QDir::separator()+"vlm"+QDir::separator()+_gen_name_le->text()+".tif"; TIFF_Model model; @@ -367,8 +370,8 @@ void GenScanVlmWidget::_generate() float f_scene_w = _scene_width->text().toFloat(); float f_scene_h = _scene_heigh->text().toFloat(); - float w10 = f_scene_w * .1; - float h10 = f_scene_h * .1; + float w10 = f_scene_w * .05; + float h10 = f_scene_h * .05; _dataset_calib_map["A"][gstar::UPROBE_LIGHT_POS_X] = QString::number(w10); _dataset_calib_map["A"][gstar::UPROBE_REAL_POS_X] = QString::number(w10); _dataset_calib_map["A"][gstar::UPROBE_LIGHT_POS_Y] = QString::number(h10); @@ -426,6 +429,10 @@ void GenScanVlmWidget::_generate() } emit new_scan_area(tif_name); close(); + + _btn_browse->setEnabled(true); + _btn_gen->setEnabled(true); + _btn_scan->setEnabled(true); } //--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/SWSModel.cpp b/src/mvc/SWSModel.cpp index 3cbed5d..72e6799 100644 --- a/src/mvc/SWSModel.cpp +++ b/src/mvc/SWSModel.cpp @@ -196,7 +196,6 @@ int SWSModel::getRank() void SWSModel::_initializeCoordModel() { - vec2 topLeft; vec2 topRight; vec2 bottomLeft; @@ -373,9 +372,6 @@ void SWSModel::_initializeCoordModel() lt->setScale(xScale, yScale, 1.0); lt->setDivider(1000.0, 1000.0, 1.0); _coord_model = new gstar::CoordinateModel(lt); - - - } } diff --git a/src/mvc/ScatterPlotWidget.cpp b/src/mvc/ScatterPlotWidget.cpp index a63a163..c60501a 100644 --- a/src/mvc/ScatterPlotWidget.cpp +++ b/src/mvc/ScatterPlotWidget.cpp @@ -67,7 +67,7 @@ void ScatterPlotWidget::_createLayout() connect(_btn_del, &QPushButton::released, this, &ScatterPlotWidget::onDel); _btn_scan_corr_coef = new QPushButton("Scan Corr Coef"); connect(_btn_scan_corr_coef, &QPushButton::released, this, &ScatterPlotWidget::onScan); - _btn_save_png = new QPushButton("Save PNG"); + _btn_save_png = new QPushButton("Export"); connect(_btn_save_png, &QPushButton::released, this, &ScatterPlotWidget::onSavePng); if (num_wins < 1) diff --git a/src/mvc/SolverProfileWidget.cpp b/src/mvc/SolverProfileWidget.cpp index 92b6c7b..51919d7 100644 --- a/src/mvc/SolverProfileWidget.cpp +++ b/src/mvc/SolverProfileWidget.cpp @@ -174,7 +174,7 @@ void SolverProfileWidget::createCompontent() void SolverProfileWidget::addDefaultTransformers() { - CoordinateTransformer ctrans; + SV_CoordTransformer ctrans; gstar::LinearTransformer ltrans; addProfile(QSTR_2IDE_COORD_TRANS, QSTR_2IDE_COORD_TRANS_DESC, ctrans.getAllCoef()); addProfile(QSTR_LINEAR_COORD_TRANS, QSTR_LINEAR_COORD_TRANS_DESC, ltrans.getAllCoef() ); diff --git a/src/mvc/SolverProfileWidget.h b/src/mvc/SolverProfileWidget.h index 0708494..6d75b69 100644 --- a/src/mvc/SolverProfileWidget.h +++ b/src/mvc/SolverProfileWidget.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include diff --git a/src/mvc/TIFF_Model.cpp b/src/mvc/TIFF_Model.cpp index e97b45d..3546257 100644 --- a/src/mvc/TIFF_Model.cpp +++ b/src/mvc/TIFF_Model.cpp @@ -154,15 +154,6 @@ void TIFF_Model::_initializeCoordModel() { double xScale = 1.0; double yScale = 1.0; - double imgWidth; - double imgHeight; - - int topLeftIdx = 0; - int topRightIdx; - int bottomLeftIdx; - - imgWidth = _img.width(); - imgHeight = _img.height(); LinearTransformer* lt = new LinearTransformer(); lt->setTopLeft(0, 0); diff --git a/src/mvc/VLM_Model.cpp b/src/mvc/VLM_Model.cpp index 5573175..4b497bb 100644 --- a/src/mvc/VLM_Model.cpp +++ b/src/mvc/VLM_Model.cpp @@ -12,6 +12,7 @@ const QString STR_MARKERS = "markers"; const QString STR_MARKER = "marker"; const QString STR_REGION_MARKER = "regionmarker"; +const QString STR_SOLVER = "solver"; /*----------------src/mvc/VLM_Model.cpp \-----------------------------------------------------------*/ @@ -86,15 +87,20 @@ void VLM_Model::_load_xml_markers_and_regions() { continue; } - if (xml.name() == STR_MARKER) + else if (xml.name() == STR_MARKER) { _markersLoaded.prepend(_parseMarker(xml)); continue; } - if (xml.name() == STR_REGION_MARKER) + else if (xml.name() == STR_REGION_MARKER) { _regionMarkersLoaded.prepend(_parseRegionMarker(xml)); } + else if (xml.name() == STR_SOLVER) + { + // TODO: load and config solver + //_regionMarkersLoaded.prepend(_parseRegionMarker(xml)); + } } } diff --git a/src/mvc/VLM_Widget.cpp b/src/mvc/VLM_Widget.cpp index f68e27b..4905a43 100644 --- a/src/mvc/VLM_Widget.cpp +++ b/src/mvc/VLM_Widget.cpp @@ -56,8 +56,9 @@ enum TabIndex{ MICROPROBE_IDX }; -static const int ID_NELDER_MEAD = 0; -static const int ID_PYTHON = 1; +static const int ID_LINEAR = 0; +static const int ID_NELDER_MEAD = 1; +static const int ID_PYTHON = 2; //--------------------------------------------------------------------------- @@ -275,75 +276,82 @@ void VLM_Widget::_createLightToMicroCoords(int id) lightTransformer = nullptr; } - if (id == ID_NELDER_MEAD) - { - QStringList coefList = Preferences::inst()->getValue(STR_PRF_NMCoefficient).toStringList(); - if (m_solverParameterParse->parseSolverCoefList(coefList)) - { - m_solverParameterParse->getTransform(allCoefs); - } - else - { - //generate defaults - CoordinateTransformer c; - allCoefs = c.getAllCoef(); - } - + if(id == ID_LINEAR) + { + if (lightTransformer == nullptr) + { + lightTransformer = new LinearCoordTransformer(); + } + } + else if (id == ID_NELDER_MEAD) + { + QStringList coefList = Preferences::inst()->getValue(STR_PRF_NMCoefficient).toStringList(); + if (m_solverParameterParse->parseSolverCoefList(coefList)) + { + m_solverParameterParse->getTransform(allCoefs); + } + else + { + //generate defaults + SV_CoordTransformer c; + allCoefs = c.getAllCoef(); + } + - if (lightTransformer == nullptr) - { - lightTransformer = new CoordinateTransformer(); - } - } - else - { - QStringList coefList = Preferences::inst()->getValue(STR_PRF_PythonCoefficient).toStringList(); + if (lightTransformer == nullptr) + { + lightTransformer = new SV_CoordTransformer(); + } + } + else + { + QStringList coefList = Preferences::inst()->getValue(STR_PRF_PythonCoefficient).toStringList(); - if (false == m_solverParameterParse->parseSolverCoefList(coefList)) - { - Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); - _createSolver(); - return; - } - m_solverParameterParse->getTransform(allCoefs); + if (false == m_solverParameterParse->parseSolverCoefList(coefList)) + { + Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); + _createSolver(); + return; + } + m_solverParameterParse->getTransform(allCoefs); - if (lightTransformer == nullptr) - { - QString pythonFileName = Preferences::inst()->getValue(STR_PRF_PythonSolverName).toString(); - if (pythonFileName.isEmpty()) - { - QMessageBox::critical(nullptr, "Error", - "Must have a python script having a transform function, using default transformer right now."); - Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); - _createSolver(); - return; - } - QFileInfo fileInfo = QFileInfo(pythonFileName); - lightTransformer = new PythonTransformer( - fileInfo.path(), - fileInfo.baseName(), - QString("my_transform")); - } - } + if (lightTransformer == nullptr) + { + QString pythonFileName = Preferences::inst()->getValue(STR_PRF_PythonSolverName).toString(); + if (pythonFileName.isEmpty()) + { + QMessageBox::critical(nullptr, "Error", + "Must have a python script having a transform function, using default transformer right now."); + Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); + _createSolver(); + return; + } + QFileInfo fileInfo = QFileInfo(pythonFileName); + lightTransformer = new PythonTransformer( + fileInfo.path(), + fileInfo.baseName(), + QString("my_transform")); + } + } - if (lightTransformer->Init(allCoefs)) - { - if (m_lightToMicroCoordModel != nullptr) - { - m_lightToMicroCoordModel->setTransformer(lightTransformer); - } - else - { - m_lightToMicroCoordModel = new gstar::CoordinateModel(lightTransformer); - } - } - else - { - QMessageBox::critical(nullptr, "uProbeX", "Error initializeing Transformer!"); - logW << "Could not init Transformer\n"; - } + if (lightTransformer->Init(allCoefs)) + { + if (m_lightToMicroCoordModel != nullptr) + { + m_lightToMicroCoordModel->setTransformer(lightTransformer); + } + else + { + m_lightToMicroCoordModel = new gstar::CoordinateModel(lightTransformer); + } + } + else + { + QMessageBox::critical(nullptr, "uProbeX", "Error initializeing Transformer!"); + logW << "Could not init Transformer\n"; + } - m_lightToMicroCoordWidget->setModel(m_lightToMicroCoordModel); + m_lightToMicroCoordWidget->setModel(m_lightToMicroCoordModel); } @@ -363,54 +371,59 @@ void VLM_Widget::_createSolver() _createLightToMicroCoords(id); - if (id == ID_NELDER_MEAD) - { - NelderMeadSolver* nm = new NelderMeadSolver(); - ///nm->setTransformer(); - QStringList optionList = Preferences::inst()->getValue(STR_PRF_NMOptions).toStringList(); - if (false == m_solverParameterParse->parseSolverOptionList(optionList)) - { - logE << "Error reading options for NM solver\n"; - // Initialize with the default option - dict_options = nm->getOptions(); - } - else - { - m_solverParameterParse->getOptions(dict_options); - } + if (id == ID_LINEAR) + { - m_solver->setImpl(nm); - } - else - { - PythonSolver* ps = new PythonSolver(); + } + else if (id == ID_NELDER_MEAD) + { + NelderMeadSolver* nm = new NelderMeadSolver(); + + ///nm->setTransformer(); + QStringList optionList = Preferences::inst()->getValue(STR_PRF_NMOptions).toStringList(); + if (false == m_solverParameterParse->parseSolverOptionList(optionList)) + { + logE << "Error reading options for NM solver\n"; + // Initialize with the default option + dict_options = nm->getOptions(); + } + else + { + m_solverParameterParse->getOptions(dict_options); + } + + m_solver->setImpl(nm); + } + else + { + PythonSolver* ps = new PythonSolver(); - QString pythonFileName = Preferences::inst()->getValue(STR_PRF_PythonSolverName).toString(); - QFileInfo fileInfo = QFileInfo(pythonFileName); + QString pythonFileName = Preferences::inst()->getValue(STR_PRF_PythonSolverName).toString(); + QFileInfo fileInfo = QFileInfo(pythonFileName); - QStringList optionList = Preferences::inst()->getValue(STR_PRF_PythonOptions).toStringList(); + QStringList optionList = Preferences::inst()->getValue(STR_PRF_PythonOptions).toStringList(); - if (pythonFileName.isEmpty() - || false == m_solverParameterParse->parseSolverOptionList(optionList) - || false == ps->initialPythonSolver(fileInfo.path(), - fileInfo.baseName(), - QString("my_solver"))) - { - logE << "Error reading options for python solver, reverting to NelderMeadSolver\n"; - QMessageBox::critical(nullptr, "uProbeX", "Error initializeing Python solver, reverting to NelderMeadSolver"); - Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); - _createSolver(); - return; - } - m_solverParameterParse->getOptions(dict_options); - m_solver->setImpl(ps); + if (pythonFileName.isEmpty() + || false == m_solverParameterParse->parseSolverOptionList(optionList) + || false == ps->initialPythonSolver(fileInfo.path(), + fileInfo.baseName(), + QString("my_solver"))) + { + logE << "Error reading options for python solver, reverting to NelderMeadSolver\n"; + QMessageBox::critical(nullptr, "uProbeX", "Error initializeing Python solver, reverting to NelderMeadSolver"); + Preferences::inst()->setValue(STR_PRF_SolverCheckedID, 0); + _createSolver(); + return; + } + m_solverParameterParse->getOptions(dict_options); + m_solver->setImpl(ps); - } - ITransformer* trans = m_lightToMicroCoordModel->getTransformer(); - m_solver->setAllCoef(trans->getAllCoef()); - m_solver->setOptions(dict_options); - m_solver->setTransformer(trans); + } + ITransformer* trans = m_lightToMicroCoordModel->getTransformer(); + m_solver->setAllCoef(trans->getAllCoef()); + m_solver->setOptions(dict_options); + m_solver->setTransformer(trans); } diff --git a/src/mvc/VLM_Widget.h b/src/mvc/VLM_Widget.h index f3c69f0..1bb270d 100644 --- a/src/mvc/VLM_Widget.h +++ b/src/mvc/VLM_Widget.h @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include diff --git a/src/preferences/PreferencesSolverOption.cpp b/src/preferences/PreferencesSolverOption.cpp index 1376b50..923a7e7 100644 --- a/src/preferences/PreferencesSolverOption.cpp +++ b/src/preferences/PreferencesSolverOption.cpp @@ -27,7 +27,7 @@ PreferencesSolverOption::PreferencesSolverOption( m_windowList = windowList; m_solverWidget = nullptr; - m_transformer = new CoordinateTransformer(); + m_transformer = new SV_CoordTransformer(); m_solverParameterParse = new SolverParameterParse(); //m_solver = solver; diff --git a/src/preferences/PreferencesSolverOption.h b/src/preferences/PreferencesSolverOption.h index 543ace5..1cbab2e 100644 --- a/src/preferences/PreferencesSolverOption.h +++ b/src/preferences/PreferencesSolverOption.h @@ -25,11 +25,11 @@ #include #include #include -#include +#include class NelderMeadSolver; class SolverWidget; -class CoordinateTransformer; +class SV_CoordTransformer; class SolverAttributesModel; class SolverAttributesGroup; @@ -240,7 +240,7 @@ private slots: /** * @brief m_transformer */ - CoordinateTransformer* m_transformer; + SV_CoordTransformer* m_transformer; /** * @brief m_coordTransformer diff --git a/src/preferences/SolverParameterParse.h b/src/preferences/SolverParameterParse.h index 1376ef7..1ab953f 100644 --- a/src/preferences/SolverParameterParse.h +++ b/src/preferences/SolverParameterParse.h @@ -62,11 +62,6 @@ class SolverParameterParse */ void getOptions(QMap& dict_options); - /** - * @brief getCoefficientAndTransform - * - * @param coefList - */ bool parseSolverCoefList(QStringList& coefList); /** diff --git a/src/solver/LinearCoordTransformer.cpp b/src/solver/LinearCoordTransformer.cpp new file mode 100644 index 0000000..9ef6764 --- /dev/null +++ b/src/solver/LinearCoordTransformer.cpp @@ -0,0 +1,129 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2012, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include +#include + +/*---------------------------------------------------------------------------*/ + +LinearCoordTransformer::LinearCoordTransformer() : ITransformer() +{ + + +} + +/*---------------------------------------------------------------------------*/ + +LinearCoordTransformer::~LinearCoordTransformer() +{ + +} + +/*---------------------------------------------------------------------------*/ + +QMap LinearCoordTransformer::getAllCoef() +{ + + QMap m_coefs { + {STR_m2xfm_x, 0.0 }, + {STR_m2xfm_y, 0.0 } + }; + return m_coefs; + +} + +/*---------------------------------------------------------------------------*/ + +bool LinearCoordTransformer::Init(QMap globalVars) +{ + + + if(globalVars.count(STR_m2xfm_x) > 0) + { + m_2xfm_x = globalVars[STR_m2xfm_x]; + } + if(globalVars.count(STR_m2xfm_y) > 0) + { + m_2xfm_y = globalVars[STR_m2xfm_y]; + } + + return true; + +} + +/*---------------------------------------------------------------------------*/ + +bool LinearCoordTransformer::getVariable(QString name, double *val) +{ + + if(name == STR_m2xfm_x) + { + *val = m_2xfm_x; + return true; + } + else if(name == STR_m2xfm_y) + { + *val = m_2xfm_y; + return true; + } + + return false; + +} + +/*---------------------------------------------------------------------------*/ + +bool LinearCoordTransformer::setVariable(QString name, double val) +{ + + if(name == STR_m2xfm_x) + { + m_2xfm_x= val; + return true; + } + else if(name == STR_m2xfm_y) + { + m_2xfm_y = val; + return true; + } + + return false; + +} + +/*---------------------------------------------------------------------------*/ + +void LinearCoordTransformer::transformCommand(double inX, + double inY, + double inZ, + double *outX, + double *outY, + double *outZ) +{ +/* + *outX = -( + ( inX - m_offset_c ) * + sin( (m_angle_alpha + m_omega_prime) / 180.0 * M_PI) + / sin( (m_omega_prime) / 180.0 * M_PI ) - (inY - m_offset_d) + * sin( ( m_omega - m_omega_prime - m_angle_alpha ) / 180.0 * M_PI ) + / sin( m_omega_prime / 180.0 * M_PI ) + ) * m_scaling_XFM_X + m_offset_a + + (inZ - m_z_offset) * m_z_lin_x - m_2xfm_x; + + + *outY = -( + -(inX - m_offset_c) * sin( m_angle_alpha / 180.0 * M_PI) + / sin( m_omega_prime / 180.0 * M_PI) + (inY - m_offset_d) + * sin( ( m_omega_prime + m_angle_alpha ) / 180.0 * M_PI) + / sin( m_omega_prime / 180.0 * M_PI) + ) * m_scaling_XFM_Y + m_offset_b + + (inZ - m_z_offset) * m_z_lin_y - m_2xfm_y; + + *outZ = 0.0; +*/ +} + +/*---------------------------------------------------------------------------*/ + diff --git a/src/solver/LinearCoordTransformer.h b/src/solver/LinearCoordTransformer.h new file mode 100644 index 0000000..e92c358 --- /dev/null +++ b/src/solver/LinearCoordTransformer.h @@ -0,0 +1,100 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef LINEAR_COORDINATE_TRANSFORMER_H +#define LINEAR_COORDINATE_TRANSFORMER_H + +/*---------------------------------------------------------------------------*/ + +#include +#include +#include +#include "preferences/Attribute.h" +#include + +/*---------------------------------------------------------------------------*/ + +/** + * @brief + * + */ +class LinearCoordTransformer : public gstar::ITransformer +{ + +public: + + /** + * Constructor. + */ + LinearCoordTransformer(); + + /** + * Destructor. + */ + virtual ~LinearCoordTransformer(); + + /** + * @brief Init + * @param globalVars + * @return + */ + bool Init(QMap globalVars); + + /** + * @brief getAllCoef + * @return + */ + virtual QMap getAllCoef(); + + /** + * @brief getVariable + * @param name + * @param val + * @return + */ + virtual bool getVariable(QString name, double* val); + + /** + * @brief setVariable + * @param name + * @param val + * @return + */ + virtual bool setVariable(QString name, double val); + + /** + * @brief transformCommand + * @param inX + * @param inY + * @param inZ + * @param outX + * @param outY + */ + virtual void transformCommand(double inX, + double inY, + double inZ, + double *outX, + double *outY, + double *outZ); + +protected: + + /** + * @brief m_2xfm_x + */ + double m_2xfm_x; + + /** + * @brief m_2xfm_y + */ + double m_2xfm_y; + +}; + +/*---------------------------------------------------------------------------*/ + +#endif + +/*---------------------------------------------------------------------------*/ diff --git a/src/solver/CoordinateTransformer.cpp b/src/solver/SV_CoordTransformer.cpp similarity index 93% rename from src/solver/CoordinateTransformer.cpp rename to src/solver/SV_CoordTransformer.cpp index 46dfa6b..5b50d2a 100644 --- a/src/solver/CoordinateTransformer.cpp +++ b/src/solver/SV_CoordTransformer.cpp @@ -3,7 +3,7 @@ * See LICENSE file. *---------------------------------------------------------------------------*/ -#include +#include #include #ifndef M_PI @@ -13,7 +13,7 @@ /*---------------------------------------------------------------------------*/ -CoordinateTransformer::CoordinateTransformer() : ITransformer() +SV_CoordTransformer::SV_CoordTransformer() : ITransformer() { @@ -21,14 +21,14 @@ CoordinateTransformer::CoordinateTransformer() : ITransformer() /*---------------------------------------------------------------------------*/ -CoordinateTransformer::~CoordinateTransformer() +SV_CoordTransformer::~SV_CoordTransformer() { } /*---------------------------------------------------------------------------*/ -QMap CoordinateTransformer::getAllCoef() +QMap SV_CoordTransformer::getAllCoef() { QMap m_coefs { @@ -53,7 +53,7 @@ QMap CoordinateTransformer::getAllCoef() /*---------------------------------------------------------------------------*/ -bool CoordinateTransformer::Init(QMap globalVars) +bool SV_CoordTransformer::Init(QMap globalVars) { @@ -120,7 +120,7 @@ bool CoordinateTransformer::Init(QMap globalVars) /*---------------------------------------------------------------------------*/ -bool CoordinateTransformer::getVariable(QString name, double *val) +bool SV_CoordTransformer::getVariable(QString name, double *val) { if(name == STR_m2xfm_x) @@ -200,7 +200,7 @@ bool CoordinateTransformer::getVariable(QString name, double *val) /*---------------------------------------------------------------------------*/ -bool CoordinateTransformer::setVariable(QString name, double val) +bool SV_CoordTransformer::setVariable(QString name, double val) { if(name == STR_m2xfm_x) @@ -280,7 +280,7 @@ bool CoordinateTransformer::setVariable(QString name, double val) /*---------------------------------------------------------------------------*/ -void CoordinateTransformer::transformCommand(double inX, +void SV_CoordTransformer::transformCommand(double inX, double inY, double inZ, double *outX, diff --git a/src/solver/CoordinateTransformer.h b/src/solver/SV_CoordTransformer.h similarity index 93% rename from src/solver/CoordinateTransformer.h rename to src/solver/SV_CoordTransformer.h index 46c2512..3b3f8b5 100644 --- a/src/solver/CoordinateTransformer.h +++ b/src/solver/SV_CoordTransformer.h @@ -3,8 +3,8 @@ * See LICENSE file. *---------------------------------------------------------------------------*/ -#ifndef COORDINATE_TRANSFORMER_H -#define COORDINATE_TRANSFORMER_H +#ifndef SV_COORDINATE_TRANSFORMER_H +#define SV_COORDINATE_TRANSFORMER_H /*---------------------------------------------------------------------------*/ @@ -20,7 +20,7 @@ * @brief * */ -class CoordinateTransformer : public gstar::ITransformer +class SV_CoordTransformer : public gstar::ITransformer { public: @@ -28,12 +28,12 @@ class CoordinateTransformer : public gstar::ITransformer /** * Constructor. */ - CoordinateTransformer(); + SV_CoordTransformer(); /** * Destructor. */ - virtual ~CoordinateTransformer(); + virtual ~SV_CoordTransformer(); /** * @brief Init From f981d3f74c472b7f234ed9b332e54d8d2a500714 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 21 Jun 2024 09:22:42 -0500 Subject: [PATCH 09/18] Refactor menu a little --- src/core/uProbeX.cpp | 130 +++++++++++++++++---------------- src/core/uProbeX.h | 27 +++---- src/mvc/MapsElementsWidget.cpp | 88 +++++++++++++--------- src/mvc/MapsElementsWidget.h | 2 + 4 files changed, 135 insertions(+), 112 deletions(-) diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index 0861b30..ff43eb1 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -188,75 +188,79 @@ void uProbeX::createMenuBar() setMenuBar(m_menu); // File menu - m_menuFile = new QMenu(tr("File")); - action = m_menuFile->addAction("Open Maps Workspace"); - connect(action, SIGNAL(triggered()), this, SLOT(openMapsWorkspace())); + _menu_file = new QMenu("File"); + action = _menu_file->addAction("Open Maps Workspace"); + connect(action, &QAction::triggered, this, &uProbeX::openMapsWorkspaceA); - _recentWorkspaceMenu = m_menuFile->addMenu("Open Recent Workspace"); + _menu_recent_workspace = _menu_file->addMenu("Open Recent Workspace"); updateRecentMapsWorkspaces(); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Open VLM Workspace"); - connect(action, SIGNAL(triggered()), this, SLOT(open_VLM_File())); - action = m_menuFile->addAction("Open HDF5 Analyzed"); - connect(action, SIGNAL(triggered()), this, SLOT(open_HDF_File())); - action = m_menuFile->addAction("Open Raw Spectra"); - connect(action, SIGNAL(triggered()), this, SLOT(open_spectra_file())); - action = m_menuFile->addAction("Open Raw Spectra and Override"); - connect(action, SIGNAL(triggered()), this, SLOT(open_spectra_and_override_file())); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Save Screen Shot"); - connect(action, SIGNAL(triggered()), this, SLOT(saveScreenShot())); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Save Activated VLM DATA"); - connect(action, SIGNAL(triggered()), this, SLOT(saveActivatedXML())); - action = m_menuFile->addAction("Save All VLM DATA"); - connect(action, SIGNAL(triggered()), this, SLOT(saveAllXML())); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Convert v9 ROI's to V10"); - connect(action, SIGNAL(triggered()), this, SLOT(upgradeV9Rois())); - - //action = m_menuFile->addAction("Save preferences"); - //connect(action, SIGNAL(triggered()), this, SLOT(savePreferencesXMLData())); - //action = m_menuFile->addAction("Load preferences"); - //connect(action, SIGNAL(triggered()), this, SLOT(loadPreferencesXMLData())); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Preferences"); - connect(action, SIGNAL(triggered()), this, SLOT(showPreferences())); - m_menuFile->addSeparator(); - action = m_menuFile->addAction("Exit"); - connect(action, SIGNAL(triggered()), this, SLOT(exitApplication())); - m_menu->addMenu(m_menuFile); - - connect(m_menuFile, SIGNAL(aboutToShow()), this, SLOT(menuBarEnable())); + _menu_file->addSeparator(); + action = _menu_file->addAction("Open VLM Workspace"); + connect(action, &QAction::triggered, this, &uProbeX::open_VLM_File); + action = _menu_file->addAction("Open HDF5 Analyzed"); + connect(action, &QAction::triggered, this, &uProbeX::open_HDF_File); + action = _menu_file->addAction("Open Raw Spectra"); + connect(action, &QAction::triggered, this, &uProbeX::open_spectra_file); + action = _menu_file->addAction("Open Raw Spectra and Override"); + connect(action, &QAction::triggered, this, &uProbeX::open_spectra_and_override_file); + _menu_file->addSeparator(); + action = _menu_file->addAction("Save Screen Shot"); + connect(action, &QAction::triggered, this, &uProbeX::saveScreenShot); + _menu_file->addSeparator(); + action = _menu_file->addAction("Save Activated VLM DATA"); + connect(action, &QAction::triggered, this, &uProbeX::saveActivatedXML); + action = _menu_file->addAction("Save All VLM DATA"); + connect(action, &QAction::triggered, this, &uProbeX::saveAllXMLA); + _menu_file->addSeparator(); + action = _menu_file->addAction("Convert v9 ROI's to V10"); + connect(action, &QAction::triggered, this, &uProbeX::upgradeV9Rois); + + _menu_file->addSeparator(); + action = _menu_file->addAction("Preferences"); + connect(action, &QAction::triggered, this, &uProbeX::showPreferences); + _menu_file->addSeparator(); + action = _menu_file->addAction("Exit"); + connect(action, &QAction::triggered, this, &uProbeX::exitApplication); + m_menu->addMenu(_menu_file); + + connect(_menu_file, &QMenu::aboutToShow, this, &uProbeX::menuBarEnable); + + // TODO: finish view options + _menu_view = new QMenu("View"); + _menu_view_file_top = _menu_view->addMenu("File Nav Top"); + _menu_view_file_side = _menu_view->addMenu("File Nav Side"); + _menu_view_marker = _menu_view->addMenu("Annotation : ROI"); + //action = _menu_file->addAction("File Navigate"); + //connect(action, &QAction::triggered, this, &uProbeX::exitApplication); + //m_menu->addMenu(_menu_view); // Batch menu - m_menuBatch = new QMenu(tr("Batch Processing")); - _action_per_pixel = m_menuBatch->addAction("Per Pixel Processing"); - connect(_action_per_pixel, SIGNAL(triggered()), this, SLOT(batchPerPixel())); - _action_export_images = m_menuBatch->addAction("Export Images"); - connect(_action_export_images, SIGNAL(triggered()), this, SLOT(BatchExportImages())); - _action_roi_stats = m_menuBatch->addAction("Roi Stats"); - connect(_action_roi_stats, SIGNAL(triggered()), this, SLOT(BatchRoiStats())); - _action_gen_scan_vlm = m_menuBatch->addAction("Generate Scan VLM"); - connect(_action_gen_scan_vlm, SIGNAL(triggered()), this, SLOT(BatcGenScanVlm())); - - m_menu->addMenu(m_menuBatch); + _menu_batch = new QMenu("Batch Processing"); + _action_per_pixel = _menu_batch->addAction("Per Pixel Processing"); + connect(_action_per_pixel, &QAction::triggered, this, &uProbeX::batchPerPixel); + _action_export_images = _menu_batch->addAction("Export Images"); + connect(_action_export_images, &QAction::triggered, this, &uProbeX::BatchExportImages); + _action_roi_stats = _menu_batch->addAction("Roi Stats"); + connect(_action_roi_stats, &QAction::triggered, this, &uProbeX::BatchRoiStats); + _action_gen_scan_vlm = _menu_batch->addAction("Generate Scan VLM"); + connect(_action_gen_scan_vlm, &QAction::triggered, this, &uProbeX::BatcGenScanVlm); + m_menu->addMenu(_menu_batch); setBatchActionsEnabled(false); // Stream menu - m_menuStream = new QMenu(tr("Live Stream")); - action = m_menuStream->addAction("Open Live Stream Viewer"); - connect(action, SIGNAL(triggered()), this, SLOT(openLiveStreamViewer())); - m_menu->addMenu(m_menuStream); + _menu_stream = new QMenu(tr("Live Stream")); + action = _menu_stream->addAction("Open Live Stream Viewer"); + connect(action, &QAction::triggered, this, &uProbeX::openLiveStreamViewer); + m_menu->addMenu(_menu_stream); // Help menu - m_menuHelp = new QMenu(tr("Help")); - action = m_menuHelp->addAction("About"); - connect(action, SIGNAL(triggered()), this, SLOT(showAbout())); - m_menuHelp->addAction(_log_dock->toggleViewAction()); - m_menu->addMenu(m_menuHelp); + _menu_help = new QMenu(tr("Help")); + action = _menu_help->addAction("About"); + connect(action, &QAction::triggered, this, &uProbeX::showAbout); + _menu_help->addAction(_log_dock->toggleViewAction()); + m_menu->addMenu(_menu_help); } @@ -270,7 +274,7 @@ void uProbeX::setBatchActionsEnabled(bool val) _action_roi_stats->setEnabled(val); _action_gen_scan_vlm->setEnabled(val); */ - m_menuBatch->setEnabled(val); + _menu_batch->setEnabled(val); } //--------------------------------------------------------------------------- @@ -809,19 +813,19 @@ void uProbeX::open_VLM_File() void uProbeX::updateRecentMapsWorkspaces() { - _recentWorkspaceMenu->clear(); + _menu_recent_workspace->clear(); QStringList recentPaths = Preferences::inst()->getValue(STR_RECENT_MAPS_WORKSPACES).toStringList(); foreach(QString path, recentPaths) { - QAction* action = _recentWorkspaceMenu->addAction(path); + QAction* action = _menu_recent_workspace->addAction(path); connect(action, &QAction::triggered, this, &uProbeX::openRecentMapsWorkspace); } } /*---------------------------------------------------------------------------*/ -void uProbeX::openMapsWorkspace() +void uProbeX::openMapsWorkspaceA() { QString dirName = QFileDialog::getExistingDirectory(this, "Open Maps workspace", "."); @@ -970,7 +974,7 @@ void uProbeX::saveActivatedXML() /*---------------------------------------------------------------------------*/ -void uProbeX::saveAllXML() +void uProbeX::saveAllXMLA() { saveAllXML(true); } diff --git a/src/core/uProbeX.h b/src/core/uProbeX.h index 45833c1..01601bc 100644 --- a/src/core/uProbeX.h +++ b/src/core/uProbeX.h @@ -132,7 +132,7 @@ private slots: /** * @brief openMAPSWorkspace */ - void openMapsWorkspace(); + void openMapsWorkspaceA(); void openRecentMapsWorkspace(); @@ -158,7 +158,7 @@ private slots: /** * @brief saveAllXML */ - void saveAllXML(); + void saveAllXMLA(); /** * @brief Show about dialog.Triggered from the menu. @@ -279,24 +279,19 @@ private slots: */ QMenuBar* m_menu; - QMenu* _recentWorkspaceMenu; + QMenu* _menu_file; + QMenu* _menu_recent_workspace; - /** - * @brief File menu - */ - QMenu* m_menuFile; + QMenu* _menu_stream; - /** - * @brief Stream menu - */ - QMenu* m_menuStream; + QMenu* _menu_batch; - QMenu* m_menuBatch; + QMenu* _menu_view; + QMenu* _menu_view_file_top; + QMenu* _menu_view_file_side; + QMenu* _menu_view_marker; - /** - * @brief Help menu - */ - QMenu* m_menuHelp; + QMenu* _menu_help; /** * @brief MDI area that serves as a central widget diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index 5cdb6d9..fbf9812 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -94,6 +94,8 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) QHBoxLayout *tmp_layout; QWidget *tmp_widget; + _tw_image_controls = new QTabWidget(); + _tab_widget = new QTabWidget(); _spectra_widget = new FitSpectraWidget(); connect(_spectra_widget, &FitSpectraWidget::export_fit_paramters, this, &MapsElementsWidget::on_export_fit_params); @@ -101,8 +103,8 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _cb_analysis = new QComboBox(this); - QWidget* toolbar_widget = new QWidget(); - QHBoxLayout* toolbar_hbox = new QHBoxLayout(); + //QWidget* toolbar_widget = new QWidget(); + //QHBoxLayout* toolbar_hbox = new QHBoxLayout(); QHBoxLayout* hbox = new QHBoxLayout(); QHBoxLayout* hbox2 = new QHBoxLayout(); @@ -152,14 +154,12 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _color_map_ledgend_lbl->setPixmap(QPixmap::fromImage(_color_maps_ledgend->convertToFormat(QImage::Format_RGB32))); QWidget* color_maps_widgets = new QWidget(); - QVBoxLayout* colormapsVBox = new QVBoxLayout(); QHBoxLayout* colormapsHBox = new QHBoxLayout(); colormapsHBox->addWidget(new QLabel(" ColorMap :")); colormapsHBox->addWidget(_cb_colormap); - colormapsVBox->addItem(colormapsHBox); - colormapsVBox->addWidget(_color_map_ledgend_lbl); - color_maps_widgets->setLayout(colormapsVBox); - + colormapsHBox->addWidget(_color_map_ledgend_lbl); + color_maps_widgets->setLayout(colormapsHBox); + _chk_disp_color_ledgend = new QCheckBox("Display Color Ledgend"); _chk_disp_color_ledgend->setChecked(Preferences::inst()->getValue(STR_LOG_SCALE_COLOR).toBool()); connect(_chk_disp_color_ledgend, &QCheckBox::stateChanged, this, &MapsElementsWidget::on_log_color_changed); @@ -172,19 +172,31 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _chk_invert_y->setChecked(Preferences::inst()->getValue(STR_INVERT_Y_AXIS).toBool()); connect(_chk_invert_y, &QCheckBox::stateChanged, this, &MapsElementsWidget::on_invert_y_axis); - QWidget* color_chk_widgets = new QWidget(); - QVBoxLayout* colorVBox = new QVBoxLayout(); - colorVBox->addWidget(_chk_log_color); - colorVBox->addWidget(_chk_disp_color_ledgend); - colorVBox->addWidget(_chk_invert_y); - color_chk_widgets->setLayout(colorVBox); - _grid_button = new QPushButton(); _grid_button->setIcon(QIcon(":/images/grid.png")); _grid_button->setIconSize(QSize(15, 15)); - connect(_grid_button, SIGNAL(pressed()), this, SLOT(onGridDialog())); + connect(_grid_button, &QPushButton::pressed, this, &MapsElementsWidget::onGridDialog); + _btn_export_as_image = new QPushButton("Export Images"); + connect(_btn_export_as_image, &QPushButton::pressed, this, &MapsElementsWidget::on_export_image_pressed); + + QWidget* options_widgets = new QWidget(); + QVBoxLayout* optionsVBox = new QVBoxLayout(); + QHBoxLayout* optionsHboxS = new QHBoxLayout(); + QHBoxLayout* optionsHboxM = new QHBoxLayout(); + optionsVBox->addWidget(_chk_log_color); + optionsVBox->addWidget(_chk_disp_color_ledgend); + optionsVBox->addWidget(_chk_invert_y); + optionsHboxS->addWidget(new QLabel("Layout:")); + optionsHboxS->addWidget(_grid_button); + optionsHboxS->addWidget(_btn_export_as_image); + + optionsHboxM->addItem(optionsVBox); + optionsHboxM->addItem(optionsHboxS); + options_widgets->setLayout(optionsHboxM); + + _cb_normalize = new QComboBox(); _cb_normalize->setMinimumContentsLength(20); _cb_normalize->setSizeAdjustPolicy(QComboBox::AdjustToContents); @@ -197,12 +209,7 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _contrast_widget = new gstar::MinMaxSlider(); _contrast_widget->setMinimumWidth(200); - connect(_contrast_widget, &gstar::MinMaxSlider::min_max_val_changed, this, &MapsElementsWidget::on_min_max_contrast_changed); - - - _btn_export_as_image = new QPushButton("Export Images"); - connect(_btn_export_as_image, &QPushButton::pressed, this, &MapsElementsWidget::on_export_image_pressed); - + connect(_contrast_widget, &gstar::MinMaxSlider::min_max_val_changed, this, &MapsElementsWidget::on_min_max_contrast_changed); //_pb_perpixel_fitting = new QPushButton("Per Pixel Fitting"); //counts_layout->addWidget(_pb_perpixel_fitting); @@ -212,18 +219,29 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _extra_pvs_table_widget = new QTableWidget(1, 4); _extra_pvs_table_widget->setHorizontalHeaderLabels(extra_pv_header); - toolbar_hbox->addWidget(m_toolbar); - toolbar_hbox->addWidget(color_maps_widgets); - toolbar_hbox->addWidget(color_chk_widgets); - toolbar_hbox->addWidget(_grid_button); - toolbar_hbox->addWidget(_cb_analysis); - toolbar_hbox->addWidget(new QLabel(" Normalize By: ")); - toolbar_hbox->addWidget(_cb_normalize); - toolbar_hbox->addWidget(_global_contrast_chk); - toolbar_hbox->addWidget(_contrast_widget); - toolbar_hbox->addWidget(_btn_export_as_image); + QWidget* w_normalize = new QWidget(); + QHBoxLayout* hbox_normalize = new QHBoxLayout(); + hbox_normalize->addWidget(_cb_analysis); + hbox_normalize->addWidget(new QLabel(" Normalize By: ")); + hbox_normalize->addWidget(_cb_normalize); + w_normalize->setLayout(hbox_normalize); - toolbar_widget->setLayout(toolbar_hbox); + QWidget* w_contrast = new QWidget(); + QHBoxLayout* hbox_contrast = new QHBoxLayout(); + hbox_contrast->addWidget(_global_contrast_chk); + hbox_contrast->addWidget(_contrast_widget); + w_contrast->setLayout(hbox_contrast); + + + _tw_image_controls->addTab(m_toolbar, "Zoom"); + _tw_image_controls->addTab(color_maps_widgets, "Color Map"); + _tw_image_controls->addTab(options_widgets, "Options"); + _tw_image_controls->addTab(w_normalize, "Normalize"); + _tw_image_controls->addTab(w_contrast, "Contrast"); + _tw_image_controls->setProperty("padding", QVariant("1px")); + //toolbar_widget->setLayout(toolbar_hbox); + + //_tabWidget->addTab(color_maps_widgets, "Color Map"); QScrollArea* scrollArea = new QScrollArea(); scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); @@ -231,7 +249,8 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) scrollArea->setWidgetResizable(true); scrollArea->setMinimumHeight(110); scrollArea->setMaximumHeight(140); - scrollArea->setWidget(toolbar_widget); + //scrollArea->setWidget(toolbar_widget); + scrollArea->setWidget(_tw_image_controls); counts_layout->addWidget(scrollArea); counts_layout->addWidget(splitter); @@ -248,6 +267,7 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _counts_dock = new QDockWidget("Analyzed Counts", this); _counts_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _counts_dock->setWidget(_counts_window); + _counts_dock->setProperty("padding", QVariant("1px")); _dockMap[STR_COUNTS_DOCK] = _counts_dock; _intspectra_dock = new QDockWidget(DEF_STR_INT_SPECTRA, this); @@ -313,6 +333,8 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) _tab_widget->addTab(tmp_widget, "Extra PV's"); + _tab_widget->setProperty("padding", QVariant("1px")); + layout->addItem(hbox2); layout->addWidget(_tab_widget); diff --git a/src/mvc/MapsElementsWidget.h b/src/mvc/MapsElementsWidget.h index 04b478c..344b716 100644 --- a/src/mvc/MapsElementsWidget.h +++ b/src/mvc/MapsElementsWidget.h @@ -247,6 +247,8 @@ public slots: gstar::MotorLookupTransformer _motor_trans; + QTabWidget* _tw_image_controls; + }; From 4acf93a75b856b75bf117705fb06f67f670bdf27 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Mon, 24 Jun 2024 14:50:09 -0500 Subject: [PATCH 10/18] Added scanqueuewidget and blueskycomm classes. Minor updates to live view --- src/mvc/BlueskyComm.cpp | 7 ++ src/mvc/BlueskyComm.h | 111 +++++++++++++++++++++++++++++ src/mvc/LiveMapsElementsWidget.cpp | 19 ++++- src/mvc/LiveMapsElementsWidget.h | 9 +++ src/mvc/MapsElementsWidget.h | 2 + src/mvc/ScanQueueWidget.cpp | 99 +++++++++++++++++++++++++ src/mvc/ScanQueueWidget.h | 59 +++++++++++++++ 7 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 src/mvc/BlueskyComm.cpp create mode 100644 src/mvc/BlueskyComm.h create mode 100644 src/mvc/ScanQueueWidget.cpp create mode 100644 src/mvc/ScanQueueWidget.h diff --git a/src/mvc/BlueskyComm.cpp b/src/mvc/BlueskyComm.cpp new file mode 100644 index 0000000..cd23776 --- /dev/null +++ b/src/mvc/BlueskyComm.cpp @@ -0,0 +1,7 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include + diff --git a/src/mvc/BlueskyComm.h b/src/mvc/BlueskyComm.h new file mode 100644 index 0000000..b87b498 --- /dev/null +++ b/src/mvc/BlueskyComm.h @@ -0,0 +1,111 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef BLUESKY_COMM_H +#define BLUESKY_COMM_H + +/*---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include "support/zmq/zmq.hpp" +#include +/*---------------------------------------------------------------------------*/ + + +class BlueskyComm : public QThread +{ + + Q_OBJECT + +public: + + /** + * Constructor. + */ + BlueskyComm(QString str_ip, QObject* parent = nullptr) : QThread(parent) + { + + std::string conn_str = "tcp://"+str_ip.toStdString()+":60610"; // or 60615 + std::string lsn_str = "tcp://"+str_ip.toStdString()+":60625"; + _context = new zmq::context_t(1); + _zmq_comm_socket = new zmq::socket_t(*_context, ZMQ_REQ); + _zmq_comm_socket->connect(conn_str); + _zmq_lsn_socket = new zmq::socket_t(*_context, ZMQ_SUB); + _zmq_lsn_socket->connect(lsn_str); + _zmq_lsn_socket->setsockopt(ZMQ_SUBSCRIBE, "QS_Console", 10); + _zmq_lsn_socket->setsockopt(ZMQ_RCVTIMEO, 1000); //set timeout to 1000ms + + } + + /** + * Destructor. + */ + ~BlueskyComm() + { + if(_zmq_comm_socket != nullptr) + { + _zmq_comm_socket->close(); + delete _zmq_comm_socket; + } + if(_zmq_lsn_socket != nullptr) + { + _zmq_lsn_socket->close(); + delete _zmq_lsn_socket; + } + if (_context != nullptr) + { + _context->close(); + delete _context; + } + _zmq_comm_socket = nullptr; + _zmq_lsn_socket = nullptr; + _context = nullptr; + } + +public slots: + void run() override + { + _running = true; + zmq::message_t token, message; + while(_running) + { + _zmq_lsn_socket->recv(&token); + std::string s1 ((char*)token.data(), token.size()); + if(s1 == "QS_Console") + { + if(_zmq_lsn_socket->recv(&message)) + { + emit newData(QString::fromUtf8((char*)message.data(), message.size())); + } + } + } + _zmq_lsn_socket->close(); + } + void stop() {_running = false;} + +signals: + void newData(const QString&); + +protected: + + bool _running; + + zmq::context_t *_context; + + zmq::socket_t *_zmq_comm_socket; + + zmq::socket_t *_zmq_lsn_socket; + +}; + + +/*---------------------------------------------------------------------------*/ + +#endif /* NET_STREAM_WORKER_H */ + +/*---------------------------------------------------------------------------*/ diff --git a/src/mvc/LiveMapsElementsWidget.cpp b/src/mvc/LiveMapsElementsWidget.cpp index c6a359f..20325f4 100644 --- a/src/mvc/LiveMapsElementsWidget.cpp +++ b/src/mvc/LiveMapsElementsWidget.cpp @@ -97,6 +97,11 @@ void LiveMapsElementsWidget::createLayout() // _textEdit->resize(1024, 800); // _textEdit->scrollBarWidgets(Qt::AlignRight); _mapsElementsWidget = new MapsElementsWidget(1,1,true,this); + //_mapsElementsWidget->setTabVisible(1, false); + _mapsElementsWidget->setTabVisible(2, false); + _mapsElementsWidget->setTabVisible(3, false); + _mapsElementsWidget->setTabVisible(4, false); + _mapsElementsWidget->setTabVisible(5, false); //_mapsElementsWidget->setModel(_currentModel, nullptr, nullptr); // _mapsElementsWidget->appendTab(_textEdit, "Log"); @@ -112,7 +117,19 @@ void LiveMapsElementsWidget::createLayout() _mapsElementsWidget, SLOT(model_updated())); } - layout->addWidget(_mapsElementsWidget); + + + _vlm_widget = new VLM_Widget(); + + _scan_queue_widget = new ScanQueueWidget(); + + _tab_widget = new QTabWidget(); + _tab_widget->addTab(_mapsElementsWidget, "Counts"); + _tab_widget->addTab(_vlm_widget, "Scan Area"); + _tab_widget->addTab(_scan_queue_widget, "Queue"); + + + layout->addWidget(_tab_widget); _progressBar = new QProgressBar(this); layout->addWidget(_progressBar); diff --git a/src/mvc/LiveMapsElementsWidget.h b/src/mvc/LiveMapsElementsWidget.h index 64437c6..c998a85 100644 --- a/src/mvc/LiveMapsElementsWidget.h +++ b/src/mvc/LiveMapsElementsWidget.h @@ -14,8 +14,11 @@ #include #include #include +#include #include "NetStreamWorker.h" #include "mvc/MapsElementsWidget.h" +#include "mvc/VLM_Widget.h" +#include "mvc/ScanQueueWidget.h" /*---------------------------------------------------------------------------*/ @@ -58,6 +61,12 @@ public slots: MapsElementsWidget *_mapsElementsWidget; + VLM_Widget *_vlm_widget; + + ScanQueueWidget* _scan_queue_widget; + + QTabWidget *_tab_widget; + QTextEdit *_textEdit; QProgressBar *_progressBar; diff --git a/src/mvc/MapsElementsWidget.h b/src/mvc/MapsElementsWidget.h index 344b716..3eced65 100644 --- a/src/mvc/MapsElementsWidget.h +++ b/src/mvc/MapsElementsWidget.h @@ -60,6 +60,8 @@ class MapsElementsWidget MapsH5Model *getModel(){return _model;} + void setTabVisible(int idx, bool val) { _tab_widget->setTabVisible(idx, val);} + signals: void loaded_perc(int, int); diff --git a/src/mvc/ScanQueueWidget.cpp b/src/mvc/ScanQueueWidget.cpp new file mode 100644 index 0000000..9640e91 --- /dev/null +++ b/src/mvc/ScanQueueWidget.cpp @@ -0,0 +1,99 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include + +#include +#include +#include +#include "core/defines.h" + +//--------------------------------------------------------------------------- + +ScanQueueWidget::ScanQueueWidget(QWidget *parent) : QWidget(parent) +{ + + _createLayout(); + +} + +//--------------------------------------------------------------------------- + +ScanQueueWidget::~ScanQueueWidget() +{ + +} + +//--------------------------------------------------------------------------- + +void ScanQueueWidget::_createLayout() +{ + + QVBoxLayout* layout = new QVBoxLayout(); + + _te_qs_console = new QTextEdit(this); + _te_qs_console->scrollBarWidgets(Qt::AlignRight); + + layout->addWidget(_te_qs_console); + setLayout(layout); +/* + QHBoxLayout* hlayout = new QHBoxLayout(); + _btn_update = new QPushButton("Update"); + connect(_btn_update, SIGNAL(released()), this, SLOT(updateIp())); + + hlayout->addWidget(new QLabel("Computer:")); + hlayout->addWidget(_qline_ip_addr); + hlayout->addWidget(new QLabel("Port:")); + hlayout->addWidget(_qline_port); + hlayout->addWidget(_btn_update); + layout->addLayout(hlayout); + + _mapsElementsWidget = new MapsElementsWidget(1,1,true,this); + //_mapsElementsWidget->setTabVisible(1, false); + _mapsElementsWidget->setTabVisible(2, false); + _mapsElementsWidget->setTabVisible(3, false); + _mapsElementsWidget->setTabVisible(4, false); + _mapsElementsWidget->setTabVisible(5, false); + //_mapsElementsWidget->setModel(_currentModel, nullptr, nullptr); + // _mapsElementsWidget->appendTab(_textEdit, "Log"); + + connect(_mapsElementsWidget, + SIGNAL(rangeChanged(int, int)), + this, + SLOT(image_changed(int, int))); + + if(_currentModel != nullptr) + { + connect(_currentModel, + SIGNAL(model_data_updated()), + _mapsElementsWidget, + SLOT(model_updated())); + } + + + _vlm_widget = new VLM_Widget(); + + _tab_widget = new QTabWidget(); + + _tab_widget->addTab(_mapsElementsWidget, "Counts"); + _tab_widget->addTab(_vlm_widget, "Scan Area"); + //_tab_widget->addTab(_scan_queue, "Queue"); + + + layout->addWidget(_tab_widget); + + _progressBar = new QProgressBar(this); + layout->addWidget(_progressBar); + setLayout(layout); +*/ +} + +//--------------------------------------------------------------------------- + +void ScanQueueWidget::newDataArrived(const QString& data) +{ +} + +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ScanQueueWidget.h b/src/mvc/ScanQueueWidget.h new file mode 100644 index 0000000..842ba1a --- /dev/null +++ b/src/mvc/ScanQueueWidget.h @@ -0,0 +1,59 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef SCAN_QUEUE_WIDGET_H +#define SCAN_QUEUE_WIDGET_H + +/*---------------------------------------------------------------------------*/ + +#include +#include + +/*---------------------------------------------------------------------------*/ + + +class ScanQueueWidget : public QWidget +{ + + Q_OBJECT + +public: + + /** + * Constructor. + */ + ScanQueueWidget(QWidget *parent = nullptr); + + /** + * Destructor. + */ + ~ScanQueueWidget(); + +public slots: + + void newDataArrived(const QString &); + +protected: + + /** + * @brief Create layout + */ + void _createLayout(); + + QTextEdit *_te_qs_console; + +// QLineEdit *_qline_ip_addr; + +// QLineEdit *_qline_port; + +// QPushButton *_btn_update; +}; + + +/*---------------------------------------------------------------------------*/ + +#endif /* LiveLiveMapsElementsWidget_H_ */ + +/*---------------------------------------------------------------------------*/ From 4408f627bc0c8fe20351713687da2a9ae717e668 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Wed, 26 Jun 2024 14:05:53 -0500 Subject: [PATCH 11/18] changed function break comments --- src/core/CAEmitDataChangeHandler.h | 22 ++-- src/core/ColorMap.cpp | 12 +- src/core/ColorMap.h | 8 +- src/core/CorrelationCoefficient.h | 8 +- src/core/GlobalThreadPool.cpp | 6 +- src/core/GlobalThreadPool.h | 4 +- src/core/PythonLoader.cpp | 44 +++---- src/core/PythonLoader.h | 8 +- src/core/PythonRegionCaller.cpp | 10 +- src/core/PythonRegionCaller.h | 8 +- src/core/RegionCaller.cpp | 8 +- src/core/RegionCaller.h | 8 +- src/core/ShellRegionCaller.cpp | 10 +- src/core/ShellRegionCaller.h | 8 +- src/core/SubWindow.cpp | 10 +- src/core/SubWindow.h | 8 +- src/core/uProbeX.cpp | 86 +++++++------- src/core/uProbeX.h | 8 +- src/gstar/AbstractImageWidget.cpp | 96 ++++++++------- src/gstar/AbstractImageWidget.h | 8 +- src/gstar/Annotation/AbstractGraphicsItem.cpp | 94 +++++++-------- src/gstar/Annotation/AbstractGraphicsItem.h | 10 +- src/gstar/Annotation/EmptyGraphicsItem.cpp | 20 ++-- src/gstar/Annotation/EmptyGraphicsItem.h | 8 +- .../Annotation/HotSpotMaskGraphicsItem.cpp | 36 +++--- .../Annotation/HotSpotMaskGraphicsItem.h | 8 +- .../Annotation/IntensityLineGraphicsItem.cpp | 10 +- .../Annotation/IntensityLineGraphicsItem.h | 8 +- .../Annotation/IntensityPieGraphicsItem.cpp | 10 +- .../Annotation/IntensityPieGraphicsItem.h | 8 +- src/gstar/Annotation/LineGraphicsItem.cpp | 48 ++++---- src/gstar/Annotation/LineGraphicsItem.h | 8 +- src/gstar/Annotation/MarkerGraphicsItem.cpp | 26 ++--- src/gstar/Annotation/MarkerGraphicsItem.h | 8 +- src/gstar/Annotation/PieGraphicsItem.cpp | 20 ++-- src/gstar/Annotation/PieGraphicsItem.h | 8 +- src/gstar/Annotation/RoiMaskGraphicsItem.h | 8 +- src/gstar/Annotation/RulerGraphicsItem.cpp | 10 +- src/gstar/Annotation/RulerGraphicsItem.h | 8 +- .../Annotation/UProbeMarkerGraphicsItem.cpp | 50 ++++---- .../Annotation/UProbeMarkerGraphicsItem.h | 8 +- .../Annotation/UProbeRegionGraphicsItem.cpp | 76 ++++++------ .../Annotation/UProbeRegionGraphicsItem.h | 8 +- src/gstar/AnnotationProperty.cpp | 16 +-- src/gstar/AnnotationProperty.h | 6 +- src/gstar/AnnotationToolBarWidget.cpp | 8 +- src/gstar/AnnotationToolBarWidget.h | 8 +- src/gstar/AnnotationTreeModel.cpp | 46 ++++---- src/gstar/AnnotationTreeModel.h | 8 +- src/gstar/CheckBoxDelegate.cpp | 10 +- src/gstar/CheckBoxDelegate.h | 8 +- src/gstar/ContrastDialog.cpp | 12 +- src/gstar/ContrastDialog.h | 6 +- src/gstar/CoordinateModel.cpp | 20 ++-- src/gstar/CoordinateModel.h | 6 +- src/gstar/CoordinateWidget.cpp | 22 ++-- src/gstar/CoordinateWidget.h | 6 +- src/gstar/CountsLookupTransformer.cpp | 20 ++-- src/gstar/CountsLookupTransformer.h | 8 +- src/gstar/CountsStatsTransformer.cpp | 20 ++-- src/gstar/CountsStatsTransformer.h | 8 +- src/gstar/GStarResource.h | 8 +- src/gstar/HistogramPlot.cpp | 16 +-- src/gstar/HistogramPlot.h | 4 +- src/gstar/ITransformer.cpp | 10 +- src/gstar/ITransformer.h | 6 +- src/gstar/ImageViewScene.cpp | 72 ++++++------ src/gstar/ImageViewScene.h | 8 +- src/gstar/ImageViewToolBar.cpp | 24 ++-- src/gstar/ImageViewToolBar.h | 4 +- src/gstar/ImageViewWidget.cpp | 110 +++++++++--------- src/gstar/ImageViewWidget.h | 10 +- src/gstar/LinearTransformer.cpp | 40 +++---- src/gstar/LinearTransformer.h | 8 +- src/gstar/MinMaxSlider.cpp | 18 +-- src/gstar/MinMaxSlider.h | 6 +- src/gstar/MotorLookupTransformer.cpp | 20 ++-- src/gstar/MotorLookupTransformer.h | 8 +- src/gstar/RangeWidget.cpp | 30 ++--- src/gstar/RangeWidget.h | 6 +- src/gstar/RectItem.cpp | 38 +++--- src/gstar/RectItem.h | 8 +- src/gstar/RulerUnitsDialog.cpp | 20 ++-- src/gstar/RulerUnitsDialog.h | 8 +- src/gstar/Splash.cpp | 10 +- src/gstar/Splash.h | 8 +- src/gstar/SubImageWindow.cpp | 18 +-- src/gstar/SubImageWindow.h | 8 +- src/mvc/AbstractWindowController.cpp | 6 +- src/mvc/AbstractWindowController.h | 8 +- src/mvc/AbstractWindowModel.cpp | 10 +- src/mvc/AbstractWindowModel.h | 8 +- src/mvc/BatchRoiFitWidget.cpp | 16 +-- src/mvc/BatchRoiFitWidget.h | 8 +- src/mvc/BlueskyComm.h | 8 +- src/mvc/ChartView.cpp | 14 +-- src/mvc/ChartView.h | 10 +- src/mvc/CoLocalizationWidget.h | 8 +- src/mvc/ComboBoxDelegate.cpp | 14 +-- src/mvc/ComboBoxDelegate.h | 6 +- src/mvc/DeselectableTreeView.cpp | 8 +- src/mvc/DeselectableTreeView.h | 8 +- src/mvc/ExportMapsDialog.cpp | 16 +-- src/mvc/ExportMapsDialog.h | 8 +- src/mvc/FileTabWidget.cpp | 22 ++-- src/mvc/FileTabWidget.h | 10 +- src/mvc/FitElementsTableModel.cpp | 46 ++++---- src/mvc/FitElementsTableModel.h | 6 +- src/mvc/FitParamsTableModel.cpp | 38 +++--- src/mvc/FitParamsTableModel.h | 6 +- src/mvc/FitSpectraWidget.cpp | 76 ++++++------ src/mvc/FitSpectraWidget.h | 8 +- src/mvc/FittingDialog.cpp | 34 +++--- src/mvc/FittingDialog.h | 10 +- src/mvc/ImageGridDialog.cpp | 14 +-- src/mvc/ImageGridDialog.h | 8 +- src/mvc/ImageSegROIDialog.h | 8 +- src/mvc/ImageSegWidget.h | 8 +- src/mvc/ImageStackControlWidget.cpp | 34 +++--- src/mvc/ImageStackControlWidget.h | 8 +- src/mvc/LiveMapsElementsWidget.cpp | 12 +- src/mvc/LiveMapsElementsWidget.h | 8 +- src/mvc/MDA_Widget.cpp | 20 ++-- src/mvc/MDA_Widget.h | 8 +- src/mvc/MapsElementsWidget.cpp | 4 +- src/mvc/MapsElementsWidget.h | 8 +- src/mvc/MapsH5Model.cpp | 70 +++++------ src/mvc/MapsH5Model.h | 8 +- src/mvc/MapsWorkspaceController.cpp | 10 +- src/mvc/MapsWorkspaceController.h | 6 +- src/mvc/MapsWorkspaceFilesWidget.cpp | 26 ++--- src/mvc/MapsWorkspaceFilesWidget.h | 8 +- src/mvc/MapsWorkspaceModel.cpp | 58 ++++----- src/mvc/MapsWorkspaceModel.h | 8 +- src/mvc/NetStreamWorker.h | 8 +- src/mvc/NumericPrecDelegate.cpp | 2 +- src/mvc/NumericPrecDelegate.h | 6 +- src/mvc/OptimizerOptionsWidget.cpp | 18 +-- src/mvc/OptimizerOptionsWidget.h | 10 +- src/mvc/PerPixelFitWidget.cpp | 8 +- src/mvc/PerPixelFitWidget.h | 8 +- src/mvc/PerPixelOptionsWidget.cpp | 10 +- src/mvc/PerPixelOptionsWidget.h | 8 +- src/mvc/QuantificationWidget.h | 8 +- src/mvc/RAW_Model.cpp | 20 ++-- src/mvc/RAW_Model.h | 8 +- src/mvc/RawH5Model.h | 8 +- src/mvc/RoiStatisticsWidget.h | 8 +- src/mvc/SWSModel.cpp | 42 +++---- src/mvc/SWSModel.h | 8 +- src/mvc/Scaler_Widget.cpp | 12 +- src/mvc/Scaler_Widget.h | 8 +- src/mvc/ScanCorrCoefDialog.h | 8 +- src/mvc/ScanQueueWidget.h | 8 +- src/mvc/ScatterPlotView.cpp | 4 +- src/mvc/ScatterPlotView.h | 6 +- src/mvc/ScatterPlotWidget.cpp | 8 +- src/mvc/ScatterPlotWidget.h | 6 +- src/mvc/SolverProfileWidget.cpp | 54 ++++----- src/mvc/SolverProfileWidget.h | 6 +- src/mvc/SolverWidget.cpp | 18 +-- src/mvc/SolverWidget.h | 6 +- src/mvc/SpectraWidget.cpp | 48 ++++---- src/mvc/SpectraWidget.h | 8 +- src/mvc/SpectraWidgetSettingsDialog.cpp | 12 +- src/mvc/SpectraWidgetSettingsDialog.h | 8 +- src/mvc/TIFF_Model.cpp | 18 +-- src/mvc/TIFF_Model.h | 8 +- src/mvc/UpgradeRoiDialog.cpp | 16 +-- src/mvc/UpgradeRoiDialog.h | 8 +- src/mvc/VLM_Model.cpp | 14 +-- src/mvc/VLM_Model.h | 8 +- src/mvc/VLM_Widget.cpp | 98 ++++++++-------- src/mvc/VLM_Widget.h | 8 +- src/preferences/Attribute.cpp | 32 ++--- src/preferences/Attribute.h | 10 +- src/preferences/AttributeGroup.cpp | 34 +++--- src/preferences/AttributeGroup.h | 8 +- src/preferences/AttributeGroupModel.cpp | 42 +++---- src/preferences/AttributeGroupModel.h | 8 +- src/preferences/AttributeTableModel.cpp | 30 ++--- src/preferences/AttributeTableModel.h | 6 +- src/preferences/Preferences.cpp | 16 +-- src/preferences/Preferences.h | 8 +- src/preferences/PreferencesAutoSave.cpp | 20 ++-- src/preferences/PreferencesAutoSave.h | 8 +- src/preferences/PreferencesDialog.cpp | 12 +- src/preferences/PreferencesDialog.h | 8 +- src/preferences/PreferencesDisplay.cpp | 24 ++-- src/preferences/PreferencesDisplay.h | 8 +- src/preferences/PreferencesExport.cpp | 32 ++--- src/preferences/PreferencesExport.h | 8 +- src/preferences/PreferencesMicroPv.cpp | 16 +-- src/preferences/PreferencesMicroPv.h | 8 +- src/preferences/PreferencesPythonFunc.cpp | 38 +++--- src/preferences/PreferencesPythonFunc.h | 8 +- src/preferences/PreferencesSolverOption.cpp | 34 +++--- src/preferences/PreferencesSolverOption.h | 6 +- src/preferences/Profile.cpp | 40 +++---- src/preferences/Profile.h | 10 +- src/preferences/ProfileTable.cpp | 32 ++--- src/preferences/ProfileTable.h | 8 +- src/preferences/SolverAttributesGroup.cpp | 20 ++-- src/preferences/SolverAttributesGroup.h | 8 +- src/preferences/SolverAttributesModel.cpp | 22 ++-- src/preferences/SolverAttributesModel.h | 8 +- src/preferences/SolverParameterParse.cpp | 18 +-- src/preferences/SolverParameterParse.h | 8 +- src/preferences/SolverParameterWidget.cpp | 48 ++++---- src/preferences/SolverParameterWidget.h | 6 +- src/preferences/SolverTable.cpp | 40 +++---- src/preferences/SolverTable.h | 6 +- src/solver/AbstractSolver.cpp | 8 +- src/solver/AbstractSolver.h | 6 +- src/solver/LinearCoordTransformer.cpp | 16 +-- src/solver/LinearCoordTransformer.h | 8 +- src/solver/NelderMeadSolver.cpp | 34 +++--- src/solver/NelderMeadSolver.h | 6 +- src/solver/PythonSolver.cpp | 26 ++--- src/solver/PythonSolver.h | 6 +- src/solver/PythonTransformer.cpp | 18 +-- src/solver/PythonTransformer.h | 8 +- src/solver/SV_CoordTransformer.cpp | 16 +-- src/solver/SV_CoordTransformer.h | 8 +- src/solver/Solver.cpp | 30 ++--- src/solver/Solver.h | 6 +- 226 files changed, 1935 insertions(+), 1925 deletions(-) diff --git a/src/core/CAEmitDataChangeHandler.h b/src/core/CAEmitDataChangeHandler.h index 6f9f61d..f00f433 100644 --- a/src/core/CAEmitDataChangeHandler.h +++ b/src/core/CAEmitDataChangeHandler.h @@ -6,7 +6,7 @@ #ifndef TXM_CA_EMIT_DATA_CHANGE_HANDLER_H #define TXM_CA_EMIT_DATA_CHANGE_HANDLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -17,7 +17,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Template class for data change handler. @@ -62,7 +62,7 @@ class CAEmitDataChangeHandler }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * Partial Template specialization @@ -107,7 +107,7 @@ class CAEmitDataChangeHandler }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template CAEmitDataChangeHandler::CAEmitDataChangeHandler(K* model, @@ -117,7 +117,7 @@ CAEmitDataChangeHandler::CAEmitDataChangeHandler(K* model, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template void CAEmitDataChangeHandler::onFailure() @@ -127,7 +127,7 @@ void CAEmitDataChangeHandler::onFailure() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template void CAEmitDataChangeHandler::onSuccess() @@ -138,7 +138,7 @@ void CAEmitDataChangeHandler::onSuccess() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template CAEmitDataChangeHandler::CAEmitDataChangeHandler(K* model, @@ -148,7 +148,7 @@ CAEmitDataChangeHandler::CAEmitDataChangeHandler(K* model, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template void CAEmitDataChangeHandler::onFailure() @@ -158,7 +158,7 @@ void CAEmitDataChangeHandler::onFailure() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- template void CAEmitDataChangeHandler::onSuccess() @@ -175,8 +175,8 @@ void CAEmitDataChangeHandler::onSuccess() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/ColorMap.cpp b/src/core/ColorMap.cpp index 4bc86f7..d5421d4 100644 --- a/src/core/ColorMap.cpp +++ b/src/core/ColorMap.cpp @@ -50,7 +50,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ColorMap* ColorMap::_inst = nullptr; @@ -60,7 +60,7 @@ ColorMap::ColorMap() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ColorMap::~ColorMap() { @@ -68,7 +68,7 @@ ColorMap::~ColorMap() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ColorMap* ColorMap::inst() { @@ -80,7 +80,7 @@ ColorMap* ColorMap::inst() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVector* ColorMap::get_color_map(QString name) { @@ -91,7 +91,7 @@ QVector* ColorMap::get_color_map(QString name) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ColorMap::reload_color_maps() { @@ -144,4 +144,4 @@ void ColorMap::reload_color_maps() } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/core/ColorMap.h b/src/core/ColorMap.h index 374b471..fb5b373 100644 --- a/src/core/ColorMap.h +++ b/src/core/ColorMap.h @@ -51,8 +51,8 @@ #include #include -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- /** * @brief Singleton class to call python scripts. @@ -91,8 +91,8 @@ class ColorMap }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/CorrelationCoefficient.h b/src/core/CorrelationCoefficient.h index 59536eb..de6c4fd 100644 --- a/src/core/CorrelationCoefficient.h +++ b/src/core/CorrelationCoefficient.h @@ -8,8 +8,8 @@ #include -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- template _T find_coefficient(const Eigen::Array<_T, Eigen::Dynamic, Eigen::RowMajor>& x_arr, const Eigen::Array<_T, Eigen::Dynamic, Eigen::RowMajor>& y_arr) @@ -27,8 +27,8 @@ _T find_coefficient(const Eigen::Array<_T, Eigen::Dynamic, Eigen::RowMajor>& x_a return corr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/GlobalThreadPool.cpp b/src/core/GlobalThreadPool.cpp index fbafbf1..99fca82 100644 --- a/src/core/GlobalThreadPool.cpp +++ b/src/core/GlobalThreadPool.cpp @@ -3,13 +3,13 @@ * See LICENSE file. *---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "core/GlobalThreadPool.h" std::mutex Global_Thread_Pool::_mutex; Global_Thread_Pool* Global_Thread_Pool::_this_inst(nullptr); -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Global_Thread_Pool::Global_Thread_Pool() : ThreadPool(std::thread::hardware_concurrency() - 1) { @@ -31,4 +31,4 @@ Global_Thread_Pool* Global_Thread_Pool::inst() -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/GlobalThreadPool.h b/src/core/GlobalThreadPool.h index a230129..d04bc43 100644 --- a/src/core/GlobalThreadPool.h +++ b/src/core/GlobalThreadPool.h @@ -6,7 +6,7 @@ #ifndef Global_Thread_Pool_H #define Global_Thread_Pool_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "core/defines.h" #include "workflow/threadpool.h" @@ -30,4 +30,4 @@ class DLL_EXPORT Global_Thread_Pool : public ThreadPool #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/PythonLoader.cpp b/src/core/PythonLoader.cpp index bb9f719..7a1f3b4 100644 --- a/src/core/PythonLoader.cpp +++ b/src/core/PythonLoader.cpp @@ -49,12 +49,12 @@ #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- static const char STR_GET_MEMBERS[] = {"getmembers"}; static const char STR_IS_FUNCTION[] = {"isfunction"}; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonLoader* PythonLoader::m_inst = nullptr; @@ -66,7 +66,7 @@ PythonLoader::PythonLoader() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonLoader::~PythonLoader() { @@ -97,7 +97,7 @@ PythonLoader::~PythonLoader() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonLoader::callFunc(QString module, QString func, @@ -260,7 +260,7 @@ void PythonLoader::callFunc(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::init() { @@ -269,7 +269,7 @@ bool PythonLoader::init() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonLoader* PythonLoader::inst() { @@ -281,7 +281,7 @@ PythonLoader* PythonLoader::inst() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::init(QString sharedLibName) { @@ -491,7 +491,7 @@ bool PythonLoader::init(QString sharedLibName) return m_foundFuncs; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::loadFunction(QString path, QString moduleName, @@ -618,7 +618,7 @@ bool PythonLoader::loadFunction(QString path, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PythonLoader::getFunctionList(QString path, QString moduleName) { @@ -699,7 +699,7 @@ QStringList PythonLoader::getFunctionList(QString path, QString moduleName) return funcList; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::isLoaded() { @@ -708,7 +708,7 @@ bool PythonLoader::isLoaded() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::getRetDouble(QString module, QString func, @@ -737,7 +737,7 @@ bool PythonLoader::getRetDouble(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::getRetDict(QString module, QString func, @@ -760,7 +760,7 @@ bool PythonLoader::getRetDict(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::getRetStrDict(QString module, QString func, @@ -783,7 +783,7 @@ bool PythonLoader::getRetStrDict(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::safeCheck() { @@ -808,7 +808,7 @@ bool PythonLoader::safeCheck() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setArgDict(QString module, QString func, @@ -847,7 +847,7 @@ bool PythonLoader::setArgDict(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setArgTupleTuples(QString module, QString func, @@ -886,7 +886,7 @@ bool PythonLoader::setArgTupleTuples(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setArgDouble(QString module, QString func, @@ -923,7 +923,7 @@ bool PythonLoader::setArgDouble(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setArgLong(QString module, QString func, int idx, long val) { @@ -957,7 +957,7 @@ bool PythonLoader::setArgLong(QString module, QString func, int idx, long val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setArgString(QString module, QString func, @@ -994,7 +994,7 @@ bool PythonLoader::setArgString(QString module, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setNumArgs(QString module, QString func, int amt) { @@ -1013,7 +1013,7 @@ bool PythonLoader::setNumArgs(QString module, QString func, int amt) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonLoader::setRetCnt(QString module, QString func, int amt) { @@ -1034,5 +1034,5 @@ bool PythonLoader::setRetCnt(QString module, QString func, int amt) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/PythonLoader.h b/src/core/PythonLoader.h index b701b76..ffd8f35 100644 --- a/src/core/PythonLoader.h +++ b/src/core/PythonLoader.h @@ -46,7 +46,7 @@ #ifndef PYTHON_LOADER_H #define PYTHON_LOADER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- //#include #include @@ -57,7 +57,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Singleton class to call python scripts. @@ -508,8 +508,8 @@ class PythonLoader }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/PythonRegionCaller.cpp b/src/core/PythonRegionCaller.cpp index f6b0214..db96a7a 100644 --- a/src/core/PythonRegionCaller.cpp +++ b/src/core/PythonRegionCaller.cpp @@ -7,7 +7,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const static int num_args = 7; @@ -17,14 +17,14 @@ PythonRegionCaller::PythonRegionCaller() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonRegionCaller::~PythonRegionCaller() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonRegionCaller::init(QString path, QString module, @@ -63,7 +63,7 @@ bool PythonRegionCaller::init(QString path, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonRegionCaller::CallFunc(QString name, double cX, @@ -103,6 +103,6 @@ bool PythonRegionCaller::CallFunc(QString name, return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/PythonRegionCaller.h b/src/core/PythonRegionCaller.h index 4bcdbdc..cd79bd8 100644 --- a/src/core/PythonRegionCaller.h +++ b/src/core/PythonRegionCaller.h @@ -6,13 +6,13 @@ #ifndef PYTHON_REGION_CALLER_H #define PYTHON_REGION_CALLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Class to call python functions that take 6 parameters from region box @@ -65,8 +65,8 @@ class PythonRegionCaller : public RegionCaller }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/RegionCaller.cpp b/src/core/RegionCaller.cpp index 03d255c..968771b 100644 --- a/src/core/RegionCaller.cpp +++ b/src/core/RegionCaller.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RegionCaller::RegionCaller() @@ -14,14 +14,14 @@ RegionCaller::RegionCaller() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RegionCaller::~RegionCaller() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString RegionCaller::getFuncName() { @@ -29,4 +29,4 @@ QString RegionCaller::getFuncName() return m_funcName; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/RegionCaller.h b/src/core/RegionCaller.h index 3a3f8b9..a3abaca 100644 --- a/src/core/RegionCaller.h +++ b/src/core/RegionCaller.h @@ -6,11 +6,11 @@ #ifndef REGION_CALLER_H #define REGION_CALLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Abstract class for region box actions. @@ -61,8 +61,8 @@ class RegionCaller }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/ShellRegionCaller.cpp b/src/core/ShellRegionCaller.cpp index e002092..898de42 100644 --- a/src/core/ShellRegionCaller.cpp +++ b/src/core/ShellRegionCaller.cpp @@ -7,7 +7,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ShellRegionCaller::ShellRegionCaller() @@ -17,14 +17,14 @@ ShellRegionCaller::ShellRegionCaller() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ShellRegionCaller::~ShellRegionCaller() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool ShellRegionCaller::init(QString fullpath, QString module, @@ -42,7 +42,7 @@ bool ShellRegionCaller::init(QString fullpath, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool ShellRegionCaller::CallFunc( QString name, double cX, @@ -74,4 +74,4 @@ bool ShellRegionCaller::CallFunc( QString name, return ret; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/ShellRegionCaller.h b/src/core/ShellRegionCaller.h index 093e6cb..31e4738 100644 --- a/src/core/ShellRegionCaller.h +++ b/src/core/ShellRegionCaller.h @@ -6,13 +6,13 @@ #ifndef SHELL_REGION_CALLER_H #define SHELL_REGION_CALLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Class for calling shell/batch scripts with region box parameters @@ -68,8 +68,8 @@ class ShellRegionCaller : public RegionCaller }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/SubWindow.cpp b/src/core/SubWindow.cpp index 6f0507e..8fe0514 100644 --- a/src/core/SubWindow.cpp +++ b/src/core/SubWindow.cpp @@ -9,7 +9,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SubWindow::SubWindow(QWidget* parent, Qt::WindowFlags flags) : QMdiSubWindow(parent, flags) @@ -22,14 +22,14 @@ SubWindow::SubWindow(QWidget* parent, Qt::WindowFlags flags) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SubWindow::~SubWindow() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubWindow::closeEvent(QCloseEvent* closeEvent) { @@ -41,7 +41,7 @@ void SubWindow::closeEvent(QCloseEvent* closeEvent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QUuid SubWindow::getUuid() { @@ -49,4 +49,4 @@ QUuid SubWindow::getUuid() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/SubWindow.h b/src/core/SubWindow.h index cf54806..b6ede40 100644 --- a/src/core/SubWindow.h +++ b/src/core/SubWindow.h @@ -6,12 +6,12 @@ #ifndef SUB_WINDOW_H #define SUB_WINDOW_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The SubWindow class provides a QMdiSubWindow that emits a signal @@ -83,8 +83,8 @@ class SubWindow }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index ff43eb1..ea3db4d 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -36,7 +36,7 @@ static const QString PREFERENCES_XML_SECTION_NAME = "preferences"; QTextEdit * uProbeX::log_textedit = 0; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- uProbeX::uProbeX(QWidget* parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) { @@ -90,7 +90,7 @@ uProbeX::uProbeX(QWidget* parent, Qt::WindowFlags flags) : QMainWindow(parent, f show(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- uProbeX::~uProbeX() { @@ -119,7 +119,7 @@ uProbeX::~uProbeX() m_subWindows.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::adjustDisplaySettings() { @@ -135,7 +135,7 @@ void uProbeX::adjustDisplaySettings() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool uProbeX::checkSameFileWindow(QString& filePath) { @@ -159,7 +159,7 @@ bool uProbeX::checkSameFileWindow(QString& filePath) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::closeEvent(QCloseEvent* event) { @@ -177,7 +177,7 @@ void uProbeX::closeEvent(QCloseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::createMenuBar() { @@ -364,7 +364,7 @@ void uProbeX::openLiveStreamViewer() _liveMapsViewer->show(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::exitApplication() { @@ -382,7 +382,7 @@ void uProbeX::exitApplication() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::initialize() { @@ -391,7 +391,7 @@ void uProbeX::initialize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void uProbeX::adjustAutoSaveSettings() { @@ -433,7 +433,7 @@ void uProbeX::adjustAutoSaveSettings() } } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::make_VLM_Window(VLM_Model* model) { @@ -478,7 +478,7 @@ void uProbeX::make_VLM_Window(VLM_Model* model) SLOT(windowChanged(Qt::WindowStates, Qt::WindowStates))); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::make_VLM_Window(QString path, bool newWindow) { @@ -582,7 +582,7 @@ void uProbeX::make_VLM_Window(QString path, bool newWindow) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::open_spectra_file() { @@ -599,7 +599,7 @@ void uProbeX::open_spectra_file() make_spectra_window(filePath, nullptr); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::open_spectra_and_override_file() { @@ -630,7 +630,7 @@ void uProbeX::open_spectra_and_override_file() make_spectra_window(filePath, po); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::make_spectra_window(QString path, data_struct::Params_Override* po) { @@ -649,7 +649,7 @@ void uProbeX::make_spectra_window(QString path, data_struct::Params_Overrideexec(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::showPreferences() { @@ -1226,7 +1226,7 @@ void uProbeX::showPreferences() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::processPreferencesUpdate() { @@ -1244,7 +1244,7 @@ void uProbeX::processPreferencesUpdate() updatePreference(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::subWindowClosed(SubWindow* subWindow) { @@ -1270,7 +1270,7 @@ void uProbeX::subWindowClosed(SubWindow* subWindow) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::updatePreference() { @@ -1289,7 +1289,7 @@ void uProbeX::updatePreference() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void uProbeX::updateContextMenus() { @@ -1308,4 +1308,4 @@ void uProbeX::updateContextMenus() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/core/uProbeX.h b/src/core/uProbeX.h index 01601bc..ec8b543 100644 --- a/src/core/uProbeX.h +++ b/src/core/uProbeX.h @@ -6,7 +6,7 @@ #ifndef uProbeX_H #define uProbeX_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -35,7 +35,7 @@ class AbstractWindowController; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The main uProbeX user interface window. Main application class @@ -334,8 +334,8 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AbstractImageWidget.cpp b/src/gstar/AbstractImageWidget.cpp index 8f8e888..465b733 100644 --- a/src/gstar/AbstractImageWidget.cpp +++ b/src/gstar/AbstractImageWidget.cpp @@ -22,7 +22,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractImageWidget::AbstractImageWidget(int rows, int cols, QWidget* parent) : QWidget(parent) @@ -92,7 +92,7 @@ AbstractImageWidget::AbstractImageWidget(int rows, int cols, QWidget* parent) //m_lblPixelXCoordinate = nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractImageWidget::~AbstractImageWidget() { @@ -120,7 +120,7 @@ AbstractImageWidget::~AbstractImageWidget() */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::addMarker() { @@ -130,7 +130,7 @@ void AbstractImageWidget::addMarker() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::addRuler() { @@ -140,7 +140,7 @@ void AbstractImageWidget::addRuler() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::appendAnnotationTab(bool bToolbar) { @@ -159,14 +159,14 @@ void AbstractImageWidget::appendAnnotationTab(bool bToolbar) m_tabWidget->addTab(m_treeTabWidget, QIcon(), "Annotations"); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::appendTab(QWidget *widget, QString name) { m_tabWidget->addTab(widget, QIcon(), name); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::createActions() { @@ -201,7 +201,7 @@ void AbstractImageWidget::createActions() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::createToolBar(ImageViewWidget* imageViewWidget, bool create_image_nav) { @@ -228,7 +228,7 @@ void AbstractImageWidget::createToolBar(ImageViewWidget* imageViewWidget, bool c } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::createAnnotationToolBar() { @@ -251,7 +251,7 @@ void AbstractImageWidget::createAnnotationToolBar() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::createRangeWidget() { @@ -272,7 +272,7 @@ void AbstractImageWidget::createRangeWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::deleteAllItems() { @@ -307,7 +307,7 @@ void AbstractImageWidget::deleteAllItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::deleteItem() { @@ -343,7 +343,7 @@ void AbstractImageWidget::deleteItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::displayContextMenu(QWidget* parent, const QPoint& pos) @@ -379,7 +379,7 @@ void AbstractImageWidget::displayContextMenu(QWidget* parent, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::duplicateItem() { @@ -398,7 +398,7 @@ void AbstractImageWidget::duplicateItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QLayout* AbstractImageWidget::generateDefaultLayout(bool add_tab_widget) { @@ -424,7 +424,7 @@ QLayout* AbstractImageWidget::generateDefaultLayout(bool add_tab_widget) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QLayout* AbstractImageWidget::getImageViewLayout() { @@ -433,7 +433,7 @@ QLayout* AbstractImageWidget::getImageViewLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationTreeModel* AbstractImageWidget::getAnnotationModel() { @@ -442,7 +442,7 @@ AnnotationTreeModel* AbstractImageWidget::getAnnotationModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewWidget* AbstractImageWidget::imageViewWidget() const { @@ -451,7 +451,7 @@ ImageViewWidget* AbstractImageWidget::imageViewWidget() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::insertAndSelectAnnotation(AnnotationTreeModel* treeModel, QTreeView* annoTreeView, @@ -493,7 +493,7 @@ void AbstractImageWidget::insertAndSelectAnnotation(AnnotationTreeModel* treeMod } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::reloadAndSelectAnnotation(AnnotationTreeModel* treeModel, QTreeView* annoTreeView, @@ -531,7 +531,7 @@ void AbstractImageWidget::reloadAndSelectAnnotation(AnnotationTreeModel* treeMod } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::modelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) @@ -542,7 +542,7 @@ void AbstractImageWidget::modelDataChanged(const QModelIndex& topLeft, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setAnnotationModel(AnnotationTreeModel *model) { @@ -553,7 +553,7 @@ void AbstractImageWidget::setAnnotationModel(AnnotationTreeModel *model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setCoordinateModel(CoordinateModel *model) { @@ -565,7 +565,7 @@ void AbstractImageWidget::setCoordinateModel(CoordinateModel *model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setHeightDims(int h) { @@ -580,7 +580,7 @@ void AbstractImageWidget::setHeightDims(int h) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setNumberOfImages(int images) { @@ -591,7 +591,7 @@ void AbstractImageWidget::setNumberOfImages(int images) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setAnnotationsEnabled(bool value) { @@ -602,7 +602,7 @@ void AbstractImageWidget::setAnnotationsEnabled(bool value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setRank(int m_rankDim) { @@ -620,7 +620,7 @@ void AbstractImageWidget::setRank(int m_rankDim) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setRangeWidgetStartIndex(int index) { @@ -630,7 +630,7 @@ void AbstractImageWidget::setRangeWidgetStartIndex(int index) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractImageWidget::getRangeWidgetStartIndex() { @@ -641,7 +641,7 @@ int AbstractImageWidget::getRangeWidgetStartIndex() return 0; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setRangeWidgetVisible(bool m_rangeVisible) { @@ -651,7 +651,7 @@ void AbstractImageWidget::setRangeWidgetVisible(bool m_rangeVisible) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setToolBarVisible(bool visible) { @@ -660,7 +660,7 @@ void AbstractImageWidget::setToolBarVisible(bool visible) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::setWidthDims(int w) { @@ -674,7 +674,7 @@ void AbstractImageWidget::setWidthDims(int w) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::showRulerUnitsDialog() { @@ -702,7 +702,7 @@ void AbstractImageWidget::showRulerUnitsDialog() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::treeContextMenu(const QPoint& pos) { @@ -712,7 +712,7 @@ void AbstractImageWidget::treeContextMenu(const QPoint& pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::treeDoubleClicked(const QModelIndex& index) { @@ -724,13 +724,21 @@ void AbstractImageWidget::treeDoubleClicked(const QModelIndex& index) if (item != nullptr) { - QVariant data = item->data(0, index.column()); - if (data.type() == QVariant::Color) + QDialog* custom_dialog = item->get_custom_dialog(); + if(custom_dialog != nullptr) { - QColor color = QColorDialog::getColor(data.toString(), this); - if (color.isValid()) + custom_dialog->show(); + } + else + { + QVariant data = item->data(0, index.column()); + if (data.type() == QVariant::Color) { - item->setData(index, color); + QColor color = QColorDialog::getColor(data.toString(), this); + if (color.isValid()) + { + item->setData(index, color); + } } } } @@ -738,7 +746,7 @@ void AbstractImageWidget::treeDoubleClicked(const QModelIndex& index) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::updateFrame(QImage *img) { @@ -750,7 +758,7 @@ void AbstractImageWidget::updateFrame(QImage *img) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractImageWidget::viewContextMenu(const QPoint& pos) { @@ -759,5 +767,5 @@ void AbstractImageWidget::viewContextMenu(const QPoint& pos) } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/gstar/AbstractImageWidget.h b/src/gstar/AbstractImageWidget.h index 2ebcbef..9d5bbf6 100644 --- a/src/gstar/AbstractImageWidget.h +++ b/src/gstar/AbstractImageWidget.h @@ -6,7 +6,7 @@ #ifndef TXM_ABSTRACT_IMAGE_WIDGET_H #define TXM_ABSTRACT_IMAGE_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -28,7 +28,7 @@ #include "gstar/RangeWidget.h" #include "gstar/RulerUnitsDialog.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -418,8 +418,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ImageWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/AbstractGraphicsItem.cpp b/src/gstar/Annotation/AbstractGraphicsItem.cpp index 8ec42f2..d2c7369 100644 --- a/src/gstar/Annotation/AbstractGraphicsItem.cpp +++ b/src/gstar/Annotation/AbstractGraphicsItem.cpp @@ -11,7 +11,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem::AbstractGraphicsItem(AbstractGraphicsItem* parent) : QGraphicsObject(parent) @@ -30,7 +30,7 @@ AbstractGraphicsItem::AbstractGraphicsItem(AbstractGraphicsItem* parent) : } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem::~AbstractGraphicsItem() { @@ -40,7 +40,7 @@ AbstractGraphicsItem::~AbstractGraphicsItem() m_parent = nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::clearChildren() { @@ -54,7 +54,7 @@ void AbstractGraphicsItem::clearChildren() m_children.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::appendChild(AbstractGraphicsItem* child) { @@ -65,14 +65,14 @@ void AbstractGraphicsItem::appendChild(AbstractGraphicsItem* child) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::appendLinkedDisplayChild(AbstractGraphicsItem* child) { _linkedDisplayChildren.push_back(child); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::removeLinkedDisplayChild(AbstractGraphicsItem* child) { @@ -82,7 +82,7 @@ void AbstractGraphicsItem::removeLinkedDisplayChild(AbstractGraphicsItem* child) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::appendProperty(AnnotationProperty* prop) { @@ -92,7 +92,7 @@ void AbstractGraphicsItem::appendProperty(AnnotationProperty* prop) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* AbstractGraphicsItem::child(int row) { @@ -108,7 +108,7 @@ AbstractGraphicsItem* AbstractGraphicsItem::child(int row) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString AbstractGraphicsItem::classId() { @@ -117,7 +117,7 @@ QString AbstractGraphicsItem::classId() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::list AbstractGraphicsItem::childList() const { @@ -126,7 +126,7 @@ std::list AbstractGraphicsItem::childList() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractGraphicsItem::childCount() const { @@ -135,7 +135,7 @@ int AbstractGraphicsItem::childCount() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::clearProperties() { @@ -148,7 +148,7 @@ void AbstractGraphicsItem::clearProperties() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::copyPropertyValues(QList prop_list) { @@ -168,7 +168,7 @@ void AbstractGraphicsItem::copyPropertyValues(QList prop_li connectAllProperties(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::linkProperties(QList prop_list) { @@ -179,7 +179,7 @@ void AbstractGraphicsItem::linkProperties(QList prop_list) connectAllLinkedProperties(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractGraphicsItem::columnCount() const { @@ -188,7 +188,7 @@ int AbstractGraphicsItem::columnCount() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::connectAllProperties() { @@ -200,7 +200,7 @@ void AbstractGraphicsItem::connectAllProperties() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::connectAllLinkedProperties() { @@ -212,7 +212,7 @@ void AbstractGraphicsItem::connectAllLinkedProperties() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::disconnectAllLinkedProperties() { @@ -224,7 +224,7 @@ void AbstractGraphicsItem::disconnectAllLinkedProperties() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::unlinkAllAnnotations() { @@ -232,7 +232,7 @@ void AbstractGraphicsItem::unlinkAllAnnotations() _linked_props.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::connectAllViewItems() { @@ -272,7 +272,7 @@ void AbstractGraphicsItem::connectAllViewItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AbstractGraphicsItem::data(int row, int column) const { @@ -314,7 +314,7 @@ QVariant AbstractGraphicsItem::data(int row, int column) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::disconnectAllProperties() { @@ -326,7 +326,7 @@ void AbstractGraphicsItem::disconnectAllProperties() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::disconnectAllViewItems() { @@ -366,7 +366,7 @@ void AbstractGraphicsItem::disconnectAllViewItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags AbstractGraphicsItem::displayFlags(int row, int column) const { @@ -403,7 +403,7 @@ Qt::ItemFlags AbstractGraphicsItem::displayFlags(int row, int column) const return flags; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AbstractGraphicsItem::hasChild(AbstractGraphicsItem* child) { @@ -418,7 +418,7 @@ bool AbstractGraphicsItem::hasChild(AbstractGraphicsItem* child) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QTransform AbstractGraphicsItem::getFirstViewTransform() const { @@ -440,7 +440,7 @@ QTransform AbstractGraphicsItem::getFirstViewTransform() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::initializePropertyName() { @@ -449,7 +449,7 @@ void AbstractGraphicsItem::initializePropertyName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AbstractGraphicsItem::itemChange(GraphicsItemChange change, const QVariant& value) @@ -531,7 +531,7 @@ QVariant AbstractGraphicsItem::itemChange(GraphicsItemChange change, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::modelChanged(AnnotationProperty* prop, QVariant val) { @@ -546,7 +546,7 @@ void AbstractGraphicsItem::modelChanged(AnnotationProperty* prop, QVariant val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::linkPropChanged(AnnotationProperty* prop, QVariant val) { @@ -563,7 +563,7 @@ void AbstractGraphicsItem::linkPropChanged(AnnotationProperty* prop, QVariant va connectAllLinkedProperties(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* AbstractGraphicsItem::parent() const { @@ -572,7 +572,7 @@ AbstractGraphicsItem* AbstractGraphicsItem::parent() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::prependProperty(AnnotationProperty* prop) { @@ -581,7 +581,7 @@ void AbstractGraphicsItem::prependProperty(AnnotationProperty* prop) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList AbstractGraphicsItem::properties() const { @@ -590,7 +590,7 @@ QList AbstractGraphicsItem::properties() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AbstractGraphicsItem::propertyValue(QString name) const { @@ -605,7 +605,7 @@ QVariant AbstractGraphicsItem::propertyValue(QString name) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::setPropertyValue(QString name, QVariant value) { @@ -618,7 +618,7 @@ void AbstractGraphicsItem::setPropertyValue(QString name, QVariant value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::removeChild(AbstractGraphicsItem* item) { @@ -627,7 +627,7 @@ void AbstractGraphicsItem::removeChild(AbstractGraphicsItem* item) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::removeChildAt(int row) { @@ -642,7 +642,7 @@ void AbstractGraphicsItem::removeChildAt(int row) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractGraphicsItem::indexOfName(AbstractGraphicsItem* child, AbstractGraphicsItem **out_child) { @@ -661,7 +661,7 @@ int AbstractGraphicsItem::indexOfName(AbstractGraphicsItem* child, AbstractGraph return -1; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractGraphicsItem::indexOf(AbstractGraphicsItem* child) { @@ -675,7 +675,7 @@ int AbstractGraphicsItem::indexOf(AbstractGraphicsItem* child) return -1; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AbstractGraphicsItem::row() const { @@ -689,7 +689,7 @@ int AbstractGraphicsItem::row() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::setAllChildrenSelected(bool select) { @@ -701,7 +701,7 @@ void AbstractGraphicsItem::setAllChildrenSelected(bool select) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- //void AbstractGraphicsItem::setCoordinatePrecision(int number) //{ @@ -710,7 +710,7 @@ void AbstractGraphicsItem::setAllChildrenSelected(bool select) //} -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AbstractGraphicsItem::setData(const QModelIndex& index, const QVariant& value) @@ -803,7 +803,7 @@ bool AbstractGraphicsItem::setData(const QModelIndex& index, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void AbstractGraphicsItem::setSelected(bool selected) { @@ -812,7 +812,7 @@ void AbstractGraphicsItem::setSelected(bool selected) } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::setParent(AbstractGraphicsItem* parent) { @@ -821,7 +821,7 @@ void AbstractGraphicsItem::setParent(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractGraphicsItem::viewChanged() { @@ -836,4 +836,4 @@ void AbstractGraphicsItem::viewChanged() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/AbstractGraphicsItem.h b/src/gstar/Annotation/AbstractGraphicsItem.h index 5e1c622..96fa32e 100644 --- a/src/gstar/Annotation/AbstractGraphicsItem.h +++ b/src/gstar/Annotation/AbstractGraphicsItem.h @@ -6,13 +6,14 @@ #ifndef ABSTRACTGRAPHICSITEM_H #define ABSTRACTGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include +#include #include "gstar/AnnotationProperty.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -46,6 +47,7 @@ class AbstractGraphicsItem : public QGraphicsObject */ ~AbstractGraphicsItem(); + virtual QDialog* get_custom_dialog() { return nullptr; } void clearChildren(); @@ -366,8 +368,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // ABSTRACTGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/EmptyGraphicsItem.cpp b/src/gstar/Annotation/EmptyGraphicsItem.cpp index 58881aa..8b3c4f5 100644 --- a/src/gstar/Annotation/EmptyGraphicsItem.cpp +++ b/src/gstar/Annotation/EmptyGraphicsItem.cpp @@ -9,7 +9,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- EmptyGraphicsItem::EmptyGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -17,7 +17,7 @@ EmptyGraphicsItem::EmptyGraphicsItem(AbstractGraphicsItem* parent) : } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF EmptyGraphicsItem::boundingRect() const { @@ -26,7 +26,7 @@ QRectF EmptyGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF EmptyGraphicsItem::boundingRectMarker() const { @@ -35,7 +35,7 @@ QRectF EmptyGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void EmptyGraphicsItem::calculate() { @@ -44,7 +44,7 @@ void EmptyGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString EmptyGraphicsItem::displayName() const { @@ -54,7 +54,7 @@ const QString EmptyGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* EmptyGraphicsItem::duplicate() { @@ -65,7 +65,7 @@ AbstractGraphicsItem* EmptyGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void EmptyGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -79,18 +79,18 @@ void EmptyGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void EmptyGraphicsItem::updateModel() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void EmptyGraphicsItem::updateView() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/EmptyGraphicsItem.h b/src/gstar/Annotation/EmptyGraphicsItem.h index c9314ea..586d22d 100644 --- a/src/gstar/Annotation/EmptyGraphicsItem.h +++ b/src/gstar/Annotation/EmptyGraphicsItem.h @@ -6,13 +6,13 @@ #ifndef EMPTYGRAPHICSITEM_H #define EMPTYGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "AbstractGraphicsItem.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -88,8 +88,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // EMPTYGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/HotSpotMaskGraphicsItem.cpp b/src/gstar/Annotation/HotSpotMaskGraphicsItem.cpp index f18353f..a95afd0 100644 --- a/src/gstar/Annotation/HotSpotMaskGraphicsItem.cpp +++ b/src/gstar/Annotation/HotSpotMaskGraphicsItem.cpp @@ -13,7 +13,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- HotSpotMaskGraphicsItem::HotSpotMaskGraphicsItem(int width, int height, AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -63,14 +63,14 @@ HotSpotMaskGraphicsItem::HotSpotMaskGraphicsItem(int width, int height, Abstract } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- HotSpotMaskGraphicsItem::~HotSpotMaskGraphicsItem() { emit (mask_updated(this, false)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString HotSpotMaskGraphicsItem::getName() { @@ -84,7 +84,7 @@ QString HotSpotMaskGraphicsItem::getName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::calculate() { @@ -118,14 +118,14 @@ void HotSpotMaskGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::updateModel() { update(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::updateView() { @@ -154,7 +154,7 @@ void HotSpotMaskGraphicsItem::updateView() emit(mask_updated(this, false)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::drawmask_changed() { @@ -166,7 +166,7 @@ void HotSpotMaskGraphicsItem::drawmask_changed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector HotSpotMaskGraphicsItem::get_mask_list() { @@ -185,7 +185,7 @@ std::vector HotSpotMaskGraphicsItem::get_mask_list() return roi_list; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::erasemask_changed() { @@ -197,7 +197,7 @@ void HotSpotMaskGraphicsItem::erasemask_changed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF HotSpotMaskGraphicsItem::boundingRect() const { @@ -206,7 +206,7 @@ QRectF HotSpotMaskGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF HotSpotMaskGraphicsItem::boundingRectMarker() const { @@ -215,7 +215,7 @@ QRectF HotSpotMaskGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString HotSpotMaskGraphicsItem::displayName() const { @@ -225,7 +225,7 @@ const QString HotSpotMaskGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* HotSpotMaskGraphicsItem::duplicate() { @@ -239,7 +239,7 @@ AbstractGraphicsItem* HotSpotMaskGraphicsItem::duplicate() return item; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -260,7 +260,7 @@ void HotSpotMaskGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) { @@ -289,7 +289,7 @@ void HotSpotMaskGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -315,7 +315,7 @@ void HotSpotMaskGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HotSpotMaskGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { @@ -331,4 +331,4 @@ void HotSpotMaskGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/HotSpotMaskGraphicsItem.h b/src/gstar/Annotation/HotSpotMaskGraphicsItem.h index d966efb..1f20a3f 100644 --- a/src/gstar/Annotation/HotSpotMaskGraphicsItem.h +++ b/src/gstar/Annotation/HotSpotMaskGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef HOTSPOTMASKGI_H #define HOTSPOTMASKGI_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "LineGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -126,8 +126,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // RULERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/IntensityLineGraphicsItem.cpp b/src/gstar/Annotation/IntensityLineGraphicsItem.cpp index 0e0751c..7f98c25 100644 --- a/src/gstar/Annotation/IntensityLineGraphicsItem.cpp +++ b/src/gstar/Annotation/IntensityLineGraphicsItem.cpp @@ -9,7 +9,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- IntensityLineGraphicsItem::IntensityLineGraphicsItem() : LineGraphicsItem() { @@ -25,7 +25,7 @@ IntensityLineGraphicsItem::IntensityLineGraphicsItem() : LineGraphicsItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void IntensityLineGraphicsItem::calculate() { @@ -37,7 +37,7 @@ void IntensityLineGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString IntensityLineGraphicsItem::displayName() const { @@ -47,7 +47,7 @@ const QString IntensityLineGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* IntensityLineGraphicsItem::duplicate() { @@ -63,4 +63,4 @@ AbstractGraphicsItem* IntensityLineGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/IntensityLineGraphicsItem.h b/src/gstar/Annotation/IntensityLineGraphicsItem.h index a18b0b2..e9f50b7 100644 --- a/src/gstar/Annotation/IntensityLineGraphicsItem.h +++ b/src/gstar/Annotation/IntensityLineGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef INTENSITYLINEGRAPHICSITEM_H #define INTENSITYLINEGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "LineGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -57,8 +57,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // INTENSITYLINEGRAPHICSMODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/IntensityPieGraphicsItem.cpp b/src/gstar/Annotation/IntensityPieGraphicsItem.cpp index 7f19c6d..adc8312 100644 --- a/src/gstar/Annotation/IntensityPieGraphicsItem.cpp +++ b/src/gstar/Annotation/IntensityPieGraphicsItem.cpp @@ -9,7 +9,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- IntensityPieGraphicsItem::IntensityPieGraphicsItem() : PieGraphicsItem() { @@ -23,7 +23,7 @@ IntensityPieGraphicsItem::IntensityPieGraphicsItem() : PieGraphicsItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void IntensityPieGraphicsItem::calculate() { @@ -33,7 +33,7 @@ void IntensityPieGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString IntensityPieGraphicsItem::displayName() const { @@ -43,7 +43,7 @@ const QString IntensityPieGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* IntensityPieGraphicsItem::duplicate() { @@ -55,4 +55,4 @@ AbstractGraphicsItem* IntensityPieGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/IntensityPieGraphicsItem.h b/src/gstar/Annotation/IntensityPieGraphicsItem.h index a5c7f94..058c5a5 100644 --- a/src/gstar/Annotation/IntensityPieGraphicsItem.h +++ b/src/gstar/Annotation/IntensityPieGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef INTENSITYPIEGRAPHICSITEM_H #define INTENSITYPIEGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "PieGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -58,8 +58,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // INTENSITYPIEGRAPHICSMODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/LineGraphicsItem.cpp b/src/gstar/Annotation/LineGraphicsItem.cpp index f589142..b21f44c 100644 --- a/src/gstar/Annotation/LineGraphicsItem.cpp +++ b/src/gstar/Annotation/LineGraphicsItem.cpp @@ -18,7 +18,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LineGraphicsItem::LineGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -53,7 +53,7 @@ LineGraphicsItem::LineGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LineGraphicsItem::~LineGraphicsItem() { @@ -62,7 +62,7 @@ LineGraphicsItem::~LineGraphicsItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF LineGraphicsItem::boundingRect() const { @@ -73,7 +73,7 @@ QRectF LineGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF LineGraphicsItem::boundingRectMarker() const { @@ -84,7 +84,7 @@ QRectF LineGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LineGraphicsItem::checkBoundPos(QPointF newPos, QPointF offset) { @@ -130,7 +130,7 @@ bool LineGraphicsItem::checkBoundPos(QPointF newPos, QPointF offset) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::connectAll() { @@ -140,7 +140,7 @@ void LineGraphicsItem::connectAll() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString LineGraphicsItem::displayName() const { @@ -150,7 +150,7 @@ const QString LineGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::disconnectAll() { @@ -160,7 +160,7 @@ void LineGraphicsItem::disconnectAll() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPointF LineGraphicsItem::endNodePos() { @@ -169,7 +169,7 @@ QPointF LineGraphicsItem::endNodePos() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant LineGraphicsItem::itemChange(GraphicsItemChange change, const QVariant& value) @@ -205,7 +205,7 @@ QVariant LineGraphicsItem::itemChange(GraphicsItemChange change, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -257,7 +257,7 @@ void LineGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { @@ -284,7 +284,7 @@ void LineGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { @@ -294,7 +294,7 @@ void LineGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -420,7 +420,7 @@ void LineGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::setEndPos(QPointF pos) { @@ -430,7 +430,7 @@ void LineGraphicsItem::setEndPos(QPointF pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::setLine(QLineF line) { @@ -440,7 +440,7 @@ void LineGraphicsItem::setLine(QLineF line) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::setLinkColor(QColor color) { @@ -450,7 +450,7 @@ void LineGraphicsItem::setLinkColor(QColor color) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::setStartPos(QPointF pos) { @@ -460,7 +460,7 @@ void LineGraphicsItem::setStartPos(QPointF pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPointF LineGraphicsItem::startNodePos() { @@ -471,7 +471,7 @@ QPointF LineGraphicsItem::startNodePos() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPainterPath LineGraphicsItem::shape() const { @@ -512,7 +512,7 @@ QPainterPath LineGraphicsItem::shape() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF LineGraphicsItem::textBoundingRect() const { @@ -524,7 +524,7 @@ QRectF LineGraphicsItem::textBoundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::updateModel() { @@ -550,7 +550,7 @@ void LineGraphicsItem::updateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LineGraphicsItem::updateView() { @@ -578,4 +578,4 @@ void LineGraphicsItem::updateView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/LineGraphicsItem.h b/src/gstar/Annotation/LineGraphicsItem.h index 6e4fe1b..9fd6ed1 100644 --- a/src/gstar/Annotation/LineGraphicsItem.h +++ b/src/gstar/Annotation/LineGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef LINEGRAPHICSITEM_H #define LINEGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "AbstractGraphicsItem.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -234,8 +234,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // RULERGI_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/MarkerGraphicsItem.cpp b/src/gstar/Annotation/MarkerGraphicsItem.cpp index 6bce47a..f9df9f4 100644 --- a/src/gstar/Annotation/MarkerGraphicsItem.cpp +++ b/src/gstar/Annotation/MarkerGraphicsItem.cpp @@ -12,7 +12,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MarkerGraphicsItem::MarkerGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -40,7 +40,7 @@ MarkerGraphicsItem::MarkerGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF MarkerGraphicsItem::boundingRect() const { @@ -49,7 +49,7 @@ QRectF MarkerGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF MarkerGraphicsItem::boundingRectMarker() const { @@ -58,7 +58,7 @@ QRectF MarkerGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::calculate() { @@ -67,7 +67,7 @@ void MarkerGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString MarkerGraphicsItem::displayName() const { @@ -77,7 +77,7 @@ const QString MarkerGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* MarkerGraphicsItem::duplicate() { @@ -92,7 +92,7 @@ AbstractGraphicsItem* MarkerGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -140,7 +140,7 @@ void MarkerGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::setColor(QColor color) { @@ -149,7 +149,7 @@ void MarkerGraphicsItem::setColor(QColor color) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::setSize(double size) { @@ -166,7 +166,7 @@ void MarkerGraphicsItem::setSize(double size) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPainterPath MarkerGraphicsItem::shape() const { @@ -177,7 +177,7 @@ QPainterPath MarkerGraphicsItem::shape() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::updateModel() { @@ -189,7 +189,7 @@ void MarkerGraphicsItem::updateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MarkerGraphicsItem::updateView() { @@ -205,4 +205,4 @@ void MarkerGraphicsItem::updateView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/MarkerGraphicsItem.h b/src/gstar/Annotation/MarkerGraphicsItem.h index c9eb14d..2bf64ba 100644 --- a/src/gstar/Annotation/MarkerGraphicsItem.h +++ b/src/gstar/Annotation/MarkerGraphicsItem.h @@ -6,13 +6,13 @@ #ifndef MARKERGRAPHICSITEM_H #define MARKERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "AbstractGraphicsItem.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -143,8 +143,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // MARKERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/PieGraphicsItem.cpp b/src/gstar/Annotation/PieGraphicsItem.cpp index 2c559fd..5ca8263 100644 --- a/src/gstar/Annotation/PieGraphicsItem.cpp +++ b/src/gstar/Annotation/PieGraphicsItem.cpp @@ -12,7 +12,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PieGraphicsItem::PieGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -47,7 +47,7 @@ PieGraphicsItem::PieGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF PieGraphicsItem::boundingRect() const { @@ -57,7 +57,7 @@ QRectF PieGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF PieGraphicsItem::boundingRectMarker() const { @@ -67,7 +67,7 @@ QRectF PieGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString PieGraphicsItem::displayName() const { @@ -77,7 +77,7 @@ const QString PieGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPoint PieGraphicsItem::getPos() { @@ -87,7 +87,7 @@ QPoint PieGraphicsItem::getPos() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PieGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -108,7 +108,7 @@ void PieGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PieGraphicsItem::setRadius(double radius) { @@ -122,7 +122,7 @@ void PieGraphicsItem::setRadius(double radius) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PieGraphicsItem::updateModel() { @@ -137,7 +137,7 @@ void PieGraphicsItem::updateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PieGraphicsItem::updateView() { @@ -152,4 +152,4 @@ void PieGraphicsItem::updateView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/PieGraphicsItem.h b/src/gstar/Annotation/PieGraphicsItem.h index be1006f..da099db 100644 --- a/src/gstar/Annotation/PieGraphicsItem.h +++ b/src/gstar/Annotation/PieGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef PIEGRAPHICSITEM_H #define PIEGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "AbstractGraphicsItem.h" #include "gstar/AnnotationProperty.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -133,8 +133,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // PIEGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/RoiMaskGraphicsItem.h b/src/gstar/Annotation/RoiMaskGraphicsItem.h index 88c67df..d84c15e 100644 --- a/src/gstar/Annotation/RoiMaskGraphicsItem.h +++ b/src/gstar/Annotation/RoiMaskGraphicsItem.h @@ -6,13 +6,13 @@ #ifndef ROIMASKGI_H #define ROIMASKGI_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/Annotation/AbstractGraphicsItem.h" #include "gstar/RectItem.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -160,8 +160,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // RULERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/RulerGraphicsItem.cpp b/src/gstar/Annotation/RulerGraphicsItem.cpp index b109194..c7c981f 100644 --- a/src/gstar/Annotation/RulerGraphicsItem.cpp +++ b/src/gstar/Annotation/RulerGraphicsItem.cpp @@ -14,7 +14,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RulerGraphicsItem::RulerGraphicsItem(AbstractGraphicsItem* parent) : LineGraphicsItem(parent) @@ -33,7 +33,7 @@ RulerGraphicsItem::RulerGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerGraphicsItem::calculate() { @@ -66,7 +66,7 @@ void RulerGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString RulerGraphicsItem::displayName() const { @@ -76,7 +76,7 @@ const QString RulerGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* RulerGraphicsItem::duplicate() { @@ -91,4 +91,4 @@ AbstractGraphicsItem* RulerGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/RulerGraphicsItem.h b/src/gstar/Annotation/RulerGraphicsItem.h index 3a0ccdc..d30f69f 100644 --- a/src/gstar/Annotation/RulerGraphicsItem.h +++ b/src/gstar/Annotation/RulerGraphicsItem.h @@ -6,11 +6,11 @@ #ifndef RULERGRAPHICSITEM_H #define RULERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "LineGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -58,8 +58,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // RULERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/UProbeMarkerGraphicsItem.cpp b/src/gstar/Annotation/UProbeMarkerGraphicsItem.cpp index f0e6555..257c292 100644 --- a/src/gstar/Annotation/UProbeMarkerGraphicsItem.cpp +++ b/src/gstar/Annotation/UProbeMarkerGraphicsItem.cpp @@ -15,7 +15,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeMarkerGraphicsItem::UProbeMarkerGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -64,7 +64,7 @@ UProbeMarkerGraphicsItem::UProbeMarkerGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeMarkerGraphicsItem::UProbeMarkerGraphicsItem(QMap& marker, AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -111,7 +111,7 @@ UProbeMarkerGraphicsItem::UProbeMarkerGraphicsItem(QMap& marke } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF UProbeMarkerGraphicsItem::boundingRect() const { @@ -152,7 +152,7 @@ QRectF UProbeMarkerGraphicsItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF UProbeMarkerGraphicsItem::boundingRectMarker() const { @@ -161,7 +161,7 @@ QRectF UProbeMarkerGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::calculate() { @@ -170,7 +170,7 @@ void UProbeMarkerGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString UProbeMarkerGraphicsItem::displayName() const { @@ -180,7 +180,7 @@ const QString UProbeMarkerGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* UProbeMarkerGraphicsItem::duplicate() { @@ -197,7 +197,7 @@ AbstractGraphicsItem* UProbeMarkerGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -265,7 +265,7 @@ void UProbeMarkerGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setMouseOverPixelCoordModel(CoordinateModel* model) { @@ -290,7 +290,7 @@ void UProbeMarkerGraphicsItem::setMouseOverPixelCoordModel(CoordinateModel* mode } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setLightToMicroCoordModel(CoordinateModel* model) { @@ -315,7 +315,7 @@ void UProbeMarkerGraphicsItem::setLightToMicroCoordModel(CoordinateModel* model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setColor(QColor color) { @@ -323,7 +323,7 @@ void UProbeMarkerGraphicsItem::setColor(QColor color) m_outlineColor = color; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setColorProperty(QVariant color) { @@ -332,7 +332,7 @@ void UProbeMarkerGraphicsItem::setColorProperty(QVariant color) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setMeasuredXProperty(QVariant mx) { @@ -341,7 +341,7 @@ void UProbeMarkerGraphicsItem::setMeasuredXProperty(QVariant mx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setMeasuredYProperty(QVariant my) { @@ -350,7 +350,7 @@ void UProbeMarkerGraphicsItem::setMeasuredYProperty(QVariant my) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setPositionXProperty(QVariant lx) { @@ -359,7 +359,7 @@ void UProbeMarkerGraphicsItem::setPositionXProperty(QVariant lx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setPositionYProperty(QVariant ly) { @@ -368,7 +368,7 @@ void UProbeMarkerGraphicsItem::setPositionYProperty(QVariant ly) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setPositionZProperty(QVariant lz) { @@ -377,7 +377,7 @@ void UProbeMarkerGraphicsItem::setPositionZProperty(QVariant lz) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setPredictXProperty(QVariant px) { @@ -386,7 +386,7 @@ void UProbeMarkerGraphicsItem::setPredictXProperty(QVariant px) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setPredictYProperty(QVariant py) { @@ -395,7 +395,7 @@ void UProbeMarkerGraphicsItem::setPredictYProperty(QVariant py) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::setSize(double size) { @@ -424,7 +424,7 @@ void UProbeMarkerGraphicsItem::setSize(double size) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPainterPath UProbeMarkerGraphicsItem::shape() const { @@ -435,7 +435,7 @@ QPainterPath UProbeMarkerGraphicsItem::shape() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::updateModel() { @@ -479,7 +479,7 @@ void UProbeMarkerGraphicsItem::updateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::updateStringSize() { @@ -495,7 +495,7 @@ void UProbeMarkerGraphicsItem::updateStringSize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeMarkerGraphicsItem::updateView() { @@ -511,4 +511,4 @@ void UProbeMarkerGraphicsItem::updateView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/UProbeMarkerGraphicsItem.h b/src/gstar/Annotation/UProbeMarkerGraphicsItem.h index 13d2bab..296187c 100644 --- a/src/gstar/Annotation/UProbeMarkerGraphicsItem.h +++ b/src/gstar/Annotation/UProbeMarkerGraphicsItem.h @@ -6,7 +6,7 @@ #ifndef UPROBEMARKERGRAPHICSITEM_H #define UPROBEMARKERGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "AbstractGraphicsItem.h" @@ -14,7 +14,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -270,8 +270,8 @@ protected slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/UProbeRegionGraphicsItem.cpp b/src/gstar/Annotation/UProbeRegionGraphicsItem.cpp index e7ab069..eac0049 100644 --- a/src/gstar/Annotation/UProbeRegionGraphicsItem.cpp +++ b/src/gstar/Annotation/UProbeRegionGraphicsItem.cpp @@ -13,7 +13,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeRegionGraphicsItem::UProbeRegionGraphicsItem(AbstractGraphicsItem* parent) : AbstractGraphicsItem(parent) @@ -62,7 +62,7 @@ UProbeRegionGraphicsItem::UProbeRegionGraphicsItem(AbstractGraphicsItem* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeRegionGraphicsItem::UProbeRegionGraphicsItem(QMap& marker, AbstractGraphicsItem* parent) @@ -106,7 +106,7 @@ UProbeRegionGraphicsItem::UProbeRegionGraphicsItem(QMap& marke } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeRegionGraphicsItem* UProbeRegionGraphicsItem::cloneRegion() { @@ -118,7 +118,7 @@ UProbeRegionGraphicsItem* UProbeRegionGraphicsItem::cloneRegion() return newRegion; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString UProbeRegionGraphicsItem::getUProbeName() { @@ -129,7 +129,7 @@ QString UProbeRegionGraphicsItem::getUProbeName() return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF UProbeRegionGraphicsItem::boundingRect() const { @@ -170,7 +170,7 @@ QRectF UProbeRegionGraphicsItem::boundingRect() const return QRectF(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF UProbeRegionGraphicsItem::boundingRectMarker() const { @@ -179,7 +179,7 @@ QRectF UProbeRegionGraphicsItem::boundingRectMarker() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::calculate() { @@ -188,7 +188,7 @@ void UProbeRegionGraphicsItem::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString UProbeRegionGraphicsItem::displayName() const { @@ -198,7 +198,7 @@ const QString UProbeRegionGraphicsItem::displayName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* UProbeRegionGraphicsItem::duplicate() { @@ -216,7 +216,7 @@ AbstractGraphicsItem* UProbeRegionGraphicsItem::duplicate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getFactorX() { @@ -226,7 +226,7 @@ double UProbeRegionGraphicsItem::getFactorX() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getFactorY() { @@ -236,7 +236,7 @@ double UProbeRegionGraphicsItem::getFactorY() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getHeight() { @@ -245,7 +245,7 @@ double UProbeRegionGraphicsItem::getHeight() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getWidth() { @@ -254,7 +254,7 @@ double UProbeRegionGraphicsItem::getWidth() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getX() { @@ -263,7 +263,7 @@ double UProbeRegionGraphicsItem::getX() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double UProbeRegionGraphicsItem::getY() { @@ -272,7 +272,7 @@ double UProbeRegionGraphicsItem::getY() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { @@ -290,7 +290,7 @@ void UProbeRegionGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { @@ -303,7 +303,7 @@ void UProbeRegionGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) { @@ -352,7 +352,7 @@ void UProbeRegionGraphicsItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::initialScale() { @@ -375,7 +375,7 @@ void UProbeRegionGraphicsItem::initialScale() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -461,7 +461,7 @@ void UProbeRegionGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) setGripSize(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::zoomToRegion() { @@ -489,7 +489,7 @@ void UProbeRegionGraphicsItem::zoomToRegion() imageViewScene->updateZoom(this); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) { @@ -540,7 +540,7 @@ void UProbeRegionGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { @@ -556,7 +556,7 @@ void UProbeRegionGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -645,7 +645,7 @@ void UProbeRegionGraphicsItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setColor(const QColor& color) { @@ -655,7 +655,7 @@ void UProbeRegionGraphicsItem::setColor(const QColor& color) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setGripSize() { @@ -671,7 +671,7 @@ void UProbeRegionGraphicsItem::setGripSize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setHeight(double height) { @@ -684,7 +684,7 @@ void UProbeRegionGraphicsItem::setHeight(double height) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setMouseOverPixelCoordModel(CoordinateModel* model) { @@ -709,7 +709,7 @@ void UProbeRegionGraphicsItem::setMouseOverPixelCoordModel(CoordinateModel* mode } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setLightToMicroCoordModel(CoordinateModel* model) { @@ -734,7 +734,7 @@ void UProbeRegionGraphicsItem::setLightToMicroCoordModel(CoordinateModel* model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setSameRect(QRectF& rect) { @@ -747,7 +747,7 @@ void UProbeRegionGraphicsItem::setSameRect(QRectF& rect) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setSize(double size) { @@ -758,7 +758,7 @@ void UProbeRegionGraphicsItem::setSize(double size) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setWidth(double width) { @@ -771,7 +771,7 @@ void UProbeRegionGraphicsItem::setWidth(double width) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setX(double x) { @@ -784,7 +784,7 @@ void UProbeRegionGraphicsItem::setX(double x) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::setY(double y) { @@ -797,7 +797,7 @@ void UProbeRegionGraphicsItem::setY(double y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::updateModel() { @@ -889,7 +889,7 @@ void UProbeRegionGraphicsItem::updateModel() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::updateStringSize() { @@ -958,7 +958,7 @@ int UProbeRegionGraphicsItem::predictFontPixelSizeByScale(qreal scale) { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UProbeRegionGraphicsItem::updateView() { @@ -973,5 +973,5 @@ void UProbeRegionGraphicsItem::updateView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/UProbeRegionGraphicsItem.h b/src/gstar/Annotation/UProbeRegionGraphicsItem.h index 0e10cb0..cfc086d 100644 --- a/src/gstar/Annotation/UProbeRegionGraphicsItem.h +++ b/src/gstar/Annotation/UProbeRegionGraphicsItem.h @@ -6,7 +6,7 @@ #ifndef UPROBEREGIONGRAPHICSITEM_H #define UPROBEREGIONGRAPHICSITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -23,7 +23,7 @@ #include "gstar/AnnotationProperty.h" #include "gstar/CoordinateModel.h" #include "gstar/Annotation/UProbeMarkerGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -418,8 +418,8 @@ class UProbeRegionGraphicsItem : public AbstractGraphicsItem } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationProperty.cpp b/src/gstar/AnnotationProperty.cpp index e7e4e7d..8328041 100644 --- a/src/gstar/AnnotationProperty.cpp +++ b/src/gstar/AnnotationProperty.cpp @@ -7,14 +7,14 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationProperty::AnnotationProperty() : QObject() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationProperty::AnnotationProperty(QString name) : QObject() { @@ -23,7 +23,7 @@ AnnotationProperty::AnnotationProperty(QString name) : QObject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationProperty::AnnotationProperty(QString name, QVariant value) : QObject() { @@ -33,7 +33,7 @@ AnnotationProperty::AnnotationProperty(QString name, QVariant value) : QObject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString AnnotationProperty::getName() const { @@ -42,7 +42,7 @@ QString AnnotationProperty::getName() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AnnotationProperty::getValue() const { @@ -51,7 +51,7 @@ QVariant AnnotationProperty::getValue() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationProperty::setName(const QString name) { @@ -60,7 +60,7 @@ void AnnotationProperty::setName(const QString name) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationProperty::setValue(const QVariant value) { @@ -70,4 +70,4 @@ void AnnotationProperty::setValue(const QVariant value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationProperty.h b/src/gstar/AnnotationProperty.h index d17f87a..589abb2 100644 --- a/src/gstar/AnnotationProperty.h +++ b/src/gstar/AnnotationProperty.h @@ -6,7 +6,7 @@ #ifndef ANNOTATION_PROPERTY_H #define ANNOTATION_PROPERTY_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -91,8 +91,8 @@ class AnnotationProperty : public QObject } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // ANNOTATION_PROPERTY_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationToolBarWidget.cpp b/src/gstar/AnnotationToolBarWidget.cpp index 1da99b5..45aed27 100644 --- a/src/gstar/AnnotationToolBarWidget.cpp +++ b/src/gstar/AnnotationToolBarWidget.cpp @@ -12,7 +12,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationToolBarWidget::AnnotationToolBarWidget(QWidget* parent) : QWidget(parent) @@ -126,7 +126,7 @@ AnnotationToolBarWidget::~AnnotationToolBarWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QWidget* AnnotationToolBarWidget::getToolBar() { @@ -135,7 +135,7 @@ QWidget* AnnotationToolBarWidget::getToolBar() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationToolBarWidget::setActionsEnabled(int state) { @@ -153,4 +153,4 @@ void AnnotationToolBarWidget::setActionsEnabled(int state) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationToolBarWidget.h b/src/gstar/AnnotationToolBarWidget.h index d21aaa5..5440678 100644 --- a/src/gstar/AnnotationToolBarWidget.h +++ b/src/gstar/AnnotationToolBarWidget.h @@ -6,14 +6,14 @@ #ifndef ANNOTATIONTOOLBARWIDGET_H #define ANNOTATIONTOOLBARWIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -138,8 +138,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // ANNOTATIONTOOLBARWIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationTreeModel.cpp b/src/gstar/AnnotationTreeModel.cpp index c7ef175..b1554f4 100644 --- a/src/gstar/AnnotationTreeModel.cpp +++ b/src/gstar/AnnotationTreeModel.cpp @@ -16,7 +16,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationTreeModel::AnnotationTreeModel(QObject* parent) : QAbstractItemModel(parent) { @@ -26,7 +26,7 @@ AnnotationTreeModel::AnnotationTreeModel(QObject* parent) : QAbstractItemModel(p } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AnnotationTreeModel::~AnnotationTreeModel() { @@ -38,7 +38,7 @@ AnnotationTreeModel::~AnnotationTreeModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AnnotationTreeModel::appendNode(AbstractGraphicsItem* item) { @@ -82,7 +82,7 @@ QModelIndex AnnotationTreeModel::appendNode(AbstractGraphicsItem* item) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationTreeModel::calculate() { @@ -91,7 +91,7 @@ void AnnotationTreeModel::calculate() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AnnotationTreeModel::columnCount(const QModelIndex& parent) const { @@ -111,7 +111,7 @@ int AnnotationTreeModel::columnCount(const QModelIndex& parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractGraphicsItem* AnnotationTreeModel::createGroup(AbstractGraphicsItem* item) { @@ -155,7 +155,7 @@ AbstractGraphicsItem* AnnotationTreeModel::createGroup(AbstractGraphicsItem* ite } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AnnotationTreeModel::data(const QModelIndex& index, int role) const { @@ -210,7 +210,7 @@ QVariant AnnotationTreeModel::data(const QModelIndex& index, int role) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AnnotationTreeModel::setData(const QModelIndex& index, const QVariant& value, int role) { @@ -255,7 +255,7 @@ QVariant AnnotationTreeModel::data(const QModelIndex& index, int role) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AnnotationTreeModel::duplicateNode(const QModelIndex& index) { @@ -294,7 +294,7 @@ QModelIndex AnnotationTreeModel::duplicateNode(const QModelIndex& index) return QModelIndex(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags AnnotationTreeModel::flags(const QModelIndex& index) const { @@ -338,7 +338,7 @@ Qt::ItemFlags AnnotationTreeModel::flags(const QModelIndex& index) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AnnotationTreeModel::headerData(int section, Qt::Orientation orientation, @@ -377,7 +377,7 @@ QVariant AnnotationTreeModel::headerData(int section, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AnnotationTreeModel::index(int row, int column, @@ -426,7 +426,7 @@ QModelIndex AnnotationTreeModel::index(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AnnotationTreeModel::insertRows(int row, int count, @@ -454,14 +454,14 @@ bool AnnotationTreeModel::insertRows(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AnnotationTreeModel::getRootModelIndex()const { return createIndex(0, 0, m_root); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AnnotationTreeModel::parent(const QModelIndex& index)const { @@ -494,7 +494,7 @@ QModelIndex AnnotationTreeModel::parent(const QModelIndex& index)const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationTreeModel::recursiveCalculate(AbstractGraphicsItem* pItem) { @@ -507,7 +507,7 @@ void AnnotationTreeModel::recursiveCalculate(AbstractGraphicsItem* pItem) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationTreeModel::refreshModel(AbstractGraphicsItem* item) { @@ -518,7 +518,7 @@ void AnnotationTreeModel::refreshModel(AbstractGraphicsItem* item) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AnnotationTreeModel::clearAll() { @@ -531,7 +531,7 @@ void AnnotationTreeModel::clearAll() m_groupsCnt.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AnnotationTreeModel::removeRow(int row, const QModelIndex& parent) @@ -631,7 +631,7 @@ bool AnnotationTreeModel::removeRow(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AnnotationTreeModel::removeRows(int row, int count, @@ -669,7 +669,7 @@ bool AnnotationTreeModel::removeRows(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AnnotationTreeModel::rowCount(const QModelIndex& parent) const { @@ -691,5 +691,5 @@ int AnnotationTreeModel::rowCount(const QModelIndex& parent) const } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/src/gstar/AnnotationTreeModel.h b/src/gstar/AnnotationTreeModel.h index a593970..4cca82f 100644 --- a/src/gstar/AnnotationTreeModel.h +++ b/src/gstar/AnnotationTreeModel.h @@ -6,14 +6,14 @@ #ifndef ANNOTATION_TREE_MODEL_H #define ANNOTATION_TREE_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include "gstar/Annotation/AbstractGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -232,8 +232,8 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // ANNOTATION_TREE_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CheckBoxDelegate.cpp b/src/gstar/CheckBoxDelegate.cpp index 15b2b0c..bac4cb1 100644 --- a/src/gstar/CheckBoxDelegate.cpp +++ b/src/gstar/CheckBoxDelegate.cpp @@ -10,7 +10,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CheckBoxDelegate::CheckBoxDelegate(QObject* parent) : QStyledItemDelegate(parent) @@ -18,7 +18,7 @@ CheckBoxDelegate::CheckBoxDelegate(QObject* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRect CheckBoxDelegate::checkBoxRect(const QStyleOptionViewItem& itemStyleOptions) @@ -40,7 +40,7 @@ QRect CheckBoxDelegate::checkBoxRect(const QStyleOptionViewItem& } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CheckBoxDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, @@ -87,7 +87,7 @@ bool CheckBoxDelegate::editorEvent(QEvent* event, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CheckBoxDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, @@ -121,4 +121,4 @@ void CheckBoxDelegate::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CheckBoxDelegate.h b/src/gstar/CheckBoxDelegate.h index b26316b..e691b5f 100644 --- a/src/gstar/CheckBoxDelegate.h +++ b/src/gstar/CheckBoxDelegate.h @@ -6,12 +6,12 @@ #ifndef GSTAR_CHECK_BOX_DELEGATE_H #define GSTAR_CHECK_BOX_DELEGATE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -62,8 +62,8 @@ class CheckBoxDelegate } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ContrastDialog.cpp b/src/gstar/ContrastDialog.cpp index fd64c08..e95091e 100644 --- a/src/gstar/ContrastDialog.cpp +++ b/src/gstar/ContrastDialog.cpp @@ -6,7 +6,7 @@ #include "gstar/ContrastDialog.h" using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ContrastDialog::ContrastDialog(QWidget* parent) : QDialog(parent) { @@ -39,7 +39,7 @@ ContrastDialog::ContrastDialog(QWidget* parent) : QDialog(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ContrastDialog::~ContrastDialog() { @@ -71,7 +71,7 @@ void ContrastDialog::set_array(const data_struct::ArrayXXr* arr) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ContrastDialog::min_max_updated() { @@ -82,7 +82,7 @@ void ContrastDialog::min_max_updated() emit on_min_max_update(minCoef, maxCoef); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ContrastDialog::on_accepted() { @@ -91,7 +91,7 @@ void ContrastDialog::on_accepted() accept(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ContrastDialog::on_rejected() { @@ -99,4 +99,4 @@ void ContrastDialog::on_rejected() close(); } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/gstar/ContrastDialog.h b/src/gstar/ContrastDialog.h index eb47d66..e2dc288 100644 --- a/src/gstar/ContrastDialog.h +++ b/src/gstar/ContrastDialog.h @@ -6,7 +6,7 @@ #ifndef ContrastDialog_H_ #define ContrastDialog_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include "gstar/HistogramPlot.h" #include "gstar/MinMaxSlider.h" #include "data_struct/fit_parameters.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -59,7 +59,7 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* _H_ */ diff --git a/src/gstar/CoordinateModel.cpp b/src/gstar/CoordinateModel.cpp index 6e593f3..be4ba01 100644 --- a/src/gstar/CoordinateModel.cpp +++ b/src/gstar/CoordinateModel.cpp @@ -8,14 +8,14 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateModel::CoordinateModel() : QObject(0) { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateModel::CoordinateModel(ITransformer *transformer) : QObject(0) { @@ -24,7 +24,7 @@ CoordinateModel::CoordinateModel(ITransformer *transformer) : QObject(0) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateModel::~CoordinateModel() { @@ -37,7 +37,7 @@ CoordinateModel::~CoordinateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ITransformer* CoordinateModel::getTransformer() { @@ -46,7 +46,7 @@ ITransformer* CoordinateModel::getTransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CoordinateModel::getTransformerVariable(QString name, double *val) { @@ -60,7 +60,7 @@ bool CoordinateModel::getTransformerVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CoordinateModel::setTransformerVariable(QString name, double val) { @@ -78,7 +78,7 @@ bool CoordinateModel::setTransformerVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateModel::setTransformer(ITransformer *transformer) { @@ -87,7 +87,7 @@ void CoordinateModel::setTransformer(ITransformer *transformer) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateModel::setTransformerPrecision(int number) { @@ -96,7 +96,7 @@ void CoordinateModel::setTransformerPrecision(int number) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateModel::runTransformer(double inX, double inY, @@ -117,4 +117,4 @@ void CoordinateModel::runTransformer(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CoordinateModel.h b/src/gstar/CoordinateModel.h index 377b6a6..4526d9e 100644 --- a/src/gstar/CoordinateModel.h +++ b/src/gstar/CoordinateModel.h @@ -6,18 +6,18 @@ #ifndef GSTAR_COORDINATE_MODEL_H #define GSTAR_COORDINATE_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { class ITransformer; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { diff --git a/src/gstar/CoordinateWidget.cpp b/src/gstar/CoordinateWidget.cpp index c476ae6..19cee28 100644 --- a/src/gstar/CoordinateWidget.cpp +++ b/src/gstar/CoordinateWidget.cpp @@ -6,7 +6,7 @@ #include "gstar/CoordinateWidget.h" using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateWidget::CoordinateWidget(bool vertical, QWidget* parent) : QWidget(parent) @@ -88,14 +88,14 @@ CoordinateWidget::CoordinateWidget(bool vertical, QWidget* parent) // m_decimalPreci = 2; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateWidget::~CoordinateWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setLabel(QString xLabel, QString yLabel) { @@ -105,7 +105,7 @@ void CoordinateWidget::setLabel(QString xLabel, QString yLabel) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setLabel(QString xLabel, QString yLabel, QString zLabel) { @@ -116,7 +116,7 @@ void CoordinateWidget::setLabel(QString xLabel, QString yLabel, QString zLabel) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setVisible(bool xVisible, bool yVisible, bool zVisible) { @@ -136,7 +136,7 @@ void CoordinateWidget::setVisible(bool xVisible, bool yVisible, bool zVisible) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setCoordinate(int x, int y) { @@ -159,7 +159,7 @@ void CoordinateWidget::setCoordinate(int x, int y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setCoordinate(double x, double y, double z) { @@ -183,7 +183,7 @@ void CoordinateWidget::setCoordinate(double x, double y, double z) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setModel(CoordinateModel* model) { @@ -192,7 +192,7 @@ void CoordinateWidget::setModel(CoordinateModel* model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setnullptr() { @@ -203,7 +203,7 @@ void CoordinateWidget::setnullptr() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CoordinateWidget::setUnitsLabel(QString units) { @@ -214,6 +214,6 @@ void CoordinateWidget::setUnitsLabel(QString units) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CoordinateWidget.h b/src/gstar/CoordinateWidget.h index 9383d29..797b181 100644 --- a/src/gstar/CoordinateWidget.h +++ b/src/gstar/CoordinateWidget.h @@ -6,7 +6,7 @@ #ifndef COORDINATEWIDGET_H_ #define COORDINATEWIDGET_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include "gstar/CoordinateModel.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The RangeWidget class provides a Qt range widget, similar to a @@ -162,7 +162,7 @@ namespace gstar } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RANGEWIDGET_H_ */ diff --git a/src/gstar/CountsLookupTransformer.cpp b/src/gstar/CountsLookupTransformer.cpp index 84bd981..831b958 100644 --- a/src/gstar/CountsLookupTransformer.cpp +++ b/src/gstar/CountsLookupTransformer.cpp @@ -8,13 +8,13 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define STR_COUNTS "Counts" #define STR_MIN_COUNTS "Min Counts" #define STR_MAX_COUNTS "Max Counts" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CountsLookupTransformer::CountsLookupTransformer() : ITransformer() { @@ -27,14 +27,14 @@ CountsLookupTransformer::CountsLookupTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CountsLookupTransformer::~CountsLookupTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsLookupTransformer::Init(QMap globalVars) { @@ -43,7 +43,7 @@ bool CountsLookupTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap CountsLookupTransformer::getAllCoef() { @@ -58,7 +58,7 @@ QMap CountsLookupTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CountsLookupTransformer::setCounts(const data_struct::ArrayXXr& counts) { @@ -69,7 +69,7 @@ void CountsLookupTransformer::setCounts(const data_struct::ArrayXXr& coun _cols = _counts_arr.cols(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsLookupTransformer::getVariable(QString name, double *val) { @@ -94,7 +94,7 @@ bool CountsLookupTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsLookupTransformer::setVariable(QString name, double val) { @@ -119,7 +119,7 @@ bool CountsLookupTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CountsLookupTransformer::transformCommand(double inX, double inY, @@ -144,4 +144,4 @@ void CountsLookupTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CountsLookupTransformer.h b/src/gstar/CountsLookupTransformer.h index f3af185..4340195 100644 --- a/src/gstar/CountsLookupTransformer.h +++ b/src/gstar/CountsLookupTransformer.h @@ -6,14 +6,14 @@ #ifndef COUNTS_LOOKUP_TRANSFORMER_H #define COUNTS_LOOKUP_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/ITransformer.h" #include "mvc/MapsH5Model.h" #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -99,8 +99,8 @@ class CountsLookupTransformer : public ITransformer }; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CountsStatsTransformer.cpp b/src/gstar/CountsStatsTransformer.cpp index 8c6d2c6..86485e7 100644 --- a/src/gstar/CountsStatsTransformer.cpp +++ b/src/gstar/CountsStatsTransformer.cpp @@ -8,13 +8,13 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define STR_AVG "Avg" #define STR_MEADIAN "Median" #define STR_STDEV "StDev" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CountsStatsTransformer::CountsStatsTransformer() : ITransformer() { @@ -25,14 +25,14 @@ CountsStatsTransformer::CountsStatsTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CountsStatsTransformer::~CountsStatsTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsStatsTransformer::Init(QMap globalVars) { @@ -41,7 +41,7 @@ bool CountsStatsTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap CountsStatsTransformer::getAllCoef() { @@ -56,7 +56,7 @@ QMap CountsStatsTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CountsStatsTransformer::setCounts(const data_struct::ArrayXXr& counts) { @@ -80,7 +80,7 @@ void CountsStatsTransformer::setCounts(const data_struct::ArrayXXr& count _median = cnts(idx); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsStatsTransformer::getVariable(QString name, double *val) { @@ -105,7 +105,7 @@ bool CountsStatsTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool CountsStatsTransformer::setVariable(QString name, double val) { @@ -130,7 +130,7 @@ bool CountsStatsTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void CountsStatsTransformer::transformCommand(double inX, double inY, @@ -145,4 +145,4 @@ void CountsStatsTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/CountsStatsTransformer.h b/src/gstar/CountsStatsTransformer.h index 561a2fa..d001d5a 100644 --- a/src/gstar/CountsStatsTransformer.h +++ b/src/gstar/CountsStatsTransformer.h @@ -6,14 +6,14 @@ #ifndef COUNTS_STATS_TRANSFORMER_H #define COUNTS_STATS_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/ITransformer.h" #include "mvc/MapsH5Model.h" #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -91,8 +91,8 @@ class CountsStatsTransformer : public ITransformer }; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/GStarResource.h b/src/gstar/GStarResource.h index 67dfaf3..a0287dd 100644 --- a/src/gstar/GStarResource.h +++ b/src/gstar/GStarResource.h @@ -6,11 +6,11 @@ #ifndef GSTAR_RESOURCE_H #define GSTAR_RESOURCE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The GStar resource namespace @@ -112,8 +112,8 @@ namespace gstar { }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/HistogramPlot.cpp b/src/gstar/HistogramPlot.cpp index 1bae225..64c8d1c 100644 --- a/src/gstar/HistogramPlot.cpp +++ b/src/gstar/HistogramPlot.cpp @@ -10,7 +10,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- HistogramPlot::HistogramPlot(QWidget* parent) { @@ -32,7 +32,7 @@ HistogramPlot::HistogramPlot(QWidget* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- HistogramPlot::~HistogramPlot() { @@ -40,7 +40,7 @@ HistogramPlot::~HistogramPlot() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool HistogramPlot::eventFilter(QObject* source, QEvent* event) { @@ -76,7 +76,7 @@ bool HistogramPlot::eventFilter(QObject* source, QEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HistogramPlot::drawHistogram() { @@ -118,7 +118,7 @@ void HistogramPlot::drawHistogram() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- qreal HistogramPlot::ymap(const qreal& value) { @@ -138,7 +138,7 @@ qreal HistogramPlot::ymap(const qreal& value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HistogramPlot::updatePoints(const data_struct::ArrayTr& pts) { @@ -166,7 +166,7 @@ void HistogramPlot::updatePoints(const data_struct::ArrayTr& pts) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void HistogramPlot::set_min_max_lines(qreal minCoef, qreal maxCoef) { @@ -177,4 +177,4 @@ void HistogramPlot::set_min_max_lines(qreal minCoef, qreal maxCoef) } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/gstar/HistogramPlot.h b/src/gstar/HistogramPlot.h index 9964570..622f106 100644 --- a/src/gstar/HistogramPlot.h +++ b/src/gstar/HistogramPlot.h @@ -6,12 +6,12 @@ #ifndef GSTAR_HISTOGRAM_PLOT_H #define GSTAR_HISTOGRAM_PLOT_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include "data_struct/spectra.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { diff --git a/src/gstar/ITransformer.cpp b/src/gstar/ITransformer.cpp index ea2ea89..c729970 100644 --- a/src/gstar/ITransformer.cpp +++ b/src/gstar/ITransformer.cpp @@ -7,21 +7,21 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ITransformer::ITransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ITransformer::~ITransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ITransformer::setDecimalPrecision(int number) { @@ -30,7 +30,7 @@ void ITransformer::setDecimalPrecision(int number) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ITransformer::getResultWithPrecision(double* outX, double* outY, double* outZ) { @@ -41,4 +41,4 @@ void ITransformer::getResultWithPrecision(double* outX, double* outY, double* ou } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ITransformer.h b/src/gstar/ITransformer.h index e3a3671..f7bef3f 100644 --- a/src/gstar/ITransformer.h +++ b/src/gstar/ITransformer.h @@ -9,7 +9,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -102,8 +102,8 @@ class ITransformer }; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ImageViewScene.cpp b/src/gstar/ImageViewScene.cpp index a0ec12a..e8e8022 100644 --- a/src/gstar/ImageViewScene.cpp +++ b/src/gstar/ImageViewScene.cpp @@ -16,7 +16,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewScene::ImageViewScene(QWidget* parent) : QGraphicsScene(parent) { @@ -48,14 +48,14 @@ ImageViewScene::ImageViewScene(QWidget* parent) : QGraphicsScene(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewScene::~ImageViewScene() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::addAnnotationsFromModel() { @@ -93,7 +93,7 @@ void ImageViewScene::addAnnotationsFromModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QAbstractItemModel* ImageViewScene::getModel() const { @@ -102,7 +102,7 @@ const QAbstractItemModel* ImageViewScene::getModel() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString ImageViewScene::getUnitsLabel() const { @@ -111,7 +111,7 @@ const QString ImageViewScene::getUnitsLabel() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double ImageViewScene::getUnitsPerPixelX() const { @@ -120,7 +120,7 @@ double ImageViewScene::getUnitsPerPixelX() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double ImageViewScene::getUnitsPerPixelY() const { @@ -129,7 +129,7 @@ double ImageViewScene::getUnitsPerPixelY() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::modelRowsInserted(const QModelIndex& parent, int start, @@ -174,7 +174,7 @@ void ImageViewScene::modelRowsInserted(const QModelIndex& parent, } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::modelRowsRemoved(const QModelIndex& parent, int start, int end) { @@ -221,7 +221,7 @@ void ImageViewScene::modelRowsRemoved(const QModelIndex& parent, int start, int } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::enableAnnotations(bool state) { @@ -261,7 +261,7 @@ void ImageViewScene::enableAnnotations(bool state) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void ImageViewScene::lockROIs(bool state) { @@ -279,7 +279,7 @@ void ImageViewScene::lockROIs(bool state) } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::modelSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected) @@ -332,7 +332,7 @@ void ImageViewScene::modelSelectionChanged(const QItemSelection& selected, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -381,7 +381,7 @@ void ImageViewScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::mousePressEvent(QGraphicsSceneMouseEvent* event) { @@ -420,14 +420,14 @@ void ImageViewScene::mousePressEvent(QGraphicsSceneMouseEvent* event) emit onMousePressEvent(event); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::updateZoom(QGraphicsItem* zoomObject) { emit zoomIn(zoomObject); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { @@ -446,7 +446,7 @@ void ImageViewScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) emit onMouseReleaseEvent(event); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF ImageViewScene::pixRect() { @@ -455,7 +455,7 @@ QRectF ImageViewScene::pixRect() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::recursiveAddAnnotation(AbstractGraphicsItem* item) { @@ -480,7 +480,7 @@ void ImageViewScene::recursiveAddAnnotation(AbstractGraphicsItem* item) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::recursiveSetEnabled(AbstractGraphicsItem* item, bool state) { @@ -494,7 +494,7 @@ void ImageViewScene::recursiveSetEnabled(AbstractGraphicsItem* item, bool state) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::removeAllAnnotationItems() { @@ -508,7 +508,7 @@ void ImageViewScene::removeAllAnnotationItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::removeAllGraphicsItems() { @@ -521,7 +521,7 @@ void ImageViewScene::removeAllGraphicsItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::sceneSelectionChanged() { @@ -587,7 +587,7 @@ void ImageViewScene::sceneSelectionChanged() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setPixmap(QPixmap p) { @@ -621,7 +621,7 @@ void ImageViewScene::setPixmap(QPixmap p) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setMode(Mode mode) { @@ -631,7 +631,7 @@ void ImageViewScene::setMode(Mode mode) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setModel(QAbstractItemModel* model, bool is_multi_scene) { @@ -672,7 +672,7 @@ void ImageViewScene::setModel(QAbstractItemModel* model, bool is_multi_scene) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setSelectionModel(QItemSelectionModel* selectionModel) { @@ -703,7 +703,7 @@ void ImageViewScene::setSelectionModel(QItemSelectionModel* selectionModel) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setUnitsLabel(QString label) { @@ -712,7 +712,7 @@ void ImageViewScene::setUnitsLabel(QString label) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setUnitsPerPixelX(double x) { @@ -721,7 +721,7 @@ void ImageViewScene::setUnitsPerPixelX(double x) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setUnitsPerPixelY(double y) { @@ -730,7 +730,7 @@ void ImageViewScene::setUnitsPerPixelY(double y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setZoomModeToFit() { @@ -739,7 +739,7 @@ void ImageViewScene::setZoomModeToFit() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setZoomModeToNone() { @@ -748,7 +748,7 @@ void ImageViewScene::setZoomModeToNone() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setZoomModeToZoomIn() { @@ -757,7 +757,7 @@ void ImageViewScene::setZoomModeToZoomIn() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::setZoomModeToZoomOut() { @@ -766,7 +766,7 @@ void ImageViewScene::setZoomModeToZoomOut() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewScene::updateModel() { @@ -779,7 +779,7 @@ void ImageViewScene::updateModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void ImageViewScene::updateROIs() { @@ -814,4 +814,4 @@ void ImageViewScene::updateROIs() } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ImageViewScene.h b/src/gstar/ImageViewScene.h index 69e2ac6..e655962 100644 --- a/src/gstar/ImageViewScene.h +++ b/src/gstar/ImageViewScene.h @@ -6,7 +6,7 @@ #ifndef GSTAR_IMAGE_VIEW_SCENE_H #define GSTAR_IMAGE_VIEW_SCENE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -17,7 +17,7 @@ #include #include "gstar/Annotation/AbstractGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -344,8 +344,8 @@ private slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ImageViewToolBar.cpp b/src/gstar/ImageViewToolBar.cpp index 11b9ec5..8715a50 100644 --- a/src/gstar/ImageViewToolBar.cpp +++ b/src/gstar/ImageViewToolBar.cpp @@ -13,7 +13,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewToolBar::ImageViewToolBar(ImageViewWidget* widget) { @@ -98,7 +98,7 @@ ImageViewToolBar::ImageViewToolBar(ImageViewWidget* widget) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewToolBar::~ImageViewToolBar() { @@ -111,7 +111,7 @@ ImageViewToolBar::~ImageViewToolBar() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::appendImageViewWidget(ImageViewWidget* widget) { @@ -121,14 +121,14 @@ void ImageViewToolBar::appendImageViewWidget(ImageViewWidget* widget) itr->setZoomPercentWidget(m_zoomPercent); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clearImageViewWidgets() { m_imageWidget.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clickCursor() { @@ -138,7 +138,7 @@ void ImageViewToolBar::clickCursor() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clickZoomIn() { @@ -147,7 +147,7 @@ void ImageViewToolBar::clickZoomIn() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::resetZoomToolBar() { @@ -157,7 +157,7 @@ void ImageViewToolBar::resetZoomToolBar() m_cursorAction->setChecked(true); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clickFill() { @@ -179,7 +179,7 @@ void ImageViewToolBar::clickFill() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clickZoomOriginal() { @@ -189,7 +189,7 @@ void ImageViewToolBar::clickZoomOriginal() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewToolBar::clickZoomOut() { @@ -199,7 +199,7 @@ void ImageViewToolBar::clickZoomOut() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QToolBar* ImageViewToolBar::getToolBar() { @@ -208,4 +208,4 @@ QToolBar* ImageViewToolBar::getToolBar() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/ImageViewToolBar.h b/src/gstar/ImageViewToolBar.h index acca105..eb4ef05 100644 --- a/src/gstar/ImageViewToolBar.h +++ b/src/gstar/ImageViewToolBar.h @@ -6,7 +6,7 @@ #ifndef GSTAR_IMAGE_VIEW_TOOL_BAR_H #define GSTAR_IMAGE_VIEW_TOOL_BAR_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -15,7 +15,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { diff --git a/src/gstar/ImageViewWidget.cpp b/src/gstar/ImageViewWidget.cpp index f78d391..43eca22 100644 --- a/src/gstar/ImageViewWidget.cpp +++ b/src/gstar/ImageViewWidget.cpp @@ -7,7 +7,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewWidget::ImageViewWidget(int rows, int cols , QWidget* parent) : QWidget(parent), m_fillState(false) @@ -34,7 +34,7 @@ ImageViewWidget::ImageViewWidget(int rows, int cols , QWidget* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewWidget::~ImageViewWidget() { @@ -43,7 +43,7 @@ ImageViewWidget::~ImageViewWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool ImageViewWidget::getMouseLeaveState() { @@ -52,7 +52,7 @@ bool ImageViewWidget::getMouseLeaveState() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setGlobalContrast(bool val) { @@ -62,7 +62,7 @@ void ImageViewWidget::setGlobalContrast(bool val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clickCursor() { @@ -76,7 +76,7 @@ void ImageViewWidget::clickCursor() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::customCursor(QCursor cursor) { @@ -86,14 +86,14 @@ void ImageViewWidget::customCursor(QCursor cursor) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setCoordsVisible(bool val) { m_coordWidget->setVisible(val, val, val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSelectorVisible(bool val) { @@ -103,7 +103,7 @@ void ImageViewWidget::setSelectorVisible(bool val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setCountsVisible(bool val) { @@ -113,7 +113,7 @@ void ImageViewWidget::setCountsVisible(bool val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clickFill(bool checked) { @@ -142,7 +142,7 @@ void ImageViewWidget::clickFill(bool checked) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clickZoomIn() { @@ -155,7 +155,7 @@ void ImageViewWidget::clickZoomIn() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clickZoomOriginal() { @@ -172,7 +172,7 @@ void ImageViewWidget::clickZoomOriginal() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clickZoomOut() { @@ -186,7 +186,7 @@ void ImageViewWidget::clickZoomOut() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::createLayout() { @@ -216,7 +216,7 @@ void ImageViewWidget::createLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::createSceneAndView(int rows, int cols) { @@ -267,7 +267,7 @@ QImage ImageViewWidget::generate_img(ArrayXXr& int_img, QVector& co return image; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::redrawSubWindows() { @@ -277,7 +277,7 @@ void ImageViewWidget::redrawSubWindows() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setUnitLabel(int idx, QString label) { @@ -288,7 +288,7 @@ void ImageViewWidget::setUnitLabel(int idx, QString label) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setUnitLabels(QString label) { @@ -299,7 +299,7 @@ void ImageViewWidget::setUnitLabels(QString label) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::newGridLayout(int rows, int cols) { @@ -323,7 +323,7 @@ void ImageViewWidget::newGridLayout(int rows, int cols) createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- CoordinateWidget* ImageViewWidget::coordinateWidget() { @@ -332,7 +332,7 @@ CoordinateWidget* ImageViewWidget::coordinateWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::enterEvent(QEvent * event) { @@ -342,7 +342,7 @@ void ImageViewWidget::enterEvent(QEvent * event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::onComboBoxChange(QString lbl) { @@ -357,7 +357,7 @@ void ImageViewWidget::onComboBoxChange(QString lbl) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::clearLabels() { @@ -367,7 +367,7 @@ void ImageViewWidget::clearLabels() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::addLabel(QString lbl) { @@ -377,7 +377,7 @@ void ImageViewWidget::addLabel(QString lbl) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- qreal ImageViewWidget::getCurrentZoomPercent() { @@ -392,7 +392,7 @@ qreal ImageViewWidget::getCurrentZoomPercent() return wp; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPointF ImageViewWidget::getCenterPoint() const { @@ -405,7 +405,7 @@ QPointF ImageViewWidget::getCenterPoint() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::leaveEvent(QEvent * event) { @@ -425,7 +425,7 @@ void ImageViewWidget::leaveEvent(QEvent * event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setCoordinateModel(CoordinateModel* model) { @@ -434,7 +434,7 @@ void ImageViewWidget::setCoordinateModel(CoordinateModel* model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::onMouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -448,7 +448,7 @@ void ImageViewWidget::onMouseMoveEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::resizeEvent(QResizeEvent* event) { @@ -473,7 +473,7 @@ void ImageViewWidget::resizeEvent(QResizeEvent* event) update(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageViewScene* ImageViewWidget::scene(int grid_idx) { @@ -487,7 +487,7 @@ ImageViewScene* ImageViewWidget::scene(int grid_idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneModel(QAbstractItemModel* model) { @@ -498,7 +498,7 @@ void ImageViewWidget::setSceneModel(QAbstractItemModel* model) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneSelectionModel(QItemSelectionModel* selectionModel) { @@ -508,7 +508,7 @@ void ImageViewWidget::setSceneSelectionModel(QItemSelectionModel* selectionModel } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneModelAndSelection(QAbstractItemModel* model, QItemSelectionModel* selectionModel) { @@ -520,7 +520,7 @@ void ImageViewWidget::setSceneModelAndSelection(QAbstractItemModel* model, QItem } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::sceneEnableAnnotations(bool state) { @@ -530,7 +530,7 @@ void ImageViewWidget::sceneEnableAnnotations(bool state) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneUnitsLabel(QString label) { @@ -540,7 +540,7 @@ void ImageViewWidget::setSceneUnitsLabel(QString label) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneUnitsPerPixelX(double val) { @@ -550,7 +550,7 @@ void ImageViewWidget::setSceneUnitsPerPixelX(double val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setSceneUnitsPerPixelY(double val) { @@ -560,7 +560,7 @@ void ImageViewWidget::setSceneUnitsPerPixelY(double val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::sceneUpdateModel() { @@ -570,7 +570,7 @@ void ImageViewWidget::sceneUpdateModel() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setScenetPixmap(QPixmap p) { @@ -580,7 +580,7 @@ void ImageViewWidget::setScenetPixmap(QPixmap p) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::sceneRectUpdated(const QRectF& rect) { @@ -592,7 +592,7 @@ void ImageViewWidget::sceneRectUpdated(const QRectF& rect) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::setZoomPercentWidget(QComboBox* zoomPercent) { @@ -603,7 +603,7 @@ void ImageViewWidget::setZoomPercentWidget(QComboBox* zoomPercent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::updateZoomPercentage() { @@ -620,7 +620,7 @@ void ImageViewWidget::updateZoomPercentage() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QGraphicsView* ImageViewWidget::view() { @@ -634,7 +634,7 @@ QGraphicsView* ImageViewWidget::view() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::zoomIn(QGraphicsItem* zoomObject) { @@ -653,7 +653,7 @@ void ImageViewWidget::zoomIn(QGraphicsItem* zoomObject) emit resetZoomToolBar(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::zoomIn(QRectF zoomRect, QGraphicsSceneMouseEvent* event) { @@ -712,7 +712,7 @@ void ImageViewWidget::zoomIn(QRectF zoomRect, QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::zoomOut() { @@ -732,7 +732,7 @@ void ImageViewWidget::zoomOut() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::zoomValueChanged(int val) { @@ -764,7 +764,7 @@ void ImageViewWidget::zoomValueChanged(int val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString ImageViewWidget::getLabelAt(int idx) { @@ -775,7 +775,7 @@ QString ImageViewWidget::getLabelAt(int idx) return QString(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::getMouseTrasnformAt(int idx, CountsLookupTransformer** counts_lookup, CountsStatsTransformer** counts_stats) { @@ -786,7 +786,7 @@ QString ImageViewWidget::getLabelAt(int idx) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector ImageViewWidget::getLabelList() { @@ -798,7 +798,7 @@ std::vector ImageViewWidget::getLabelList() return label_list; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::restoreLabels(const std::vector& labels) { @@ -832,7 +832,7 @@ void ImageViewWidget::restoreLabels(const std::vector& labels) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::resetCoordsToZero() { @@ -844,7 +844,7 @@ void ImageViewWidget::resetCoordsToZero() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageViewWidget::getMinMaxAt(int grid_idx, float &counts_min, float &counts_max) { @@ -858,4 +858,4 @@ void ImageViewWidget::getMinMaxAt(int grid_idx, float &counts_min, float &counts } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/gstar/ImageViewWidget.h b/src/gstar/ImageViewWidget.h index 1c166d8..e243c6b 100644 --- a/src/gstar/ImageViewWidget.h +++ b/src/gstar/ImageViewWidget.h @@ -6,7 +6,7 @@ #ifndef GSTAR_IMAGE_VIEW_WIDGET_H #define GSTAR_IMAGE_VIEW_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/CoordinateWidget.h" #include "gstar/ImageViewScene.h" @@ -31,8 +31,8 @@ #include "gstar/SubImageWindow.h" -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- namespace gstar { @@ -407,8 +407,8 @@ private slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/LinearTransformer.cpp b/src/gstar/LinearTransformer.cpp index 22ccf9d..cbbb277 100644 --- a/src/gstar/LinearTransformer.cpp +++ b/src/gstar/LinearTransformer.cpp @@ -8,7 +8,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define STR_SCALE_X "ScaleX" #define STR_SCALE_Y "ScaleY" @@ -20,7 +20,7 @@ using namespace gstar; #define STR_DIVIDER_Y "DividerY" #define STR_DIVIDER_Z "DividerZ" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LinearTransformer::LinearTransformer() : ITransformer() { @@ -37,14 +37,14 @@ LinearTransformer::LinearTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LinearTransformer::~LinearTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearTransformer::Init(QMap globalVars) { @@ -54,7 +54,7 @@ bool LinearTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap LinearTransformer::getAllCoef() { @@ -75,7 +75,7 @@ QMap LinearTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double LinearTransformer::getScaleX() { @@ -84,7 +84,7 @@ double LinearTransformer::getScaleX() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double LinearTransformer::getScaleY() { @@ -93,7 +93,7 @@ double LinearTransformer::getScaleY() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double LinearTransformer::getScaleZ() { @@ -102,7 +102,7 @@ double LinearTransformer::getScaleZ() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double LinearTransformer::getTopLeftX() { @@ -111,7 +111,7 @@ double LinearTransformer::getTopLeftX() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double LinearTransformer::getTopLeftY() { @@ -120,7 +120,7 @@ double LinearTransformer::getTopLeftY() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearTransformer::getVariable(QString name, double *val) { @@ -175,7 +175,7 @@ bool LinearTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setDivider(double dx, double dy, double dz) { @@ -186,7 +186,7 @@ void LinearTransformer::setDivider(double dx, double dy, double dz) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setScale(double x, double y, double z) { @@ -197,7 +197,7 @@ void LinearTransformer::setScale(double x, double y, double z) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setScaleX(double x) { @@ -206,7 +206,7 @@ void LinearTransformer::setScaleX(double x) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setScaleY(double y) { @@ -215,7 +215,7 @@ void LinearTransformer::setScaleY(double y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setScaleZ(double z) { @@ -225,7 +225,7 @@ void LinearTransformer::setScaleZ(double z) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::setTopLeft(double x, double y) { @@ -235,7 +235,7 @@ void LinearTransformer::setTopLeft(double x, double y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearTransformer::setVariable(QString name, double val) { @@ -290,7 +290,7 @@ bool LinearTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearTransformer::transformCommand(double inX, double inY, @@ -306,4 +306,4 @@ void LinearTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/LinearTransformer.h b/src/gstar/LinearTransformer.h index 4c10600..f835a00 100644 --- a/src/gstar/LinearTransformer.h +++ b/src/gstar/LinearTransformer.h @@ -6,13 +6,13 @@ #ifndef LINEAR_TRANSFORMER_H #define LINEAR_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/ITransformer.h" #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -200,8 +200,8 @@ class LinearTransformer : public ITransformer }; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/MinMaxSlider.cpp b/src/gstar/MinMaxSlider.cpp index e3fc512..ad96e0d 100644 --- a/src/gstar/MinMaxSlider.cpp +++ b/src/gstar/MinMaxSlider.cpp @@ -8,7 +8,7 @@ #include using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MinMaxSlider::MinMaxSlider(bool is_glob, QWidget* parent) : QWidget(parent) @@ -84,14 +84,14 @@ MinMaxSlider::MinMaxSlider(bool is_glob, QWidget* parent) setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MinMaxSlider::~MinMaxSlider() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MinMaxSlider::setMinMax(float min, float max) { @@ -133,7 +133,7 @@ void MinMaxSlider::setMinMax(float min, float max) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MinMaxSlider::min_slider_changed(int val) { @@ -156,7 +156,7 @@ void MinMaxSlider::min_slider_changed(int val) emit min_max_val_changed(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MinMaxSlider::max_slider_changed(int val) { @@ -179,7 +179,7 @@ void MinMaxSlider::max_slider_changed(int val) emit min_max_val_changed(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MinMaxSlider::min_lineedit_changed() { @@ -207,7 +207,7 @@ void MinMaxSlider::min_lineedit_changed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MinMaxSlider::max_lineedit_changed() { @@ -236,7 +236,7 @@ void MinMaxSlider::max_lineedit_changed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- float MinMaxSlider::getUserMin() { @@ -249,7 +249,7 @@ float MinMaxSlider::getUserMin() return _min_slider->value(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- float MinMaxSlider::getUserMax() { diff --git a/src/gstar/MinMaxSlider.h b/src/gstar/MinMaxSlider.h index 5e7985e..a1f1e0c 100644 --- a/src/gstar/MinMaxSlider.h +++ b/src/gstar/MinMaxSlider.h @@ -6,7 +6,7 @@ #ifndef MinMaxSlider_H_ #define MinMaxSlider_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -16,7 +16,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -72,7 +72,7 @@ public slots: } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RANGEWIDGET_H_ */ diff --git a/src/gstar/MotorLookupTransformer.cpp b/src/gstar/MotorLookupTransformer.cpp index 5842ad1..8692be0 100644 --- a/src/gstar/MotorLookupTransformer.cpp +++ b/src/gstar/MotorLookupTransformer.cpp @@ -8,12 +8,12 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define STR_MOTOR_X "X" #define STR_MOTOR_Y "Y" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MotorLookupTransformer::MotorLookupTransformer() : ITransformer() { @@ -25,14 +25,14 @@ MotorLookupTransformer::MotorLookupTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MotorLookupTransformer::~MotorLookupTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MotorLookupTransformer::Init(QMap globalVars) { @@ -41,7 +41,7 @@ bool MotorLookupTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap MotorLookupTransformer::getAllCoef() { @@ -55,7 +55,7 @@ QMap MotorLookupTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MotorLookupTransformer::setMotors(const std::vector& motor_x, const std::vector& motor_y) { @@ -65,7 +65,7 @@ void MotorLookupTransformer::setMotors(const std::vector& motor_x, const _cols = motor_x.size(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MotorLookupTransformer::getVariable(QString name, double *val) { @@ -85,7 +85,7 @@ bool MotorLookupTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MotorLookupTransformer::setVariable(QString name, double val) { @@ -105,7 +105,7 @@ bool MotorLookupTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MotorLookupTransformer::transformCommand(double inX, double inY, @@ -132,4 +132,4 @@ void MotorLookupTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/MotorLookupTransformer.h b/src/gstar/MotorLookupTransformer.h index 55fc45a..bebd555 100644 --- a/src/gstar/MotorLookupTransformer.h +++ b/src/gstar/MotorLookupTransformer.h @@ -6,7 +6,7 @@ #ifndef MOTOR_LOOKUP_TRANSFORMER_H #define MOTOR_LOOKUP_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/ITransformer.h" #include "mvc/MapsH5Model.h" @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -100,8 +100,8 @@ class MotorLookupTransformer : public ITransformer }; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/RangeWidget.cpp b/src/gstar/RangeWidget.cpp index e70451d..9d9bf51 100644 --- a/src/gstar/RangeWidget.cpp +++ b/src/gstar/RangeWidget.cpp @@ -6,7 +6,7 @@ #include using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RangeWidget::RangeWidget(QWidget* parent) : QWidget(parent) @@ -62,14 +62,14 @@ RangeWidget::RangeWidget(QWidget* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RangeWidget::~RangeWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::clickFirst() { @@ -79,7 +79,7 @@ void RangeWidget::clickFirst() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::clickPrevious() { @@ -89,7 +89,7 @@ void RangeWidget::clickPrevious() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::clickNext() { @@ -99,7 +99,7 @@ void RangeWidget::clickNext() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::clickLast() { @@ -109,7 +109,7 @@ void RangeWidget::clickLast() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setId(int id) { @@ -118,7 +118,7 @@ void RangeWidget::setId(int id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setMaximum(int max) { @@ -128,7 +128,7 @@ void RangeWidget::setMaximum(int max) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setMinimum(int min) { @@ -137,7 +137,7 @@ void RangeWidget::setMinimum(int min) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setValue(int v) { @@ -149,7 +149,7 @@ void RangeWidget::setValue(int v) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::spinChanged(int value) { @@ -158,7 +158,7 @@ void RangeWidget::spinChanged(int value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int RangeWidget::value() { @@ -167,7 +167,7 @@ int RangeWidget::value() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setRangewidgetStatus(bool m_rangeEnable) { @@ -178,7 +178,7 @@ void RangeWidget::setRangewidgetStatus(bool m_rangeEnable) m_btnLast -> setEnabled(m_rangeEnable); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RangeWidget::setRangeWidgetVisible(bool m_rangeVisible) { m_btnFirst -> setVisible(m_rangeVisible); @@ -188,4 +188,4 @@ void RangeWidget::setRangeWidgetVisible(bool m_rangeVisible) m_btnLast -> setVisible(m_rangeVisible); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/RangeWidget.h b/src/gstar/RangeWidget.h index d2ed6ef..8d086f6 100644 --- a/src/gstar/RangeWidget.h +++ b/src/gstar/RangeWidget.h @@ -6,14 +6,14 @@ #ifndef RANGEWIDGET_H_ #define RANGEWIDGET_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The RangeWidget class provides a Qt range widget, similar to a @@ -176,7 +176,7 @@ namespace gstar } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RANGEWIDGET_H_ */ diff --git a/src/gstar/RectItem.cpp b/src/gstar/RectItem.cpp index d79509c..6e512d3 100644 --- a/src/gstar/RectItem.cpp +++ b/src/gstar/RectItem.cpp @@ -8,7 +8,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RectItem::RectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent) @@ -29,7 +29,7 @@ RectItem::RectItem(qreal x, qreal y, qreal w, qreal h, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QRectF RectItem::boundingRect() const { @@ -39,7 +39,7 @@ QRectF RectItem::boundingRect() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- char* RectItem::getMask() { @@ -79,7 +79,7 @@ char* RectItem::getMask() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double RectItem::getSceneScale() { @@ -107,7 +107,7 @@ double RectItem::getSceneScale() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { @@ -125,7 +125,7 @@ void RectItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { @@ -138,7 +138,7 @@ void RectItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) { @@ -169,7 +169,7 @@ void RectItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant RectItem::itemChange(GraphicsItemChange change, const QVariant& value) @@ -211,7 +211,7 @@ QVariant RectItem::itemChange(GraphicsItemChange change, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) { @@ -283,7 +283,7 @@ void RectItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::mousePressEvent(QGraphicsSceneMouseEvent* event) { @@ -315,7 +315,7 @@ void RectItem::mousePressEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { @@ -331,7 +331,7 @@ void RectItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, @@ -394,7 +394,7 @@ void RectItem::paint(QPainter* painter, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setColor(const QColor& color) { @@ -407,7 +407,7 @@ void RectItem::setColor(const QColor& color) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setHeight(double height) { @@ -420,7 +420,7 @@ void RectItem::setHeight(double height) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setText(const QString& text) { @@ -430,7 +430,7 @@ void RectItem::setText(const QString& text) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setWidth(double width) { @@ -443,7 +443,7 @@ void RectItem::setWidth(double width) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setX(double x) { @@ -456,7 +456,7 @@ void RectItem::setX(double x) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RectItem::setY(double y) { @@ -469,4 +469,4 @@ void RectItem::setY(double y) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/RectItem.h b/src/gstar/RectItem.h index 1c65e52..fefc977 100755 --- a/src/gstar/RectItem.h +++ b/src/gstar/RectItem.h @@ -6,7 +6,7 @@ #ifndef GSTAR_RECT_ITEM_H #define GSTAR_RECT_ITEM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -19,7 +19,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -214,8 +214,8 @@ class RectItem } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/RulerUnitsDialog.cpp b/src/gstar/RulerUnitsDialog.cpp index 44e9cbd..2134e72 100644 --- a/src/gstar/RulerUnitsDialog.cpp +++ b/src/gstar/RulerUnitsDialog.cpp @@ -5,7 +5,7 @@ #include "gstar/RulerUnitsDialog.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RulerUnitsDialog::RulerUnitsDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f) @@ -63,7 +63,7 @@ RulerUnitsDialog::RulerUnitsDialog(QWidget* parent, Qt::WindowFlags f) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerUnitsDialog::accept() { @@ -83,7 +83,7 @@ void RulerUnitsDialog::accept() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString RulerUnitsDialog::getUnitLabel() { @@ -92,7 +92,7 @@ QString RulerUnitsDialog::getUnitLabel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double RulerUnitsDialog::getUnitsPerPixelX() { @@ -101,7 +101,7 @@ double RulerUnitsDialog::getUnitsPerPixelX() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double RulerUnitsDialog::getUnitsPerPixelY() { @@ -110,7 +110,7 @@ double RulerUnitsDialog::getUnitsPerPixelY() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerUnitsDialog::reject() { @@ -120,7 +120,7 @@ void RulerUnitsDialog::reject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerUnitsDialog::setUnitLabel(QString label) { @@ -129,7 +129,7 @@ void RulerUnitsDialog::setUnitLabel(QString label) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerUnitsDialog::setUnitsPerPixelX(double end) { @@ -138,7 +138,7 @@ void RulerUnitsDialog::setUnitsPerPixelX(double end) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void RulerUnitsDialog::setUnitsPerPixelY(double delta) { @@ -147,4 +147,4 @@ void RulerUnitsDialog::setUnitsPerPixelY(double delta) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/RulerUnitsDialog.h b/src/gstar/RulerUnitsDialog.h index 1556ebb..7fd9820 100644 --- a/src/gstar/RulerUnitsDialog.h +++ b/src/gstar/RulerUnitsDialog.h @@ -6,7 +6,7 @@ #ifndef RULER_UNITS_DIALOG_H #define RULER_UNITS_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -18,7 +18,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Dialog for setting Units per pixel. @@ -115,8 +115,8 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Splash.cpp b/src/gstar/Splash.cpp index 9ee1b92..9f03cc4 100644 --- a/src/gstar/Splash.cpp +++ b/src/gstar/Splash.cpp @@ -12,7 +12,7 @@ using gstar::Splash; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Splash::Splash(QWidget* parent, Qt::WindowFlags f, const QString& title, bool aboutMode) @@ -86,7 +86,7 @@ Splash::Splash(QWidget* parent, Qt::WindowFlags f, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Splash::appendMessage(const QString& msg) { @@ -104,7 +104,7 @@ void Splash::appendMessage(const QString& msg) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Splash::appendMessageAndProcess(const QString& msg) { @@ -117,7 +117,7 @@ void Splash::appendMessageAndProcess(const QString& msg) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Splash::clear() { @@ -128,4 +128,4 @@ void Splash::clear() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/Splash.h b/src/gstar/Splash.h index 40b88ff..868898e 100644 --- a/src/gstar/Splash.h +++ b/src/gstar/Splash.h @@ -6,7 +6,7 @@ #ifndef GSTAR_SPLASH_H #define GSTAR_SPLASH_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -92,8 +92,8 @@ class Splash } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/SubImageWindow.cpp b/src/gstar/SubImageWindow.cpp index 5af3ff4..d28e4e8 100644 --- a/src/gstar/SubImageWindow.cpp +++ b/src/gstar/SubImageWindow.cpp @@ -7,7 +7,7 @@ using namespace gstar; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SubImageWindow::SubImageWindow() : QObject() { @@ -55,7 +55,7 @@ SubImageWindow::SubImageWindow() : QObject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SubImageWindow::SubImageWindow(const SubImageWindow& win) { @@ -74,7 +74,7 @@ SubImageWindow::SubImageWindow(const SubImageWindow& win) _contrast_dialog = win._contrast_dialog; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SubImageWindow::~SubImageWindow() { @@ -88,7 +88,7 @@ SubImageWindow::~SubImageWindow() delete btn_contrast; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubImageWindow::setCountsVisible(bool val) { @@ -96,7 +96,7 @@ void SubImageWindow::setCountsVisible(bool val) counts_stats_widget->setVisible(val, val, val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubImageWindow::on_contrast_show() { @@ -115,7 +115,7 @@ void SubImageWindow::on_contrast_show() _contrast_dialog->min_max_updated(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubImageWindow::on_update_min_max(float minCoef, float maxCoef) { @@ -125,14 +125,14 @@ void SubImageWindow::on_update_min_max(float minCoef, float maxCoef) emit redraw_event(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubImageWindow::on_accept_contrast() { _contrast_updated = true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SubImageWindow::on_cancel_contrast() { @@ -140,4 +140,4 @@ void SubImageWindow::on_cancel_contrast() emit redraw_event(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/gstar/SubImageWindow.h b/src/gstar/SubImageWindow.h index f1bf89a..14802f8 100644 --- a/src/gstar/SubImageWindow.h +++ b/src/gstar/SubImageWindow.h @@ -6,7 +6,7 @@ #ifndef GSTAR_SUB_IMAGE_WIDGET_H #define GSTAR_SUB_IMAGE_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include "gstar/CoordinateWidget.h" #include "gstar/ImageViewScene.h" @@ -21,7 +21,7 @@ #include "gstar/ContrastDialog.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- namespace gstar { @@ -89,8 +89,8 @@ namespace gstar } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/AbstractWindowController.cpp b/src/mvc/AbstractWindowController.cpp index b58db6f..12d88aa 100644 --- a/src/mvc/AbstractWindowController.cpp +++ b/src/mvc/AbstractWindowController.cpp @@ -7,7 +7,7 @@ using gstar::ImageViewWidget; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractWindowController::AbstractWindowController() { @@ -17,7 +17,7 @@ AbstractWindowController::AbstractWindowController() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractWindowController::~AbstractWindowController() { @@ -25,5 +25,5 @@ AbstractWindowController::~AbstractWindowController() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/AbstractWindowController.h b/src/mvc/AbstractWindowController.h index 068621a..22e3ab2 100644 --- a/src/mvc/AbstractWindowController.h +++ b/src/mvc/AbstractWindowController.h @@ -6,7 +6,7 @@ #ifndef TXM_ABSTRACT_WINDOW_CONTROLLER_H #define TXM_ABSTRACT_WINDOW_CONTROLLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -15,7 +15,7 @@ #include "gstar/AbstractImageWidget.h" #include "mvc/AbstractWindowModel.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Abstract window controller class. @@ -72,8 +72,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* TXM_ABSTRACT_WINDOW_CONTROLLER_H */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/AbstractWindowModel.cpp b/src/mvc/AbstractWindowModel.cpp index d3985b6..088e7d2 100644 --- a/src/mvc/AbstractWindowModel.cpp +++ b/src/mvc/AbstractWindowModel.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractWindowModel::AbstractWindowModel() { @@ -13,7 +13,7 @@ AbstractWindowModel::AbstractWindowModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractWindowModel::~AbstractWindowModel() { @@ -22,7 +22,7 @@ AbstractWindowModel::~AbstractWindowModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList AbstractWindowModel::getHistogram() { @@ -31,7 +31,7 @@ QList AbstractWindowModel::getHistogram() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AbstractWindowModel::setHistogram(QList hist) { @@ -40,4 +40,4 @@ void AbstractWindowModel::setHistogram(QList hist) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/AbstractWindowModel.h b/src/mvc/AbstractWindowModel.h index 039cb60..0339d96 100644 --- a/src/mvc/AbstractWindowModel.h +++ b/src/mvc/AbstractWindowModel.h @@ -6,12 +6,12 @@ #ifndef ABSTRACT_WINDOW_MODEL #define ABSTRACT_WINDOW_MODEL -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief abstract window model for the CTF, histogram. @@ -88,8 +88,8 @@ class AbstractWindowModel }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ABSTRACTWINDOWMODEL_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/BatchRoiFitWidget.cpp b/src/mvc/BatchRoiFitWidget.cpp index 83a3d69..b5d7cca 100644 --- a/src/mvc/BatchRoiFitWidget.cpp +++ b/src/mvc/BatchRoiFitWidget.cpp @@ -11,7 +11,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- BatchRoiFitWidget::BatchRoiFitWidget(std::string directory, QWidget *parent) : QWidget(parent) { @@ -27,7 +27,7 @@ BatchRoiFitWidget::BatchRoiFitWidget(std::string directory, QWidget *parent) : Q } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- BatchRoiFitWidget::~BatchRoiFitWidget() { @@ -35,7 +35,7 @@ BatchRoiFitWidget::~BatchRoiFitWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void BatchRoiFitWidget::createLayout() { @@ -95,7 +95,7 @@ void BatchRoiFitWidget::createLayout() this->setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void BatchRoiFitWidget::optimizer_changed(QString val) { @@ -120,7 +120,7 @@ void BatchRoiFitWidget::onClose() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void BatchRoiFitWidget::updateFileList(std::unordered_map roi_map) { @@ -149,7 +149,7 @@ void BatchRoiFitWidget::updateFileList(std::unordered_map ro } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void BatchRoiFitWidget::status_callback(size_t cur_itr, size_t total_itr) { @@ -178,7 +178,7 @@ void BatchRoiFitWidget::status_callback(size_t cur_itr, size_t total_itr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void BatchRoiFitWidget::runProcessing() { @@ -334,4 +334,4 @@ void BatchRoiFitWidget::runProcessing() } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/BatchRoiFitWidget.h b/src/mvc/BatchRoiFitWidget.h index 87a10ab..f80d01a 100644 --- a/src/mvc/BatchRoiFitWidget.h +++ b/src/mvc/BatchRoiFitWidget.h @@ -6,7 +6,7 @@ #ifndef BATCH_ROI_FIT_WIDGET_H #define BATCH_ROI_FIT_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -30,7 +30,7 @@ #include #include "mvc/OptimizerOptionsWidget.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class BatchRoiFitWidget : public QWidget @@ -98,8 +98,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/BlueskyComm.h b/src/mvc/BlueskyComm.h index b87b498..2f7b816 100644 --- a/src/mvc/BlueskyComm.h +++ b/src/mvc/BlueskyComm.h @@ -6,7 +6,7 @@ #ifndef BLUESKY_COMM_H #define BLUESKY_COMM_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include "support/zmq/zmq.hpp" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class BlueskyComm : public QThread @@ -104,8 +104,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* NET_STREAM_WORKER_H */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ChartView.cpp b/src/mvc/ChartView.cpp index 03a3f70..c0782ca 100644 --- a/src/mvc/ChartView.cpp +++ b/src/mvc/ChartView.cpp @@ -6,8 +6,8 @@ #include "mvc/ChartView.h" -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- ChartView::ChartView(QChart* chart, QWidget *parent) : QChartView(chart, parent) { @@ -17,14 +17,14 @@ ChartView::ChartView(QChart* chart, QWidget *parent) : QChartView(chart, parent) //setRenderHint(QPainter::Antialiasing); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ChartView::~ChartView() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ChartView::mousePressEvent(QMouseEvent* event) { @@ -32,7 +32,7 @@ void ChartView::mousePressEvent(QMouseEvent* event) QChartView::mousePressEvent(event); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ChartView::mouseReleaseEvent(QMouseEvent* event) { @@ -46,7 +46,7 @@ void ChartView::mouseReleaseEvent(QMouseEvent* event) QChartView::mouseReleaseEvent(event); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ChartView::keyPressEvent(QKeyEvent* event) { @@ -64,4 +64,4 @@ void ChartView::keyPressEvent(QKeyEvent* event) } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ChartView.h b/src/mvc/ChartView.h index 15265fd..be2df53 100644 --- a/src/mvc/ChartView.h +++ b/src/mvc/ChartView.h @@ -6,14 +6,14 @@ #ifndef CHART_VIEW_H #define CHART_VIEW_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class ChartView : public QChartView { @@ -48,8 +48,8 @@ class ChartView : public QChartView }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/CoLocalizationWidget.h b/src/mvc/CoLocalizationWidget.h index 98be56f..29583ff 100644 --- a/src/mvc/CoLocalizationWidget.h +++ b/src/mvc/CoLocalizationWidget.h @@ -6,7 +6,7 @@ #ifndef COLOCALIZATION_WIDGET_H #define COLOCALIZATION_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -19,7 +19,7 @@ #include "preferences/Preferences.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class CoLocalizationWidget : public gstar::AbstractImageWidget { @@ -95,9 +95,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* CoLocalizationWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ComboBoxDelegate.cpp b/src/mvc/ComboBoxDelegate.cpp index c2d76c8..3ef081c 100644 --- a/src/mvc/ComboBoxDelegate.cpp +++ b/src/mvc/ComboBoxDelegate.cpp @@ -12,7 +12,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ComboBoxDelegate::ComboBoxDelegate(std::vector cbItems, QObject *parent) :QItemDelegate(parent) @@ -20,7 +20,7 @@ ComboBoxDelegate::ComboBoxDelegate(std::vector cbItems, QObject *pa Items = cbItems; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &/* index */) const { @@ -32,7 +32,7 @@ QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI return editor; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { @@ -41,7 +41,7 @@ void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) comboBox->setCurrentIndex(value); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { @@ -49,14 +49,14 @@ void ComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, model->setData(index, comboBox->currentIndex(), Qt::EditRole); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const { editor->setGeometry(option.rect); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { @@ -69,4 +69,4 @@ void ComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &myOption, painter); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ComboBoxDelegate.h b/src/mvc/ComboBoxDelegate.h index 12a7e9d..1092e3c 100644 --- a/src/mvc/ComboBoxDelegate.h +++ b/src/mvc/ComboBoxDelegate.h @@ -6,7 +6,7 @@ #ifndef COMBO_BOX_DELEGATE_H #define COMBO_BOX_DELEGATE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -33,8 +33,8 @@ Q_OBJECT }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/DeselectableTreeView.cpp b/src/mvc/DeselectableTreeView.cpp index 3f4ea1f..b7dc9f8 100644 --- a/src/mvc/DeselectableTreeView.cpp +++ b/src/mvc/DeselectableTreeView.cpp @@ -8,21 +8,21 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- DeselectableTreeView::DeselectableTreeView(QWidget *parent) : QTreeView(parent) { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- DeselectableTreeView::~DeselectableTreeView() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void DeselectableTreeView::mousePressEvent(QMouseEvent *event) { @@ -32,4 +32,4 @@ void DeselectableTreeView::mousePressEvent(QMouseEvent *event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/DeselectableTreeView.h b/src/mvc/DeselectableTreeView.h index 9dc65e4..23331aa 100644 --- a/src/mvc/DeselectableTreeView.h +++ b/src/mvc/DeselectableTreeView.h @@ -6,11 +6,11 @@ #ifndef TXM_DESELECTABLE_TREE_VIEW_H #define TXM_DESELECTABLE_TREE_VIEW_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Abstract model class. @@ -39,8 +39,8 @@ class DeselectableTreeView }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ExportMapsDialog.cpp b/src/mvc/ExportMapsDialog.cpp index f2b5691..e4ffa9d 100644 --- a/src/mvc/ExportMapsDialog.cpp +++ b/src/mvc/ExportMapsDialog.cpp @@ -7,7 +7,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ExportMapsDialog::ExportMapsDialog(QDir directory, QWidget *parent) : QWidget(parent) { @@ -17,7 +17,7 @@ ExportMapsDialog::ExportMapsDialog(QDir directory, QWidget *parent) : QWidget(pa _total_blocks = 100; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ExportMapsDialog::~ExportMapsDialog() { @@ -25,7 +25,7 @@ ExportMapsDialog::~ExportMapsDialog() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ExportMapsDialog::createLayout() { @@ -90,7 +90,7 @@ void ExportMapsDialog::createLayout() setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ExportMapsDialog::setRunEnabled(bool val) { @@ -99,14 +99,14 @@ void ExportMapsDialog::setRunEnabled(bool val) QCoreApplication::processEvents(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ExportMapsDialog::on_browse() { _directory = QFileDialog::getExistingDirectory(this, "Export Directory", _directory.absolutePath()); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ExportMapsDialog::on_open() { @@ -116,7 +116,7 @@ void ExportMapsDialog::on_open() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ExportMapsDialog::status_callback(size_t cur_block, size_t total_blocks) { @@ -132,4 +132,4 @@ void ExportMapsDialog::status_callback(size_t cur_block, size_t total_blocks) QCoreApplication::processEvents(); } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ExportMapsDialog.h b/src/mvc/ExportMapsDialog.h index b0b7f75..d8b45a9 100644 --- a/src/mvc/ExportMapsDialog.h +++ b/src/mvc/ExportMapsDialog.h @@ -6,7 +6,7 @@ #ifndef EXPORT_MAPS_DIALOG_H #define EXPORT_MAPS_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -29,7 +29,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class ExportMapsDialog : public QWidget @@ -109,8 +109,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/FileTabWidget.cpp b/src/mvc/FileTabWidget.cpp index 5083224..5ccd63a 100644 --- a/src/mvc/FileTabWidget.cpp +++ b/src/mvc/FileTabWidget.cpp @@ -14,7 +14,7 @@ #include #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- FileTabWidget::FileTabWidget(QWidget* parent) : QWidget(parent) { @@ -99,7 +99,7 @@ FileTabWidget::FileTabWidget(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::_gen_visible_list(QStringList *sl) { @@ -134,7 +134,7 @@ void FileTabWidget::onUpdateFilter() filterTextChanged(_filter_line->text()); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::load_all_visible() { @@ -155,7 +155,7 @@ void FileTabWidget::load_all_visible() emit loadList(sl); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::unload_all_visible() { @@ -275,14 +275,14 @@ void FileTabWidget::update_file_list(const std::map& fileinf _file_list_view->horizontalHeader()->resizeSections(QHeaderView::Interactive); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::ShowContextMenu(const QPoint &pos) { _contextMenu->exec(mapToGlobal(pos)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::onDoubleClickElement(const QModelIndex idx) { @@ -294,7 +294,7 @@ void FileTabWidget::onDoubleClickElement(const QModelIndex idx) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::setActionsAndButtonsEnabled(bool val) { @@ -314,7 +314,7 @@ void FileTabWidget::setActionsAndButtonsEnabled(bool val) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::onLoadFile() { @@ -328,7 +328,7 @@ void FileTabWidget::onLoadFile() emit loadList(sl); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::onUnloadFile() { @@ -343,7 +343,7 @@ void FileTabWidget::onUnloadFile() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FileTabWidget::filterTextChanged(const QString &filter_text) { @@ -485,4 +485,4 @@ void FileTabWidget::onFileRowChange(const QModelIndex& current, const QModelInde } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/FileTabWidget.h b/src/mvc/FileTabWidget.h index 8921800..5325587 100644 --- a/src/mvc/FileTabWidget.h +++ b/src/mvc/FileTabWidget.h @@ -6,7 +6,7 @@ #ifndef FILE_TAB_WIDGET_H #define FILE_TAB_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -23,9 +23,9 @@ #include "mvc/ComboBoxDelegate.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class FileTabWidget : public QWidget { @@ -145,9 +145,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* FileTabWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/FitElementsTableModel.cpp b/src/mvc/FitElementsTableModel.cpp index eb96830..f811ce1 100644 --- a/src/mvc/FitElementsTableModel.cpp +++ b/src/mvc/FitElementsTableModel.cpp @@ -6,7 +6,7 @@ #include "FitElementsTableModel.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- FitElementsTableModel::FitElementsTableModel(std::string detector_element, QObject* parent) : QAbstractTableModel(parent) { @@ -18,7 +18,7 @@ FitElementsTableModel::FitElementsTableModel(std::string detector_element, QObje _detector_element = detector_element; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- FitElementsTableModel::~FitElementsTableModel() { @@ -32,7 +32,7 @@ FitElementsTableModel::~FitElementsTableModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void FitElementsTableModel::setFitParams(data_struct::Fit_Parameters fit_params) { @@ -62,7 +62,7 @@ void FitElementsTableModel::setDisplayHeaderMinMax(bool val) } } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitElementsTableModel::update_counts_log10(bool is_log10) { @@ -90,7 +90,7 @@ void FitElementsTableModel::update_counts_log10(bool is_log10) emit layoutChanged(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Fit_Element_Map_Dict FitElementsTableModel::getElementsToFit() { @@ -104,7 +104,7 @@ data_struct::Fit_Element_Map_Dict FitElementsTableModel::getElementsToFi return elements_to_fit; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Fit_Parameters FitElementsTableModel::getAsFitParams() { @@ -118,7 +118,7 @@ data_struct::Fit_Parameters FitElementsTableModel::getAsFitParams() return fit_params; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitElementsTableModel::updateElementValues(data_struct::Fit_Parameters*fit_params) { @@ -135,7 +135,7 @@ void FitElementsTableModel::updateElementValues(data_struct::Fit_Parameters* elements_to_fit) { @@ -197,7 +197,7 @@ void FitElementsTableModel::updateFitElements(data_struct::Fit_Element_Map_Dict< } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString FitElementsTableModel::element_at_row(int row) { @@ -213,7 +213,7 @@ QString FitElementsTableModel::element_at_row(int row) return QString(""); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitElementsTableModel::appendElement(data_struct::Fit_Element_Map* element) { @@ -252,7 +252,7 @@ void FitElementsTableModel::appendElement(data_struct::Fit_Element_Map* } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool FitElementsTableModel::removeRows(int row, int count, const QModelIndex &parent) { @@ -283,7 +283,7 @@ bool FitElementsTableModel::removeRows(int row, int count, const QModelIndex &pa } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitElementsTableModel::clearAll() { @@ -296,7 +296,7 @@ void FitElementsTableModel::clearAll() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant FitElementsTableModel::data(const QModelIndex &index, int role) const { @@ -363,7 +363,7 @@ QVariant FitElementsTableModel::data(const QModelIndex &index, int role) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags FitElementsTableModel::flags(const QModelIndex &index) const { @@ -390,7 +390,7 @@ Qt::ItemFlags FitElementsTableModel::flags(const QModelIndex &index) const return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant FitElementsTableModel::headerData(int section, Qt::Orientation orientation, int role) const { @@ -416,7 +416,7 @@ QVariant FitElementsTableModel::headerData(int section, Qt::Orientation orientat } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int FitElementsTableModel::rowCount(const QModelIndex &parent) const { @@ -433,7 +433,7 @@ int FitElementsTableModel::rowCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex FitElementsTableModel::index(int row, int column, const QModelIndex &parent) const { @@ -469,7 +469,7 @@ QModelIndex FitElementsTableModel::index(int row, int column, const QModelIndex return QModelIndex(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Fit_Element_Map* FitElementsTableModel::getElementByIndex(QModelIndex index) const { @@ -486,7 +486,7 @@ data_struct::Fit_Element_Map* FitElementsTableModel::getElementByIndex(Q return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex FitElementsTableModel::parent(const QModelIndex &index) const { @@ -521,7 +521,7 @@ QModelIndex FitElementsTableModel::parent(const QModelIndex &index) const return createIndex(row, 0, parentItem); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool FitElementsTableModel::setData(const QModelIndex &index, const QVariant &value, @@ -614,7 +614,7 @@ bool FitElementsTableModel::setData(const QModelIndex &index, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool FitElementsTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role) { @@ -643,7 +643,7 @@ bool FitElementsTableModel::setHeaderData(int section, Qt::Orientation orientati } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/FitElementsTableModel.h b/src/mvc/FitElementsTableModel.h index b5ec8f5..790f09a 100644 --- a/src/mvc/FitElementsTableModel.h +++ b/src/mvc/FitElementsTableModel.h @@ -13,7 +13,7 @@ #include #include "data_struct/fit_element_map.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief model to control the solver table @@ -318,8 +318,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/FitParamsTableModel.cpp b/src/mvc/FitParamsTableModel.cpp index f705891..d2abeb1 100644 --- a/src/mvc/FitParamsTableModel.cpp +++ b/src/mvc/FitParamsTableModel.cpp @@ -7,7 +7,7 @@ #include "fitting/models/gaussian_model.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- FitParamsTableModel::FitParamsTableModel(QObject* parent) : QAbstractTableModel(parent) { @@ -24,7 +24,7 @@ FitParamsTableModel::FitParamsTableModel(QObject* parent) : QAbstractTableModel( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitParamsTableModel::setFitParams(data_struct::Fit_Parameters fit_params) { @@ -42,7 +42,7 @@ void FitParamsTableModel::setFitParams(data_struct::Fit_Parameters fit_p } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int FitParamsTableModel::columnCount(const QModelIndex &parent) const { @@ -52,7 +52,7 @@ int FitParamsTableModel::columnCount(const QModelIndex &parent) const return NUM_PROPS - 3; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitParamsTableModel::setOptimizerSupportsMinMax(bool val) { @@ -63,7 +63,7 @@ void FitParamsTableModel::setOptimizerSupportsMinMax(bool val) emit layoutChanged(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitParamsTableModel::updateFitParams(data_struct::Fit_Parameters* fit_params) { @@ -83,7 +83,7 @@ void FitParamsTableModel::updateFitParams(data_struct::Fit_Parameters* f } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitParamsTableModel::only_keep_these_keys(data_struct::Fit_Parameters fit_params) { @@ -113,7 +113,7 @@ void FitParamsTableModel::only_keep_these_keys(data_struct::Fit_Parameters* po) { @@ -290,7 +290,7 @@ void FitSpectraWidget::setParamOverride(data_struct::Params_Override* po } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::on_braching_ratio_update(data_struct::Fit_Element_Map* element) { @@ -300,7 +300,7 @@ void FitSpectraWidget::on_braching_ratio_update(data_struct::Fit_Element_MapgetPngofChart(), &_ev, _int_spec, &_spectra_background, &_fit_spec, &_labeled_spectras); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::replot_integrated_spectra(bool snipback) { @@ -517,21 +517,21 @@ void FitSpectraWidget::replot_integrated_spectra(bool snipback) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::appendFitIntSpectra(std::string name, ArrayDr* spec) { _fit_int_spec_map[name] = spec; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::appendMaxChanSpectra(std::string name, ArrayDr* spec) { _max_chan_spec_map[name] = spec; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::appendROISpectra(std::string name, ArrayDr* spec, QColor color) { @@ -539,7 +539,7 @@ void FitSpectraWidget::appendROISpectra(std::string name, ArrayDr* spec, QColor _roi_spec_colors[name] = color; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::deleteROISpectra(std::string name) { @@ -557,7 +557,7 @@ void FitSpectraWidget::deleteROISpectra(std::string name) replot_integrated_spectra(false); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::deleteAllROISpectra() { @@ -575,7 +575,7 @@ void FitSpectraWidget::deleteAllROISpectra() replot_integrated_spectra(false); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::clearFitIntSpectra() { @@ -588,7 +588,7 @@ void FitSpectraWidget::clearFitIntSpectra() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::clearMaxChanSpectra() { @@ -599,7 +599,7 @@ void FitSpectraWidget::clearMaxChanSpectra() _max_chan_spec_map.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::clearROISpectra() { @@ -610,7 +610,7 @@ void FitSpectraWidget::clearROISpectra() _roi_spec_map.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::add_element() { @@ -671,7 +671,7 @@ void FitSpectraWidget::add_element() update_spectra_top_axis(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::del_element() { @@ -708,7 +708,7 @@ void FitSpectraWidget::del_element() update_spectra_top_axis(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::pileup_chk_changed(int state) { @@ -726,7 +726,7 @@ void FitSpectraWidget::pileup_chk_changed(int state) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::Fit_Spectra_Click() { @@ -886,7 +886,7 @@ void FitSpectraWidget::Fit_Spectra_Click() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::Fit_ROI_Spectra_Click() { @@ -1000,14 +1000,14 @@ void FitSpectraWidget::Fit_ROI_Spectra_Click() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::Model_Spectra_Val_Change(QModelIndex,QModelIndex,QVector) { Model_Spectra_Click(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::Model_Spectra_Click() { @@ -1050,7 +1050,7 @@ void FitSpectraWidget::Model_Spectra_Click() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::finished_fitting() { @@ -1063,14 +1063,14 @@ void FitSpectraWidget::finished_fitting() replot_integrated_spectra(true); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::fit_params_customMenuRequested(QPoint pos) { _fit_param_contextMenu->exec(_fit_params_table->mapToGlobal(pos)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::set_fit_params_bounds(data_struct::E_Bound_Type e_type) { @@ -1081,7 +1081,7 @@ void FitSpectraWidget::set_fit_params_bounds(data_struct::E_Bound_Type e_type) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::check_auto_model(int state) { @@ -1113,7 +1113,7 @@ void FitSpectraWidget::check_auto_model(int state) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- //void FitSpectraWidget::element_clicked(QModelIndex index) //{ @@ -1133,14 +1133,14 @@ void FitSpectraWidget::check_auto_model(int state) // } //} -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::element_selection_changed(QModelIndex current, QModelIndex previous) { _spectra_widget->set_element_lines(_fit_elements_table_model->getElementByIndex(current)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::element_selection_changed(int index) { @@ -1175,7 +1175,7 @@ void FitSpectraWidget::element_selection_changed(int index) _spectra_widget->set_element_lines(&em); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::optimizer_changed(QString val) { @@ -1188,7 +1188,7 @@ void FitSpectraWidget::optimizer_changed(QString val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::setIntegratedSpectra(ArrayDr* int_spec) { @@ -1200,14 +1200,14 @@ void FitSpectraWidget::setIntegratedSpectra(ArrayDr* int_spec) _spectra_widget->onResetChartViewOnlyY(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::setFitParams(data_struct::Fit_Parameters* fit_params) { _fit_params_table_model->updateFitParams(fit_params); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FitSpectraWidget::setElementsToFit(data_struct::Fit_Element_Map_Dict* elements_to_fit) { @@ -1216,7 +1216,7 @@ void FitSpectraWidget::setElementsToFit(data_struct::Fit_Element_Map_Dict @@ -27,7 +27,7 @@ #include "data_struct/params_override.h" #include "mvc/SpectraWidgetSettingsDialog.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing @@ -253,9 +253,9 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* FitSpectraWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/FittingDialog.cpp b/src/mvc/FittingDialog.cpp index 9a70323..118be78 100644 --- a/src/mvc/FittingDialog.cpp +++ b/src/mvc/FittingDialog.cpp @@ -17,8 +17,8 @@ using namespace std::chrono_literals; #define OPT_INDEX 1 #define OUTPUT_INDEX 2 - /*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ + //--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- FittingDialog::FittingDialog(QWidget *parent) : QDialog(parent) { @@ -33,7 +33,7 @@ FittingDialog::FittingDialog(QWidget *parent) : QDialog(parent) _createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- FittingDialog::~FittingDialog() { @@ -48,7 +48,7 @@ FittingDialog::~FittingDialog() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::_createLayout() { @@ -180,7 +180,7 @@ void FittingDialog::_createLayout() setLayout(l); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::updateFitParams(data_struct::Fit_Parameters out_fit_params, data_struct::Fit_Parameters element_fit_params) { @@ -195,7 +195,7 @@ void FittingDialog::updateFitParams(data_struct::Fit_Parameters out_fit_ _btn_accept->setEnabled(false); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::setOptimizer(QString opt) { @@ -224,7 +224,7 @@ void FittingDialog::setOptimizer(QString opt) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::setSpectra(data_struct::Spectra* spectra, ArrayDr energy) { @@ -263,14 +263,14 @@ void FittingDialog::setSpectra(data_struct::Spectra* spectra, ArrayDr en } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::setFitSpectra(data_struct::Spectra* spectra) { _spectra_widget->append_spectra(DEF_STR_FIT_INT_SPECTRA, spectra, &_ev); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::setElementsToFit(data_struct::Fit_Element_Map_Dict* elements_to_fit) { @@ -297,7 +297,7 @@ void FittingDialog::setElementsToFit(data_struct::Fit_Element_Map_Dict* } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Spectra FittingDialog::get_fit_spectra(std::unordered_map* labeled_spectras) { @@ -305,14 +305,14 @@ data_struct::Spectra FittingDialog::get_fit_spectra(std::unordered_mapsetDisplayRange(wmin, wmax, hmin, hmax); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::onAccepted() { @@ -321,7 +321,7 @@ void FittingDialog::onAccepted() close(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::onCancel() { @@ -336,7 +336,7 @@ void FittingDialog::onCancel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::onUpdateSelected() { @@ -349,7 +349,7 @@ void FittingDialog::onUpdateSelected() _fit_params_table_model->updateAll(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::runProcessing() { @@ -517,7 +517,7 @@ void FittingDialog::runProcessing() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void FittingDialog::status_callback(size_t cur_itr, size_t total_itr) { @@ -545,4 +545,4 @@ void FittingDialog::waitToFinishRunning() } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/FittingDialog.h b/src/mvc/FittingDialog.h index 21046bd..cb42af9 100644 --- a/src/mvc/FittingDialog.h +++ b/src/mvc/FittingDialog.h @@ -6,7 +6,7 @@ #ifndef FITTING_DIALOG_H #define FITTING_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -41,8 +41,8 @@ #include "core/GlobalThreadPool.h" #include "mvc/OptimizerOptionsWidget.h" -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- class FittingDialog : public QDialog { @@ -191,8 +191,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageGridDialog.cpp b/src/mvc/ImageGridDialog.cpp index 9c52a4c..4a37c4b 100644 --- a/src/mvc/ImageGridDialog.cpp +++ b/src/mvc/ImageGridDialog.cpp @@ -11,8 +11,8 @@ #include #include -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- ImageGridDialog::ImageGridDialog() : QDialog() { @@ -21,14 +21,14 @@ ImageGridDialog::ImageGridDialog() : QDialog() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageGridDialog::~ImageGridDialog() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageGridDialog::createLayout() { @@ -69,7 +69,7 @@ void ImageGridDialog::createLayout() setWindowTitle("Grid View"); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageGridDialog::onUpdate() { @@ -77,5 +77,5 @@ void ImageGridDialog::onUpdate() close(); } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageGridDialog.h b/src/mvc/ImageGridDialog.h index 2a121ba..8da37fc 100644 --- a/src/mvc/ImageGridDialog.h +++ b/src/mvc/ImageGridDialog.h @@ -6,7 +6,7 @@ #ifndef IMAGE_GRID_DIALOG_H #define IMAGE_GRID_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -18,7 +18,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing @@ -67,9 +67,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ImageGridDialog_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageSegROIDialog.h b/src/mvc/ImageSegROIDialog.h index 2ad6363..8cd3fb6 100644 --- a/src/mvc/ImageSegROIDialog.h +++ b/src/mvc/ImageSegROIDialog.h @@ -6,7 +6,7 @@ #ifndef IMAGE_SEG_ROI_DIALOG_H #define IMAGE_SEG_ROI_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -27,7 +27,7 @@ #include #include "gstar/Annotation/RoiMaskGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class ImageSegRoiDialog : public QDialog { @@ -140,9 +140,9 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ImageSegRoiDialog_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageSegWidget.h b/src/mvc/ImageSegWidget.h index d6c79b8..bdc8336 100644 --- a/src/mvc/ImageSegWidget.h +++ b/src/mvc/ImageSegWidget.h @@ -6,12 +6,12 @@ #ifndef IMG_SEG_WIDGET_H #define IMG_SEG_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include "gstar/Annotation/RoiMaskGraphicsItem.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Widget used to display VLM workspaces. Used with VLM_Model. @@ -92,9 +92,9 @@ protected slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ImageSegWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageStackControlWidget.cpp b/src/mvc/ImageStackControlWidget.cpp index 0686608..f4dea9a 100644 --- a/src/mvc/ImageStackControlWidget.cpp +++ b/src/mvc/ImageStackControlWidget.cpp @@ -11,8 +11,8 @@ #include #include -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- ImageStackControlWidget::ImageStackControlWidget(QWidget* parent) : QWidget(parent) { @@ -21,7 +21,7 @@ ImageStackControlWidget::ImageStackControlWidget(QWidget* parent) : QWidget(pare } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ImageStackControlWidget::~ImageStackControlWidget() { @@ -47,7 +47,7 @@ void ImageStackControlWidget::savePref() _imageGrid->savePref(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::createLayout() { @@ -139,7 +139,7 @@ void ImageStackControlWidget::createLayout() setLayout(mainLayout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::closeEvent(QCloseEvent *event) { @@ -147,7 +147,7 @@ void ImageStackControlWidget::closeEvent(QCloseEvent *event) event->accept(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::model_IndexChanged(const QString &text) { @@ -180,7 +180,7 @@ void ImageStackControlWidget::model_IndexChanged(const QString &text) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onPrevFilePressed() { @@ -193,7 +193,7 @@ void ImageStackControlWidget::onPrevFilePressed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onNextFilePressed() { @@ -206,7 +206,7 @@ void ImageStackControlWidget::onNextFilePressed() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::setModel(MapsWorkspaceModel *model) { @@ -220,7 +220,7 @@ void ImageStackControlWidget::setModel(MapsWorkspaceModel *model) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::update_progress_bar(int val, int amt) { @@ -232,7 +232,7 @@ void ImageStackControlWidget::update_progress_bar(int val, int amt) _load_progress->setValue(val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onLoad_Model(const QString name, MODEL_TYPE mt) { @@ -262,7 +262,7 @@ void ImageStackControlWidget::onLoad_Model(const QString name, MODEL_TYPE mt) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onUnloadList_Model(const QStringList sl, MODEL_TYPE mt) { @@ -301,7 +301,7 @@ void ImageStackControlWidget::onUnloadList_Model(const QStringList sl, MODEL_TYP } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::update_file_list() { @@ -313,7 +313,7 @@ void ImageStackControlWidget::update_file_list() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onLinkRegionToDataset(QString item_name, QString vlm_file_path, QImage image) { @@ -367,7 +367,7 @@ void ImageStackControlWidget::onLinkRegionToDataset(QString item_name, QString v } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ImageStackControlWidget::onChangeDatasetName(const QString & name) { @@ -378,5 +378,5 @@ void ImageStackControlWidget::onChangeDatasetName(const QString & name) } } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageStackControlWidget.h b/src/mvc/ImageStackControlWidget.h index a859501..a704213 100644 --- a/src/mvc/ImageStackControlWidget.h +++ b/src/mvc/ImageStackControlWidget.h @@ -6,7 +6,7 @@ #ifndef IMAGE_STACK_CONTROL_WIDGET_H #define IMAGE_STACK_CONTROL_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -20,7 +20,7 @@ #include "mvc/MapsElementsWidget.h" #include "mvc/MapsWorkspaceFilesWidget.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing @@ -110,9 +110,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ImageStackControlWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/LiveMapsElementsWidget.cpp b/src/mvc/LiveMapsElementsWidget.cpp index 20325f4..82b3220 100644 --- a/src/mvc/LiveMapsElementsWidget.cpp +++ b/src/mvc/LiveMapsElementsWidget.cpp @@ -10,7 +10,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LiveMapsElementsWidget::LiveMapsElementsWidget(QString ip, QString port, QWidget* parent) : QWidget(parent) { @@ -40,7 +40,7 @@ LiveMapsElementsWidget::LiveMapsElementsWidget(QString ip, QString port, QWidget } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LiveMapsElementsWidget::~LiveMapsElementsWidget() { @@ -76,7 +76,7 @@ LiveMapsElementsWidget::~LiveMapsElementsWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LiveMapsElementsWidget::createLayout() { @@ -137,7 +137,7 @@ void LiveMapsElementsWidget::createLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LiveMapsElementsWidget::updateIp() { @@ -158,7 +158,7 @@ void LiveMapsElementsWidget::updateIp() _last_packet = nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LiveMapsElementsWidget::newDataArrived(data_struct::Stream_Block* new_packet) { @@ -247,7 +247,7 @@ void LiveMapsElementsWidget::newDataArrived(data_struct::Stream_Block* ne _last_packet = new_packet; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LiveMapsElementsWidget::image_changed(int start, int end) { diff --git a/src/mvc/LiveMapsElementsWidget.h b/src/mvc/LiveMapsElementsWidget.h index c998a85..b2b0ba5 100644 --- a/src/mvc/LiveMapsElementsWidget.h +++ b/src/mvc/LiveMapsElementsWidget.h @@ -6,7 +6,7 @@ #ifndef LIVE_MAPS_ELEMENTS_WIDGET_H #define LIVE_MAPS_ELEMENTS_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -20,7 +20,7 @@ #include "mvc/VLM_Widget.h" #include "mvc/ScanQueueWidget.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class LiveMapsElementsWidget : public QWidget @@ -91,8 +91,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* LiveLiveMapsElementsWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MDA_Widget.cpp b/src/mvc/MDA_Widget.cpp index 79353c3..78d1d09 100644 --- a/src/mvc/MDA_Widget.cpp +++ b/src/mvc/MDA_Widget.cpp @@ -13,7 +13,7 @@ #include "io/file/aps/aps_fit_params_import.h" #include "io/file/csv_io.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MDA_Widget::MDA_Widget(QWidget* parent) : QWidget(parent) { @@ -23,14 +23,14 @@ MDA_Widget::MDA_Widget(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MDA_Widget::~MDA_Widget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::createLayout() { @@ -71,7 +71,7 @@ void MDA_Widget::createLayout() setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::setModel(RAW_Model* model) { @@ -83,7 +83,7 @@ void MDA_Widget::setModel(RAW_Model* model) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::model_updated() { @@ -137,7 +137,7 @@ void MDA_Widget::model_updated() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::on_export_fit_params(data_struct::Fit_Parameters fit_params, data_struct::Fit_Element_Map_Dict elements_to_fit) { @@ -195,7 +195,7 @@ void MDA_Widget::on_export_fit_params(data_struct::Fit_Parameters fit_pa } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::on_export_csv(QPixmap png, ArrayDr* ev, ArrayDr* int_spec, ArrayDr* back_spec, ArrayDr* fit_spec, std::unordered_map* labeled_spectras) { @@ -245,7 +245,7 @@ void MDA_Widget::on_export_csv(QPixmap png, ArrayDr* ev, ArrayDr* int_spec, Arra QMessageBox::information(nullptr, "Export to CSV", mesg); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::onDetectorSelect(const QString& det) { @@ -268,7 +268,7 @@ void MDA_Widget::onDetectorSelect(const QString& det) _spectra_widget->setIntegratedSpectra(_model->getIntegratedSpectra(detector)); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MDA_Widget::onDetectorSelectIdx(int idx) { @@ -279,4 +279,4 @@ void MDA_Widget::onDetectorSelectIdx(int idx) } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/MDA_Widget.h b/src/mvc/MDA_Widget.h index 416aefa..f3f3101 100644 --- a/src/mvc/MDA_Widget.h +++ b/src/mvc/MDA_Widget.h @@ -6,7 +6,7 @@ #ifndef MDA_WIDGET_H #define MDA_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class MDA_Widget : public QWidget { @@ -75,8 +75,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsElementsWidget_H_ */ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index fbf9812..fb872f9 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -475,7 +475,7 @@ void MapsElementsWidget::_appendRoiTab() m_tabWidget->addTab(m_roiTreeTabWidget, QIcon(), "ROI's"); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsElementsWidget::roiTreeContextMenu(const QPoint& pos) { @@ -515,7 +515,7 @@ void MapsElementsWidget::displayRoiContextMenu(QWidget* parent, const QPoint& po } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsElementsWidget::roiModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) { diff --git a/src/mvc/MapsElementsWidget.h b/src/mvc/MapsElementsWidget.h index 3eced65..b799ad7 100644 --- a/src/mvc/MapsElementsWidget.h +++ b/src/mvc/MapsElementsWidget.h @@ -6,7 +6,7 @@ #ifndef MAPS_ELEMENTS_WIDGET_H #define MAPS_ELEMENTS_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -31,7 +31,7 @@ #include using gstar::AbstractGraphicsItem; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing @@ -254,9 +254,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsElementsWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsH5Model.cpp b/src/mvc/MapsH5Model.cpp index 59ef65a..1af84ff 100644 --- a/src/mvc/MapsH5Model.cpp +++ b/src/mvc/MapsH5Model.cpp @@ -26,7 +26,7 @@ MapsH5Model::MapsH5Model() : QObject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsH5Model::~MapsH5Model() { @@ -35,7 +35,7 @@ MapsH5Model::~MapsH5Model() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::clear_analyzed_counts() { @@ -48,7 +48,7 @@ void MapsH5Model::clear_analyzed_counts() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::getAnalyzedCounts(std::string analysis_type, data_struct::Fit_Count_Dict& out_counts) { @@ -131,7 +131,7 @@ std::vector MapsH5Model::count_names() return count_names; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector MapsH5Model::getAnalyzedTypes() { @@ -144,7 +144,7 @@ std::vector MapsH5Model::getAnalyzedTypes() return keys; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::string MapsH5Model::_analysis_enum_to_str(data_struct::Fitting_Routines val) { @@ -171,14 +171,14 @@ std::string MapsH5Model::_analysis_enum_to_str(data_struct::Fitting_Routines val return ""; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::set_fit_parameters_override(data_struct::Params_Override* override) { _params_override = override; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::initialize_from_stream_block(data_struct::Stream_Block* block) { @@ -214,21 +214,21 @@ void MapsH5Model::initialize_from_stream_block(data_struct::Stream_Block* emit model_data_updated(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::clearAllMapRois() { _map_rois.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::appendMapRoi(std::string name, struct Map_ROI roi) { _map_rois[name] = roi; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::saveAllRoiMaps(QString savename) { @@ -298,7 +298,7 @@ void MapsH5Model::saveAllRoiMaps(QString savename) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::saveAllRoiMaps() { @@ -316,7 +316,7 @@ void MapsH5Model::saveAllRoiMaps() saveAllRoiMaps(roi_file_name); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::loadAllRoiMaps() { @@ -451,7 +451,7 @@ void MapsH5Model::loadAllRoiMaps() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::update_from_stream_block(data_struct::Stream_Block* block) { @@ -767,7 +767,7 @@ bool MapsH5Model::load(QString filepath) return _is_fully_loaded; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::load_roi(const std::vector &roi_list, data_struct::Spectra& spec) { @@ -799,7 +799,7 @@ bool MapsH5Model::_load_version_9(hid_t maps_grp_id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_quantification_9_single(hid_t maps_grp_id, std::string path, std::unordered_map >&quant) { @@ -895,7 +895,7 @@ bool MapsH5Model::_load_quantification_9_single(hid_t maps_grp_id, std::string p return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_quantification_9(hid_t maps_grp_id) { @@ -905,7 +905,7 @@ bool MapsH5Model::_load_quantification_9(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_scalers_9(hid_t maps_grp_id) { @@ -1011,7 +1011,7 @@ bool MapsH5Model::_load_scalers_9(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_scan_9(hid_t maps_grp_id) { @@ -1065,7 +1065,7 @@ bool MapsH5Model::_load_scan_9(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_integrated_spectra_9(hid_t maps_grp_id) { @@ -1206,7 +1206,7 @@ bool MapsH5Model::_load_integrated_spectra_9(hid_t maps_grp_id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_counts_9(hid_t maps_grp_id) { @@ -1222,7 +1222,7 @@ bool MapsH5Model::_load_counts_9(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_analyzed_counts_9(hid_t analyzed_grp_id, std::string group_name) { @@ -1329,7 +1329,7 @@ bool MapsH5Model::_load_analyzed_counts_9(hid_t analyzed_grp_id, std::string gro return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_roi_9(const std::vector& roi_list, data_struct::Spectra& spec) { @@ -1359,7 +1359,7 @@ bool MapsH5Model::_load_version_10(hid_t file_id, hid_t maps_grp_id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_quantification_10_single(hid_t maps_grp_id, std::string path, std::unordered_map >& quant, std::map*>>& e_quants) @@ -1742,7 +1742,7 @@ bool MapsH5Model::_load_quantification_10_single(hid_t maps_grp_id, std::string return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_quantification_10(hid_t maps_grp_id) { @@ -1753,7 +1753,7 @@ bool MapsH5Model::_load_quantification_10(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_quantification_standard_10(hid_t maps_grp_id) { @@ -1910,7 +1910,7 @@ bool MapsH5Model::_load_quantification_standard_10(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_scalers_10(hid_t maps_grp_id) { @@ -2015,7 +2015,7 @@ bool MapsH5Model::_load_scalers_10(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_scan_10(hid_t maps_grp_id) { @@ -2150,7 +2150,7 @@ bool MapsH5Model::_load_scan_10(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_integrated_spectra_10(hid_t file_id) { @@ -2250,7 +2250,7 @@ bool MapsH5Model::_load_integrated_spectra_10(hid_t file_id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_counts_10(hid_t maps_grp_id) { @@ -2276,7 +2276,7 @@ bool MapsH5Model::_load_counts_10(hid_t maps_grp_id) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_analyzed_counts_10(hid_t analyzed_grp_id, std::string group_name) { @@ -2444,7 +2444,7 @@ bool MapsH5Model::_load_analyzed_counts_10(hid_t analyzed_grp_id, std::string gr return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsH5Model::_load_roi_10(const std::vector& roi_list, data_struct::Spectra& spec) { @@ -2452,7 +2452,7 @@ bool MapsH5Model::_load_roi_10(const std::vector& roi_list, data_struct: return false; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList MapsH5Model::get_calibration_curve_scalers(std::string analysis_type) { @@ -2484,7 +2484,7 @@ QStringList MapsH5Model::get_calibration_curve_scalers(std::string analysis_type return keys; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Calibration_curve* MapsH5Model::get_calibration_curve(std::string analysis_type, std::string scaler_name) { @@ -2518,7 +2518,7 @@ const std::unordered_map < std::string, Element_Quant*>& MapsH5Model::ge return _all_element_quants[analysis_type][scaler_name]; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsH5Model::generateNameLists(QString analysis_type, std::vector &names) { @@ -2628,4 +2628,4 @@ void MapsH5Model::generateNameLists(QString analysis_type, std::vector #include @@ -23,7 +23,7 @@ #include "fitting/models/gaussian_model.h" #include "data_struct/stream_block.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define MAX_DETECTORS 30 @@ -300,8 +300,8 @@ class MapsH5Model : public QObject }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsH5Model_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsWorkspaceController.cpp b/src/mvc/MapsWorkspaceController.cpp index 98d168e..5fbcd78 100644 --- a/src/mvc/MapsWorkspaceController.cpp +++ b/src/mvc/MapsWorkspaceController.cpp @@ -27,7 +27,7 @@ MapsWorkspaceController::MapsWorkspaceController(QObject* parent) : QObject(pare } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsWorkspaceController::~MapsWorkspaceController() { @@ -44,7 +44,7 @@ MapsWorkspaceController::~MapsWorkspaceController() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceController::imgWidgetClosed() @@ -59,7 +59,7 @@ void MapsWorkspaceController::imgWidgetClosed() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceController::setWorkingDir(QString path) { @@ -71,6 +71,6 @@ void MapsWorkspaceController::setWorkingDir(QString path) _imgStackControllWidget->setWindowTitle(path); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsWorkspaceController.h b/src/mvc/MapsWorkspaceController.h index 5c0f104..e019f9c 100644 --- a/src/mvc/MapsWorkspaceController.h +++ b/src/mvc/MapsWorkspaceController.h @@ -6,7 +6,7 @@ #ifndef MAPS_WORKSPACE_CONTROLLER_H #define MAPS_WORKSPACE_CONTROLLER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include @@ -58,9 +58,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsWorkspaceController_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index 905cf59..c59d2f4 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -22,7 +22,7 @@ const static QString STR_BATCH_ROI("Process ROI's"); const static QString STR_H5_EXPORT("hdf5_export"); const static QString STR_GEN_SCAN_AREA("Generate Scan Area"); -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsWorkspaceFilesWidget::MapsWorkspaceFilesWidget(QWidget* parent) : QWidget(parent) { @@ -34,14 +34,14 @@ MapsWorkspaceFilesWidget::MapsWorkspaceFilesWidget(QWidget* parent) : QWidget(pa } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsWorkspaceFilesWidget::~MapsWorkspaceFilesWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::createLayout() { @@ -110,7 +110,7 @@ void MapsWorkspaceFilesWidget::createLayout() setLayout(vlayout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::setModel(MapsWorkspaceModel *model) { @@ -152,7 +152,7 @@ void MapsWorkspaceFilesWidget::setModel(MapsWorkspaceModel *model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::updatedMDA() { @@ -164,7 +164,7 @@ void MapsWorkspaceFilesWidget::updatedMDA() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::updatedVLM() { @@ -176,7 +176,7 @@ void MapsWorkspaceFilesWidget::updatedVLM() } //_vlm_tab_widget->set_roi_num_list(_model->get_region_num_list()); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::updatedHDF() { @@ -205,7 +205,7 @@ void MapsWorkspaceFilesWidget::update_roi_num(QString name, int val) _mda_tab_widget->set_roi_num(name, val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::setFileTabActionsEnabled(bool val) { @@ -216,7 +216,7 @@ void MapsWorkspaceFilesWidget::setFileTabActionsEnabled(bool val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onOpenModel(const QStringList& names_list, MODEL_TYPE mt) { @@ -441,7 +441,7 @@ void MapsWorkspaceFilesWidget::onCloseModel(const QStringList& names_list, MODEL emit unloadList_model(names_list, mt); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::clearLists() { @@ -511,7 +511,7 @@ void MapsWorkspaceFilesWidget::onPerPixelProcessList(const QStringList& file_lis _per_pixel_fit_widget->show(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onPerPixelProcessListAnalyzed(const QStringList& file_list) { @@ -627,7 +627,7 @@ void MapsWorkspaceFilesWidget::onProcessed_list_update(QStringList file_list) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceFilesWidget::onDatasetSelected(const QString name) { @@ -637,4 +637,4 @@ void MapsWorkspaceFilesWidget::onDatasetSelected(const QString name) } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/MapsWorkspaceFilesWidget.h b/src/mvc/MapsWorkspaceFilesWidget.h index c5f9edb..3cca8ea 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.h +++ b/src/mvc/MapsWorkspaceFilesWidget.h @@ -6,7 +6,7 @@ #ifndef MAPS_WORKSPACE_WIDGET_H #define MAPS_WORKSPACE_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -27,7 +27,7 @@ enum class MODEL_TYPE { MAPS_H5, RAW, VLM }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing * the image from the area detector writer, the window will also be updated to @@ -133,9 +133,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsWorkspaceFilesWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/MapsWorkspaceModel.cpp b/src/mvc/MapsWorkspaceModel.cpp index 42786db..0ff1434 100644 --- a/src/mvc/MapsWorkspaceModel.cpp +++ b/src/mvc/MapsWorkspaceModel.cpp @@ -13,7 +13,7 @@ // confocal, emd, gsecars gsecars std::vector raw_h5_groups = {"2D Scan", "/Data/Image", "xrmmap", "xrfmap" }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_raw_mda(QFileInfo fileInfo) { @@ -23,7 +23,7 @@ bool check_raw_mda(QFileInfo fileInfo) return false; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_raw_h5(QFileInfo fileInfo) { @@ -47,7 +47,7 @@ bool check_raw_h5(QFileInfo fileInfo) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_region_link(QFileInfo fileInfo) { @@ -57,7 +57,7 @@ bool check_region_link(QFileInfo fileInfo) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_roi(QFileInfo fileInfo) { @@ -66,7 +66,7 @@ bool check_roi(QFileInfo fileInfo) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_vlm(QFileInfo fileInfo) { @@ -75,7 +75,7 @@ bool check_vlm(QFileInfo fileInfo) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool check_imgdat_h5(QFileInfo fileInfo) { @@ -134,7 +134,7 @@ MapsWorkspaceModel::MapsWorkspaceModel() : QObject() _all_region_links_suffex.append("tif"); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsWorkspaceModel::~MapsWorkspaceModel() { @@ -162,7 +162,7 @@ MapsWorkspaceModel::~MapsWorkspaceModel() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::load(QString filepath) { @@ -267,7 +267,7 @@ void MapsWorkspaceModel::load(QString filepath) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::reload_raw() { @@ -275,7 +275,7 @@ void MapsWorkspaceModel::reload_raw() emit doneLoadingRAW(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::reload_analyzed() { @@ -283,7 +283,7 @@ void MapsWorkspaceModel::reload_analyzed() emit doneLoadingImgDat(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::reload_vlm() { @@ -291,7 +291,7 @@ void MapsWorkspaceModel::reload_vlm() emit doneLoadingVLM(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::reload_roi() { @@ -299,7 +299,7 @@ void MapsWorkspaceModel::reload_roi() get_filesnames_in_directory(*_dir, "rois", _all_roi_suffex, &_roi_fileinfo_list, check_roi, false); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::reload_region_link() { @@ -307,7 +307,7 @@ void MapsWorkspaceModel::reload_region_link() get_filesnames_in_directory(*_dir, "VLM/region_links", _all_region_links_suffex, &_region_links_fileinfo_list, check_region_link, false); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::unload() { @@ -346,7 +346,7 @@ void MapsWorkspaceModel::unload() emit doneUnloading(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::_load_region_links(QString name, MapsH5Model* model) { @@ -372,7 +372,7 @@ void MapsWorkspaceModel::_load_region_links(QString name, MapsH5Model* model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- MapsH5Model* MapsWorkspaceModel::get_MapsH5_Model(QString name) { @@ -405,7 +405,7 @@ MapsH5Model* MapsWorkspaceModel::get_MapsH5_Model(QString name) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RAW_Model* MapsWorkspaceModel::get_RAW_Model(QString name) { @@ -436,7 +436,7 @@ RAW_Model* MapsWorkspaceModel::get_RAW_Model(QString name) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- VLM_Model* MapsWorkspaceModel::get_VLM_Model(QString name) { @@ -474,7 +474,7 @@ VLM_Model* MapsWorkspaceModel::get_VLM_Model(QString name) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector MapsWorkspaceModel::get_loaded_raw_names() { @@ -486,7 +486,7 @@ std::vector MapsWorkspaceModel::get_loaded_raw_names() return ret; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector MapsWorkspaceModel::get_loaded_h5_names() { @@ -498,7 +498,7 @@ std::vector MapsWorkspaceModel::get_loaded_h5_names() return ret; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector MapsWorkspaceModel::get_loaded_vlm_names() { @@ -569,7 +569,7 @@ void MapsWorkspaceModel::unload_all_H5_Model() _h5_models.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::unload_RAW_Model(QString name) { @@ -592,7 +592,7 @@ void MapsWorkspaceModel::unload_all_RAW_Model() _raw_models.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void MapsWorkspaceModel::unload_VLM_Model(QString name) { @@ -615,7 +615,7 @@ void MapsWorkspaceModel::unload_all_VLM_Model() _vlm_models.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString MapsWorkspaceModel::get_directory_name() { @@ -626,7 +626,7 @@ QString MapsWorkspaceModel::get_directory_name() return ""; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool MapsWorkspaceModel::_load_fit_params() { @@ -653,7 +653,7 @@ bool MapsWorkspaceModel::_load_fit_params() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool get_filesnames_in_directory(QDir dir, QString sub_dir_name, QList suffex, std::map *fileinfo_list, Check_Func_Def chk_func, bool prepend_sub_dir) { @@ -697,7 +697,7 @@ bool get_filesnames_in_directory(QDir dir, QString sub_dir_name, QList return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Fit_Parameters* MapsWorkspaceModel::getFitParameters(int idx) { @@ -708,7 +708,7 @@ data_struct::Fit_Parameters* MapsWorkspaceModel::getFitParameters(int id return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Params_Override* MapsWorkspaceModel::getParamOverride(int idx) { @@ -719,7 +719,7 @@ data_struct::Params_Override* MapsWorkspaceModel::getParamOverride(int i return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Fit_Element_Map_Dict* MapsWorkspaceModel::getElementToFit(int idx) { diff --git a/src/mvc/MapsWorkspaceModel.h b/src/mvc/MapsWorkspaceModel.h index f797ef6..85b38fa 100644 --- a/src/mvc/MapsWorkspaceModel.h +++ b/src/mvc/MapsWorkspaceModel.h @@ -6,7 +6,7 @@ #ifndef MAPS_WORKSPACE_MODEL_H #define MAPS_WORKSPACE_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include "RawH5Model.h" @@ -18,7 +18,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- typedef std::function Check_Func_Def; @@ -184,8 +184,8 @@ public slots: bool get_filesnames_in_directory(QDir dir, QString sub_dir_name, QList suffex, std::map* fileinfo_list, Check_Func_Def chk_func, bool prepend_sub_dir); -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* MapsWorkspaceModel_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/NetStreamWorker.h b/src/mvc/NetStreamWorker.h index ab4bbe9..5a8f26f 100644 --- a/src/mvc/NetStreamWorker.h +++ b/src/mvc/NetStreamWorker.h @@ -6,13 +6,13 @@ #ifndef NET_STREAM_WORKER_H #define NET_STREAM_WORKER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include "support/zmq/zmq.hpp" #include "io/net/basic_serializer.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class NetStreamWorker : public QThread @@ -113,8 +113,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* NET_STREAM_WORKER_H */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/NumericPrecDelegate.cpp b/src/mvc/NumericPrecDelegate.cpp index 41b3f03..76292e8 100644 --- a/src/mvc/NumericPrecDelegate.cpp +++ b/src/mvc/NumericPrecDelegate.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- NumericPrecDelegate::NumericPrecDelegate(QObject* parent) : QStyledItemDelegate(parent) { diff --git a/src/mvc/NumericPrecDelegate.h b/src/mvc/NumericPrecDelegate.h index c121054..547c812 100644 --- a/src/mvc/NumericPrecDelegate.h +++ b/src/mvc/NumericPrecDelegate.h @@ -6,7 +6,7 @@ #ifndef NUMERIC_PREC_DELEGATE_H #define NUMERIC_PREC_DELEGATE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -38,8 +38,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/OptimizerOptionsWidget.cpp b/src/mvc/OptimizerOptionsWidget.cpp index ddeb6c3..aeac8e3 100644 --- a/src/mvc/OptimizerOptionsWidget.cpp +++ b/src/mvc/OptimizerOptionsWidget.cpp @@ -10,7 +10,7 @@ #include #include - /*---------------------------------------------------------------------------*/ + //--------------------------------------------------------------------------- const QString tip_ftol = "Relative error desired in the sum of squares. Termination occurs when both the actual and predicted relative reductions in the sum of squares are at most ftol."; const QString tip_xtol = "Relative error between last two approximations. Termination occurs when the relative error between two consecutive iterates is at most xtol."; @@ -23,21 +23,21 @@ const QString tip_covtol = "Range tolerance for covariance calculation Default: const QString tip_verbose = "OR'ed: 1: print some messages; 2: print Jacobian."; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- OptimizerOptionsWidget::OptimizerOptionsWidget(QWidget *parent) : QWidget(parent) { _createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- OptimizerOptionsWidget::~OptimizerOptionsWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void OptimizerOptionsWidget::_createLayout() { @@ -156,7 +156,7 @@ void OptimizerOptionsWidget::_createLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void OptimizerOptionsWidget::setOptimizer(QString opt, fitting::optimizers::Optimizer& optimizer) { @@ -178,7 +178,7 @@ void OptimizerOptionsWidget::setOptimizer(QString opt, fitting::optimizers::Opti updateGUIOptimizerOptions(optimizer); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void OptimizerOptionsWidget::updateGUIOptimizerOptions(fitting::optimizers::Optimizer& optimizer) { @@ -223,7 +223,7 @@ void OptimizerOptionsWidget::updateGUIOptimizerOptions(fitting::optimizers::Opt } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void OptimizerOptionsWidget::updateOptimizerOptions(fitting::optimizers::Optimizer& optimizer) { @@ -240,5 +240,5 @@ void OptimizerOptionsWidget::updateOptimizerOptions(fitting::optimizers::Optimi optimizer.set_options(opt); } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/OptimizerOptionsWidget.h b/src/mvc/OptimizerOptionsWidget.h index 0c33847..b0a1d7e 100644 --- a/src/mvc/OptimizerOptionsWidget.h +++ b/src/mvc/OptimizerOptionsWidget.h @@ -6,7 +6,7 @@ #ifndef Optimizer_Options_Widget_H #define Optimizer_Options_Widget_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -23,13 +23,13 @@ #include "fitting/routines/param_optimized_fit_routine.h" #include "fitting/routines/hybrid_param_nnls_fit_routine.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const static QString STR_LM_FIT = "Levenberg-Marquardt Fit"; const static QString STR_MP_FIT = "MP Fit"; const static QString STR_HYBRID_MP_FIT = "Hybrid MP Fit"; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class OptimizerOptionsWidget : public QWidget { @@ -92,8 +92,8 @@ class OptimizerOptionsWidget : public QWidget }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/PerPixelFitWidget.cpp b/src/mvc/PerPixelFitWidget.cpp index 3e2be68..034dd73 100644 --- a/src/mvc/PerPixelFitWidget.cpp +++ b/src/mvc/PerPixelFitWidget.cpp @@ -6,7 +6,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PerPixelFitWidget::PerPixelFitWidget(QWidget *parent) : QWidget(parent) { @@ -15,7 +15,7 @@ PerPixelFitWidget::PerPixelFitWidget(QWidget *parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PerPixelFitWidget::~PerPixelFitWidget() { @@ -23,7 +23,7 @@ PerPixelFitWidget::~PerPixelFitWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PerPixelFitWidget::createLayout() { @@ -50,7 +50,7 @@ void PerPixelFitWidget::setDir(std::string directory) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PerPixelFitWidget::runProcessing() { diff --git a/src/mvc/PerPixelFitWidget.h b/src/mvc/PerPixelFitWidget.h index cb7ad33..0b5f372 100644 --- a/src/mvc/PerPixelFitWidget.h +++ b/src/mvc/PerPixelFitWidget.h @@ -6,7 +6,7 @@ #ifndef PER_PIXEL_FIT_WIDGET_H #define PER_PIXEL_FIT_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -27,7 +27,7 @@ #include #include "mvc/PerPixelOptionsWidget.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class PerPixelFitWidget : public QWidget @@ -73,8 +73,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/PerPixelOptionsWidget.cpp b/src/mvc/PerPixelOptionsWidget.cpp index d06f8c7..0d38661 100644 --- a/src/mvc/PerPixelOptionsWidget.cpp +++ b/src/mvc/PerPixelOptionsWidget.cpp @@ -10,7 +10,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PerPixelOptionsWidget::PerPixelOptionsWidget(QWidget *parent) : QWidget(parent) { @@ -24,7 +24,7 @@ PerPixelOptionsWidget::PerPixelOptionsWidget(QWidget *parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PerPixelOptionsWidget::~PerPixelOptionsWidget() { @@ -32,7 +32,7 @@ PerPixelOptionsWidget::~PerPixelOptionsWidget() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PerPixelOptionsWidget::createLayout() { @@ -115,7 +115,7 @@ void PerPixelOptionsWidget::createLayout() setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PerPixelOptionsWidget::updateFileList(QStringList file_list) { @@ -150,7 +150,7 @@ void PerPixelOptionsWidget::onCancel() emit onStop(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PerPixelOptionsWidget::status_callback(size_t cur_block, size_t total_blocks) { diff --git a/src/mvc/PerPixelOptionsWidget.h b/src/mvc/PerPixelOptionsWidget.h index 29ddc83..edc2a59 100644 --- a/src/mvc/PerPixelOptionsWidget.h +++ b/src/mvc/PerPixelOptionsWidget.h @@ -6,7 +6,7 @@ #ifndef PER_PIXEL_OPTIONS_WIDGET_H #define PER_PIXEL_OPTIONS_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -28,7 +28,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class PerPixelOptionsWidget : public QWidget @@ -254,8 +254,8 @@ protected slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/QuantificationWidget.h b/src/mvc/QuantificationWidget.h index 38f5204..aca628a 100644 --- a/src/mvc/QuantificationWidget.h +++ b/src/mvc/QuantificationWidget.h @@ -6,7 +6,7 @@ #ifndef QUANTIFICATION_WIDGET_H #define QUANTIFICATION_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -19,7 +19,7 @@ #include "preferences/Preferences.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class QuantificationWidget : public QWidget { @@ -85,9 +85,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* QuantificationWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/RAW_Model.cpp b/src/mvc/RAW_Model.cpp index 522dc05..4973dd1 100644 --- a/src/mvc/RAW_Model.cpp +++ b/src/mvc/RAW_Model.cpp @@ -23,14 +23,14 @@ RAW_Model::RAW_Model() : QObject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- RAW_Model::~RAW_Model() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool RAW_Model::load(QString directory, QString filename) { @@ -170,7 +170,7 @@ bool RAW_Model::load(QString filename) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Params_Override* RAW_Model::getParamOverride(int idx) { @@ -185,7 +185,7 @@ data_struct::Params_Override* RAW_Model::getParamOverride(int idx) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Params_Override* RAW_Model::getParamOverrideOrAvg(int idx) { @@ -203,14 +203,14 @@ data_struct::Params_Override* RAW_Model::getParamOverrideOrAvg(int idx) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- unsigned int RAW_Model::getNumIntegratedSpectra() { return _integrated_spectra_map.size(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- std::vector RAW_Model::getDetectorKeys() { @@ -224,9 +224,9 @@ std::vector RAW_Model::getDetectorKeys() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Spectra* RAW_Model::getIntegratedSpectra(unsigned int det) { @@ -237,11 +237,11 @@ data_struct::Spectra* RAW_Model::getIntegratedSpectra(unsigned int det) return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- data_struct::Scan_Info* RAW_Model::getScanInfo() { return &_scan_info; } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/RAW_Model.h b/src/mvc/RAW_Model.h index d6366d8..ec79215 100644 --- a/src/mvc/RAW_Model.h +++ b/src/mvc/RAW_Model.h @@ -6,7 +6,7 @@ #ifndef RAW_MODEL_H #define RAW_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include "io/file/mda_io.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model for raw mda files @@ -76,8 +76,8 @@ class RAW_Model : public QObject }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RAW_MODEL_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/RawH5Model.h b/src/mvc/RawH5Model.h index 9d93f51..0df7047 100644 --- a/src/mvc/RawH5Model.h +++ b/src/mvc/RawH5Model.h @@ -6,7 +6,7 @@ #ifndef RAW_H5_MODEL_H #define RAW_H5_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -19,7 +19,7 @@ #include "fitting/models/gaussian_model.h" #include "data_struct/stream_block.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model for Maps analyzed hdf5 files */ @@ -141,8 +141,8 @@ class RawH5Model : public QObject }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RawH5Model_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/RoiStatisticsWidget.h b/src/mvc/RoiStatisticsWidget.h index 590ba0d..f20c5d9 100644 --- a/src/mvc/RoiStatisticsWidget.h +++ b/src/mvc/RoiStatisticsWidget.h @@ -6,7 +6,7 @@ #ifndef Roi_Statistics_Widget_H #define Roi_Statistics_Widget_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -18,7 +18,7 @@ #include "data_struct/element_info.h" #include "mvc/MapsH5Model.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class RoiStatisticsWidget : public QWidget { @@ -92,9 +92,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* RoiStatisticsWidget.h */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SWSModel.cpp b/src/mvc/SWSModel.cpp index 72e6799..eea4831 100644 --- a/src/mvc/SWSModel.cpp +++ b/src/mvc/SWSModel.cpp @@ -33,7 +33,7 @@ SWSModel::SWSModel() : VLM_Model() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SWSModel::~SWSModel() { @@ -46,7 +46,7 @@ SWSModel::~SWSModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::load(QString filepath) { @@ -97,7 +97,7 @@ bool SWSModel::load(QString filepath) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SWSModel::check_and_load_autosave() { @@ -139,7 +139,7 @@ void SWSModel::check_and_load_autosave() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- gstar::CoordinateModel* SWSModel::getCoordModel() { @@ -148,7 +148,7 @@ gstar::CoordinateModel* SWSModel::getCoordModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SWSModel::getPixelByteSize() { @@ -157,7 +157,7 @@ int SWSModel::getPixelByteSize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SWSModel::getImageDims(int imageIndex) { @@ -174,7 +174,7 @@ int SWSModel::getImageDims(int imageIndex) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SWSModel::getNumberOfImages() { @@ -183,7 +183,7 @@ int SWSModel::getNumberOfImages() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SWSModel::getRank() { @@ -192,7 +192,7 @@ int SWSModel::getRank() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SWSModel::_initializeCoordModel() { @@ -375,7 +375,7 @@ void SWSModel::_initializeCoordModel() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loadDirectory() { @@ -417,7 +417,7 @@ bool SWSModel::loadDirectory() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::readPMGInt(QFile *pmgFile, QString ID, int& data) { @@ -438,7 +438,7 @@ bool SWSModel::readPMGInt(QFile *pmgFile, QString ID, int& data) return false; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::readPMGDoubleArray(QFile *pmgFile, QString ID, @@ -475,7 +475,7 @@ bool SWSModel::readPMGDoubleArray(QFile *pmgFile, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::readPMGString(QFile *pmgFile, QString ID, QString& data) { @@ -508,7 +508,7 @@ bool SWSModel::readPMGString(QFile *pmgFile, QString ID, QString& data) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loadPMG() { @@ -632,7 +632,7 @@ bool SWSModel::loadPMG() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loaded() { @@ -641,7 +641,7 @@ bool SWSModel::loaded() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loadTiff() { @@ -684,7 +684,7 @@ bool SWSModel::loadTiff() return m_tiffLoaded; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loadTiles() { @@ -745,7 +745,7 @@ bool SWSModel::loadTiles() return loaded; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SWSModel::loadXYZ() { @@ -795,7 +795,7 @@ bool SWSModel::loadXYZ() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- uchar* SWSModel::getBytes() { @@ -804,7 +804,7 @@ uchar* SWSModel::getBytes() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QImage* SWSModel::getImage() { @@ -813,4 +813,4 @@ QImage* SWSModel::getImage() } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/SWSModel.h b/src/mvc/SWSModel.h index 5f3d185..067b1c0 100644 --- a/src/mvc/SWSModel.h +++ b/src/mvc/SWSModel.h @@ -6,7 +6,7 @@ #ifndef SWS_MODEL_H #define SWS_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -15,7 +15,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model for SWS workspace. Used with SWSWidget @@ -224,8 +224,8 @@ class SWSModel : public VLM_Model }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* SWSModel_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/Scaler_Widget.cpp b/src/mvc/Scaler_Widget.cpp index f8ee5d5..77b593f 100644 --- a/src/mvc/Scaler_Widget.cpp +++ b/src/mvc/Scaler_Widget.cpp @@ -7,7 +7,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Scaler_Widget::Scaler_Widget(QWidget* parent) : QWidget(parent) { @@ -17,14 +17,14 @@ Scaler_Widget::Scaler_Widget(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Scaler_Widget::~Scaler_Widget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Scaler_Widget::createLayout() { @@ -47,7 +47,7 @@ void Scaler_Widget::createLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Scaler_Widget::setModel(RAW_Model* model) { @@ -74,7 +74,7 @@ void Scaler_Widget::setModel(RAW_Model* model) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Scaler_Widget::onScalerSelect(const QString& det) { @@ -109,4 +109,4 @@ void Scaler_Widget::onScalerSelect(const QString& det) } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/Scaler_Widget.h b/src/mvc/Scaler_Widget.h index f4d2da9..9cec6e8 100644 --- a/src/mvc/Scaler_Widget.h +++ b/src/mvc/Scaler_Widget.h @@ -6,14 +6,14 @@ #ifndef SCALER_WIDGET_H #define SCALER_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class Scaler_Widget : public QWidget { @@ -53,8 +53,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* SCALER_WIDGET_H */ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ScanCorrCoefDialog.h b/src/mvc/ScanCorrCoefDialog.h index 5a8d8d7..2e4bf00 100644 --- a/src/mvc/ScanCorrCoefDialog.h +++ b/src/mvc/ScanCorrCoefDialog.h @@ -6,7 +6,7 @@ #ifndef ScanCorrCoefDialog_DIALOG_H #define ScanCorrCoefDialog_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -28,7 +28,7 @@ #include #include "mvc/MapsH5Model.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class ScanCorrCoefDialog : public QWidget @@ -102,8 +102,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ScanQueueWidget.h b/src/mvc/ScanQueueWidget.h index 842ba1a..e425ca0 100644 --- a/src/mvc/ScanQueueWidget.h +++ b/src/mvc/ScanQueueWidget.h @@ -6,12 +6,12 @@ #ifndef SCAN_QUEUE_WIDGET_H #define SCAN_QUEUE_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class ScanQueueWidget : public QWidget @@ -52,8 +52,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* LiveLiveMapsElementsWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ScatterPlotView.cpp b/src/mvc/ScatterPlotView.cpp index 71f5ddf..ad0cf25 100644 --- a/src/mvc/ScatterPlotView.cpp +++ b/src/mvc/ScatterPlotView.cpp @@ -581,5 +581,5 @@ void ScatterPlotView::_updatePlot() } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ScatterPlotView.h b/src/mvc/ScatterPlotView.h index 5a214e3..07bdecf 100644 --- a/src/mvc/ScatterPlotView.h +++ b/src/mvc/ScatterPlotView.h @@ -6,7 +6,7 @@ #ifndef SCATTER_PLOT_VIEW_H #define SCATTER_PLOT_VIEW_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -108,9 +108,9 @@ public slots: }; //--------------------------------------------------------------------------- -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ScatterPlotView_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/ScatterPlotWidget.cpp b/src/mvc/ScatterPlotWidget.cpp index c60501a..0ecd9a5 100644 --- a/src/mvc/ScatterPlotWidget.cpp +++ b/src/mvc/ScatterPlotWidget.cpp @@ -19,7 +19,7 @@ ScatterPlotWidget::ScatterPlotWidget(QWidget* parent) : QWidget(parent) _createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ScatterPlotWidget::~ScatterPlotWidget() { @@ -29,7 +29,7 @@ ScatterPlotWidget::~ScatterPlotWidget() _plot_view_list.clear(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ScatterPlotWidget::_createLayout() { @@ -287,5 +287,5 @@ void ScatterPlotWidget::onScan() _scan_corr_coef_dialog.show(); } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/ScatterPlotWidget.h b/src/mvc/ScatterPlotWidget.h index 69f9e99..530b029 100644 --- a/src/mvc/ScatterPlotWidget.h +++ b/src/mvc/ScatterPlotWidget.h @@ -6,7 +6,7 @@ #ifndef SCATTER_PLOT_WIDGET_H #define SCATTER_PLOT_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -109,9 +109,9 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* ScatterPlotWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SolverProfileWidget.cpp b/src/mvc/SolverProfileWidget.cpp index 51919d7..083a4c3 100644 --- a/src/mvc/SolverProfileWidget.cpp +++ b/src/mvc/SolverProfileWidget.cpp @@ -15,7 +15,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverProfileWidget::SolverProfileWidget(QWidget* parent) : QDialog(parent) { @@ -29,14 +29,14 @@ SolverProfileWidget::SolverProfileWidget(QWidget* parent) : QDialog(parent) addDefaultTransformers(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverProfileWidget::~SolverProfileWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverProfileWidget::addProfileItem(QString name, QString desc) { @@ -54,7 +54,7 @@ void SolverProfileWidget::addProfileItem(QString name, QString desc) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverProfileWidget::addProfile(QString name, QString desc, QMap coef) { @@ -101,7 +101,7 @@ void SolverProfileWidget::addProfile(QString name, QString desc, QMap oldVals, QMap newVals) { @@ -151,7 +151,7 @@ void SolverWidget::setCoefs(QMap oldVals, QMap } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverWidget::setStatusString(QString val) { @@ -160,7 +160,7 @@ void SolverWidget::setStatusString(QString val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverWidget::setUseBtnEnabled(bool val) { @@ -169,7 +169,7 @@ void SolverWidget::setUseBtnEnabled(bool val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverWidget::useNewValues() { @@ -179,4 +179,4 @@ void SolverWidget::useNewValues() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SolverWidget.h b/src/mvc/SolverWidget.h index 1ecfbdd..b51191b 100644 --- a/src/mvc/SolverWidget.h +++ b/src/mvc/SolverWidget.h @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Widget that will show the old and new value of the solver @@ -123,8 +123,8 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // CHAIN_LOOP_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SpectraWidget.cpp b/src/mvc/SpectraWidget.cpp index dbc398d..a9c221c 100644 --- a/src/mvc/SpectraWidget.cpp +++ b/src/mvc/SpectraWidget.cpp @@ -16,7 +16,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SpectraWidget::SpectraWidget(QWidget* parent) : QWidget(parent) { @@ -47,14 +47,14 @@ SpectraWidget::SpectraWidget(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SpectraWidget::~SpectraWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::createLayout() { @@ -174,7 +174,7 @@ void SpectraWidget::createLayout() setLayout(vlayout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::setBackgroundBlack(bool val) { @@ -198,7 +198,7 @@ void SpectraWidget::setDisplayRange(QString wmin, QString wmax, QString hmin, QS onSpectraDisplayHeightChanged(hmin); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::onSpectraDisplayChanged(const QString &) { @@ -208,7 +208,7 @@ void SpectraWidget::onSpectraDisplayChanged(const QString &) _top_axis_elements->setRange(minRange, maxRange); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::onSpectraDisplayHeightChanged(const QString&) { @@ -217,7 +217,7 @@ void SpectraWidget::onSpectraDisplayHeightChanged(const QString&) _currentYAxis->setRange(minRange, maxRange); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::onResetChartViewOnlyY() { @@ -226,7 +226,7 @@ void SpectraWidget::onResetChartViewOnlyY() _currentYAxis->setRange(1, _int_spec_max_y); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::onResetChartView() { @@ -243,7 +243,7 @@ void SpectraWidget::onResetChartView() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::onUpdateChartLineEdits() { @@ -261,7 +261,7 @@ void SpectraWidget::onUpdateChartLineEdits() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::append_spectra(QString name, const data_struct::ArrayTr* spectra, const data_struct::ArrayTr*energy, QColor* color) { @@ -391,7 +391,7 @@ void SpectraWidget::append_spectra(QString name, const data_struct::ArrayTr* element) { @@ -528,7 +528,7 @@ void SpectraWidget::set_element_lines(data_struct::Fit_Element_Map* elem } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::remove_spectra(QString name) { @@ -546,7 +546,7 @@ void SpectraWidget::remove_spectra(QString name) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::ShowContextMenu(const QPoint &pos) { @@ -555,7 +555,7 @@ void SpectraWidget::ShowContextMenu(const QPoint &pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::set_log10(bool val) { @@ -595,7 +595,7 @@ void SpectraWidget::set_log10(bool val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QPixmap SpectraWidget::getPngofChart() { @@ -604,7 +604,7 @@ QPixmap SpectraWidget::getPngofChart() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void SpectraWidget::_update_series() { @@ -630,7 +630,7 @@ void SpectraWidget::_update_series() //_chart->createDefaultAxes(); } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::connectMarkers() { @@ -644,7 +644,7 @@ void SpectraWidget::connectMarkers() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::disconnectMarkers() { @@ -655,7 +655,7 @@ void SpectraWidget::disconnectMarkers() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::handleMarkerClicked() { @@ -708,7 +708,7 @@ void SpectraWidget::handleMarkerClicked() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::clear_top_axis() { @@ -719,7 +719,7 @@ void SpectraWidget::clear_top_axis() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidget::set_top_axis(std::map < float, std::string> elements) { @@ -729,4 +729,4 @@ void SpectraWidget::set_top_axis(std::map < float, std::string> elements) } } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/SpectraWidget.h b/src/mvc/SpectraWidget.h index 3c52dcf..3fe9427 100644 --- a/src/mvc/SpectraWidget.h +++ b/src/mvc/SpectraWidget.h @@ -6,7 +6,7 @@ #ifndef SPECTRA_WIDGET_H #define SPECTRA_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -67,7 +67,7 @@ #define LINE_M_G 126 #define LINE_M_B 126 -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief When open the acquisition window, the widget is showing for capturing @@ -204,9 +204,9 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* SpectraWidget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SpectraWidgetSettingsDialog.cpp b/src/mvc/SpectraWidgetSettingsDialog.cpp index d75a922..30b87c1 100644 --- a/src/mvc/SpectraWidgetSettingsDialog.cpp +++ b/src/mvc/SpectraWidgetSettingsDialog.cpp @@ -8,7 +8,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SpectraWidgetSettingsDialog::SpectraWidgetSettingsDialog(QWidget *parent) : QDialog(parent) { @@ -17,14 +17,14 @@ SpectraWidgetSettingsDialog::SpectraWidgetSettingsDialog(QWidget *parent) : QDia createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SpectraWidgetSettingsDialog::~SpectraWidgetSettingsDialog() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidgetSettingsDialog::createLayout() { @@ -77,7 +77,7 @@ void SpectraWidgetSettingsDialog::createLayout() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidgetSettingsDialog::onAccepted() { @@ -92,11 +92,11 @@ void SpectraWidgetSettingsDialog::onAccepted() close(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SpectraWidgetSettingsDialog::onCancel() { close(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/SpectraWidgetSettingsDialog.h b/src/mvc/SpectraWidgetSettingsDialog.h index 266bcfb..7cdfb4e 100644 --- a/src/mvc/SpectraWidgetSettingsDialog.h +++ b/src/mvc/SpectraWidgetSettingsDialog.h @@ -6,7 +6,7 @@ #ifndef SpectraWidgetSettingsDialog_H #define SpectraWidgetSettingsDialog_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -21,7 +21,7 @@ #include #include "mvc/ComboBoxDelegate.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class SpectraWidgetSettingsDialog : public QDialog { @@ -80,8 +80,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/TIFF_Model.cpp b/src/mvc/TIFF_Model.cpp index 3546257..6ba8042 100644 --- a/src/mvc/TIFF_Model.cpp +++ b/src/mvc/TIFF_Model.cpp @@ -19,7 +19,7 @@ using std::vector; using std::pair; using std::string; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- TIFF_Model::TIFF_Model() : VLM_Model() { @@ -27,14 +27,14 @@ TIFF_Model::TIFF_Model() : VLM_Model() //_tif_ptr = nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- TIFF_Model::~TIFF_Model() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool TIFF_Model::load(QString filepath) { @@ -130,7 +130,7 @@ bool TIFF_Model::load(QString filepath) return _loaded; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool TIFF_Model::loaded() { @@ -139,7 +139,7 @@ bool TIFF_Model::loaded() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int TIFF_Model::getPixelByteSize() { @@ -148,7 +148,7 @@ int TIFF_Model::getPixelByteSize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void TIFF_Model::_initializeCoordModel() { @@ -163,7 +163,7 @@ void TIFF_Model::_initializeCoordModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString TIFF_Model::getDataPath() { @@ -172,7 +172,7 @@ QString TIFF_Model::getDataPath() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int TIFF_Model::getImageDims(int imageIndex) { @@ -189,7 +189,7 @@ int TIFF_Model::getImageDims(int imageIndex) return 0; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int TIFF_Model::getNumberOfImages() { diff --git a/src/mvc/TIFF_Model.h b/src/mvc/TIFF_Model.h index 59369ac..eed975c 100644 --- a/src/mvc/TIFF_Model.h +++ b/src/mvc/TIFF_Model.h @@ -6,7 +6,7 @@ #ifndef TIFF_MODEL_H #define TIFF_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -14,7 +14,7 @@ #include #include "data_struct/fit_parameters.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model to manipulate the image path behavior, such as get @@ -107,8 +107,8 @@ class TIFF_Model : public VLM_Model }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* TIFF_Model_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/UpgradeRoiDialog.cpp b/src/mvc/UpgradeRoiDialog.cpp index 4c0d43a..8358b94 100644 --- a/src/mvc/UpgradeRoiDialog.cpp +++ b/src/mvc/UpgradeRoiDialog.cpp @@ -11,7 +11,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UpgradeRoiDialog::UpgradeRoiDialog() : QDialog() { @@ -43,7 +43,7 @@ UpgradeRoiDialog::UpgradeRoiDialog() : QDialog() _createLayout(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UpgradeRoiDialog::~UpgradeRoiDialog() { @@ -51,7 +51,7 @@ UpgradeRoiDialog::~UpgradeRoiDialog() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UpgradeRoiDialog::_createLayout() { @@ -101,7 +101,7 @@ void UpgradeRoiDialog::_createLayout() this->setLayout(layout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UpgradeRoiDialog::setDirectory(QDir directory) { @@ -129,7 +129,7 @@ void UpgradeRoiDialog::onCancelClose() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void UpgradeRoiDialog::runProcessing() { @@ -184,7 +184,7 @@ void UpgradeRoiDialog::runProcessing() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool UpgradeRoiDialog::_get_filesnames_in_directory(QDir dir, QString sub_dir_name, QList suffex, std::map* fileinfo_list) { @@ -221,7 +221,7 @@ bool UpgradeRoiDialog::_get_filesnames_in_directory(QDir dir, QString sub_dir_na return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool UpgradeRoiDialog::_load_v9_rois(QString fname, MapsH5Model* model, QString &out_hdf_file) { @@ -315,5 +315,5 @@ bool UpgradeRoiDialog::_load_v9_rois(QString fname, MapsH5Model* model, QString return false; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/UpgradeRoiDialog.h b/src/mvc/UpgradeRoiDialog.h index 4949ee5..7570edf 100644 --- a/src/mvc/UpgradeRoiDialog.h +++ b/src/mvc/UpgradeRoiDialog.h @@ -6,7 +6,7 @@ #ifndef UPGRADE_ROI_DIALOG_H #define UPGRADE_ROI_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -28,7 +28,7 @@ #include #include "MapsH5Model.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString STR_V9_ROIS_DIR = "rois_v9"; class UpgradeRoiDialog : public QDialog @@ -101,8 +101,8 @@ public slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/VLM_Model.cpp b/src/mvc/VLM_Model.cpp index 4b497bb..13fff11 100644 --- a/src/mvc/VLM_Model.cpp +++ b/src/mvc/VLM_Model.cpp @@ -22,7 +22,7 @@ VLM_Model::VLM_Model() : AbstractWindowModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- VLM_Model::~VLM_Model() { @@ -179,7 +179,7 @@ void VLM_Model::save_xml(QString filename) delete xmlWriter; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void VLM_Model::check_and_load_autosave() { @@ -230,7 +230,7 @@ void VLM_Model::check_and_load_autosave() } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap VLM_Model::_parseMarker(QXmlStreamReader& xml) { @@ -299,7 +299,7 @@ QMap VLM_Model::_parseMarker(QXmlStreamReader& xml) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap VLM_Model::_parseRegionMarker(QXmlStreamReader& xml) { @@ -364,7 +364,7 @@ QMap VLM_Model::_parseRegionMarker(QXmlStreamReader& xml) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- gstar::CoordinateModel* VLM_Model::getCoordModel() { @@ -373,5 +373,5 @@ gstar::CoordinateModel* VLM_Model::getCoordModel() } -/*---------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/VLM_Model.h b/src/mvc/VLM_Model.h index e6da791..b4be945 100644 --- a/src/mvc/VLM_Model.h +++ b/src/mvc/VLM_Model.h @@ -6,14 +6,14 @@ #ifndef VLM_MODEL_H #define VLM_MODEL_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model for SWS workspace. Used with SWSWidget @@ -87,8 +87,8 @@ class VLM_Model : public AbstractWindowModel }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* VLM_Model_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/mvc/VLM_Widget.cpp b/src/mvc/VLM_Widget.cpp index 4905a43..e0a0e1f 100644 --- a/src/mvc/VLM_Widget.cpp +++ b/src/mvc/VLM_Widget.cpp @@ -151,7 +151,7 @@ void VLM_Widget::addCalibration() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::addTopWindowPoints() { @@ -355,7 +355,7 @@ void VLM_Widget::_createLightToMicroCoords(int id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::_createSolver() { @@ -427,7 +427,7 @@ void VLM_Widget::_createSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- UProbeRegionGraphicsItem* VLM_Widget::getSelectedRegion() { @@ -446,7 +446,7 @@ UProbeRegionGraphicsItem* VLM_Widget::getSelectedRegion() return nullptr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::zoomMicroProbeRegion() { @@ -456,7 +456,7 @@ void VLM_Widget::zoomMicroProbeRegion() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::exportSelectedRegionInformation(QList* summaryInformation, QList* summaryWarnings) { @@ -662,7 +662,7 @@ void VLM_Widget::exportSelectedRegionInformation(QList* summaryInformat } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::exportRegionXMLAndImage(UProbeRegionGraphicsItem* item, QString filePathToSave, @@ -839,7 +839,7 @@ void VLM_Widget::exportRegionXMLAndImage(UProbeRegionGraphicsItem* item, } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::callbackPvXUpdatedFloat(float val) { @@ -849,7 +849,7 @@ void VLM_Widget::callbackPvXUpdatedFloat(float val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::callbackPvYUpdatedFloat(float val) { @@ -859,7 +859,7 @@ void VLM_Widget::callbackPvYUpdatedFloat(float val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::callbackPvXUpdatedDouble(double val) { @@ -890,7 +890,7 @@ void VLM_Widget::callbackPvXUpdatedDouble(double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::callbackPvYUpdatedDouble(double val) { @@ -921,7 +921,7 @@ void VLM_Widget::callbackPvYUpdatedDouble(double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::calModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) @@ -932,7 +932,7 @@ void VLM_Widget::calModelDataChanged(const QModelIndex& topLeft, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::createActions() { @@ -975,7 +975,7 @@ void VLM_Widget::createActions() SLOT(grabMicroProbePV())); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::linkRegionToDataset() { @@ -1026,7 +1026,7 @@ void VLM_Widget::linkRegionToDataset() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::cancelUpdatedSolverVariables() { @@ -1035,7 +1035,7 @@ void VLM_Widget::cancelUpdatedSolverVariables() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::createCalibrationTab() { @@ -1139,7 +1139,7 @@ void VLM_Widget::createCalibrationTab() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::CallPythonFunc() { @@ -1177,7 +1177,7 @@ void VLM_Widget::CallPythonFunc() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::createMicroProbeMenu() { @@ -1249,7 +1249,7 @@ void VLM_Widget::createMicroProbeMenu() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::createMicroProbeTab() { @@ -1298,7 +1298,7 @@ void VLM_Widget::createMicroProbeTab() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::createLayout() { @@ -1341,7 +1341,7 @@ void VLM_Widget::createLayout() m_tabWidget->setCurrentIndex(MICROPROBE_IDX); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::displayContextMenu(QWidget* parent, const QPoint& pos) @@ -1503,7 +1503,7 @@ void VLM_Widget::checkMicroProbePVs() */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::deleteItem() { @@ -1550,7 +1550,7 @@ void VLM_Widget::deleteItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::duplicateItem() { @@ -1587,7 +1587,7 @@ void VLM_Widget::duplicateItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::getMarkerInfo(QXmlStreamWriter* xmlWriter) { @@ -1644,7 +1644,7 @@ void VLM_Widget::getMarkerInfo(QXmlStreamWriter* xmlWriter) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::getRegionMarkerInfo(QXmlStreamWriter* xmlWriter) { @@ -1698,7 +1698,7 @@ void VLM_Widget::getRegionMarkerInfo(QXmlStreamWriter* xmlWriter) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString VLM_Widget::getModelFileName() { @@ -1707,7 +1707,7 @@ QString VLM_Widget::getModelFileName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool VLM_Widget::getMarkerCoordinatePoints(QList < QMap >& listCoordPoints) @@ -1802,7 +1802,7 @@ bool VLM_Widget::getMarkerCoordinatePoints(QList < QMap >& } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::grabMicroProbePV() { @@ -1823,7 +1823,7 @@ void VLM_Widget::grabMicroProbePV() */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::microModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) @@ -1834,7 +1834,7 @@ void VLM_Widget::microModelDataChanged(const QModelIndex& topLeft, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::offsetReturnPressed() { @@ -1895,7 +1895,7 @@ void VLM_Widget::offsetReturnPressed() */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::setModel(VLM_Model* model) { @@ -1914,7 +1914,7 @@ void VLM_Widget::setModel(VLM_Model* model) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::preferenceChanged() { @@ -1948,7 +1948,7 @@ void VLM_Widget::preferenceChanged() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::restoreMarkerLoaded() { @@ -2027,7 +2027,7 @@ void VLM_Widget::restoreMarkerLoaded() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::openSolver() { @@ -2045,7 +2045,7 @@ void VLM_Widget::openSolver() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::runSolver() { @@ -2138,7 +2138,7 @@ void VLM_Widget::runSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void PreferencesSolverOption::runSolver() @@ -2242,7 +2242,7 @@ void PreferencesSolverOption::runSolver() } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::setLightToMicroCoordModel(gstar::CoordinateModel *model) { @@ -2274,7 +2274,7 @@ void VLM_Widget::setLightToMicroCoordModel(gstar::CoordinateModel *model) */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::setCoordinateModel(gstar::CoordinateModel *model) { @@ -2305,7 +2305,7 @@ void VLM_Widget::setCoordinateModel(gstar::CoordinateModel *model) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- //void VLM_Widget::setMarker(QString filepath) //{ @@ -2358,7 +2358,7 @@ void VLM_Widget::setCoordinateModel(gstar::CoordinateModel *model) // //} -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::saveScreenShot() { @@ -2390,14 +2390,14 @@ void VLM_Widget::saveScreenShot() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString VLM_Widget::getTemporaryDatasetPath() { return m_datasetPath + ".tmp"; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::cleanUpTemoraryXMLFiles() { @@ -2408,7 +2408,7 @@ void VLM_Widget::cleanUpTemoraryXMLFiles() file.remove(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool VLM_Widget::verifySaveIsRequired() { @@ -2446,7 +2446,7 @@ bool VLM_Widget::verifySaveIsRequired() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::saveTemporaryXMLCoordinateInfo() { @@ -2455,7 +2455,7 @@ void VLM_Widget::saveTemporaryXMLCoordinateInfo() saveXMLCoordinateInfo(tempDatasetPath); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::saveXMLCoordinateInfo() { @@ -2465,7 +2465,7 @@ void VLM_Widget::saveXMLCoordinateInfo() cleanUpTemoraryXMLFiles(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::saveXMLCoordinateInfo(QString path) { @@ -2481,7 +2481,7 @@ void VLM_Widget::saveXMLCoordinateInfo(QString path) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::writeXMLSaveData(QIODevice* device) { @@ -2502,7 +2502,7 @@ void VLM_Widget::writeXMLSaveData(QIODevice* device) delete xmlWriter; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::tabIndexChanged(int index) { @@ -2525,7 +2525,7 @@ void VLM_Widget::tabIndexChanged(int index) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::treeContextMenu(const QPoint& pos) { @@ -2546,7 +2546,7 @@ void VLM_Widget::treeContextMenu(const QPoint& pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void VLM_Widget::updatedPixelToLight(double x, double y, double z) { diff --git a/src/mvc/VLM_Widget.h b/src/mvc/VLM_Widget.h index 1bb270d..876c336 100644 --- a/src/mvc/VLM_Widget.h +++ b/src/mvc/VLM_Widget.h @@ -6,7 +6,7 @@ #ifndef VLM_WIDGET_H #define VLM_WIDGET_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -45,7 +45,7 @@ namespace gstar } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Widget used to display VLM workspaces. Used with VLM_Model. @@ -661,9 +661,9 @@ protected slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* VLM_Widget_H_ */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/Attribute.cpp b/src/preferences/Attribute.cpp index 70bcb8a..d17ec56 100644 --- a/src/preferences/Attribute.cpp +++ b/src/preferences/Attribute.cpp @@ -7,7 +7,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute::Attribute() { @@ -20,7 +20,7 @@ Attribute::Attribute() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute::Attribute(QString type, QString value, @@ -35,14 +35,14 @@ Attribute::Attribute(QString type, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute::~Attribute() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool Attribute::getIsEnable() { @@ -51,7 +51,7 @@ bool Attribute::getIsEnable() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Attribute::getDescription() { @@ -60,7 +60,7 @@ QString Attribute::getDescription() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Attribute::getValue() { @@ -69,7 +69,7 @@ QString Attribute::getValue() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- const QString Attribute::getName() { @@ -78,7 +78,7 @@ const QString Attribute::getName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroup* Attribute::getParent() { @@ -87,7 +87,7 @@ AttributeGroup* Attribute::getParent() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::setIsEnable(bool enabled) { @@ -96,7 +96,7 @@ void Attribute::setIsEnable(bool enabled) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::setDescription(QString value) { @@ -105,7 +105,7 @@ void Attribute::setDescription(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::setValue(QString value) { @@ -114,7 +114,7 @@ void Attribute::setValue(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::setName(QString value) { @@ -123,7 +123,7 @@ void Attribute::setName(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::setParent(AttributeGroup *parent) { @@ -132,7 +132,7 @@ void Attribute::setParent(AttributeGroup *parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Attribute::toString() { @@ -144,7 +144,7 @@ QString Attribute::toString() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Attribute::fromString(QString val) { @@ -166,4 +166,4 @@ void Attribute::fromString(QString val) } -/*---------------------------------------------------------------------------*/ \ No newline at end of file +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/preferences/Attribute.h b/src/preferences/Attribute.h index a5a0261..6a01a21 100644 --- a/src/preferences/Attribute.h +++ b/src/preferences/Attribute.h @@ -6,7 +6,7 @@ #ifndef ATTRIBUTE_H #define ATTRIBUTE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -25,11 +25,11 @@ #define STR_z_lin_x "z_lin_x" #define STR_z_lin_y "z_lin_y" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- class AttributeGroup; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Attributes definition class, each Solver attribute can have its own @@ -156,8 +156,8 @@ class Attribute }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeGroup.cpp b/src/preferences/AttributeGroup.cpp index 11f9b10..054c6a9 100644 --- a/src/preferences/AttributeGroup.cpp +++ b/src/preferences/AttributeGroup.cpp @@ -6,7 +6,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroup::AttributeGroup(QObject* parent) : QObject(parent) { @@ -15,7 +15,7 @@ AttributeGroup::AttributeGroup(QObject* parent) : QObject(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroup::AttributeGroup(QString name, QObject* parent) : QObject(parent) @@ -26,7 +26,7 @@ AttributeGroup::AttributeGroup(QString name, QObject* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroup::~AttributeGroup() { @@ -35,7 +35,7 @@ AttributeGroup::~AttributeGroup() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroup::append(Attribute *motorPV) { @@ -48,7 +48,7 @@ void AttributeGroup::append(Attribute *motorPV) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroup::clearAndDeleteAttributes() { @@ -63,7 +63,7 @@ void AttributeGroup::clearAndDeleteAttributes() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeGroup::count() { @@ -72,7 +72,7 @@ int AttributeGroup::count() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroup::fromString(QString str) { @@ -122,7 +122,7 @@ bool AttributeGroup::fromString(QString str) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute* AttributeGroup::getAttrAt(int index) { @@ -136,7 +136,7 @@ Attribute* AttributeGroup::getAttrAt(int index) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString AttributeGroup::getGroupName() { @@ -145,7 +145,7 @@ QString AttributeGroup::getGroupName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroup::isEnabled() { @@ -154,7 +154,7 @@ bool AttributeGroup::isEnabled() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroup::moveAttrDown(Attribute *attr) { @@ -171,7 +171,7 @@ bool AttributeGroup::moveAttrDown(Attribute *attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroup::moveAttrUp(Attribute *attr) { @@ -188,7 +188,7 @@ bool AttributeGroup::moveAttrUp(Attribute *attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroup::remove(Attribute *motorPV) { @@ -200,7 +200,7 @@ void AttributeGroup::remove(Attribute *motorPV) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroup::setEnabled(bool state) { @@ -214,7 +214,7 @@ void AttributeGroup::setEnabled(bool state) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroup::setGroupName(QString name) { @@ -223,7 +223,7 @@ void AttributeGroup::setGroupName(QString name) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString AttributeGroup::toString() { @@ -247,4 +247,4 @@ QString AttributeGroup::toString() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeGroup.h b/src/preferences/AttributeGroup.h index faa5d55..f9cbd54 100644 --- a/src/preferences/AttributeGroup.h +++ b/src/preferences/AttributeGroup.h @@ -6,7 +6,7 @@ #ifndef ATTRIBUTE_GROUP_H #define ATTRIBUTE_GROUP_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief group of attributes which is defined in the preference dialog. @@ -157,8 +157,8 @@ class AttributeGroup : public QObject }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeGroupModel.cpp b/src/preferences/AttributeGroupModel.cpp index b9adffa..dd1a8f6 100644 --- a/src/preferences/AttributeGroupModel.cpp +++ b/src/preferences/AttributeGroupModel.cpp @@ -7,7 +7,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroupModel::AttributeGroupModel(QObject* parent) : QAbstractTableModel(parent) @@ -20,7 +20,7 @@ AttributeGroupModel::AttributeGroupModel(QObject* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeGroupModel::AttributeGroupModel(QString nameTitle, QString valueTitle, @@ -36,7 +36,7 @@ AttributeGroupModel::AttributeGroupModel(QString nameTitle, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::appendGroup(AttributeGroup *mGroup) { @@ -63,7 +63,7 @@ void AttributeGroupModel::appendGroup(AttributeGroup *mGroup) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::clearAll() { @@ -75,7 +75,7 @@ void AttributeGroupModel::clearAll() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeGroupModel::columnCount(const QModelIndex &parent) const { @@ -88,7 +88,7 @@ int AttributeGroupModel::columnCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AttributeGroupModel::data(const QModelIndex &index, int role) const { @@ -157,7 +157,7 @@ QVariant AttributeGroupModel::data(const QModelIndex &index, int role) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags AttributeGroupModel::flags(const QModelIndex &index) const { @@ -208,7 +208,7 @@ Qt::ItemFlags AttributeGroupModel::flags(const QModelIndex &index) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList AttributeGroupModel::getGroups() { @@ -218,7 +218,7 @@ QList AttributeGroupModel::getGroups() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AttributeGroupModel::index(int row, int column, @@ -260,7 +260,7 @@ QModelIndex AttributeGroupModel::index(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroupModel::moveDown(QModelIndex idx) { @@ -286,7 +286,7 @@ bool AttributeGroupModel::moveDown(QModelIndex idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroupModel::moveUp(QModelIndex idx) { @@ -312,7 +312,7 @@ bool AttributeGroupModel::moveUp(QModelIndex idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::Inserted(AttributeGroup* grp, int idx) { @@ -327,7 +327,7 @@ void AttributeGroupModel::Inserted(AttributeGroup* grp, int idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::ReOrdered(AttributeGroup* grp, int start, int end) { @@ -342,7 +342,7 @@ void AttributeGroupModel::ReOrdered(AttributeGroup* grp, int start, int end) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::Removed(AttributeGroup* grp, int idx) { @@ -357,7 +357,7 @@ void AttributeGroupModel::Removed(AttributeGroup* grp, int idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AttributeGroupModel::headerData(int section, Qt::Orientation orientation, @@ -388,7 +388,7 @@ QVariant AttributeGroupModel::headerData(int section, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QModelIndex AttributeGroupModel::parent(const QModelIndex& index)const { @@ -413,7 +413,7 @@ QModelIndex AttributeGroupModel::parent(const QModelIndex& index)const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeGroupModel::removeGroup(AttributeGroup *grp) { @@ -438,7 +438,7 @@ void AttributeGroupModel::removeGroup(AttributeGroup *grp) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeGroupModel::rowCount(const QModelIndex &parent) const { @@ -459,7 +459,7 @@ int AttributeGroupModel::rowCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /* void AttributeGroupModel::setMotorGroups(AttributesGroup attrs) { @@ -475,7 +475,7 @@ void AttributeGroupModel::setMotorGroups(AttributesGroup attrs) } */ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeGroupModel::setData(const QModelIndex &index, const QVariant &value, @@ -552,4 +552,4 @@ bool AttributeGroupModel::setData(const QModelIndex &index, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeGroupModel.h b/src/preferences/AttributeGroupModel.h index cb33f43..15d0858 100644 --- a/src/preferences/AttributeGroupModel.h +++ b/src/preferences/AttributeGroupModel.h @@ -6,7 +6,7 @@ #ifndef ATTRIBUTE_GROUP_MODEL #define ATTRIBUTE_GROUP_MODEL -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -15,7 +15,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model to manipulate the attributes, such as how to set attributes @@ -169,8 +169,8 @@ protected slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeTableModel.cpp b/src/preferences/AttributeTableModel.cpp index 789ccb5..766a547 100644 --- a/src/preferences/AttributeTableModel.cpp +++ b/src/preferences/AttributeTableModel.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AttributeTableModel::AttributeTableModel( QObject* parent) @@ -22,7 +22,7 @@ AttributeTableModel::AttributeTableModel( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeTableModel::addSolverAttr(QString name, QString value, @@ -46,7 +46,7 @@ int AttributeTableModel::addSolverAttr(QString name, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeTableModel::clearAll() { @@ -59,7 +59,7 @@ void AttributeTableModel::clearAll() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeTableModel::columnCount( const QModelIndex &parent) const @@ -72,7 +72,7 @@ int AttributeTableModel::columnCount( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AttributeTableModel::data( const QModelIndex &index, int role) const @@ -114,7 +114,7 @@ QVariant AttributeTableModel::data( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags AttributeTableModel::flags( const QModelIndex &index) const @@ -158,7 +158,7 @@ Qt::ItemFlags AttributeTableModel::flags( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList AttributeTableModel::getSolverAttrs() { @@ -168,7 +168,7 @@ QList AttributeTableModel::getSolverAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant AttributeTableModel::headerData( int section, @@ -202,7 +202,7 @@ QVariant AttributeTableModel::headerData( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeTableModel::removeRows(int row, int count, @@ -233,7 +233,7 @@ bool AttributeTableModel::removeRows(int row, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int AttributeTableModel::rowCount(const QModelIndex &parent) const { @@ -246,7 +246,7 @@ int AttributeTableModel::rowCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeTableModel::setData(const QModelIndex &index, const QVariant &value, @@ -308,7 +308,7 @@ bool AttributeTableModel::setData(const QModelIndex &index, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool AttributeTableModel::setHeaderData( int section, @@ -341,7 +341,7 @@ bool AttributeTableModel::setHeaderData( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeTableModel::setNMModel(bool nmModel) { @@ -350,7 +350,7 @@ void AttributeTableModel::setNMModel(bool nmModel) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void AttributeTableModel::setSolverAttrs( QList solverAttrs) @@ -367,7 +367,7 @@ void AttributeTableModel::setSolverAttrs( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/AttributeTableModel.h b/src/preferences/AttributeTableModel.h index 99c0bb0..048c83d 100644 --- a/src/preferences/AttributeTableModel.h +++ b/src/preferences/AttributeTableModel.h @@ -12,7 +12,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief model to control the solver table @@ -153,8 +153,8 @@ class AttributeTableModel }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/Preferences.cpp b/src/preferences/Preferences.cpp index c062933..f87ea1c 100644 --- a/src/preferences/Preferences.cpp +++ b/src/preferences/Preferences.cpp @@ -16,7 +16,7 @@ Preferences* Preferences::_this_inst(nullptr); std::mutex Preferences::_mutex; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Preferences::Preferences() { @@ -96,14 +96,14 @@ Preferences::Preferences() load(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Preferences::~Preferences() { save(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Preferences* Preferences::inst() { @@ -116,7 +116,7 @@ Preferences* Preferences::inst() return _this_inst; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant Preferences::getValue(QString key) const { @@ -129,7 +129,7 @@ QVariant Preferences::getValue(QString key) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Preferences::setValue(QString key, QVariant value) { @@ -138,7 +138,7 @@ void Preferences::setValue(QString key, QVariant value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Preferences::load() { @@ -156,7 +156,7 @@ void Preferences::load() s.endGroup(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Preferences::save() { @@ -174,4 +174,4 @@ void Preferences::save() s.endGroup(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/Preferences.h b/src/preferences/Preferences.h index 749962c..7cfbe7c 100644 --- a/src/preferences/Preferences.h +++ b/src/preferences/Preferences.h @@ -6,14 +6,14 @@ #ifndef PREFERENCES_H #define PREFERENCES_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #define STR_PRF_NMCoefficient "NMCoefficient" #define STR_PRF_NMOptions "NMOptions" @@ -144,8 +144,8 @@ class Preferences std::unordered_map _pref_map; }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesAutoSave.cpp b/src/preferences/PreferencesAutoSave.cpp index ac829f4..5708dd5 100644 --- a/src/preferences/PreferencesAutoSave.cpp +++ b/src/preferences/PreferencesAutoSave.cpp @@ -10,7 +10,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesAutoSave::PreferencesAutoSave(QWidget* parent) : QWidget(parent) { @@ -38,14 +38,14 @@ PreferencesAutoSave::PreferencesAutoSave(QWidget* parent) : QWidget(parent) connect(m_enableRecoveryAutoSaveFunctionality, SIGNAL(stateChanged(int)), this, SLOT(enableRecoveryAutoSafeChanged(int))); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesAutoSave::~PreferencesAutoSave() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesAutoSave::enableRecoveryAutoSafeChanged(int state) { @@ -57,14 +57,14 @@ void PreferencesAutoSave::enableRecoveryAutoSafeChanged(int state) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesAutoSave::getEnableRecoveryAutoSaveFunctionality() { return m_enableRecoveryAutoSaveFunctionality->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesAutoSave::setEnableRecoveryAutoSaveFunctionality(bool enableRecoveryAutoSave) { @@ -72,7 +72,7 @@ void PreferencesAutoSave::setEnableRecoveryAutoSaveFunctionality(bool enableReco enableRecoveryAutoSafeChanged(m_enableRecoveryAutoSaveFunctionality->isChecked()); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int PreferencesAutoSave::getRecoveryAutoSaveEveryMiliseconds() { @@ -81,7 +81,7 @@ int PreferencesAutoSave::getRecoveryAutoSaveEveryMiliseconds() return miliseconds; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesAutoSave::setRecoveryAutoSaveEveryMiliseconds(int recoveryAutoSaveMilisecods) { @@ -89,18 +89,18 @@ void PreferencesAutoSave::setRecoveryAutoSaveEveryMiliseconds(int recoveryAutoSa m_autoSaveTemporaryDataEverySeconds->setValue(seconds); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesAutoSave::getEnableSaveOnExit() { return m_enableSaveOnExit->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesAutoSave::setEnableSaveOnExit(bool saveOnExitAutomatically) { m_enableSaveOnExit->setChecked(saveOnExitAutomatically); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesAutoSave.h b/src/preferences/PreferencesAutoSave.h index c8da2f8..33d0350 100644 --- a/src/preferences/PreferencesAutoSave.h +++ b/src/preferences/PreferencesAutoSave.h @@ -1,9 +1,9 @@ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #ifndef PREFERENCESAUTOSAVE_H #define PREFERENCESAUTOSAVE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -86,8 +86,8 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // PREFERENCESAUTOSAVE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesDialog.cpp b/src/preferences/PreferencesDialog.cpp index 965226b..eed5e6b 100644 --- a/src/preferences/PreferencesDialog.cpp +++ b/src/preferences/PreferencesDialog.cpp @@ -25,7 +25,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesDialog::PreferencesDialog(QList windowList, QWidget* parent, @@ -132,7 +132,7 @@ PreferencesDialog::PreferencesDialog(QList windowLi } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDialog::accept() { @@ -193,7 +193,7 @@ void PreferencesDialog::accept() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDialog::changePage(QListWidgetItem* current, QListWidgetItem* previous) @@ -206,7 +206,7 @@ void PreferencesDialog::changePage(QListWidgetItem* current, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDialog::reject() { @@ -216,7 +216,7 @@ void PreferencesDialog::reject() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDialog::setPreferences(bool passMode) { @@ -294,5 +294,5 @@ void PreferencesDialog::setPreferences(bool passMode) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesDialog.h b/src/preferences/PreferencesDialog.h index b8bc446..3727acb 100644 --- a/src/preferences/PreferencesDialog.h +++ b/src/preferences/PreferencesDialog.h @@ -6,7 +6,7 @@ #ifndef PREFERENCES_DIALOG_H #define PREFERENCES_DIALOG_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -29,7 +29,7 @@ namespace gstar class AbstractImageWidget; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The preference dialog for setting the preference, after check the @@ -186,9 +186,9 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesDisplay.cpp b/src/preferences/PreferencesDisplay.cpp index dda58d2..b3fc9bb 100644 --- a/src/preferences/PreferencesDisplay.cpp +++ b/src/preferences/PreferencesDisplay.cpp @@ -12,7 +12,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesDisplay::PreferencesDisplay(QWidget* parent) : QWidget(parent) { @@ -101,14 +101,14 @@ PreferencesDisplay::PreferencesDisplay(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesDisplay::~PreferencesDisplay() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::reload_themes() { @@ -139,14 +139,14 @@ void PreferencesDisplay::reload_themes() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::themeChanged(QString val) { Preferences::inst()->setValue(STR_PFR_THEME, val); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::acceptChanges() { @@ -161,7 +161,7 @@ void PreferencesDisplay::acceptChanges() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int PreferencesDisplay::getFontSize() { @@ -170,7 +170,7 @@ int PreferencesDisplay::getFontSize() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString PreferencesDisplay::getWindowTitle() { @@ -179,7 +179,7 @@ QString PreferencesDisplay::getWindowTitle() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int PreferencesDisplay::getDecimalPrecision() { @@ -188,7 +188,7 @@ int PreferencesDisplay::getDecimalPrecision() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::setFontSize(int size) { @@ -205,7 +205,7 @@ void PreferencesDisplay::setFontSize(int size) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::setWindowTitle(QString title) { @@ -214,7 +214,7 @@ void PreferencesDisplay::setWindowTitle(QString title) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesDisplay::setDecimalPrecision(int number) { @@ -230,5 +230,5 @@ void PreferencesDisplay::setDecimalPrecision(int number) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesDisplay.h b/src/preferences/PreferencesDisplay.h index b3598e9..c32d295 100644 --- a/src/preferences/PreferencesDisplay.h +++ b/src/preferences/PreferencesDisplay.h @@ -6,7 +6,7 @@ #ifndef PREFERENCES_DISPLAY_H #define PREFERENCES_DISPLAY_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -17,7 +17,7 @@ class QSpinBox; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Preferences dialog page for configuring histogram plots. @@ -114,8 +114,8 @@ public slots: QComboBox* _cb_file_size; }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesExport.cpp b/src/preferences/PreferencesExport.cpp index ded8d1f..93897ff 100644 --- a/src/preferences/PreferencesExport.cpp +++ b/src/preferences/PreferencesExport.cpp @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include @@ -6,7 +6,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesExport::PreferencesExport(QWidget* parent) : QWidget(parent) { @@ -50,91 +50,91 @@ PreferencesExport::PreferencesExport(QWidget* parent) : QWidget(parent) setLayout(mainLayout); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesExport::~PreferencesExport() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString PreferencesExport::getExportToDirInDataset() { return m_exportToDirInDataset->text(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setExportToDirInDataset(QString directory) { m_exportToDirInDataset->setText(directory); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesExport::getEnableZoomToRegionOnExport() { return m_zoomToRegionOnExport->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setEnabledZoomToRegionOnExport(bool enableZoomToRegion) { m_zoomToRegionOnExport->setChecked(enableZoomToRegion); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesExport::getPrintNameOnExportedImage() { return m_printNameOnExportedImage->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setPrintNameOnExportedImage(bool printName) { m_printNameOnExportedImage->setChecked(printName); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesExport::getPrintPyPxOnExportedImage() { return m_printPredictedXYOnExportedImage->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setPrintPyPxOnExportedImage(bool printPyPx) { m_printPredictedXYOnExportedImage->setChecked(printPyPx); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PreferencesExport::getPrintWidthHeightOnExportedImage() { return m_printWidthHeightOnExportedImage->isChecked(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setPrintWidthHeightOnExportedImage(bool printWidthHeight) { m_printWidthHeightOnExportedImage->setChecked(printWidthHeight); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int PreferencesExport::getSelectedXmlExportOption() { return m_xmlExportOptions->checkedId(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesExport::setSelectedXmlExportOption(int selectedOption) { @@ -143,4 +143,4 @@ void PreferencesExport::setSelectedXmlExportOption(int selectedOption) else if (selectedOption == singleFileXMLExport) m_singleXmlExportButton->setChecked(true); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesExport.h b/src/preferences/PreferencesExport.h index 530c5c1..e522123 100644 --- a/src/preferences/PreferencesExport.h +++ b/src/preferences/PreferencesExport.h @@ -1,9 +1,9 @@ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #ifndef PREFERENCESEXPORT_H #define PREFERENCESEXPORT_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -93,8 +93,8 @@ class PreferencesExport }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif // PREFERENCESEXPORT_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesMicroPv.cpp b/src/preferences/PreferencesMicroPv.cpp index ab154c9..c269b96 100644 --- a/src/preferences/PreferencesMicroPv.cpp +++ b/src/preferences/PreferencesMicroPv.cpp @@ -9,7 +9,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesMicroPv::PreferencesMicroPv(QWidget* parent) : QWidget(parent) { @@ -33,21 +33,21 @@ PreferencesMicroPv::PreferencesMicroPv(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesMicroPv::~PreferencesMicroPv() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesMicroPv::acceptChanges() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString PreferencesMicroPv::getMicroProbeXPv() { @@ -56,7 +56,7 @@ QString PreferencesMicroPv::getMicroProbeXPv() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString PreferencesMicroPv::getMicroProbeYPv() { @@ -65,7 +65,7 @@ QString PreferencesMicroPv::getMicroProbeYPv() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesMicroPv::setMicroProbeXPv(QString val) { @@ -74,7 +74,7 @@ void PreferencesMicroPv::setMicroProbeXPv(QString val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesMicroPv::setMicroProbeYPv(QString val) { @@ -83,5 +83,5 @@ void PreferencesMicroPv::setMicroProbeYPv(QString val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesMicroPv.h b/src/preferences/PreferencesMicroPv.h index fd9998b..eab878c 100644 --- a/src/preferences/PreferencesMicroPv.h +++ b/src/preferences/PreferencesMicroPv.h @@ -6,7 +6,7 @@ #ifndef PREFERENCES_MICROPV_H #define PREFERENCES_MICROPV_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Preferences dialog page for configuring histogram plots. @@ -82,8 +82,8 @@ class PreferencesMicroPv }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesPythonFunc.cpp b/src/preferences/PreferencesPythonFunc.cpp index 8c8e969..979f63e 100644 --- a/src/preferences/PreferencesPythonFunc.cpp +++ b/src/preferences/PreferencesPythonFunc.cpp @@ -24,7 +24,7 @@ #include "core/defines.h" using gstar::CheckBoxDelegate; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesPythonFunc::PreferencesPythonFunc(QWidget *parent) : QWidget(parent) @@ -37,7 +37,7 @@ PreferencesPythonFunc::PreferencesPythonFunc(QWidget *parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesPythonFunc::~PreferencesPythonFunc() { @@ -46,7 +46,7 @@ PreferencesPythonFunc::~PreferencesPythonFunc() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::acceptChanges() { @@ -54,7 +54,7 @@ void PreferencesPythonFunc::acceptChanges() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::addGroupItem() { @@ -135,7 +135,7 @@ void PreferencesPythonFunc::addGroupItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::addItem() { @@ -187,7 +187,7 @@ void PreferencesPythonFunc::addItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::contextMenuRequest(const QPoint &pos) { @@ -227,7 +227,7 @@ void PreferencesPythonFunc::contextMenuRequest(const QPoint &pos) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::createComponents() { @@ -389,7 +389,7 @@ void PreferencesPythonFunc::createComponents() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute PreferencesPythonFunc::getAttribute(QString grpName, QString attrName) @@ -418,7 +418,7 @@ Attribute PreferencesPythonFunc::getAttribute(QString grpName, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PreferencesPythonFunc::getGroupStringList() { @@ -435,7 +435,7 @@ QStringList PreferencesPythonFunc::getGroupStringList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString PreferencesPythonFunc::getPVString(QString grpName, QString attrName) { @@ -460,7 +460,7 @@ QString PreferencesPythonFunc::getPVString(QString grpName, QString attrName) return pvStr; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::linkItem() { @@ -499,7 +499,7 @@ void PreferencesPythonFunc::linkItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::mousePressEvent(QMouseEvent *event) { @@ -509,7 +509,7 @@ void PreferencesPythonFunc::mousePressEvent(QMouseEvent *event) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::moveDown() { @@ -553,7 +553,7 @@ void PreferencesPythonFunc::moveDown() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::moveUp() { @@ -597,7 +597,7 @@ void PreferencesPythonFunc::moveUp() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::parseGroupStringList(QStringList attrStrList) { @@ -624,7 +624,7 @@ void PreferencesPythonFunc::parseGroupStringList(QStringList attrStrList) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::removeItem() { @@ -678,7 +678,7 @@ void PreferencesPythonFunc::removeItem() } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::tomoLinkPressed() { @@ -692,7 +692,7 @@ void PreferencesPythonFunc::tomoLinkPressed() */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesPythonFunc::treeExpanded(QModelIndex idx) { @@ -703,4 +703,4 @@ void PreferencesPythonFunc::treeExpanded(QModelIndex idx) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesPythonFunc.h b/src/preferences/PreferencesPythonFunc.h index 189cda2..bdc00dc 100644 --- a/src/preferences/PreferencesPythonFunc.h +++ b/src/preferences/PreferencesPythonFunc.h @@ -6,7 +6,7 @@ #ifndef PREFERENCES_PYTHON_FUNC_H #define PREFERENCES_PYTHON_FUNC_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -18,7 +18,7 @@ class DeselectableTreeView; class AttributeGroupModel; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Preferences dialog table using python fuction for region box calibration @@ -192,8 +192,8 @@ protected slots: bool m_foundPython; }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/PreferencesSolverOption.cpp b/src/preferences/PreferencesSolverOption.cpp index 923a7e7..c2b546a 100644 --- a/src/preferences/PreferencesSolverOption.cpp +++ b/src/preferences/PreferencesSolverOption.cpp @@ -18,7 +18,7 @@ const static int NM_SELECTED = 0; const static int PY_SELECTED = 1; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesSolverOption::PreferencesSolverOption( QList windowList, @@ -39,7 +39,7 @@ PreferencesSolverOption::PreferencesSolverOption( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PreferencesSolverOption::~PreferencesSolverOption() { @@ -64,7 +64,7 @@ PreferencesSolverOption::~PreferencesSolverOption() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::createLayOut() { @@ -100,7 +100,7 @@ void PreferencesSolverOption::createLayOut() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::createNelMinSolver() { @@ -114,7 +114,7 @@ void PreferencesSolverOption::createNelMinSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::createPythonSolver() { @@ -124,7 +124,7 @@ void PreferencesSolverOption::createPythonSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::createSolverGroup() { @@ -165,7 +165,7 @@ void PreferencesSolverOption::createSolverGroup() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int PreferencesSolverOption::getCheckedID() { @@ -174,7 +174,7 @@ int PreferencesSolverOption::getCheckedID() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PreferencesSolverOption::getNMCoefficientAttrs() { @@ -186,7 +186,7 @@ QStringList PreferencesSolverOption::getNMCoefficientAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PreferencesSolverOption::getNMOptionAttrs() { @@ -197,7 +197,7 @@ QStringList PreferencesSolverOption::getNMOptionAttrs() return QStringList(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PreferencesSolverOption::getCurrentCoefficientAttrs() { @@ -206,7 +206,7 @@ QStringList PreferencesSolverOption::getCurrentCoefficientAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList PreferencesSolverOption::getCurrentOptionAttrs() { @@ -215,7 +215,7 @@ QStringList PreferencesSolverOption::getCurrentOptionAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::getSolverPropertiesFromModel( SolverParameterWidget* widget, @@ -243,7 +243,7 @@ void PreferencesSolverOption::getSolverPropertiesFromModel( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::setCheckedID(int id) { @@ -261,7 +261,7 @@ void PreferencesSolverOption::setCheckedID(int id) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::setNMCoefficientAttrs(QStringList attrs) @@ -274,7 +274,7 @@ void PreferencesSolverOption::setNMCoefficientAttrs(QStringList attrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::setNMOptionAttrs(QStringList attrs) { @@ -286,7 +286,7 @@ void PreferencesSolverOption::setNMOptionAttrs(QStringList attrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PreferencesSolverOption::useUpdatedSolverVariables(const QMap vals) { @@ -329,4 +329,4 @@ void PreferencesSolverOption::useUpdatedSolverVariables(const QMap -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Profile::Profile() { @@ -18,7 +18,7 @@ Profile::Profile() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Profile::Profile(const Profile &p) { @@ -30,14 +30,14 @@ Profile::Profile(const Profile &p) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Profile::~Profile() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::attrsCoefficienttoString() { @@ -59,7 +59,7 @@ QString Profile::attrsCoefficienttoString() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::attrsOptiontoString() { @@ -81,7 +81,7 @@ QString Profile::attrsOptiontoString() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool Profile::coefficientfromString(QString str) { @@ -121,7 +121,7 @@ bool Profile::coefficientfromString(QString str) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList Profile::getCoefficientAttrs() { @@ -130,7 +130,7 @@ QList Profile::getCoefficientAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList Profile::getOptionAttrs() { @@ -139,7 +139,7 @@ QList Profile::getOptionAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::getDescription() { @@ -148,7 +148,7 @@ QString Profile::getDescription() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::getFilePath() { @@ -157,7 +157,7 @@ QString Profile::getFilePath() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::getValue() { @@ -166,7 +166,7 @@ QString Profile::getValue() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QString Profile::getName() { @@ -175,7 +175,7 @@ QString Profile::getName() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setCoefficientAttrs(QList attrsCoefficient) { @@ -185,7 +185,7 @@ void Profile::setCoefficientAttrs(QList attrsCoefficient) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setDescription(QString value) { @@ -194,7 +194,7 @@ void Profile::setDescription(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setFilePath(QString filePath) { @@ -203,7 +203,7 @@ void Profile::setFilePath(QString filePath) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setValue(QString value) { @@ -212,7 +212,7 @@ void Profile::setValue(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setName(QString value) { @@ -221,7 +221,7 @@ void Profile::setName(QString value) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Profile::setOptionAttrs(QList attrsOption) { @@ -231,7 +231,7 @@ void Profile::setOptionAttrs(QList attrsOption) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool Profile::optionfromString(QString str) { @@ -271,4 +271,4 @@ bool Profile::optionfromString(QString str) return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/Profile.h b/src/preferences/Profile.h index 297d55a..5baefed 100644 --- a/src/preferences/Profile.h +++ b/src/preferences/Profile.h @@ -6,7 +6,7 @@ #ifndef PROFILE_H #define PROFILE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -17,11 +17,11 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- //class AttributeGroup; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief @@ -175,8 +175,8 @@ class Profile }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/ProfileTable.cpp b/src/preferences/ProfileTable.cpp index a57425f..f5868f0 100644 --- a/src/preferences/ProfileTable.cpp +++ b/src/preferences/ProfileTable.cpp @@ -10,7 +10,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ProfileTable::ProfileTable(QWidget* parent) : QWidget(parent) { @@ -24,7 +24,7 @@ ProfileTable::ProfileTable(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ProfileTable::~ProfileTable() { @@ -33,14 +33,14 @@ ProfileTable::~ProfileTable() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::acceptChanges() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::addNewItem(QString name, QString desc) { @@ -59,7 +59,7 @@ void ProfileTable::addNewItem(QString name, QString desc) emit addItem(name, desc); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::addItem() { @@ -68,7 +68,7 @@ void ProfileTable::addItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::addItem(Attribute attr) { @@ -91,7 +91,7 @@ void ProfileTable::addItem(Attribute attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::createComponents() { @@ -175,7 +175,7 @@ void ProfileTable::createComponents() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::editItem(const QModelIndex& topLeft, const QModelIndex& bottomRight) { @@ -191,7 +191,7 @@ void ProfileTable::editItem(const QModelIndex& topLeft, const QModelIndex& botto emit editItem(position, editValue); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::fromStringList(const QStringList& list) { @@ -212,7 +212,7 @@ void ProfileTable::fromStringList(const QStringList& list) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::fromAttributeList(const QList& list) { @@ -221,7 +221,7 @@ void ProfileTable::fromAttributeList(const QList& list) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList ProfileTable::getSolverAttrs() { @@ -230,7 +230,7 @@ QList ProfileTable::getSolverAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::removeItem() { @@ -282,7 +282,7 @@ void ProfileTable::removeItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::setRow(int index) { @@ -291,7 +291,7 @@ void ProfileTable::setRow(int index) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void ProfileTable::setSolverAttrs( const QList& solverAttrs) @@ -301,7 +301,7 @@ void ProfileTable::setSolverAttrs( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList ProfileTable::toStringList() { @@ -320,5 +320,5 @@ QStringList ProfileTable::toStringList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/ProfileTable.h b/src/preferences/ProfileTable.h index dc1ff14..51984eb 100644 --- a/src/preferences/ProfileTable.h +++ b/src/preferences/ProfileTable.h @@ -6,7 +6,7 @@ #ifndef PROFILETABLE_H_ #define PROFILETABLE_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -18,7 +18,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief SolverTable the table having all the parameters of the solver @@ -175,8 +175,8 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverAttributesGroup.cpp b/src/preferences/SolverAttributesGroup.cpp index 7174cb4..79aca03 100644 --- a/src/preferences/SolverAttributesGroup.cpp +++ b/src/preferences/SolverAttributesGroup.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverAttributesGroup::SolverAttributesGroup() { @@ -27,21 +27,21 @@ SolverAttributesGroup::SolverAttributesGroup() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverAttributesGroup::~SolverAttributesGroup() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverAttributesGroup::addSolverAttribute(int type, Attribute attr) { throw "error"; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute SolverAttributesGroup::getAttribute(QString name) const { @@ -55,7 +55,7 @@ Attribute SolverAttributesGroup::getAttribute(QString name) const return Attribute(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Attribute SolverAttributesGroup::getAttribute(unsigned int idx) const { @@ -68,7 +68,7 @@ Attribute SolverAttributesGroup::getAttribute(unsigned int idx) const return Attribute(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SolverAttributesGroup::getSize() const { @@ -77,7 +77,7 @@ int SolverAttributesGroup::getSize() const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverAttributesGroup::fromStringList(QStringList args) { @@ -95,7 +95,7 @@ void SolverAttributesGroup::fromStringList(QStringList args) } } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverAttributesGroup::setAttribute(unsigned int idx, Attribute attr) { @@ -107,7 +107,7 @@ void SolverAttributesGroup::setAttribute(unsigned int idx, Attribute attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList SolverAttributesGroup::toStringList() { @@ -123,4 +123,4 @@ QStringList SolverAttributesGroup::toStringList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverAttributesGroup.h b/src/preferences/SolverAttributesGroup.h index 4f0ef40..7f3a1fb 100644 --- a/src/preferences/SolverAttributesGroup.h +++ b/src/preferences/SolverAttributesGroup.h @@ -6,12 +6,12 @@ #ifndef SOLVER_ATTRIBUTES_GROUP_H #define SOLVER_ATTRIBUTES_GROUP_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Solver group of Solver attributes which is defined in the @@ -78,8 +78,8 @@ class SolverAttributesGroup }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverAttributesModel.cpp b/src/preferences/SolverAttributesModel.cpp index 5319d06..70c6a26 100644 --- a/src/preferences/SolverAttributesModel.cpp +++ b/src/preferences/SolverAttributesModel.cpp @@ -7,7 +7,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverAttributesModel::SolverAttributesModel(QObject* parent) : QAbstractTableModel(parent) @@ -20,7 +20,7 @@ SolverAttributesModel::SolverAttributesModel(QObject* parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverAttributesModel::clearAll() { @@ -33,7 +33,7 @@ void SolverAttributesModel::clearAll() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SolverAttributesModel::columnCount(const QModelIndex &parent) const { @@ -46,7 +46,7 @@ int SolverAttributesModel::columnCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant SolverAttributesModel::data(const QModelIndex &index, int role) const { @@ -93,7 +93,7 @@ QVariant SolverAttributesModel::data(const QModelIndex &index, int role) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Qt::ItemFlags SolverAttributesModel::flags(const QModelIndex &index) const { @@ -130,7 +130,7 @@ Qt::ItemFlags SolverAttributesModel::flags(const QModelIndex &index) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverAttributesGroup SolverAttributesModel::getSolverAttributes() { @@ -140,7 +140,7 @@ SolverAttributesGroup SolverAttributesModel::getSolverAttributes() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QVariant SolverAttributesModel::headerData(int section, Qt::Orientation orientation, @@ -171,7 +171,7 @@ QVariant SolverAttributesModel::headerData(int section, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- int SolverAttributesModel::rowCount(const QModelIndex &parent) const { @@ -184,7 +184,7 @@ int SolverAttributesModel::rowCount(const QModelIndex &parent) const } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverAttributesModel::setSolverAttributes(SolverAttributesGroup attrs) { @@ -200,7 +200,7 @@ void SolverAttributesModel::setSolverAttributes(SolverAttributesGroup attrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SolverAttributesModel::setData(const QModelIndex &index, const QVariant &value, @@ -252,4 +252,4 @@ bool SolverAttributesModel::setData(const QModelIndex &index, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverAttributesModel.h b/src/preferences/SolverAttributesModel.h index 71bf444..d6ece29 100644 --- a/src/preferences/SolverAttributesModel.h +++ b/src/preferences/SolverAttributesModel.h @@ -6,7 +6,7 @@ #ifndef SOLVER_ATTRIBUTES_MODEL #define SOLVER_ATTRIBUTES_MODEL -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -15,7 +15,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Model to manipulate the Solver attributes, such as how to set @@ -107,8 +107,8 @@ class SolverAttributesModel : public QAbstractTableModel }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverParameterParse.cpp b/src/preferences/SolverParameterParse.cpp index 51f6348..bef04a5 100644 --- a/src/preferences/SolverParameterParse.cpp +++ b/src/preferences/SolverParameterParse.cpp @@ -5,7 +5,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverParameterParse::SolverParameterParse() : QObject(0) @@ -15,7 +15,7 @@ SolverParameterParse::SolverParameterParse() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverParameterParse::~SolverParameterParse() { @@ -23,7 +23,7 @@ SolverParameterParse::~SolverParameterParse() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterParse::getCoefficient(QMap& dict_min_coef) { @@ -35,7 +35,7 @@ void SolverParameterParse::getCoefficient(QMap& dict_min_coef) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterParse::getCoefficientAndTransform( QMap& dict_min_coef, @@ -54,7 +54,7 @@ void SolverParameterParse::getCoefficientAndTransform( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterParse::getTransform(QMap& dict_transform_coef) { @@ -66,7 +66,7 @@ void SolverParameterParse::getTransform(QMap& dict_transform_co } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterParse::getOptions(QMap& dict_options) { @@ -78,7 +78,7 @@ void SolverParameterParse::getOptions(QMap& dict_options) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SolverParameterParse::parseSolverCoefList(QStringList& coefList) { @@ -159,7 +159,7 @@ bool SolverParameterParse::parseSolverCoefList(QStringList& coefList) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SolverParameterParse::parseSolverOptionList(QStringList& optionList) { @@ -209,4 +209,4 @@ bool SolverParameterParse::parseSolverOptionList(QStringList& optionList) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverParameterParse.h b/src/preferences/SolverParameterParse.h index 1ab953f..a24dc19 100644 --- a/src/preferences/SolverParameterParse.h +++ b/src/preferences/SolverParameterParse.h @@ -6,14 +6,14 @@ #ifndef SOLVERPARAMETERPARSE_H #define SOLVERPARAMETERPARSE_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief SolverParameterParse parse the list of attributes got from the table @@ -89,8 +89,8 @@ class SolverParameterParse }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverParameterWidget.cpp b/src/preferences/SolverParameterWidget.cpp index ef6ec33..2c3c23b 100644 --- a/src/preferences/SolverParameterWidget.cpp +++ b/src/preferences/SolverParameterWidget.cpp @@ -15,7 +15,7 @@ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverParameterWidget::SolverParameterWidget(QWidget* parent) : QWidget(parent) { @@ -42,14 +42,14 @@ SolverParameterWidget::SolverParameterWidget(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverParameterWidget::~SolverParameterWidget() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::addCoefficientItem(Attribute attr) { @@ -58,7 +58,7 @@ void SolverParameterWidget::addCoefficientItem(Attribute attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::addCoefficientItems(QList solverAttrs) { @@ -70,7 +70,7 @@ void SolverParameterWidget::addCoefficientItems(QList solverAttrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::addOptionItem(Attribute attr) { @@ -79,7 +79,7 @@ void SolverParameterWidget::addOptionItem(Attribute attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::addOptionItems(QList solverAttrs) { @@ -91,7 +91,7 @@ void SolverParameterWidget::addOptionItems(QList solverAttrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::removeCoefficientItems() { @@ -100,7 +100,7 @@ void SolverParameterWidget::removeCoefficientItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::removeOptionItems() { @@ -109,7 +109,7 @@ void SolverParameterWidget::removeOptionItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList SolverParameterWidget::getCoefficientAttrs() { @@ -118,7 +118,7 @@ QStringList SolverParameterWidget::getCoefficientAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList SolverParameterWidget::getCoefficientAttrsList() { @@ -127,21 +127,21 @@ QList SolverParameterWidget::getCoefficientAttrsList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverParameterWidget::getCoefficientAttrsMap() { return m_coefficientTable->toMap(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverParameterWidget::getSelectedCoefficientAttrsMap() { return m_coefficientTable->toSelectedMap(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList SolverParameterWidget::getOptionAttrs() { @@ -149,7 +149,7 @@ QStringList SolverParameterWidget::getOptionAttrs() return m_optionTable -> toStringList(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList SolverParameterWidget::getOptionAttrsList() { @@ -158,14 +158,14 @@ QList SolverParameterWidget::getOptionAttrsList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverParameterWidget::getOptionAttrsMap() { return m_optionTable->toMap(); } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverParameterWidget::getSelectedOptionAttrsMap() { @@ -173,7 +173,7 @@ QMap SolverParameterWidget::getSelectedOptionAttrsMap() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setButtionVisible(bool visible) { @@ -186,7 +186,7 @@ void SolverParameterWidget::setButtionVisible(bool visible) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setCoefficientAttrs(QStringList attrs) { @@ -195,7 +195,7 @@ void SolverParameterWidget::setCoefficientAttrs(QStringList attrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setCoefficientAttrsFromList( QList attrList) @@ -205,7 +205,7 @@ void SolverParameterWidget::setCoefficientAttrsFromList( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setDefaultCoefficient() { @@ -227,7 +227,7 @@ void SolverParameterWidget::setDefaultCoefficient() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setDefaultOption() { @@ -241,7 +241,7 @@ void SolverParameterWidget::setDefaultOption() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setNMModel() { @@ -251,7 +251,7 @@ void SolverParameterWidget::setNMModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setOptionAttrs(QStringList attrs) { @@ -260,7 +260,7 @@ void SolverParameterWidget::setOptionAttrs(QStringList attrs) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverParameterWidget::setOptionAttrsFromList( QList attrList) diff --git a/src/preferences/SolverParameterWidget.h b/src/preferences/SolverParameterWidget.h index 059faad..1332741 100644 --- a/src/preferences/SolverParameterWidget.h +++ b/src/preferences/SolverParameterWidget.h @@ -10,7 +10,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Widget that has includes coefficient table and option table, which is @@ -175,9 +175,9 @@ class SolverParameterWidget }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverTable.cpp b/src/preferences/SolverTable.cpp index 5832718..a695f83 100644 --- a/src/preferences/SolverTable.cpp +++ b/src/preferences/SolverTable.cpp @@ -13,7 +13,7 @@ using gstar::CheckBoxDelegate; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverTable::SolverTable(QWidget* parent) : QWidget(parent) { @@ -28,7 +28,7 @@ SolverTable::SolverTable(QWidget* parent) : QWidget(parent) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SolverTable::~SolverTable() { @@ -37,14 +37,14 @@ SolverTable::~SolverTable() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::acceptChanges() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::addItem() { @@ -69,7 +69,7 @@ void SolverTable::addItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::addItem(Attribute attr) { @@ -92,7 +92,7 @@ void SolverTable::addItem(Attribute attr) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::removeItems() { @@ -101,7 +101,7 @@ void SolverTable::removeItems() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::createComponents() { @@ -177,7 +177,7 @@ void SolverTable::createComponents() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::fromStringList(const QStringList& list) { @@ -198,7 +198,7 @@ void SolverTable::fromStringList(const QStringList& list) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::fromAttributeList(const QList& list) { @@ -207,7 +207,7 @@ void SolverTable::fromAttributeList(const QList& list) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QList SolverTable::getSolverAttrs() { @@ -216,7 +216,7 @@ QList SolverTable::getSolverAttrs() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::removeItem() { @@ -267,7 +267,7 @@ void SolverTable::removeItem() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::setAddButtionVisible(bool visible) { @@ -276,7 +276,7 @@ void SolverTable::setAddButtionVisible(bool visible) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::setDeleteButtionVisible(bool visible) { @@ -285,7 +285,7 @@ void SolverTable::setDeleteButtionVisible(bool visible) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::setNMModel() { @@ -294,7 +294,7 @@ void SolverTable::setNMModel() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::setSolverAttrs( const QList& solverAttrs) @@ -304,7 +304,7 @@ void SolverTable::setSolverAttrs( } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SolverTable::tableDataChanged(const QModelIndex&, const QModelIndex&) { @@ -313,7 +313,7 @@ void SolverTable::tableDataChanged(const QModelIndex&, const QModelIndex&) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QStringList SolverTable::toStringList() { @@ -332,7 +332,7 @@ QStringList SolverTable::toStringList() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverTable::toMap() { @@ -348,7 +348,7 @@ QMap SolverTable::toMap() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SolverTable::toSelectedMap() { @@ -367,5 +367,5 @@ QMap SolverTable::toSelectedMap() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/preferences/SolverTable.h b/src/preferences/SolverTable.h index 4178f6e..3e10d5a 100644 --- a/src/preferences/SolverTable.h +++ b/src/preferences/SolverTable.h @@ -6,7 +6,7 @@ #ifndef SOLVERTABLE_H_ #define SOLVERTABLE_H_ -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -22,7 +22,7 @@ class AttributeTableModel; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief SolverTable the table having all the parameters of the solver @@ -182,5 +182,5 @@ private slots: }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif /* PYTHONSOLVERTABLE_H_ */ diff --git a/src/solver/AbstractSolver.cpp b/src/solver/AbstractSolver.cpp index 10f912c..74449b7 100644 --- a/src/solver/AbstractSolver.cpp +++ b/src/solver/AbstractSolver.cpp @@ -5,21 +5,21 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractSolver::AbstractSolver() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractSolver::~AbstractSolver() { } -/*--------------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- QString AbstractSolver::getLastErrorMessage() { @@ -28,4 +28,4 @@ QString AbstractSolver::getLastErrorMessage() } -/*--------------------------------------------------------------------------*/ +//-------------------------------------------------------------------------- diff --git a/src/solver/AbstractSolver.h b/src/solver/AbstractSolver.h index f5cd479..64c2fa6 100644 --- a/src/solver/AbstractSolver.h +++ b/src/solver/AbstractSolver.h @@ -10,7 +10,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief Transformation Interface @@ -116,8 +116,8 @@ class AbstractSolver }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/LinearCoordTransformer.cpp b/src/solver/LinearCoordTransformer.cpp index 9ef6764..1e70670 100644 --- a/src/solver/LinearCoordTransformer.cpp +++ b/src/solver/LinearCoordTransformer.cpp @@ -6,7 +6,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LinearCoordTransformer::LinearCoordTransformer() : ITransformer() { @@ -14,14 +14,14 @@ LinearCoordTransformer::LinearCoordTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- LinearCoordTransformer::~LinearCoordTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap LinearCoordTransformer::getAllCoef() { @@ -34,7 +34,7 @@ QMap LinearCoordTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearCoordTransformer::Init(QMap globalVars) { @@ -53,7 +53,7 @@ bool LinearCoordTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearCoordTransformer::getVariable(QString name, double *val) { @@ -73,7 +73,7 @@ bool LinearCoordTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool LinearCoordTransformer::setVariable(QString name, double val) { @@ -93,7 +93,7 @@ bool LinearCoordTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void LinearCoordTransformer::transformCommand(double inX, double inY, @@ -125,5 +125,5 @@ void LinearCoordTransformer::transformCommand(double inX, */ } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/LinearCoordTransformer.h b/src/solver/LinearCoordTransformer.h index e92c358..b6c709a 100644 --- a/src/solver/LinearCoordTransformer.h +++ b/src/solver/LinearCoordTransformer.h @@ -6,7 +6,7 @@ #ifndef LINEAR_COORDINATE_TRANSFORMER_H #define LINEAR_COORDINATE_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include "preferences/Attribute.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief @@ -93,8 +93,8 @@ class LinearCoordTransformer : public gstar::ITransformer }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/NelderMeadSolver.cpp b/src/solver/NelderMeadSolver.cpp index bf77599..633110b 100644 --- a/src/solver/NelderMeadSolver.cpp +++ b/src/solver/NelderMeadSolver.cpp @@ -10,14 +10,14 @@ using gstar::ITransformer; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include const QString NelderMeadSolver::STR_ITER = "Iterations"; const QString NelderMeadSolver::STR_STEP_SIZE = "StepSize"; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- double TotalErrorFunction(double vars[], void *p) { @@ -77,7 +77,7 @@ NelderMeadSolver::NelderMeadSolver() : AbstractSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- NelderMeadSolver::~NelderMeadSolver() { @@ -88,7 +88,7 @@ NelderMeadSolver::~NelderMeadSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- ITransformer* NelderMeadSolver::getTransformer() { @@ -97,7 +97,7 @@ ITransformer* NelderMeadSolver::getTransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- unsigned int NelderMeadSolver::getNumPoints() { @@ -106,7 +106,7 @@ unsigned int NelderMeadSolver::getNumPoints() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- NelderMeadSolver::LightPoint* NelderMeadSolver::getPoints() { @@ -115,7 +115,7 @@ NelderMeadSolver::LightPoint* NelderMeadSolver::getPoints() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap NelderMeadSolver::getVarIndexes() { @@ -124,7 +124,7 @@ QMap NelderMeadSolver::getVarIndexes() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap NelderMeadSolver::getAllCoef() { @@ -135,7 +135,7 @@ QMap NelderMeadSolver::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap NelderMeadSolver::getMinCoef() { @@ -144,7 +144,7 @@ QMap NelderMeadSolver::getMinCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap NelderMeadSolver::getOptions() { @@ -153,7 +153,7 @@ QMap NelderMeadSolver::getOptions() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void NelderMeadSolver::setAllCoef(QMap vars) { @@ -168,7 +168,7 @@ void NelderMeadSolver::setAllCoef(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void NelderMeadSolver::setCoordPoints(QList < QMap > vars) { @@ -203,7 +203,7 @@ void NelderMeadSolver::setCoordPoints(QList < QMap > vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void NelderMeadSolver::setMinCoef(QMap vars) { @@ -212,7 +212,7 @@ void NelderMeadSolver::setMinCoef(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void NelderMeadSolver::setOptions(QMap vars) { @@ -225,7 +225,7 @@ void NelderMeadSolver::setOptions(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void NelderMeadSolver::setTransformer(gstar::ITransformer* transformer) { @@ -234,7 +234,7 @@ void NelderMeadSolver::setTransformer(gstar::ITransformer* transformer) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool NelderMeadSolver::run() { @@ -301,4 +301,4 @@ bool NelderMeadSolver::run() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/NelderMeadSolver.h b/src/solver/NelderMeadSolver.h index 61dbb17..6701f1b 100644 --- a/src/solver/NelderMeadSolver.h +++ b/src/solver/NelderMeadSolver.h @@ -8,7 +8,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief NM solver using NM algorithm to do the solver calculation @@ -167,9 +167,9 @@ class NelderMeadSolver : public AbstractSolver }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/PythonSolver.cpp b/src/solver/PythonSolver.cpp index 2ad31b5..91e53c2 100644 --- a/src/solver/PythonSolver.cpp +++ b/src/solver/PythonSolver.cpp @@ -9,7 +9,7 @@ using gstar::ITransformer; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonSolver::PythonSolver() : AbstractSolver() { @@ -18,7 +18,7 @@ PythonSolver::PythonSolver() : AbstractSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonSolver::~PythonSolver() { @@ -27,7 +27,7 @@ PythonSolver::~PythonSolver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap PythonSolver::getAllCoef() { @@ -36,7 +36,7 @@ QMap PythonSolver::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap PythonSolver::getMinCoef() { @@ -45,7 +45,7 @@ QMap PythonSolver::getMinCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap PythonSolver::getOptions() { @@ -54,7 +54,7 @@ QMap PythonSolver::getOptions() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- gstar::ITransformer* PythonSolver::getTransformer() { @@ -63,7 +63,7 @@ gstar::ITransformer* PythonSolver::getTransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonSolver::initialPythonSolver(QString path, QString module, @@ -108,7 +108,7 @@ bool PythonSolver::initialPythonSolver(QString path, return true; } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonSolver::run() { @@ -132,7 +132,7 @@ bool PythonSolver::run() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonSolver::setAllCoef(QMap vars) { @@ -147,7 +147,7 @@ void PythonSolver::setAllCoef(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonSolver::setCoordPoints(QList < QMap > vars) { @@ -173,7 +173,7 @@ void PythonSolver::setCoordPoints(QList < QMap > vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonSolver::setMinCoef(QMap vars) { @@ -194,7 +194,7 @@ void PythonSolver::setMinCoef(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonSolver::setOptions(QMap vars) { @@ -209,7 +209,7 @@ void PythonSolver::setOptions(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonSolver::setTransformer(gstar::ITransformer* transformer) { diff --git a/src/solver/PythonSolver.h b/src/solver/PythonSolver.h index 1e54a42..d88b6ed 100644 --- a/src/solver/PythonSolver.h +++ b/src/solver/PythonSolver.h @@ -9,7 +9,7 @@ #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief PythonSolver the solver that use python script it will call the Python @@ -120,9 +120,9 @@ class PythonSolver : public AbstractSolver }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/PythonTransformer.cpp b/src/solver/PythonTransformer.cpp index b68be5b..d86ea7b 100644 --- a/src/solver/PythonTransformer.cpp +++ b/src/solver/PythonTransformer.cpp @@ -9,7 +9,7 @@ #include #include "core/defines.h" -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonTransformer::PythonTransformer(QString path, QString filename, @@ -60,14 +60,14 @@ PythonTransformer::PythonTransformer(QString path, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- PythonTransformer::~PythonTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap PythonTransformer::getAllCoef() { @@ -76,7 +76,7 @@ QMap PythonTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonTransformer::getVariable(QString name, double *val) { @@ -93,7 +93,7 @@ bool PythonTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonTransformer::foundFunctions() { @@ -102,7 +102,7 @@ bool PythonTransformer::foundFunctions() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonTransformer::Init(QMap globalVars) { @@ -122,7 +122,7 @@ bool PythonTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool PythonTransformer::setVariable(QString name, double val) { @@ -149,7 +149,7 @@ bool PythonTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void PythonTransformer::transformCommand(double inX, double inY, @@ -184,4 +184,4 @@ void PythonTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/PythonTransformer.h b/src/solver/PythonTransformer.h index 8a08d8e..8ade157 100644 --- a/src/solver/PythonTransformer.h +++ b/src/solver/PythonTransformer.h @@ -6,13 +6,13 @@ #ifndef PYTHON_TRANSFORMER_H #define PYTHON_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The transformer that use python script @@ -106,8 +106,8 @@ class PythonTransformer : public gstar::ITransformer QMap m_globalVars; }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/SV_CoordTransformer.cpp b/src/solver/SV_CoordTransformer.cpp index 5b50d2a..e479ae5 100644 --- a/src/solver/SV_CoordTransformer.cpp +++ b/src/solver/SV_CoordTransformer.cpp @@ -11,7 +11,7 @@ #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SV_CoordTransformer::SV_CoordTransformer() : ITransformer() { @@ -19,14 +19,14 @@ SV_CoordTransformer::SV_CoordTransformer() : ITransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- SV_CoordTransformer::~SV_CoordTransformer() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap SV_CoordTransformer::getAllCoef() { @@ -51,7 +51,7 @@ QMap SV_CoordTransformer::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SV_CoordTransformer::Init(QMap globalVars) { @@ -118,7 +118,7 @@ bool SV_CoordTransformer::Init(QMap globalVars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SV_CoordTransformer::getVariable(QString name, double *val) { @@ -198,7 +198,7 @@ bool SV_CoordTransformer::getVariable(QString name, double *val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool SV_CoordTransformer::setVariable(QString name, double val) { @@ -278,7 +278,7 @@ bool SV_CoordTransformer::setVariable(QString name, double val) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void SV_CoordTransformer::transformCommand(double inX, double inY, @@ -310,5 +310,5 @@ void SV_CoordTransformer::transformCommand(double inX, } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/SV_CoordTransformer.h b/src/solver/SV_CoordTransformer.h index 3b3f8b5..c5b792c 100644 --- a/src/solver/SV_CoordTransformer.h +++ b/src/solver/SV_CoordTransformer.h @@ -6,7 +6,7 @@ #ifndef SV_COORDINATE_TRANSFORMER_H #define SV_COORDINATE_TRANSFORMER_H -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #include #include @@ -14,7 +14,7 @@ #include "preferences/Attribute.h" #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief @@ -153,8 +153,8 @@ class SV_CoordTransformer : public gstar::ITransformer }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/Solver.cpp b/src/solver/Solver.cpp index 6808b37..8202615 100644 --- a/src/solver/Solver.cpp +++ b/src/solver/Solver.cpp @@ -5,7 +5,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Solver::Solver() { @@ -14,14 +14,14 @@ Solver::Solver() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- Solver::~Solver() { } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap Solver::getAllCoef() { @@ -34,7 +34,7 @@ QMap Solver::getAllCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- AbstractSolver* Solver::getImpl() { @@ -43,7 +43,7 @@ AbstractSolver* Solver::getImpl() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap Solver::getMinCoef() { @@ -56,7 +56,7 @@ QMap Solver::getMinCoef() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- QMap Solver::getOptions() { @@ -69,7 +69,7 @@ QMap Solver::getOptions() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- gstar::ITransformer* Solver::getTransformer() { @@ -81,7 +81,7 @@ gstar::ITransformer* Solver::getTransformer() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setAllCoef(QMap vars) { @@ -102,7 +102,7 @@ QString Solver::getLastErrorMessage() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setCoordPoints(QList < QMap > vars) { @@ -112,7 +112,7 @@ void Solver::setCoordPoints(QList < QMap > vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setImpl(AbstractSolver* impl) { @@ -121,7 +121,7 @@ void Solver::setImpl(AbstractSolver* impl) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setMinCoef(QMap vars) { @@ -131,7 +131,7 @@ void Solver::setMinCoef(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setOptions(QMap vars) { @@ -141,7 +141,7 @@ void Solver::setOptions(QMap vars) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- void Solver::setTransformer(gstar::ITransformer* transformer) { @@ -151,7 +151,7 @@ void Solver::setTransformer(gstar::ITransformer* transformer) } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- bool Solver::run() { @@ -163,4 +163,4 @@ bool Solver::run() } -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- diff --git a/src/solver/Solver.h b/src/solver/Solver.h index 90fe7ff..a7f41f6 100644 --- a/src/solver/Solver.h +++ b/src/solver/Solver.h @@ -8,7 +8,7 @@ #include -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- /** * @brief The solver class has the parameters for all the solver, it is the @@ -118,8 +118,8 @@ class Solver }; -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- #endif -/*---------------------------------------------------------------------------*/ +//--------------------------------------------------------------------------- From 300f285b394e786250dc3c7387f1826a9b23c6ee Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Wed, 26 Jun 2024 14:31:44 -0500 Subject: [PATCH 12/18] Started working on scan region graphics item and dialog --- src/core/uProbeX.cpp | 6 +- src/core/uProbeX.h | 4 +- .../Annotation/ScanRegionGraphicsItem.cpp | 977 ++++++++++++++++++ src/gstar/Annotation/ScanRegionGraphicsItem.h | 210 ++++ .../Annotation/UProbeRegionGraphicsItem.h | 4 +- src/mvc/ScanRegionDialog.cpp | 79 ++ src/mvc/ScanRegionDialog.h | 75 ++ src/mvc/VLM_Widget.cpp | 5 +- 8 files changed, 1351 insertions(+), 9 deletions(-) create mode 100644 src/gstar/Annotation/ScanRegionGraphicsItem.cpp create mode 100644 src/gstar/Annotation/ScanRegionGraphicsItem.h create mode 100644 src/mvc/ScanRegionDialog.cpp create mode 100644 src/mvc/ScanRegionDialog.h diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index ea3db4d..4774f94 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -169,7 +169,7 @@ void uProbeX::closeEvent(QCloseEvent* event) bool saveWithoutPrompt = Preferences::inst()->getValue(STR_PRF_AutoSaveOnExit).toBool(); saveAllXML(!saveWithoutPrompt); - cleanUpAutoSafeData(); + //cleanUpAutoSafeData(); Preferences::inst()->setValue(STR_GEOMETRY, saveGeometry()); Preferences::inst()->setValue(STR_WINDOWSTATE, saveState()); // Quit @@ -1098,7 +1098,7 @@ void uProbeX::savePreferencesXMLData() xmlWriter.writeEndDocument(); } -/*--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- void uProbeX::loadPreferencesXMLData() { @@ -1170,7 +1170,7 @@ void uProbeX::cleanUpAutoSafeData() { } } } - +*/ //--------------------------------------------------------------------------- void uProbeX::showAbout() diff --git a/src/core/uProbeX.h b/src/core/uProbeX.h index ec8b543..b064f0c 100644 --- a/src/core/uProbeX.h +++ b/src/core/uProbeX.h @@ -194,12 +194,12 @@ private slots: /** * @brief perform autosave for the open datasets. */ - void performAutoSave(); + //void performAutoSave(); /** * @brief cleanUpAutoSafeData */ - void cleanUpAutoSafeData(); + //void cleanUpAutoSafeData(); /* void savePreferencesXMLData(); diff --git a/src/gstar/Annotation/ScanRegionGraphicsItem.cpp b/src/gstar/Annotation/ScanRegionGraphicsItem.cpp new file mode 100644 index 0000000..a7cf713 --- /dev/null +++ b/src/gstar/Annotation/ScanRegionGraphicsItem.cpp @@ -0,0 +1,977 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include "gstar/Annotation/ScanRegionGraphicsItem.h" +#include "gstar/GStarResource.h" +#include +#include +#include + +#include + +using namespace gstar; + +//--------------------------------------------------------------------------- + +ScanRegionGraphicsItem::ScanRegionGraphicsItem(AbstractGraphicsItem* parent) + : UProbeRegionGraphicsItem(parent) +{ +/* + m_mouseOverPixelCoordModel = nullptr; + m_lightToMicroCoordModel = nullptr; + + m_outlineColor = QColor(255, 0, 127); + m_rect = QRectF(-300, -300, 600, 600); + + // The grip size of the grip rect + setGripSize(); + m_outlineColorProp = new AnnotationProperty(UPROBE_COLOR, m_outlineColor); + + m_predictXProp = new AnnotationProperty(UPROBE_PRED_POS_X, 0.0); + m_predictYProp = new AnnotationProperty(UPROBE_PRED_POS_Y, 0.0); + + m_widthProp = new AnnotationProperty(UPROBE_WIDTH, 0.0); + m_heightProp = new AnnotationProperty(UPROBE_HEIGHT, 0.0); + + m_measuredXProp = new AnnotationProperty(UPROBE_MICRO_POS_X, "0.0"); + m_measuredYProp = new AnnotationProperty(UPROBE_MICRO_POS_Y, "0.0"); + + m_sizeProp = new AnnotationProperty(UPROBE_SIZE, 20.0); + + // m_data.push_back(m_outlineColorProp); + + m_data.push_back(m_predictXProp); + m_data.push_back(m_predictYProp); + + m_data.push_back(m_widthProp); + m_data.push_back(m_heightProp); + + setSize(m_sizeProp->getValue().toDouble()); + + connectAllProperties(); + + // Initialize rectangle size + setFlag(QGraphicsItem::ItemSendsGeometryChanges); + // Accept hover events + setAcceptHoverEvents(true); + + initialScale(); + updateStringSize(); +*/ +} + +//--------------------------------------------------------------------------- + +ScanRegionGraphicsItem::ScanRegionGraphicsItem(QMap& marker, + AbstractGraphicsItem* parent) + : UProbeRegionGraphicsItem(parent) +{ +/* + m_mouseOverPixelCoordModel = nullptr; + m_lightToMicroCoordModel = nullptr; + + + m_outlineColor = QColor(marker[UPROBE_COLOR]); + m_rect = QRectF(marker["TopLeftX"].toDouble(), + marker["TopLeftY"].toDouble(), + marker["RectWidth"].toDouble(), + marker["RectHeight"].toDouble()); + setGripSize(); + m_outlineColorProp = new AnnotationProperty(UPROBE_COLOR, m_outlineColor); + m_predictXProp = new AnnotationProperty(UPROBE_PRED_POS_X, marker[UPROBE_PRED_POS_X]); + m_predictYProp = new AnnotationProperty(UPROBE_PRED_POS_Y, marker[UPROBE_PRED_POS_Y]); + m_widthProp = new AnnotationProperty(UPROBE_WIDTH, 0.0); + m_heightProp = new AnnotationProperty(UPROBE_HEIGHT, 0.0); + m_sizeProp = new AnnotationProperty(UPROBE_SIZE, 20.0); + + m_data.push_back(m_outlineColorProp); + m_data.push_back(m_predictXProp); + m_data.push_back(m_predictYProp); + m_data.push_back(m_widthProp); + m_data.push_back(m_heightProp); + + + setSize(m_sizeProp->getValue().toDouble()); + + connectAllProperties(); + + setFlag(QGraphicsItem::ItemSendsGeometryChanges); + // Accept hover events + setAcceptHoverEvents(true); + + initialScale(); + updateStringSize(); +*/ +} + +//--------------------------------------------------------------------------- + +ScanRegionGraphicsItem* ScanRegionGraphicsItem::cloneRegion() +{ + ScanRegionGraphicsItem* newRegion = new ScanRegionGraphicsItem(); + + //newRegion->m_outlineColor = m_outlineColor; + newRegion->m_rect = m_rect; + + return newRegion; +} +/* +//--------------------------------------------------------------------------- + +QString ScanRegionGraphicsItem::getUProbeName() +{ + QVariant value = this->propertyValue(UPROBE_NAME); + if (value.type() == QVariant::String) { + return value.toString(); + } + return nullptr; +} + +//--------------------------------------------------------------------------- + +QRectF ScanRegionGraphicsItem::boundingRect() const +{ + + QFontMetrics fm(m_font); + int currentStringWidth=fm.horizontalAdvance(this->propertyValue(UPROBE_NAME).toString()); + + int width; + if(currentStringWidth < m_lastStringWidth) + { + width = m_lastStringWidth; + } + else + { + width = currentStringWidth; + } + + // Make the region width 4 pixel more for gap between string and region + qreal regionWidth = width + m_rect.width()+4; + qreal regionHeight = m_rect.height(); + QSizeF regionSize = QSizeF(regionWidth, regionHeight); + + // Verify that item is in a scene + if (scene() != 0) { + QRectF scenceRect = scene()->sceneRect(); + if(mapToScene(m_rect.center()).x() < scenceRect.center().x()) + { + return QRectF(m_rect.topLeft(), + regionSize); + } + else + { + qreal textLeftPosition = m_rect.left()-1-width; + return QRectF(QPointF(textLeftPosition, m_rect.top()), + regionSize); + } + } + return QRectF(); +} + +//--------------------------------------------------------------------------- + +QRectF ScanRegionGraphicsItem::boundingRectMarker() const +{ + + return m_rect; + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::calculate() +{ + + //nothing to calculate + +} + +//--------------------------------------------------------------------------- + +const QString ScanRegionGraphicsItem::displayName() const +{ + + const QString name = QString("Micro Probe Region"); + return name; + +} + +//--------------------------------------------------------------------------- + +AbstractGraphicsItem* ScanRegionGraphicsItem::duplicate() +{ + + ScanRegionGraphicsItem* item = new ScanRegionGraphicsItem(); + + QColor color(m_outlineColorProp->getValue().toString()); + item->setColor(color); + item->setPos(pos()); + item->setSameRect(m_rect); + + item->setMouseOverPixelCoordModel(m_mouseOverPixelCoordModel); + item->setLightToMicroCoordModel(m_lightToMicroCoordModel); + return item; + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getFactorX() +{ + + //TODO: add annotation property + return 1.0; + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getFactorY() +{ + + //TODO: add annotation property + return 1.0; + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getHeight() +{ + + return m_heightProp->getValue().toDouble(); + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getWidth() +{ + + return m_widthProp->getValue().toDouble(); + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getX() +{ + + return m_predictXProp->getValue().toDouble(); + +} + +//--------------------------------------------------------------------------- + +double ScanRegionGraphicsItem::getY() +{ + + return m_predictYProp->getValue().toDouble(); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + + // Mark unused + Q_UNUSED(event); + + // Return if item is not selected + if (!isSelected()) { + return; + } + + // Set cursor + setCursor(Qt::SizeAllCursor); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + + // Mark unused + Q_UNUSED(event); + + // Reset cursor + unsetCursor(); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + + // Return if item is not selected + if (!isSelected()) { + return; + } + + // Mouse click position (in item coordinates) + QPointF pt = event -> pos(); + + // Check for bottom right grip + if (pt.x() <= m_rect.right() && + pt.y() <= m_rect.bottom() && + pt.x() >= m_rect.right() - m_gripSize && + pt.y() >= m_rect.bottom() - m_gripSize) + { + setCursor(Qt::SizeFDiagCursor); + }// bottom left + else if (pt.x() >= m_rect.left() && + pt.y() >= m_rect.bottom() - m_gripSize && + pt.x() <= m_rect.left() + m_gripSize && + pt.y() <= m_rect.bottom()) + { + setCursor(Qt::SizeBDiagCursor); + }//top left + else if (pt.x() <= m_rect.left() + m_gripSize && + pt.y() <= m_rect.top() + m_gripSize && + pt.x() >= m_rect.left() && + pt.y() >= m_rect.top()) + { + setCursor(Qt::SizeFDiagCursor); + }//top right + else if (pt.x() >= m_rect.right() - m_gripSize && + pt.y() >= m_rect.top()&& + pt.x() <= m_rect.right() && + pt.y() <= m_rect.top() + m_gripSize ) + { + setCursor(Qt::SizeBDiagCursor); + } + // Reset cursor + else { + setCursor(Qt::OpenHandCursor); + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::initialScale() +{ + + QTransform trans = getFirstViewTransform(); + if (trans.isScaling()) + { + bool isInvertable = false; + QTransform invTrans = trans.inverted(&isInvertable); + if (isInvertable) + { + double xScale = invTrans.m11(); + double s = scale(); + if (s != xScale) + { + setScale(100*xScale); + } + } + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + + // Current mouse position + QPointF pt = event -> pos(); + + // Last mouse position + QPointF lpt = event -> lastPos(); + + // Get boundary item rectangle + QRectF boundRect = ((ImageViewScene*) scene()) -> pixRect(); + + // User interacted with a resize grip + if (m_grip != None) { + prepareGeometryChange(); + double last_y = m_rect.y(); + double last_x = m_rect.x(); + + // Perform resize based on the edge the user is moving & limit within parent. + + // Update Height + if (m_grip == TopLeft || m_grip == TopRight) { + if (mapToScene(pt).y() <= boundRect.top()) { + m_rect.setTop(mapFromScene(boundRect.topLeft()).y()); + } else { + m_rect.setY(pt.y()); + } + } + if (m_grip == BottomLeft || m_grip == BottomRight) { + if (mapToScene(pt).y() >= boundRect.bottom()) { + m_rect.setBottom(mapFromScene(boundRect.bottomLeft()).y()); + } else { + m_rect.setHeight(pt.y() - m_rect.top()); + } + } + + // Update Width + if (m_grip == BottomLeft || m_grip == TopLeft) { + if (mapToScene(pt).x() <= boundRect.left()) { + m_rect.setLeft(mapFromScene(boundRect.topLeft()).x()); + } else { + m_rect.setX(pt.x()); + } + } + if (m_grip == BottomRight || m_grip == TopRight) { + if (mapToScene(pt).x() >= boundRect.right()) { + m_rect.setRight(mapFromScene(boundRect.topRight()).x()); + } else { + m_rect.setWidth(pt.x() - m_rect.left()); + } + } + + // Enforce a minimum size + if (m_rect.width() < 5) { + m_rect.setX(last_x); + m_rect.setWidth(5); + } + if (m_rect.height() < 5) { + m_rect.setY(last_y); + m_rect.setHeight(5); + } + } + // No grip selected (this is a move) + else { + // Queue an update + update(); + + // Pass mouse position + QGraphicsItem::mouseMoveEvent(event); + setPos(pos().x(), pos().y()); + + // Check bounds + // setPos(qBound(boundRect.left(), pos().x(), + // boundRect.right() - m_rect.width()), + // qBound(boundRect.top(), pos().y(), + // boundRect.bottom() - m_rect.height())); + // Emit change + //emit itemChanged(this); + + } + + setGripSize(); +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::zoomToRegion() +{ + // Estimated minimum text size. Should be predicted. + QGraphicsView* v = scene()->views().first(); + QSize size = v->size(); + + double rectWidth = m_rect.width(); + double rectHeight = m_rect.height(); + + qreal predictedScale = 0; + if (rectHeight == rectWidth || rectHeight < rectWidth) { + predictedScale = rectWidth / size.width(); + + } else if (rectWidth < rectHeight) { + predictedScale = rectHeight / size.height(); + } + + int predictedPixelSize = predictFontPixelSizeByScale(predictedScale); + // Apply predicted pixel size to factor in when zoom to region is performed. + m_font.setPixelSize(predictedPixelSize); + m_lastStringWidth = 0; + + ImageViewScene* imageViewScene = ((ImageViewScene*) scene()); + imageViewScene->updateZoom(this); +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + + // Mouse click position (in item coordinates) + QPointF pt = event -> pos(); + + // Check for bottom right grip + if (pt.x() <= m_rect.right() && + pt.y() <= m_rect.bottom() && + pt.x() >= m_rect.right() - m_gripSize && + pt.y() >= m_rect.bottom() - m_gripSize) + { + m_grip = BottomRight; + }// bottom left + else if (pt.x() >= m_rect.left() && + pt.y() >= m_rect.bottom() - m_gripSize && + pt.x() <= m_rect.left() + m_gripSize && + pt.y() <= m_rect.bottom()) + { + m_grip = BottomLeft; + }//top left + else if (pt.x() <= m_rect.left() + m_gripSize && + pt.y() <= m_rect.top() + m_gripSize && + pt.x() >= m_rect.left() && + pt.y() >= m_rect.top()) + { + m_grip = TopLeft; + }//top right + else if (pt.x() >= m_rect.right() - m_gripSize && + pt.y() >= m_rect.top()&& + pt.x() <= m_rect.right() && + pt.y() <= m_rect.top() + m_gripSize ) + { + m_grip = TopRight; + } + // Reset cursor + else + { + m_grip = None; + } + + // Queue an update + update(); + + // Pass mouse event + QGraphicsItem::mousePressEvent(event); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + + // No grip selected + m_grip = None; + + // Queue an update + update(); + + // Pass mouse event + QGraphicsItem::mouseReleaseEvent(event); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::paint(QPainter* painter, + const QStyleOptionGraphicsItem* option, + QWidget* widget) +{ + + Q_UNUSED(widget); + // Draw the center of the rect. + + // Draw grip box + QRectF gripBottomLeft(m_rect.left(), + m_rect.bottom() - m_gripSize, + m_gripSize, m_gripSize); + + QRectF gripBottomRight(m_rect.right() - m_gripSize, + m_rect.bottom() - m_gripSize, + m_gripSize, m_gripSize); + + QRectF gripTopLeft(m_rect.left(), + m_rect.top(), + m_gripSize, m_gripSize); + + QRectF gripTopRight(m_rect.right() - m_gripSize, + m_rect.top(), + m_gripSize, m_gripSize); + + + QPen pen(m_outlineColor); + if (option->state & QStyle::State_Selected) + { + pen.setStyle(Qt::DotLine); + pen.setWidth(2); + + } + pen.setCosmetic(true); + + painter->setPen(pen); + painter->drawRect(m_rect); + + if(QApplication::queryKeyboardModifiers().testFlag(Qt::ShiftModifier)) + { + + if(m_rect.width()<10&&m_rect.height()<10) + { + painter->drawPoint(m_rect.center()); + } + else + { + // Draw the crosshair in the center of the region box. + double midX = m_rect.left() + ( ( m_rect.right() - m_rect.left() ) * 0.5); + double midY = m_rect.bottom() + ( ( m_rect.top() - m_rect.bottom() ) * 0.5); + double thirdX = ( m_rect.right() - m_rect.left() ) * 0.1; + double thirdY = ( m_rect.top() - m_rect.bottom() ) * 0.1; + double cX = m_rect.center().x(); + double cY = m_rect.center().y(); + painter->drawLine(midX, cY - thirdY, midX, cY + thirdY); + painter->drawLine(cX - thirdX, midY, cX + thirdX, midY); + } + + painter->drawRect(gripBottomLeft); + painter->drawRect(gripBottomRight); + painter->drawRect(gripTopLeft); + painter->drawRect(gripTopRight); + } + updateStringSize(); + painter->setFont(m_font); + + QString str = this->propertyValue(UPROBE_NAME).toString(); + + // Make 1 pixel wider for gap between string and region box + if (scene() != 0) + { + QRectF scenceRect = scene()->sceneRect(); + + if( mapToScene(m_rect.center()).x() < scenceRect.center().x()) + { + double txtRightPosition = m_rect.right()+1; + painter->drawText( QPointF(txtRightPosition, m_rect.center().y() ), str); + } + else + { + double textLeftPosition = m_rect.left()-1-m_lastStringWidth; + painter->drawText( QPointF(textLeftPosition, m_rect.center().y() ), str); + } + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setColor(const QColor& color) +{ + + // Set color + m_outlineColor = color; + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setGripSize() +{ + + if (m_rect.width() < m_rect.height()) + { + m_gripSize = 0.1 * m_rect.width(); + } + else + { + m_gripSize = 0.1 * m_rect.height(); + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setHeight(double height) +{ + + // Prepare for change + prepareGeometryChange(); + + // Set width + m_rect.setHeight(height); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setMouseOverPixelCoordModel(CoordinateModel* model) +{ + + if(m_mouseOverPixelCoordModel != nullptr) + { + disconnect(m_mouseOverPixelCoordModel, + SIGNAL(modelUpdated()), + this, + SLOT(updateModel())); + } + + m_mouseOverPixelCoordModel = model; + + if(m_mouseOverPixelCoordModel != nullptr) + { + connect(m_mouseOverPixelCoordModel, + SIGNAL(modelUpdated()), + this, + SLOT(updateModel())); + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setLightToMicroCoordModel(CoordinateModel* model) +{ + + if(m_lightToMicroCoordModel != nullptr) + { + disconnect(m_lightToMicroCoordModel, + SIGNAL(modelUpdated()), + this, + SLOT(updateModel())); + } + + m_lightToMicroCoordModel = model; + + if(m_lightToMicroCoordModel != nullptr) + { + connect(m_lightToMicroCoordModel, + SIGNAL(modelUpdated()), + this, + SLOT(updateModel())); + } + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setSameRect(QRectF& rect) +{ + + // Prepare for change + prepareGeometryChange(); + + // Set y + m_rect = rect; + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setSize(double size) +{ + + m_size = size; + + update(); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setWidth(double width) +{ + + // Prepare for change + prepareGeometryChange(); + + // Set width + m_rect.setWidth(width); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setX(double x) +{ + + // Prepare for change + prepareGeometryChange(); + + // Set x + setPos(x, pos().y()); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::setY(double y) +{ + + // Prepare for change + prepareGeometryChange(); + + // Set y + setPos(pos().x(), y); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::updateModel() +{ + // Center needs to be calculated uProbe position + QPointF position = mapToScene(m_rect.center()); + + QPointF topLeft = mapToScene(m_rect.topLeft()); + QPointF topRight = mapToScene(m_rect.topRight()); + QPointF bottomRight = mapToScene(m_rect.bottomRight()); + + if(m_mouseOverPixelCoordModel != nullptr) + { + double x,y,z; + m_mouseOverPixelCoordModel->runTransformer((double)position.x(), + (double)position.y(), + 0.0, + &x, + &y, + &z); + + double topLeftX, topLeftY, topLeftZ; + double topRightX, topRightY, topRightZ; + double bottomRightX, bottomRightY, bottomRightZ; + m_mouseOverPixelCoordModel->runTransformer((double)topLeft.x(), + (double)topLeft.y(), + 0.0, + &topLeftX, + &topLeftY, + &topLeftZ); + m_mouseOverPixelCoordModel->runTransformer((double)topRight.x(), + (double)topRight.y(), + 0.0, + &topRightX, + &topRightY, + &topRightZ); + m_mouseOverPixelCoordModel->runTransformer((double)bottomRight.x(), + (double)bottomRight.y(), + 0.0, + &bottomRightX, + &bottomRightY, + &bottomRightZ); + + if(m_lightToMicroCoordModel != nullptr) + { + double x1,y1,z1; + m_lightToMicroCoordModel->runTransformer(x, + y, + 0.0, + &x1, + &y1, + &z1); + m_predictXProp->setValue(x1); + m_predictYProp->setValue(y1); + + double topLeftX1, topLeftY1, topLeftZ1; + double topRightX1, topRightY1, topRightZ1; + double bottomRightX1, bottomRightY1, bottomRightZ1; + m_lightToMicroCoordModel->runTransformer(topLeftX, + topLeftY, + 0.0, + &topLeftX1, + &topLeftY1, + &topLeftZ1); + m_lightToMicroCoordModel->runTransformer(topRightX, + topRightY, + 0.0, + &topRightX1, + &topRightY1, + &topRightZ1); + m_lightToMicroCoordModel->runTransformer(bottomRightX, + bottomRightY, + 0.0, + &bottomRightX1, + &bottomRightY1, + &bottomRightZ1); + + m_widthProp->setValue(topLeftX1-topRightX1); + m_heightProp->setValue(topRightY1-bottomRightY1); + + } + + } + else + { + m_predictXProp->setValue(0.0); + m_predictYProp->setValue(0.0); + m_widthProp->setValue(topRight.x()-topLeft.x()); + m_heightProp->setValue(bottomRight.y()-topRight.y()); + } +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::updateStringSize() +{ + + double pixelSize; + + QTransform trans = getFirstViewTransform(); + if (trans.isScaling()) + { + bool isInvertable = false; + QTransform invTrans = trans.inverted(&isInvertable); + if (isInvertable) + { + qreal horizontalScalingFactor = invTrans.m11(); + + pixelSize = predictFontPixelSizeByScale(horizontalScalingFactor); + } + } + else + { + pixelSize = 10; + } + + +// if(m_rect.width() > 11) +// { +// pixelSize = m_rect.width()/10; +// } +// else +// { +// pixelSize = 1; +// } + + + m_font.setPixelSize(pixelSize); + + QString str = this->propertyValue(UPROBE_NAME).toString(); + + QFontMetrics fm(m_font); + int currentStringWidth=fm.horizontalAdvance(str); + m_lastStringWidth = currentStringWidth; + +} + +int ScanRegionGraphicsItem::predictFontPixelSizeByScale(qreal scale) { + double pixelSizeScalingFactor; + + if (scale < 0.20) { + pixelSizeScalingFactor = 21.0; + } + else if (scale < 0.35) { + pixelSizeScalingFactor = 18.0; + } + else if (scale < 0.50) { + pixelSizeScalingFactor = 15.0; + } + else if (scale < 0.65) { + pixelSizeScalingFactor = 13.0; + }else { + pixelSizeScalingFactor = 12.0; + } + + + int pixelSize = scale * pixelSizeScalingFactor; + return std::max((double)pixelSize, 3.0); + +} + +//--------------------------------------------------------------------------- + +void ScanRegionGraphicsItem::updateView() +{ + //double x = m_positionXProp->getValue().toDouble(); + //double y = m_positionYProp->getValue().toDouble(); + + setSize(m_sizeProp->getValue().toDouble()); + //setX(x); + //setY(y); + + m_outlineColor = QColor(m_outlineColorProp->getValue().toString()); + +} +*/ +//--------------------------------------------------------------------------- + diff --git a/src/gstar/Annotation/ScanRegionGraphicsItem.h b/src/gstar/Annotation/ScanRegionGraphicsItem.h new file mode 100644 index 0000000..694ae5e --- /dev/null +++ b/src/gstar/Annotation/ScanRegionGraphicsItem.h @@ -0,0 +1,210 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef SCAN_REGION_GRAPHICSITEM_H +#define SCAN_REGION_GRAPHICSITEM_H + +//--------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gstar/Annotation/AbstractGraphicsItem.h" +#include "gstar/AnnotationProperty.h" +#include "gstar/CoordinateModel.h" +#include "gstar/Annotation/UProbeRegionGraphicsItem.h" +#include "mvc/ScanRegionDialog.h" + +//--------------------------------------------------------------------------- + +namespace gstar +{ + +class ScanRegionGraphicsItem : public UProbeRegionGraphicsItem +{ + +public: + + /** + * Constructor. + * + * @param x - x position + * @param y - y position + * @param w - width + * @param h - height + * @param parent - parent Qt widget + */ + ScanRegionGraphicsItem(AbstractGraphicsItem* parent = 0); + + /** + * @brief MarkerGraphicsItem + * @param parent + * @param marker infomation + */ + ScanRegionGraphicsItem(QMap& marker, + AbstractGraphicsItem* parent = 0); + + /** + * @brief coneRegion + * @param uProbeRegion + * @return + */ + virtual ScanRegionGraphicsItem* cloneRegion(); + + virtual QDialog* get_custom_dialog() { return &_scan_dialog; } +/* + QRectF boundingRect() const; + + QRectF boundingRectMarker() const; + + QString getUProbeName(); + + double getFactorX(); + + double getFactorY(); + + double getHeight(); + + double getWidth(); + + double getX(); + + double getY(); + + void updateStringSize(); + + void paint(QPainter*painter, + const QStyleOptionGraphicsItem* option, + QWidget* widget); + + void setMouseOverPixelCoordModel(CoordinateModel* model); + + void setLightToMicroCoordModel(CoordinateModel* model); + + void setGripSize(); + + void setSize(double size); + + void setColor(const QColor& color); + + void setHeight(double height); + + void setSameRect(QRectF& rect); + + void setWidth(double width); + + void setX(double x); + + void setY(double y); + + const QString displayName() const; + + AbstractGraphicsItem* duplicate(); + + void calculate(); + + void updateModel(); + + void updateView(); + + void zoomToRegion(); + +signals: + +protected: + + enum Grip { + None, // No grip selected. + BottomRight, // Bottom right grip selected. + BottomLeft, // Bottom left grip selected. + TopLeft, + TopRight + }; + + void hoverEnterEvent(QGraphicsSceneHoverEvent *event); + + void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); + + void hoverMoveEvent(QGraphicsSceneHoverEvent *event); + + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + + void mousePressEvent(QGraphicsSceneMouseEvent* event); + + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); +*/ +private: + ScanRegionDialog _scan_dialog; + +/* + void initialScale(); + + int predictFontPixelSizeByScale(qreal scale); + +private: + + QGraphicsItem* m_bound; + + QColor m_color; + + Grip m_grip; + + QRectF m_rect; + + CoordinateModel* m_mouseOverPixelCoordModel; + + CoordinateModel* m_lightToMicroCoordModel; + + QColor m_outlineColor; + + QFont m_font; + + AnnotationProperty* m_outlineColorProp; + + QPolygon m_polygon; + + AnnotationProperty* m_positionXProp; + + AnnotationProperty* m_positionYProp; + + AnnotationProperty* m_positionZProp; + + AnnotationProperty* m_predictXProp; + + AnnotationProperty* m_predictYProp; + + AnnotationProperty* m_widthProp; + + AnnotationProperty* m_heightProp; + + AnnotationProperty* m_measuredXProp; + + AnnotationProperty* m_measuredYProp; + + double m_size; + + double m_gripSize; + + AnnotationProperty* m_sizeProp; + + int m_lastStringWidth; +*/ +}; + +} + +//--------------------------------------------------------------------------- + +#endif + +//--------------------------------------------------------------------------- diff --git a/src/gstar/Annotation/UProbeRegionGraphicsItem.h b/src/gstar/Annotation/UProbeRegionGraphicsItem.h index cfc086d..6e67d8c 100644 --- a/src/gstar/Annotation/UProbeRegionGraphicsItem.h +++ b/src/gstar/Annotation/UProbeRegionGraphicsItem.h @@ -57,7 +57,7 @@ class UProbeRegionGraphicsItem : public AbstractGraphicsItem * @param uProbeRegion * @return */ - UProbeRegionGraphicsItem* cloneRegion(); + virtual UProbeRegionGraphicsItem* cloneRegion(); /** * Get item's boudning rectangle @@ -298,7 +298,7 @@ class UProbeRegionGraphicsItem : public AbstractGraphicsItem */ int predictFontPixelSizeByScale(qreal scale); -private: +protected: /** * The boudning graphics item for this item diff --git a/src/mvc/ScanRegionDialog.cpp b/src/mvc/ScanRegionDialog.cpp new file mode 100644 index 0000000..d9406a8 --- /dev/null +++ b/src/mvc/ScanRegionDialog.cpp @@ -0,0 +1,79 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2019, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include + + +#include +#include +#include +#include + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + +ScanRegionDialog::ScanRegionDialog() : QDialog() +{ + + _createLayout(); + +} + +//--------------------------------------------------------------------------- + +ScanRegionDialog::~ScanRegionDialog() +{ + +} + +//--------------------------------------------------------------------------- + +void ScanRegionDialog::_createLayout() +{ + rowLabel = new QLabel("Rows"); + colLabel = new QLabel("Cols"); + sbRow = new QSpinBox(); + sbCol = new QSpinBox(); + + sbRow->setMinimum(1); + sbRow->setMaximum(6); + sbRow->setSingleStep(1); + sbRow->setValue(1); + + sbCol->setMinimum(1); + sbCol->setMaximum(6); + sbCol->setSingleStep(1); + sbCol->setValue(1); + + updateBtn = new QPushButton("Update"); + cancelBtn = new QPushButton("Cancel"); + connect(updateBtn, SIGNAL(pressed()), this, SLOT(onUpdate())); + connect(cancelBtn, SIGNAL(pressed()), this, SLOT(close())); + + QGridLayout *mainLayout = new QGridLayout; + mainLayout->setSizeConstraint(QLayout::SetFixedSize); + mainLayout->addWidget(rowLabel, 0, 0); + mainLayout->addWidget(colLabel, 0, 1); + mainLayout->addWidget(sbRow, 1, 0); + mainLayout->addWidget(sbCol, 1, 1); + mainLayout->addWidget(updateBtn, 2, 0); + mainLayout->addWidget(cancelBtn, 2, 1); + mainLayout->setRowStretch(3, 1); + + setLayout(mainLayout); + + setWindowTitle("Scan Region"); +} + +//--------------------------------------------------------------------------- + +void ScanRegionDialog::onUpdate() +{ + emit NewScan(); + close(); +} + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/src/mvc/ScanRegionDialog.h b/src/mvc/ScanRegionDialog.h new file mode 100644 index 0000000..0de5ae7 --- /dev/null +++ b/src/mvc/ScanRegionDialog.h @@ -0,0 +1,75 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef SCAN_REGION_DIALOG_H +#define SCAN_REGION_DIALOG_H + +//--------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//--------------------------------------------------------------------------- + +/** + * @brief When open the acquisition window, the widget is showing for capturing + * the image from the area detector writer, the window will also be updated to + * show the image. + */ +class ScanRegionDialog : public QDialog +{ + + Q_OBJECT + +public: + + /** + * Constructor. + */ + ScanRegionDialog(); + + /** + * Destructor. + */ + ~ScanRegionDialog(); + +signals: + void NewScan(); + +public slots: + void onUpdate(); + +protected: + + void _createLayout(); + +private: + QLabel *rowLabel; + QLabel *colLabel; + + //QDialogButtonBox *buttonBox; + + QPushButton *updateBtn; + QPushButton *cancelBtn; + + QSpinBox *sbRow; + QSpinBox *sbCol; + +}; + + +//--------------------------------------------------------------------------- + +#endif /* ImageGridDialog_H_ */ + +//--------------------------------------------------------------------------- + diff --git a/src/mvc/VLM_Widget.cpp b/src/mvc/VLM_Widget.cpp index e0a0e1f..d68589f 100644 --- a/src/mvc/VLM_Widget.cpp +++ b/src/mvc/VLM_Widget.cpp @@ -24,6 +24,7 @@ #include "gstar/Annotation/UProbeMarkerGraphicsItem.h" #include "gstar/Annotation/UProbeRegionGraphicsItem.h" +#include "gstar/Annotation/ScanRegionGraphicsItem.h" #include "gstar/Annotation/MarkerGraphicsItem.h" #include "gstar/Annotation/AbstractGraphicsItem.h" #include "gstar/Annotation/EmptyGraphicsItem.h" @@ -233,8 +234,8 @@ void VLM_Widget::addTopWindowPoints() void VLM_Widget::addMicroProbeRegion() { - - UProbeRegionGraphicsItem* annotation = new UProbeRegionGraphicsItem(); + ScanRegionGraphicsItem* annotation = new ScanRegionGraphicsItem(); + ////UProbeRegionGraphicsItem* annotation = new UProbeRegionGraphicsItem(); annotation->setMouseOverPixelCoordModel(m_coordinateModel); annotation->setLightToMicroCoordModel(m_lightToMicroCoordModel); From 2433a173dc5223b172c69526533951ccd10f9775 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 28 Jun 2024 10:52:55 -0500 Subject: [PATCH 13/18] Set it so live view disables floating dock by default because of bug. Added auto hide for files tab --- src/mvc/AnnimateSlideWidget.cpp | 53 ++++++++++++++++ src/mvc/AnnimateSlideWidget.h | 95 ++++++++++++++++++++++++++++ src/mvc/ImageStackControlWidget.cpp | 27 ++++++-- src/mvc/ImageStackControlWidget.h | 6 +- src/mvc/LiveMapsElementsWidget.cpp | 2 +- src/mvc/MapsElementsWidget.cpp | 32 +++++----- src/mvc/MapsElementsWidget.h | 4 +- src/mvc/MapsWorkspaceFilesWidget.cpp | 1 + src/mvc/ScanQueueWidget.cpp | 2 +- 9 files changed, 198 insertions(+), 24 deletions(-) create mode 100644 src/mvc/AnnimateSlideWidget.cpp create mode 100644 src/mvc/AnnimateSlideWidget.h diff --git a/src/mvc/AnnimateSlideWidget.cpp b/src/mvc/AnnimateSlideWidget.cpp new file mode 100644 index 0000000..b1cda89 --- /dev/null +++ b/src/mvc/AnnimateSlideWidget.cpp @@ -0,0 +1,53 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#include +#include +//--------------------------------------------------------------------------- + +AnnimateSlideWidget::AnnimateSlideWidget(QWidget *parent) : QWidget(parent) +{ + _anim_widget = nullptr; + _anim_enabled = true; +} + +//--------------------------------------------------------------------------- + +void AnnimateSlideWidget::setAnimWidget(QWidget* w, QString btn_name) +{ + if(w != nullptr) + { + if(_btn_hover == nullptr) + { + _btn_hover = new QPushButton(btn_name); + } + _anim_widget = w; + } + + QHBoxLayout *layout = new QHBoxLayout(); + layout->addWidget(_btn_hover); + layout->addWidget(_anim_widget); + + setLayout(layout); +} + +//--------------------------------------------------------------------------- + +void AnnimateSlideWidget::setAnimEnabled(bool val) +{ + if(val) + { + //_btn_hover->setVisible(true); + _anim_enabled = val; + } + else + { + _btn_hover->setVisible(false); + _anim_enabled = val; + } +} + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/mvc/AnnimateSlideWidget.h b/src/mvc/AnnimateSlideWidget.h new file mode 100644 index 0000000..e15929e --- /dev/null +++ b/src/mvc/AnnimateSlideWidget.h @@ -0,0 +1,95 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2024, UChicago Argonne, LLC + * See LICENSE file. + *---------------------------------------------------------------------------*/ + +#ifndef AnnimateSlideWidget_H +#define AnnimateSlideWidget_H + +//--------------------------------------------------------------------------- + +//#include +#include +#include +#include + +//--------------------------------------------------------------------------- + +class AnnimateSlideWidget : public QWidget +{ + + Q_OBJECT + +public: + + AnnimateSlideWidget(QWidget *parent = nullptr); + + ~AnnimateSlideWidget(){} + + void setAnimWidget(QWidget* w, QString btn_name); + + void setAnimEnabled(bool val); + +protected: + + virtual void enterEvent(QEnterEvent *event) override + { + if(_anim_enabled) + { + // Show the widget and start the animation + if(_anim_widget!=nullptr) + { + _anim_widget->setVisible(true); + _btn_hover->setVisible(false); + } + animateSlideIn(); + } + } + + virtual void leaveEvent(QEvent *event) override + { + if(_anim_enabled) + { + // Hide the widget and start the animation + if(_anim_widget!=nullptr) + { + _anim_widget->setVisible(false); + _btn_hover->setVisible(true); + } + animateSlideOut(); + } + } + +private slots: + void animateSlideIn() + { + // Animate the widget to slide in + QPropertyAnimation *animation = new QPropertyAnimation(this, "visibleWidth"); + animation->setDuration(1000); + animation->setStartValue(0); + animation->setEndValue(width()); + animation->start(); + } + + void animateSlideOut() + { + // Animate the widget to slide out + QPropertyAnimation *animation = new QPropertyAnimation(this, "visibleWidth"); + animation->setDuration(1000); + animation->setStartValue(width()); + animation->setEndValue(0); + animation->start(); + } + +private: + QWidget* _anim_widget; + QPushButton* _btn_hover; + bool _anim_enabled; + +}; + +//--------------------------------------------------------------------------- + +#endif /* TXM_ABSTRACT_WINDOW_CONTROLLER_H */ + +//--------------------------------------------------------------------------- diff --git a/src/mvc/ImageStackControlWidget.cpp b/src/mvc/ImageStackControlWidget.cpp index f4dea9a..f0d5e26 100644 --- a/src/mvc/ImageStackControlWidget.cpp +++ b/src/mvc/ImageStackControlWidget.cpp @@ -104,22 +104,27 @@ void ImageStackControlWidget::createLayout() _files_dock = new QDockWidget("Files", this); _files_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _files_dock->setWidget(_mapsFilsWidget); + connect(_files_dock, &QDockWidget::topLevelChanged, this, &ImageStackControlWidget::onDockFloatChanged); - hlayout2->addWidget(_files_dock); + //hlayout2->addWidget(_files_dock); - QWidget *leftWidget = new QWidget(); - leftWidget->setLayout(hlayout2); + _files_anim_widget = new AnnimateSlideWidget(); + //QWidget *leftWidget = new QWidget(); + //leftWidget->setLayout(hlayout2); + _files_anim_widget->setAnimWidget(_files_dock, ">"); QWidget *rightWidget = new QWidget(); rightWidget->setLayout(vlayout); QSplitter* single_data_splitter = new QSplitter(); single_data_splitter->setOrientation(Qt::Horizontal); - single_data_splitter->addWidget(leftWidget); + single_data_splitter->addWidget(_files_anim_widget); single_data_splitter->setStretchFactor(0, 1); single_data_splitter->addWidget(rightWidget); //createToolBar(m_imageViewWidget); //counts_layout->addWidget(m_toolbar); //counts_layout->addWidget(splitter); + single_data_splitter->setCollapsible(0, true); + single_data_splitter->setCollapsible(1, false); _load_progress = new QProgressBar(); @@ -182,6 +187,20 @@ void ImageStackControlWidget::model_IndexChanged(const QString &text) //--------------------------------------------------------------------------- +void ImageStackControlWidget::onDockFloatChanged(bool floating) +{ + if(floating) + { + _files_anim_widget->setAnimEnabled(false); + } + else + { + _files_anim_widget->setAnimEnabled(true); + } +} + +//--------------------------------------------------------------------------- + void ImageStackControlWidget::onPrevFilePressed() { int idx = _image_name_cb->currentIndex(); diff --git a/src/mvc/ImageStackControlWidget.h b/src/mvc/ImageStackControlWidget.h index a704213..4e4373e 100644 --- a/src/mvc/ImageStackControlWidget.h +++ b/src/mvc/ImageStackControlWidget.h @@ -19,6 +19,7 @@ #include "mvc/MDA_Widget.h" #include "mvc/MapsElementsWidget.h" #include "mvc/MapsWorkspaceFilesWidget.h" +#include "mvc/AnnimateSlideWidget.h" //--------------------------------------------------------------------------- @@ -70,6 +71,8 @@ public slots: void onLinkRegionToDataset(QString item_name, QString vlm_file_path, QImage image); void onChangeDatasetName(const QString& name); + + void onDockFloatChanged(bool floating); protected: void closeEvent(QCloseEvent *event); @@ -105,7 +108,8 @@ public slots: QDockWidget* _files_dock; QDockWidget* _nav_dock; - //QDialog _raw_file_dialog; + + AnnimateSlideWidget* _files_anim_widget; }; diff --git a/src/mvc/LiveMapsElementsWidget.cpp b/src/mvc/LiveMapsElementsWidget.cpp index 82b3220..2d5ed64 100644 --- a/src/mvc/LiveMapsElementsWidget.cpp +++ b/src/mvc/LiveMapsElementsWidget.cpp @@ -96,7 +96,7 @@ void LiveMapsElementsWidget::createLayout() // _textEdit = new QTextEdit(this); // _textEdit->resize(1024, 800); // _textEdit->scrollBarWidgets(Qt::AlignRight); - _mapsElementsWidget = new MapsElementsWidget(1,1,true,this); + _mapsElementsWidget = new MapsElementsWidget(1,1,true,false); //_mapsElementsWidget->setTabVisible(1, false); _mapsElementsWidget->setTabVisible(2, false); _mapsElementsWidget->setTabVisible(3, false); diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index fb872f9..0fcc87c 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -30,7 +30,7 @@ using gstar::ImageViewWidget; //--------------------------------------------------------------------------- -MapsElementsWidget::MapsElementsWidget(int rows, int cols, bool create_image_nav, QWidget* parent) +MapsElementsWidget::MapsElementsWidget(int rows, int cols, bool create_image_nav, bool restore_floating, QWidget* parent) : AbstractImageWidget(rows, cols, parent) { @@ -67,7 +67,7 @@ MapsElementsWidget::MapsElementsWidget(int rows, int cols, bool create_image_nav connect(&_img_seg_diag, &ImageSegRoiDialog::onNewROIs, this, &MapsElementsWidget::on_add_new_ROIs); setAttribute(Qt::WA_DeleteOnClose, true); connect(this, SIGNAL(destroyed()), this, SLOT(closeEvent())); - _createLayout(create_image_nav); + _createLayout(create_image_nav, restore_floating); } //--------------------------------------------------------------------------- @@ -88,7 +88,7 @@ MapsElementsWidget::~MapsElementsWidget() //--------------------------------------------------------------------------- -void MapsElementsWidget::_createLayout(bool create_image_nav) +void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_floating) { QHBoxLayout *tmp_layout; @@ -378,21 +378,23 @@ void MapsElementsWidget::_createLayout(bool create_image_nav) setLayout(layout); - - for (auto& mItr : _dockMap) + if(restore_floating) { - QVariant variant = Preferences::inst()->getValue(mItr.first+"_floating"); - if (variant.isValid()) + for (auto& mItr : _dockMap) { - mItr.second->setFloating(variant.toBool()); - } - variant = Preferences::inst()->getValue(mItr.first + "_geometry"); - if (variant.isValid()) - { - mItr.second->restoreGeometry(variant.toByteArray()); + QVariant variant = Preferences::inst()->getValue(mItr.first+"_floating"); + if (variant.isValid()) + { + mItr.second->setFloating(variant.toBool()); + } + variant = Preferences::inst()->getValue(mItr.first + "_geometry"); + if (variant.isValid()) + { + mItr.second->restoreGeometry(variant.toByteArray()); + } + + connect(mItr.second, &QDockWidget::topLevelChanged, this, &MapsElementsWidget::onDockFloatChanged); } - - connect(mItr.second, &QDockWidget::topLevelChanged, this, &MapsElementsWidget::onDockFloatChanged); } } diff --git a/src/mvc/MapsElementsWidget.h b/src/mvc/MapsElementsWidget.h index b799ad7..801ff8f 100644 --- a/src/mvc/MapsElementsWidget.h +++ b/src/mvc/MapsElementsWidget.h @@ -49,7 +49,7 @@ class MapsElementsWidget /** * Constructor. */ - MapsElementsWidget(int rows = 1, int cols = 1, bool create_image_nav=false, QWidget* parent = nullptr); + MapsElementsWidget(int rows = 1, int cols = 1, bool create_image_nav=false, bool restore_floating=true, QWidget* parent = nullptr); /** * Destructor. @@ -136,7 +136,7 @@ public slots: /** * @brief Create layout */ - void _createLayout(bool create_image_nav); + void _createLayout(bool create_image_nav, bool restore_floating); virtual void createActions(); diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index c59d2f4..3db1cb0 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -45,6 +45,7 @@ MapsWorkspaceFilesWidget::~MapsWorkspaceFilesWidget() void MapsWorkspaceFilesWidget::createLayout() { + std::vector bound_types {"Not Initialized", "Fixed", "Limited Low High", "Limited Low", "Limited High", "Fit"}; _lbl_workspace = new QLabel(); _tab_widget = new QTabWidget(); diff --git a/src/mvc/ScanQueueWidget.cpp b/src/mvc/ScanQueueWidget.cpp index 9640e91..65a1215 100644 --- a/src/mvc/ScanQueueWidget.cpp +++ b/src/mvc/ScanQueueWidget.cpp @@ -50,7 +50,7 @@ void ScanQueueWidget::_createLayout() hlayout->addWidget(_btn_update); layout->addLayout(hlayout); - _mapsElementsWidget = new MapsElementsWidget(1,1,true,this); + _mapsElementsWidget = new MapsElementsWidget(1,1,true); //_mapsElementsWidget->setTabVisible(1, false); _mapsElementsWidget->setTabVisible(2, false); _mapsElementsWidget->setTabVisible(3, false); From d2bd465dbcf3495639705b8f3adf3c551071d52b Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 28 Jun 2024 11:13:32 -0500 Subject: [PATCH 14/18] Auto hide annotations/roi --- src/gstar/AbstractImageWidget.cpp | 9 +++++++-- src/gstar/AbstractImageWidget.h | 3 +++ src/mvc/MapsElementsWidget.cpp | 8 +++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/gstar/AbstractImageWidget.cpp b/src/gstar/AbstractImageWidget.cpp index 465b733..37007bf 100644 --- a/src/gstar/AbstractImageWidget.cpp +++ b/src/gstar/AbstractImageWidget.cpp @@ -409,10 +409,15 @@ QLayout* AbstractImageWidget::generateDefaultLayout(bool add_tab_widget) splitter->setOrientation(Qt::Horizontal); splitter->addWidget(m_imageViewWidget); + splitter->setStretchFactor(0, 1); if (add_tab_widget) { - splitter->setStretchFactor(0, 1); - splitter->addWidget(m_tabWidget); + //_anim_widget = new AnnimateSlideWidget(); + //_anim_widget->setAnimWidget(m_tabWidget, "<"); + splitter->addWidget(m_tabWidget); + splitter->setStretchFactor(1, 1); + //splitter->setCollapsible(0, false); + //splitter->setCollapsible(1, true); } createToolBar(m_imageViewWidget); diff --git a/src/gstar/AbstractImageWidget.h b/src/gstar/AbstractImageWidget.h index 9d5bbf6..769d582 100644 --- a/src/gstar/AbstractImageWidget.h +++ b/src/gstar/AbstractImageWidget.h @@ -27,6 +27,7 @@ #include "gstar/ImageViewToolBar.h" #include "gstar/RangeWidget.h" #include "gstar/RulerUnitsDialog.h" +#include "mvc/AnnimateSlideWidget.h" //--------------------------------------------------------------------------- @@ -414,6 +415,8 @@ protected slots: */ QWidget* m_treeTabWidget; + AnnimateSlideWidget* _anim_widget; + }; } diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index 0fcc87c..ccc2b44 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -120,11 +120,17 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float //hbox2->addWidget(_dataset_name); hbox2->addItem(new QSpacerItem(9999, 40, QSizePolicy::Maximum)); + + _anim_widget = new AnnimateSlideWidget(); + _anim_widget->setAnimWidget(m_tabWidget, "<"); + QSplitter* splitter = new QSplitter(); splitter->setOrientation(Qt::Horizontal); splitter->addWidget(m_imageViewWidget); splitter->setStretchFactor(0, 1); - splitter->addWidget(m_tabWidget); + splitter->addWidget(_anim_widget); + splitter->setCollapsible(0, false); + splitter->setCollapsible(1, true); createToolBar(m_imageViewWidget, create_image_nav); From 98ab3259cbe7d8062cfde3cfbd1d9d37d9c73ce0 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 28 Jun 2024 15:12:25 -0500 Subject: [PATCH 15/18] Save roi fit params along with maps_fit_param_override.txt file for the roi --- src/gstar/ImageViewWidget.cpp | 14 ++++++---- src/mvc/AnnimateSlideWidget.cpp | 3 +++ src/mvc/FileTabWidget.cpp | 2 ++ src/mvc/FitSpectraWidget.cpp | 16 ++++++++++-- src/mvc/ImageStackControlWidget.cpp | 14 +++++++--- src/mvc/MapsElementsWidget.cpp | 29 ++++++++++++++++++++- src/mvc/MapsWorkspaceFilesWidget.cpp | 4 ++- src/mvc/SpectraWidget.cpp | 39 ++++++++++++++++------------ src/mvc/SpectraWidget.h | 8 +++--- 9 files changed, 96 insertions(+), 33 deletions(-) diff --git a/src/gstar/ImageViewWidget.cpp b/src/gstar/ImageViewWidget.cpp index 43eca22..0434164 100644 --- a/src/gstar/ImageViewWidget.cpp +++ b/src/gstar/ImageViewWidget.cpp @@ -207,12 +207,16 @@ void ImageViewWidget::createLayout() _image_view_grid_layout->addItem(_sub_windows[idx].layout, i, j); } } - - _main_layout->addItem(_image_view_grid_layout); - _main_layout->addWidget(m_coordWidget); - // Set widget's layout - setLayout(_main_layout); + _main_layout->addItem(_image_view_grid_layout); + _main_layout->addWidget(m_coordWidget); + + + _main_layout->setSpacing(0); + _main_layout->setContentsMargins(0, 0, 0, 0); + + // Set widget's layout + setLayout(_main_layout); } diff --git a/src/mvc/AnnimateSlideWidget.cpp b/src/mvc/AnnimateSlideWidget.cpp index b1cda89..6ccd1cd 100644 --- a/src/mvc/AnnimateSlideWidget.cpp +++ b/src/mvc/AnnimateSlideWidget.cpp @@ -22,6 +22,7 @@ void AnnimateSlideWidget::setAnimWidget(QWidget* w, QString btn_name) if(_btn_hover == nullptr) { _btn_hover = new QPushButton(btn_name); + _btn_hover->setVisible(false); } _anim_widget = w; } @@ -29,6 +30,8 @@ void AnnimateSlideWidget::setAnimWidget(QWidget* w, QString btn_name) QHBoxLayout *layout = new QHBoxLayout(); layout->addWidget(_btn_hover); layout->addWidget(_anim_widget); + layout->setSpacing(0); + layout->setContentsMargins(0, 0, 0, 0); setLayout(layout); } diff --git a/src/mvc/FileTabWidget.cpp b/src/mvc/FileTabWidget.cpp index 5ccd63a..1b14fda 100644 --- a/src/mvc/FileTabWidget.cpp +++ b/src/mvc/FileTabWidget.cpp @@ -95,6 +95,8 @@ FileTabWidget::FileTabWidget(QWidget* parent) : QWidget(parent) vlayout->addItem(hlayout2); vlayout->addItem(_custom_btn_box); vlayout->addWidget(_file_list_view); + vlayout->setSpacing(0); + vlayout->setContentsMargins(0, 0, 0, 0); setLayout(vlayout); } diff --git a/src/mvc/FitSpectraWidget.cpp b/src/mvc/FitSpectraWidget.cpp index 0bb1166..df6e78b 100644 --- a/src/mvc/FitSpectraWidget.cpp +++ b/src/mvc/FitSpectraWidget.cpp @@ -23,6 +23,7 @@ #include "fitting//optimizers/lmfit_optimizer.h" #include #include +#include "io/file/aps/aps_roi.h" using namespace data_struct; @@ -240,10 +241,14 @@ void FitSpectraWidget::createLayout() grid_layout->addWidget(_btn_model_spectra, 1, 2); grid_layout->addWidget(_btn_export_csv, 1, 3); grid_layout->addItem(new QSpacerItem(9999, 10, QSizePolicy::Maximum), 0, 77); + //grid_layout->setSpacing(0); + //grid_layout->setContentsMargins(0, 0, 0, 0); QVBoxLayout* vlayout_tab = new QVBoxLayout(); vlayout_tab->addWidget(_fit_params_tab_widget); vlayout_tab->addItem(grid_layout); + vlayout_tab->setSpacing(0); + vlayout_tab->setContentsMargins(0, 0, 0, 0); QWidget* tab_and_buttons_widget = new QWidget(); tab_and_buttons_widget->setLayout(vlayout_tab); @@ -257,6 +262,8 @@ void FitSpectraWidget::createLayout() QLayout* layout = new QVBoxLayout(); layout->addWidget(splitter); + layout->setSpacing(0); + layout->setContentsMargins(0, 0, 0, 0); setLayout(layout); } @@ -978,15 +985,20 @@ void FitSpectraWidget::Fit_ROI_Spectra_Click() data_struct::Fit_Element_Map_Dict elements_to_fit = _fitting_dialog->get_elements_to_fit(); data_struct::Fit_Parameters* new_fit_params = _fitting_dialog->get_new_fit_params(); - int detector_num = -1; + //int detector_num = -1; QDir tmp_dir = _dataset_dir; tmp_dir.cdUp(); tmp_dir.cdUp(); QFileInfo finfo(_dataset_dir.absolutePath()); - QString roi_file_name = finfo.fileName() + "_roi_" + roi_name; + int detector_num = finfo.completeSuffix().toInt(); + QString roi_file_name = finfo.fileName() + "_roi_" + roi_name; + QString roi_override_name = tmp_dir.absolutePath() + QDir::separator() +"maps_fit_parameters_override_"+roi_file_name+".txt"+QString::number(detector_num); io::file::save_optimized_fit_params(tmp_dir.absolutePath().toStdString(), roi_file_name.toStdString(), detector_num, result, new_fit_params, (Spectra*)roi_spec, &elements_to_fit); + //io::file::aps::create_detector_fit_params_from_avg(roi_override_name.toStdString(), *new_fit_params, detector_num); + _param_override->fit_params.update_and_add_values(new_fit_params); + io::file::aps::save_parameters_override(roi_override_name.toStdString(), _param_override); // open file location tmp_dir.cd("output"); if (false == QDesktopServices::openUrl(QUrl::fromLocalFile(tmp_dir.absolutePath()))) diff --git a/src/mvc/ImageStackControlWidget.cpp b/src/mvc/ImageStackControlWidget.cpp index f0d5e26..a800a00 100644 --- a/src/mvc/ImageStackControlWidget.cpp +++ b/src/mvc/ImageStackControlWidget.cpp @@ -53,7 +53,7 @@ void ImageStackControlWidget::createLayout() { QVBoxLayout* vlayout = new QVBoxLayout(); QHBoxLayout* hlayout1 = new QHBoxLayout(); - QHBoxLayout* hlayout2 = new QHBoxLayout(); + //QHBoxLayout* hlayout2 = new QHBoxLayout(); _imageGrid = new MapsElementsWidget(1,1); _vlm_widget = new VLM_Widget(); connect(_vlm_widget, &VLM_Widget::onLinkRegionToDataset, this, &ImageStackControlWidget::onLinkRegionToDataset); @@ -83,6 +83,8 @@ void ImageStackControlWidget::createLayout() hlayout1->addWidget(_left_btn); hlayout1->addWidget(_image_name_cb); hlayout1->addWidget(_right_btn); + hlayout1->setSpacing(0); + hlayout1->setContentsMargins(0, 0, 0, 0); connect(_image_name_cb, &QComboBox::currentTextChanged, this, &ImageStackControlWidget::model_IndexChanged); @@ -100,6 +102,8 @@ void ImageStackControlWidget::createLayout() vlayout->addWidget(_imageGrid); vlayout->addWidget(_vlm_widget); vlayout->addWidget(_mda_widget); + vlayout->setSpacing(0); + vlayout->setContentsMargins(0, 0, 0, 0); _files_dock = new QDockWidget("Files", this); _files_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); @@ -129,14 +133,18 @@ void ImageStackControlWidget::createLayout() _load_progress = new QProgressBar(); QTabWidget* data_tab = new QTabWidget(); - data_tab->addTab(single_data_splitter, "Single Dataset"); + //data_tab->setProperty("padding", QVariant("1px")); + //data_tab->setSpacing(0); + data_tab->setContentsMargins(0, 0, 0, 0); //data_tab->addTab(single_data_splitter, "Multiple Datasets"); QVBoxLayout *mainLayout = new QVBoxLayout(); mainLayout->addWidget(data_tab); mainLayout->addWidget(_load_progress); - + mainLayout->setSpacing(0); + mainLayout->setContentsMargins(0, 0, 0, 0); + //_imageGrid->hide(); _vlm_widget->hide(); _mda_widget->hide(); diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index ccc2b44..dd4473a 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -261,6 +261,9 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float counts_layout->addWidget(scrollArea); counts_layout->addWidget(splitter); + counts_layout->setSpacing(0); + counts_layout->setContentsMargins(0, 0, 0, 0); + _counts_window = new QWidget(); _counts_window->setLayout(counts_layout); @@ -273,66 +276,83 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float _counts_dock = new QDockWidget("Analyzed Counts", this); _counts_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _counts_dock->setWidget(_counts_window); - _counts_dock->setProperty("padding", QVariant("1px")); + _counts_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_COUNTS_DOCK] = _counts_dock; _intspectra_dock = new QDockWidget(DEF_STR_INT_SPECTRA, this); _intspectra_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _intspectra_dock->setWidget(_spectra_widget); + _intspectra_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_INTSPEC_DOCK] = _intspectra_dock; _quant_dock = new QDockWidget("Quantification", this); _quant_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _quant_dock->setWidget(_quant_widget); + _quant_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_QUANT_DOCK] = _quant_dock; _coloc_dock = new QDockWidget("CoLocalization", this); _coloc_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _coloc_dock->setWidget(_co_loc_widget); + _coloc_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_COLOR_DOCK] = _coloc_dock; _scatter_dock = new QDockWidget("Scatter Plot", this); _scatter_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _scatter_dock->setWidget(_scatter_plot_widget); + _scatter_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_SCATTER_DOCK] = _scatter_dock; _extra_dock = new QDockWidget("Extra PV's", this); _extra_dock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); _extra_dock->setWidget(_extra_pvs_table_widget); + _extra_dock->setContentsMargins(0, 0, 0, 0); _dockMap[STR_EXTRA_DOCK] = _extra_dock; // This is done this way so that you can undock a widget and change tabs without hiding it. tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_counts_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); _tab_widget->addTab(tmp_widget, "Analyzed Counts"); tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_intspectra_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); _tab_widget->addTab(tmp_widget, DEF_STR_INT_SPECTRA); tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_quant_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); _tab_widget->addTab(tmp_widget, "Quantification"); tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_coloc_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); _tab_widget->addTab(tmp_widget, "CoLocalization"); tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_scatter_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); _tab_widget->addTab(tmp_widget, "Scatter Plot"); tmp_layout = new QHBoxLayout(); + tmp_layout->setSpacing(0); + tmp_layout->setContentsMargins(0, 0, 0, 0); tmp_layout->addWidget(_extra_dock); tmp_widget = new QWidget(); tmp_widget->setLayout(tmp_layout); @@ -382,6 +402,13 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float setCoordinateModel(new gstar::CoordinateModel(&_motor_trans)); + hbox->setSpacing(0); + hbox->setContentsMargins(0, 0, 0, 0); + hbox2->setSpacing(0); + hbox2->setContentsMargins(0, 0, 0, 0); + + layout->setSpacing(0); + layout->setContentsMargins(0, 0, 0, 0); setLayout(layout); if(restore_floating) diff --git a/src/mvc/MapsWorkspaceFilesWidget.cpp b/src/mvc/MapsWorkspaceFilesWidget.cpp index 3db1cb0..e769b7f 100644 --- a/src/mvc/MapsWorkspaceFilesWidget.cpp +++ b/src/mvc/MapsWorkspaceFilesWidget.cpp @@ -46,7 +46,7 @@ MapsWorkspaceFilesWidget::~MapsWorkspaceFilesWidget() void MapsWorkspaceFilesWidget::createLayout() { - std::vector bound_types {"Not Initialized", "Fixed", "Limited Low High", "Limited Low", "Limited High", "Fit"}; + //std::vector bound_types {"Not Initialized", "Fixed", "Limited Low High", "Limited Low", "Limited High", "Fit"}; _lbl_workspace = new QLabel(); _tab_widget = new QTabWidget(); @@ -108,6 +108,8 @@ void MapsWorkspaceFilesWidget::createLayout() _tab_widget->insertTab(2, _vlm_tab_widget, "Light Microscope"); vlayout->addWidget(_tab_widget); + vlayout->setSpacing(0); + vlayout->setContentsMargins(0, 0, 0, 0); setLayout(vlayout); } diff --git a/src/mvc/SpectraWidget.cpp b/src/mvc/SpectraWidget.cpp index a9c221c..51a63d8 100644 --- a/src/mvc/SpectraWidget.cpp +++ b/src/mvc/SpectraWidget.cpp @@ -117,22 +117,22 @@ void SpectraWidget::createLayout() // Toolbar zoom out action _display_eneergy_min = new QLineEdit(QString::number(_axisX->min(), 'f', 2)); - // _display_eneergy_min->setMinimumWidth(100); + _display_eneergy_min->setMinimumWidth(50); connect(_display_eneergy_min, SIGNAL(textEdited(const QString &)), this, SLOT(onSpectraDisplayChanged(const QString &))); _display_eneergy_max = new QLineEdit(QString::number(_axisX->max(), 'f', 2)); -// _display_eneergy_max->setMinimumWidth(100); + _display_eneergy_max->setMinimumWidth(50); connect(_display_eneergy_max, SIGNAL(textEdited(const QString &)), this, SLOT(onSpectraDisplayChanged(const QString &))); - _display_height_min = new QLineEdit(QString::number(ymin)); -// _display_height_min->setMinimumWidth(100); - connect(_display_height_min, SIGNAL(textEdited(const QString&)), this, SLOT(onSpectraDisplayHeightChanged(const QString&))); + //_display_height_min = new QLineEdit(QString::number(ymin)); + //_display_height_min->setMinimumWidth(100); + //connect(_display_height_min, SIGNAL(textEdited(const QString&)), this, SLOT(onSpectraDisplayHeightChanged(const QString&))); - _display_height_max = new QLineEdit(QString::number(ymax, 'g', 0)); -// _display_height_max->setMinimumWidth(100); - connect(_display_height_max, SIGNAL(textEdited(const QString&)), this, SLOT(onSpectraDisplayHeightChanged(const QString&))); + //_display_height_max = new QLineEdit(QString::number(ymax, 'g', 0)); + //_display_height_max->setMinimumWidth(100); + //connect(_display_height_max, SIGNAL(textEdited(const QString&)), this, SLOT(onSpectraDisplayHeightChanged(const QString&))); _btn_reset_chart_view = new QPushButton("Reset"); connect(_btn_reset_chart_view, &QPushButton::released, this, &SpectraWidget::onResetChartView); @@ -171,6 +171,9 @@ void SpectraWidget::createLayout() _chart->setBackgroundBrush(QBrush(QColor("black"))); } + vlayout->setSpacing(0); + vlayout->setContentsMargins(0, 0, 0, 0); + setLayout(vlayout); } @@ -192,8 +195,8 @@ void SpectraWidget::setDisplayRange(QString wmin, QString wmax, QString hmin, QS { _display_eneergy_min->setText(wmin); _display_eneergy_max->setText(wmax); - _display_height_min->setText(hmin); - _display_height_max->setText(hmax); + //_display_height_min->setText(hmin); + //_display_height_max->setText(hmax); onSpectraDisplayChanged(wmin); onSpectraDisplayHeightChanged(hmin); } @@ -212,17 +215,17 @@ void SpectraWidget::onSpectraDisplayChanged(const QString &) void SpectraWidget::onSpectraDisplayHeightChanged(const QString&) { - qreal maxRange = _display_height_max->text().toDouble(); - qreal minRange = _display_height_min->text().toDouble(); - _currentYAxis->setRange(minRange, maxRange); + //qreal maxRange = _display_height_max->text().toDouble(); + //qreal minRange = _display_height_min->text().toDouble(); + //_currentYAxis->setRange(minRange, maxRange); } //--------------------------------------------------------------------------- void SpectraWidget::onResetChartViewOnlyY() { - _display_height_min->setText(QString::number(1)); - _display_height_max->setText(QString::number(_int_spec_max_y, 'g', 0)); + //_display_height_min->setText(QString::number(1)); + //_display_height_max->setText(QString::number(_int_spec_max_y, 'g', 0)); _currentYAxis->setRange(1, _int_spec_max_y); } @@ -233,8 +236,8 @@ void SpectraWidget::onResetChartView() _display_eneergy_min->setText(QString::number(0, 'f', 2)); _display_eneergy_max->setText(QString::number(_int_spec_max_x, 'f', 2)); - _display_height_min->setText(QString::number(1)); - _display_height_max->setText(QString::number(_int_spec_max_y, 'g', 0)); + //_display_height_min->setText(QString::number(1)); + //_display_height_max->setText(QString::number(_int_spec_max_y, 'g', 0)); _currentYAxis->setRange(1, _int_spec_max_y); _axisX->setRange(0, _int_spec_max_x); @@ -249,6 +252,7 @@ void SpectraWidget::onUpdateChartLineEdits() { _display_eneergy_min->setText(QString::number(_axisX->min(), 'f', 2)); _display_eneergy_max->setText(QString::number(_axisX->max(), 'f', 2)); + /* if (_display_log10) { _display_height_min->setText(QString::number(_axisYLog10->min())); @@ -259,6 +263,7 @@ void SpectraWidget::onUpdateChartLineEdits() _display_height_min->setText(QString::number(_axisY->min())); _display_height_max->setText(QString::number(_axisY->max())); } + */ } //--------------------------------------------------------------------------- diff --git a/src/mvc/SpectraWidget.h b/src/mvc/SpectraWidget.h index 3fe9427..3e6724f 100644 --- a/src/mvc/SpectraWidget.h +++ b/src/mvc/SpectraWidget.h @@ -101,9 +101,9 @@ class SpectraWidget : public QWidget QString getDisplayEnergyMax() { return _display_eneergy_max->text(); } - QString getDisplayHeightMin() { return _display_height_min->text(); } + QString getDisplayHeightMin() { return QString::number(1.);}//_display_height_min->text(); } - QString getDisplayHeightMax() { return _display_height_max->text(); } + QString getDisplayHeightMax() { return QString::number(_int_spec_max_y);}//_display_height_max->text(); } void setDisplayRange(QString wmin, QString wmax, QString hmin, QString hmax); @@ -174,9 +174,9 @@ private slots: QLineEdit *_display_eneergy_min; - QLineEdit* _display_height_max; + //QLineEdit* _display_height_max; - QLineEdit* _display_height_min; + //QLineEdit* _display_height_min; QPushButton* _btn_reset_chart_view; From a5b6b922465ef9e206b414ce2b3acff89b73e602 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Fri, 28 Jun 2024 15:27:12 -0500 Subject: [PATCH 16/18] Added pref option to display int spec fit parameters to the right of it instead of the bottom --- src/mvc/FitSpectraWidget.cpp | 9 ++++++++- src/preferences/Preferences.cpp | 3 ++- src/preferences/Preferences.h | 1 + src/preferences/PreferencesDisplay.cpp | 8 ++++++++ src/preferences/PreferencesDisplay.h | 2 ++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/mvc/FitSpectraWidget.cpp b/src/mvc/FitSpectraWidget.cpp index df6e78b..68b9912 100644 --- a/src/mvc/FitSpectraWidget.cpp +++ b/src/mvc/FitSpectraWidget.cpp @@ -253,7 +253,14 @@ void FitSpectraWidget::createLayout() tab_and_buttons_widget->setLayout(vlayout_tab); QSplitter* splitter = new QSplitter(); - splitter->setOrientation(Qt::Vertical); + if(Preferences::inst()->getValue(STR_PREF_SPRECTRA_CONTROLS_HORIZONTAL_OPTION).toBool()) + { + splitter->setOrientation(Qt::Horizontal); + } + else + { + splitter->setOrientation(Qt::Vertical); + } splitter->addWidget(_spectra_dock); splitter->setStretchFactor(0, 1); splitter->addWidget(tab_and_buttons_widget); diff --git a/src/preferences/Preferences.cpp b/src/preferences/Preferences.cpp index f87ea1c..098082f 100644 --- a/src/preferences/Preferences.cpp +++ b/src/preferences/Preferences.cpp @@ -91,7 +91,8 @@ Preferences::Preferences() {STR_PRF_STRICT_REGEX, QVariant()}, {STR_PRF_FILE_SIZE, QVariant()}, {STR_PRF_SHOW_DATASET_ON_LOAD, QVariant()}, - {STR_PREF_RADIO_LOAD_SELECTED_OPTION, QVariant()} + {STR_PREF_RADIO_LOAD_SELECTED_OPTION, QVariant()}, + {STR_PREF_SPRECTRA_CONTROLS_HORIZONTAL_OPTION, QVariant()} }; load(); } diff --git a/src/preferences/Preferences.h b/src/preferences/Preferences.h index 7cfbe7c..5e7ec7b 100644 --- a/src/preferences/Preferences.h +++ b/src/preferences/Preferences.h @@ -86,6 +86,7 @@ #define STR_PRF_FILE_SIZE "FileSize" #define STR_PRF_SHOW_DATASET_ON_LOAD "ShowOnLoad" #define STR_PREF_RADIO_LOAD_SELECTED_OPTION "Load_Selected_Opt" +#define STR_PREF_SPRECTRA_CONTROLS_HORIZONTAL_OPTION "Spectra_Controls_Horizontal" /** * @brief Read and save preferences between application restarts, the vaule key diff --git a/src/preferences/PreferencesDisplay.cpp b/src/preferences/PreferencesDisplay.cpp index b3fc9bb..fa315ad 100644 --- a/src/preferences/PreferencesDisplay.cpp +++ b/src/preferences/PreferencesDisplay.cpp @@ -64,6 +64,12 @@ PreferencesDisplay::PreferencesDisplay(QWidget* parent) : QWidget(parent) _ck_show_dataset_on_load = new QCheckBox(); _ck_show_dataset_on_load->setChecked(Preferences::inst()->getValue(STR_PRF_SHOW_DATASET_ON_LOAD).toBool()); + QLabel* lblIntSpecControlLoc = new QLabel("Integreated Spectra Controls On the Right of spectra? (Unchecked = Below)"); + lblIntSpecControlLoc->setFont(font); + _ck_int_spec_horiz = new QCheckBox(); + _ck_int_spec_horiz->setChecked(Preferences::inst()->getValue(STR_PREF_SPRECTRA_CONTROLS_HORIZONTAL_OPTION).toBool()); + + QLabel* lblSearchDatasets = new QLabel("Search sub folders for datasets (ESRF datasets)."); lblSearchDatasets->setFont(font); _ck_search_datasets = new QCheckBox(); @@ -92,6 +98,7 @@ PreferencesDisplay::PreferencesDisplay(QWidget* parent) : QWidget(parent) mainLayout->addRow(lblFileSize, _cb_file_size); mainLayout->addRow(lblShowDatasetOnSelect, _ck_show_dataset_on_select); mainLayout->addRow(lblShowDatasetOnLoad, _ck_show_dataset_on_load); + mainLayout->addRow(lblIntSpecControlLoc, _ck_int_spec_horiz); mainLayout->addRow(lblSearchDatasets, _ck_search_datasets); mainLayout->addRow(lblStrictRegex, _ck_strict_regex); @@ -155,6 +162,7 @@ void PreferencesDisplay::acceptChanges() Preferences::inst()->setValue(STR_PRF_DecimalPrecision, getDecimalPrecision()); Preferences::inst()->setValue(STR_PRF_SHOW_DATASET_ON_FILE_SELECT, _ck_show_dataset_on_select->isChecked()); Preferences::inst()->setValue(STR_PRF_SHOW_DATASET_ON_LOAD, _ck_show_dataset_on_load->isChecked()); + Preferences::inst()->setValue(STR_PREF_SPRECTRA_CONTROLS_HORIZONTAL_OPTION, _ck_int_spec_horiz->isChecked()); Preferences::inst()->setValue(STR_SEARCH_SUB_DIR_FOR_DATASETS, _ck_search_datasets->isChecked()); Preferences::inst()->setValue(STR_PRF_STRICT_REGEX, _ck_strict_regex->isChecked()); Preferences::inst()->setValue(STR_PRF_FILE_SIZE, _cb_file_size->currentIndex()); diff --git a/src/preferences/PreferencesDisplay.h b/src/preferences/PreferencesDisplay.h index c32d295..c69c0fd 100644 --- a/src/preferences/PreferencesDisplay.h +++ b/src/preferences/PreferencesDisplay.h @@ -112,6 +112,8 @@ public slots: QCheckBox* _ck_strict_regex; QComboBox* _cb_file_size; + + QCheckBox* _ck_int_spec_horiz; }; //--------------------------------------------------------------------------- From 61f073f92c009bce1afd53ddd048b2a4a0ea2dd1 Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Mon, 1 Jul 2024 10:04:10 -0500 Subject: [PATCH 17/18] Fixed animation for auto hide --- src/gstar/AbstractImageWidget.cpp | 5 --- src/mvc/AnnimateSlideWidget.cpp | 26 ++++++++++------ src/mvc/AnnimateSlideWidget.h | 48 ++++++++++++----------------- src/mvc/ImageStackControlWidget.cpp | 4 ++- src/mvc/MapsElementsWidget.cpp | 2 +- 5 files changed, 40 insertions(+), 45 deletions(-) diff --git a/src/gstar/AbstractImageWidget.cpp b/src/gstar/AbstractImageWidget.cpp index 37007bf..4a0dfea 100644 --- a/src/gstar/AbstractImageWidget.cpp +++ b/src/gstar/AbstractImageWidget.cpp @@ -412,19 +412,14 @@ QLayout* AbstractImageWidget::generateDefaultLayout(bool add_tab_widget) splitter->setStretchFactor(0, 1); if (add_tab_widget) { - //_anim_widget = new AnnimateSlideWidget(); - //_anim_widget->setAnimWidget(m_tabWidget, "<"); splitter->addWidget(m_tabWidget); splitter->setStretchFactor(1, 1); - //splitter->setCollapsible(0, false); - //splitter->setCollapsible(1, true); } createToolBar(m_imageViewWidget); mainLayout->addWidget(m_toolbar); mainLayout->addWidget(splitter); - //setLayout(mainLayout); return mainLayout; } diff --git a/src/mvc/AnnimateSlideWidget.cpp b/src/mvc/AnnimateSlideWidget.cpp index 6ccd1cd..69461b2 100644 --- a/src/mvc/AnnimateSlideWidget.cpp +++ b/src/mvc/AnnimateSlideWidget.cpp @@ -11,25 +11,33 @@ AnnimateSlideWidget::AnnimateSlideWidget(QWidget *parent) : QWidget(parent) { _anim_widget = nullptr; _anim_enabled = true; + _first = true; } //--------------------------------------------------------------------------- -void AnnimateSlideWidget::setAnimWidget(QWidget* w, QString btn_name) +void AnnimateSlideWidget::setAnimWidget(QWidget* w, QWidget* container_widget) { if(w != nullptr) { - if(_btn_hover == nullptr) - { - _btn_hover = new QPushButton(btn_name); - _btn_hover->setVisible(false); - } _anim_widget = w; + _anim_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + _anim_hide = new QPropertyAnimation(_anim_widget, "minimumWidth"); + _anim_hide->setDuration(100); + + _anim_show = new QPropertyAnimation(_anim_widget, "minimumWidth"); + _anim_show->setDuration(100); } QHBoxLayout *layout = new QHBoxLayout(); - layout->addWidget(_btn_hover); - layout->addWidget(_anim_widget); + if(container_widget != nullptr) + { + layout->addWidget(container_widget); + } + else + { + layout->addWidget(_anim_widget); + } layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); @@ -42,12 +50,10 @@ void AnnimateSlideWidget::setAnimEnabled(bool val) { if(val) { - //_btn_hover->setVisible(true); _anim_enabled = val; } else { - _btn_hover->setVisible(false); _anim_enabled = val; } } diff --git a/src/mvc/AnnimateSlideWidget.h b/src/mvc/AnnimateSlideWidget.h index e15929e..de636b8 100644 --- a/src/mvc/AnnimateSlideWidget.h +++ b/src/mvc/AnnimateSlideWidget.h @@ -26,7 +26,7 @@ class AnnimateSlideWidget : public QWidget ~AnnimateSlideWidget(){} - void setAnimWidget(QWidget* w, QString btn_name); + void setAnimWidget(QWidget* w, QWidget* container_widget=nullptr); void setAnimEnabled(bool val); @@ -36,13 +36,7 @@ class AnnimateSlideWidget : public QWidget { if(_anim_enabled) { - // Show the widget and start the animation - if(_anim_widget!=nullptr) - { - _anim_widget->setVisible(true); - _btn_hover->setVisible(false); - } - animateSlideIn(); + animateSlideOut(); } } @@ -50,13 +44,7 @@ class AnnimateSlideWidget : public QWidget { if(_anim_enabled) { - // Hide the widget and start the animation - if(_anim_widget!=nullptr) - { - _anim_widget->setVisible(false); - _btn_hover->setVisible(true); - } - animateSlideOut(); + animateSlideIn(); } } @@ -64,28 +52,32 @@ private slots: void animateSlideIn() { // Animate the widget to slide in - QPropertyAnimation *animation = new QPropertyAnimation(this, "visibleWidth"); - animation->setDuration(1000); - animation->setStartValue(0); - animation->setEndValue(width()); - animation->start(); + if(_first) + { + _saved_width = _anim_widget->width(); + _first = false; + } + _anim_hide->setStartValue(_saved_width); + _anim_hide->setEndValue(20); + + _anim_show->setStartValue(20); + _anim_show->setEndValue(_saved_width); + + _anim_hide->start(); } void animateSlideOut() { - // Animate the widget to slide out - QPropertyAnimation *animation = new QPropertyAnimation(this, "visibleWidth"); - animation->setDuration(1000); - animation->setStartValue(width()); - animation->setEndValue(0); - animation->start(); + _anim_show->start(); } private: QWidget* _anim_widget; - QPushButton* _btn_hover; + QPropertyAnimation *_anim_hide; + QPropertyAnimation *_anim_show; bool _anim_enabled; - + bool _first; + int _saved_width; }; //--------------------------------------------------------------------------- diff --git a/src/mvc/ImageStackControlWidget.cpp b/src/mvc/ImageStackControlWidget.cpp index a800a00..7b26348 100644 --- a/src/mvc/ImageStackControlWidget.cpp +++ b/src/mvc/ImageStackControlWidget.cpp @@ -115,7 +115,9 @@ void ImageStackControlWidget::createLayout() _files_anim_widget = new AnnimateSlideWidget(); //QWidget *leftWidget = new QWidget(); //leftWidget->setLayout(hlayout2); - _files_anim_widget->setAnimWidget(_files_dock, ">"); + _files_anim_widget->setAnimWidget(_mapsFilsWidget, _files_dock); + //_files_anim_widget->setAnimWidget(_mapsFilsWidget, ">"); + QWidget *rightWidget = new QWidget(); rightWidget->setLayout(vlayout); diff --git a/src/mvc/MapsElementsWidget.cpp b/src/mvc/MapsElementsWidget.cpp index dd4473a..bf707a0 100644 --- a/src/mvc/MapsElementsWidget.cpp +++ b/src/mvc/MapsElementsWidget.cpp @@ -122,7 +122,7 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float _anim_widget = new AnnimateSlideWidget(); - _anim_widget->setAnimWidget(m_tabWidget, "<"); + _anim_widget->setAnimWidget(m_tabWidget); QSplitter* splitter = new QSplitter(); splitter->setOrientation(Qt::Horizontal); From 6a1a08d0039a1ae36cafb12f29a750fd948d9e5f Mon Sep 17 00:00:00 2001 From: Arthur Glowacki Date: Mon, 1 Jul 2024 10:07:11 -0500 Subject: [PATCH 18/18] Comment out batch menu until it is finished --- src/core/uProbeX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/uProbeX.cpp b/src/core/uProbeX.cpp index 4774f94..95090df 100644 --- a/src/core/uProbeX.cpp +++ b/src/core/uProbeX.cpp @@ -245,7 +245,8 @@ void uProbeX::createMenuBar() connect(_action_roi_stats, &QAction::triggered, this, &uProbeX::BatchRoiStats); _action_gen_scan_vlm = _menu_batch->addAction("Generate Scan VLM"); connect(_action_gen_scan_vlm, &QAction::triggered, this, &uProbeX::BatcGenScanVlm); - m_menu->addMenu(_menu_batch); + //TODO: Finish implementing and then add + ////m_menu->addMenu(_menu_batch); setBatchActionsEnabled(false);