libXpertMass Developer Documentation
  • libXpertMassGui
  • MassPeakShaperConfigWidget
  • MassPeakShaperConfigWidget Class

    class MsXpS::libXpertMassGui::MassPeakShaperConfigWidget

    The MassPeakShaperConfigWidget class provides a widget for the configuration of the mass peak shaping process. More...

    Header: #include <MassPeakShaperConfigWidget.hpp>

    Public Functions

    MassPeakShaperConfigWidget(QWidget *parent_p, libXpertMass::MassPeakShaperConfig &config)
    virtual ~MassPeakShaperConfigWidget()
    bool checkParameters()
    bool checkTheParameters(QString &errors)
    int *getFmwhToBinSizeDivisorSpinBox()
    int *getFwhmDoubleSpinBox()
    int *getGaussianRadioButton()
    int *getLorentzianRadioButton()
    int *getPointCountSpinBox()
    double getReferencePeakMz()
    int *getResolutionSpinBox()
    bool processBinSizeConfig()
    void readSettings(const QString &config_settings_file_path)
    void setReferencePeakMz(double mz)
    void writeSettings(const QString &config_settings_file_path)

    Public Slots

    void fwhmBinSizeDivisorValueChanged(int value)
    void fwhmEditingFinished()
    void gaussianRadioButtonToggled(bool checked)
    void lorentzianRadioButtonToggled(bool checked)
    void noBinsCheckBoxStateChanged(int state)
    void pointCountEditingFinished()
    void referencePeakMzEdited(const QString &text)
    void resolutionEditingFinished()

    Protected Functions

    void message(const QString &message, int timeout = 3000)
    void setupWidget()

    Protected Variables

    libXpertMass::MassPeakShaperConfig &m_config
    double m_normalizingIntensity
    double m_referencePeakMz
    QWidget *mp_parent
    Ui::MassPeakShaperConfigWidget *mp_ui
    std::shared_ptr<QTimer> msp_msgTimer

    Detailed Description

    This composite widget contains all the widgets and all the logic required to fully configure the mass peak shaping process.

    Member Function Documentation

    MassPeakShaperConfigWidget::MassPeakShaperConfigWidget(QWidget *parent_p, libXpertMass::MassPeakShaperConfig &config)

    Constructs a MassPeakShaperConfigWidget instance.

    [virtual noexcept] MassPeakShaperConfigWidget::~MassPeakShaperConfigWidget()

    Destructs this MassPeakShaperConfigWidget instance.

    bool MassPeakShaperConfigWidget::checkParameters()

    Checks that all the parameters are consistent and correct.

    Returns true is the check succeeded, false otherwise.

    See also checkTheParameters(QString &errors).

    bool MassPeakShaperConfigWidget::checkTheParameters(QString &errors)

    This is an overloaded function.

    Checks that all the parameters are consistent and correct.

    If errors occurs, they ware added to errors.

    Returns true is the check succeeded, false otherwise.

    See also checkParameters().

    [slot] void MassPeakShaperConfigWidget::fwhmBinSizeDivisorValueChanged(int value)

    Signals that the value by which the FWHM value should be divided is now value.

    The value is the number by which FWHM should be divided to yield the actual bin size.

    [slot] void MassPeakShaperConfigWidget::fwhmEditingFinished()

    Signals that the user has finished entering the FWHM value.

    The FWHM is the full width at half maximum, that is the width of the peak at its half-height. This value is a direct reflection of the resolving power of the mass spectrometer.

    [slot] void MassPeakShaperConfigWidget::gaussianRadioButtonToggled(bool checked)

    Signals that the peak shape type has changed.

    If checked is true, then the type is libXpertMass::MassPeakShapeType::GAUSSIAN, else it is libXpertMass::MassPeakShapeType::LORENTZIAN.

    int *MassPeakShaperConfigWidget::getFmwhToBinSizeDivisorSpinBox()

    Returns the FWHM to bin size divisor spin box widget.

    int *MassPeakShaperConfigWidget::getFwhmDoubleSpinBox()

    Returns the FWHM spin box widget.

    int *MassPeakShaperConfigWidget::getGaussianRadioButton()

    Returns the Gaussian shape type radio button widget.

    int *MassPeakShaperConfigWidget::getLorentzianRadioButton()

    Returns the Lorentzian shape type radio button widget.

    int *MassPeakShaperConfigWidget::getPointCountSpinBox()

    Returns the shape point count spin box widget.

    double MassPeakShaperConfigWidget::getReferencePeakMz()

    Returns the reference m/z value.

    int *MassPeakShaperConfigWidget::getResolutionSpinBox()

    Returns the resolving power spin box widget.

    [slot] void MassPeakShaperConfigWidget::lorentzianRadioButtonToggled(bool checked)

    Signals that the peak shape type has changed.

    If checked is true, then the type is libXpertMass::MassPeakShapeType::LORENTZIAN, else it is libXpertMass::MassPeakShapeType::GAUSSIAN.

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

    Writes message to the message line edit widget.

    The message is erase after timeout in milliseconds.

    [slot] void MassPeakShaperConfigWidget::noBinsCheckBoxStateChanged(int state)

    Signals that the check box widget has changed state.

    [slot] void MassPeakShaperConfigWidget::pointCountEditingFinished()

    Signals that the user has finished editing the count of points needed to shape the peak.

    bool MassPeakShaperConfigWidget::processBinSizeConfig()

    Determines the bin configuration from the data entered by the user.

    Returns true if the calculations succeeded, false otherwise.

    void MassPeakShaperConfigWidget::readSettings(const QString &config_settings_file_path)

    Reads the settings of this widget from config_settings_file_path.

    [slot] void MassPeakShaperConfigWidget::referencePeakMzEdited(const QString &text)

    Signals that the user edited the reference m/z value with text text.

    [slot] void MassPeakShaperConfigWidget::resolutionEditingFinished()

    Signals that the user has finished entering the resolving power value.

    void MassPeakShaperConfigWidget::setReferencePeakMz(double mz)

    Sets the reference m/z value to mz.

    [protected] void MassPeakShaperConfigWidget::setupWidget()

    Sets up this widget.

    void MassPeakShaperConfigWidget::writeSettings(const QString &config_settings_file_path)

    Writes the settings of this widget to config_settings_file_path for later restoration.

    Member Variable Documentation

    libXpertMass::MassPeakShaperConfig &MassPeakShaperConfigWidget::m_config

    This variable holds the configuration of the pass peak shaping process.

    double MassPeakShaperConfigWidget::m_normalizingIntensity

    This variable holds the intensity value that is used to normalize the peak height..

    double MassPeakShaperConfigWidget::m_referencePeakMz

    This variable holds the reference m/z value used for peak width calculations.

    This reference m/z value is used to compute the full width at half maximum of the shaped peak on the basis of the resolution and backwards.

    QWidget *MassPeakShaperConfigWidget::mp_parent

    This variable holds the parent widget.

    Ui::MassPeakShaperConfigWidget *MassPeakShaperConfigWidget::mp_ui

    This variable holds the graphical user interface definition.

    std::shared_ptr<QTimer> MassPeakShaperConfigWidget::msp_msgTimer

    This variable holds the timer object used to clear messages to the messages line edit box.