| <large>libXpertMassCore and libXpertMassGui Developer Documentation</large>

- libXpertMassGui
- IsotopicClusterShaperDlg

# MsXpS::libXpertMassGui::IsotopicClusterShaperDlg Class

class MsXpS::libXpertMassGui::IsotopicClusterShaperDlg

The IsotopicClusterShaperDlg class provides a graphical user interface for the full peak shaping process. More...

Header: | `#include <MsXpS/libXpertMassGui/IsotopicClusterShaperDlg.hpp>`
Inherits: | QDialog

- List of all members, including inherited members
- IsotopicClusterShaperDlg is part of libXpertMassGui Mass calculations.

## Public Functions

| IsotopicClusterShaperDlg(QWidget *program_window_p, const QString &application_name, const QString &window_description)
| IsotopicClusterShaperDlg(QWidget *program_window_p, const QString &application_name, const QString &window_description, pappso::TraceCstSPtr isotopic_cluster_sp, int normalizing_intensity = std::numeric_limits<double>::min())
virtual | ~IsotopicClusterShaperDlg()
void | setColorName(const QString &color_name)
void | setIsotopiCluster(pappso::TraceCstSPtr isotopic_cluster_sp)
void | setMassSpectrumTitle(const QString &title)
void | showTabWidgetInputDataPage()

## Public Slots

void | traceColorPushButtonClicked()

## Protected Functions

void | colorizePushButton(QPushButton *push_button_p, const QString &color_name)
QString | craftMassSpectrumName()
std::size_t | fillInThePeakShapers()
void | message(const QString &message, int timeout = 3000)
void | readSettings(const QString &config_settings_file_path)
void | setupDialog()
void | writeSettings(const QString &config_settings_file_path)

## Reimplemented Protected Functions

virtual void | closeEvent(QCloseEvent *event) override

## Protected Variables

QString | m_applicationName
QString | m_colorName
MsXpS::libXpertMassCore::MassPeakShaperConfig | m_config
QString | m_fileName
pappso::Trace | m_finalTrace
pappso::Trace | m_isotopicCluster
pappso::MapTrace | m_mapTrace
pappso::MzIntegrationParams | m_mzIntegrationParams
int | m_normalizingIntensity
QList<MsXpS::libXpertMassCore::MassPeakShaperSPtr> | m_peakShapers
double | m_referencePeakMz
QString | m_windowDescription
MsXpS::libXpertMassGui::MassPeakShaperConfigWidget * | mp_massPeakShaperConfigWidget
QWidget * | mp_programWindow
Ui::IsotopicClusterShaperDlg * | mp_ui
std::shared_ptr<QTimer> | msp_msgTimer

## Detailed Description

Each peak centroid in the isotopic cluster is shaped independently and all the obtained shapes are combined into a single mass spectrum.

## Member Function Documentation

### IsotopicClusterShaperDlg::IsotopicClusterShaperDlg(QWidget *program_window_p, const QString &application_name, const QString &window_description)

Constructs a IsotopicClusterShaperDlg instance.

- program_window_p: the program's main window.
- application_name: the name of the application, typically massXpert2 or mineXpert2, for example.
- window_description: the string describing what this dialog window is for (used for the window title).

### IsotopicClusterShaperDlg::IsotopicClusterShaperDlg(QWidget *program_window_p, const QString &application_name, const QString &window_description, pappso::TraceCstSPtr isotopic_cluster_sp, int normalizing_intensity = std::numeric_limits<double>::min())

Constructs a IsotopicClusterShaperDlg instance.

- program_window_p: the program's main window.
- application_name: the name of the application, typically massXpert2 or mineXpert2, for example.
- window_description: the string describing what this dialog window is for (used for the window title).
- isotopic_cluster_sp: the isotopic cluster that is to be processed in order to shape each one of its peak centroids.
- normalizing_intensity: the intensity to be used to normalize the isotopic cluster mass spectral trace. The normalizing_intensity value applies to the most probable centroid in the cluster.

### `[virtual noexcept]` IsotopicClusterShaperDlg::~IsotopicClusterShaperDlg()

Destructs this IsotopicClusterShaperDlg instance.

### `[override virtual protected]` void IsotopicClusterShaperDlg::closeEvent(QCloseEvent *event)

Reimplements: QDialog::closeEvent(QCloseEvent *e).

Upon closing of the dialog window (unused event), writes the settings to the application configuration file.

### `[protected]` void IsotopicClusterShaperDlg::colorizePushButton(QPushButton *push_button_p, const QString &color_name)

Colorizes the push_button_p push button with the color named color_name.

### `[protected]` QString IsotopicClusterShaperDlg::craftMassSpectrumName()

Returns a string with the mass spectrum name.

The mass spectrum is the result of the isotopic cluster shaping process.

### `[protected]` std::size_t IsotopicClusterShaperDlg::fillInThePeakShapers()

Creates all the peak shapers required to process all the peak centroids in the isotopic cluster.

### `[protected]` void IsotopicClusterShaperDlg::message(const QString &message, int timeout = 3000)

Set message to the message line edit widget with timeout.

At the end of the time out the message is erased.

### `[protected]` void IsotopicClusterShaperDlg::readSettings(const QString &config_settings_file_path)

Reads the settings of this dialog window from the application configuration file (config_settings_file_path).

The configuration is read from the file to set back the dialog window in the same status.

### void IsotopicClusterShaperDlg::setColorName(const QString &color_name)

Sets the member color name string to color_name.

After the assignment, colorizes the push button to provide a visual feedback of the color that was selected.

See also colorizePushButton().

### void IsotopicClusterShaperDlg::setIsotopiCluster(pappso::TraceCstSPtr isotopic_cluster_sp)

Sets the isotopic_cluster_sp isotopic cluster that is the starting material for the computations.

### void IsotopicClusterShaperDlg::setMassSpectrumTitle(const QString &title)

Sets title as the mass spectrum title to the line edit widget.

### `[protected]` void IsotopicClusterShaperDlg::setupDialog()

Sets up the dialog window.

### void IsotopicClusterShaperDlg::showTabWidgetInputDataPage()

Sets the input data tab the currently visible tab.

### `[slot]` void IsotopicClusterShaperDlg::traceColorPushButtonClicked()

Selects a color for the mass spectrum trace to be plotted.

### `[protected]` void IsotopicClusterShaperDlg::writeSettings(const QString &config_settings_file_path)

Saves the settings of this dialog window to the application configuration file (config_settings_file_path).

The saved configuration is read from the file to set back the dialog window in the same status.

## Member Variable Documentation

### QString IsotopicClusterShaperDlg::m_applicationName

This variable holds the name of the application.

### QString IsotopicClusterShaperDlg::m_colorName

This variable holds the string representation of the color with which the spectrum might be traced.

### MsXpS::libXpertMassCore::MassPeakShaperConfig IsotopicClusterShaperDlg::m_config

This variable holds the peak shaping process configuration.

### QString IsotopicClusterShaperDlg::m_fileName

This variable holds the name of the file to which results might be written.

### pappso::Trace IsotopicClusterShaperDlg::m_finalTrace

This variable holds the finale pappso::Trace in which to store the final mass spectrum.

### pappso::Trace IsotopicClusterShaperDlg::m_isotopicCluster

This variable holds the isotopic cluster in the form of a pappso::Trace instance.

### pappso::MapTrace IsotopicClusterShaperDlg::m_mapTrace

This variable holds the map trace that is used to combine each individual peak shape into a single mass spectrum.

### pappso::MzIntegrationParams IsotopicClusterShaperDlg::m_mzIntegrationParams

This variable holds the mass spectrum combination parameters (size of the bins, for example).

### int IsotopicClusterShaperDlg::m_normalizingIntensity

This variable holds the intensity value that the most intense peak in the cluster should have.

All the other peaks intensities are normalized against this value.

### QList<MsXpS::libXpertMassCore::MassPeakShaperSPtr> IsotopicClusterShaperDlg::m_peakShapers

This variable holds the list of peak shapers used to shape the peak around each isotopic cluster peak centroid.

Each peak centroid of the isotopic cluster will be handled by its own peak shaper instance.

### double IsotopicClusterShaperDlg::m_referencePeakMz

This variable holds the m/z value that is used as the reference peak when convertring full with at half maximum values to and from resolving power values.

### QString IsotopicClusterShaperDlg::m_windowDescription

This variable holds the description of this IsotopicClusterShaperDlg dialog window instance.

### MsXpS::libXpertMassGui::MassPeakShaperConfigWidget *IsotopicClusterShaperDlg::mp_massPeakShaperConfigWidget

This variable holds the widget where the mass peak shaping process configuration is done..

### QWidget *IsotopicClusterShaperDlg::mp_programWindow

This variable holds the main program window.

### Ui::IsotopicClusterShaperDlg *IsotopicClusterShaperDlg::mp_ui

This variable holds the graphical user interface definition.

### std::shared_ptr<QTimer> IsotopicClusterShaperDlg::msp_msgTimer

This variable holds the timer used to erase messages output to the user.