CycloBranch
cSpectrumDetailWidget Class Reference

The class representing a widget for visualisation of a detail of a spectrum (opened after doubleclick on a row when results are reported). More...

#include <cSpectrumDetailWidget.h>

Inheritance diagram for cSpectrumDetailWidget:

Signals

void emitMZInterval (double minmz, double maxmz)
 The signal is emitted when the range of m/z ratios has been changed. More...
 
void rawDataStateChangedSignal (bool state)
 The signal is emitted when raw data state was changed. More...
 
void absoluteIntensityStateChangedSignal (bool state)
 The signal is emitted when the absolute intensity state was changed. More...
 
void lastActiveDetail (int rowid)
 The signal is emitted when the widget has been moved. More...
 

Public Member Functions

 cSpectrumDetailWidget ()
 The constructor.
 
 cSpectrumDetailWidget (const cSpectrumDetailWidget &sd)
 The copy constructor. More...
 
cSpectrumDetailWidgetoperator= (const cSpectrumDetailWidget &sd)
 Overloaded operator=. More...
 
 ~cSpectrumDetailWidget ()
 The destructor.
 
void closeEvent (QCloseEvent *event)
 Handle the window close event. More...
 
void initialize (int rowid, string scantitle, int activefileid, cGlobalPreferences *globalpreferences, cParameters *parameters, cTheoreticalSpectrum &theoreticalspectrum, QWidget *parent)
 Initialize the widget. More...
 
cTheoreticalSpectrumgetTheoreticalSpectrum ()
 Get the theoretical spectrum. More...
 
string getDetailsAsHTMLString ()
 Get details about a theoretical spectrum as a HTML string. More...
 
string getPeaksTableAsHTMLString (bool unmatchedtheoreticalpeaks, bool unmatchedexperimentalpeaks, bool exportisomers)
 Get a table of peaks as a HTML string. More...
 
string getPartialPeaksTableAsHTMLString (int id, bool exportisomers)
 Get a partial table of peaks as a HTML string. More...
 
void prepareToShow (QAction *actionShowIsomers, cPeakListSeries *rawdata, vector< cImzMLItem > *imzmlprofilemetadata, bool profilemz64precision, bool profileintensity64precision, bool usedefaultsize)
 Prepare the widget to show. More...
 
void findAll (const QString &str, QTextDocument::FindFlags opt=0, bool errormessage=true)
 Find all occurrences of str and highlight them. More...
 
void exportImage (bool exportspectrum)
 Export spectrum/peptide image. More...
 
void zoomToPeak (double value)
 Zoom to a peak determined by the value. More...
 
set< string > & getLocalNeutralLosses ()
 Get a set of local neutral losses. More...
 
void setProfileSpectrumEnabled (bool enable)
 Set the state of profile spectrum visualization. More...
 
bool hasProfileSpectrumEnabled ()
 Check if the profile spectrum visualization is enabled. More...
 
void disableProfileMode ()
 Permanently disable the visualization in profile mode.
 
void setAbsoluteIntensityEnabled (bool enable)
 Set the state of absolute intensity mode. More...
 
bool hasAbsoluteIntensityEnabled ()
 Check if the absolute intensity mode is enabled. More...
 
void setHideMatchedPeaksEnabled (bool enable)
 Set the state of hide matched peaks mode. More...
 
bool hasHideMatchedPeaksEnabled ()
 Check if the hide matched peaks mode is enabled. More...
 
void setHideUnmatchedPeaksEnabled (bool enable)
 Set the state of hide unmatched peaks mode. More...
 
bool hasHideUnmatchedPeaksEnabled ()
 Check if the hide unmatched peaks mode is enabled. More...
 
void setHideScrambledPeaksEnabled (bool enable)
 Set the state of hide scrambled peaks mode. More...
 
bool hasHideScrambledPeaksEnabled ()
 Check if the hide scrambled peaks mode is enabled. More...
 
void setHidePeakLabelsEnabled (bool enable)
 Set the state of hide peak labels mode. More...
 
bool hasHidePeakLabelsEnabled ()
 Check if the hide peak labels mode is enabled. More...
 
void setMouseMzSelectionEnabled (bool enable)
 Set the state of mouse m/z selection tool. More...
 
bool hasMouseMzSelectionEnabled ()
 Check if the mouse m/z selection tool is enabled. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event)
 Handle a key press event. More...
 
void moveEvent (QMoveEvent *event)
 Handle a move event. More...
 

Detailed Description

The class representing a widget for visualisation of a detail of a spectrum (opened after doubleclick on a row when results are reported).

Constructor & Destructor Documentation

◆ cSpectrumDetailWidget()

cSpectrumDetailWidget::cSpectrumDetailWidget ( const cSpectrumDetailWidget sd)

The copy constructor.

Parameters
sdreference to a cSpectrumDetailWidget

Member Function Documentation

◆ absoluteIntensityStateChangedSignal

void cSpectrumDetailWidget::absoluteIntensityStateChangedSignal ( bool  state)
signal

The signal is emitted when the absolute intensity state was changed.

Parameters
statecurrent state

◆ closeEvent()

void cSpectrumDetailWidget::closeEvent ( QCloseEvent *  event)

Handle the window close event.

Parameters
eventpointer to QCloseEvent

◆ emitMZInterval

void cSpectrumDetailWidget::emitMZInterval ( double  minmz,
double  maxmz 
)
signal

The signal is emitted when the range of m/z ratios has been changed.

Parameters
minmza minimum threshold of m/z ratio
maxmza maximum threshold of m/z ratio

◆ exportImage()

void cSpectrumDetailWidget::exportImage ( bool  exportspectrum)

Export spectrum/peptide image.

Parameters
exportspectrumif true, a spectrum image is exported; if false, a peptide image is exported

◆ findAll()

void cSpectrumDetailWidget::findAll ( const QString &  str,
QTextDocument::FindFlags  opt = 0,
bool  errormessage = true 
)

Find all occurrences of str and highlight them.

Parameters
strsearch string
optsearch options
errormessageif true, an error message in a popup window is shown when no results are matched

◆ getDetailsAsHTMLString()

string cSpectrumDetailWidget::getDetailsAsHTMLString ( )

Get details about a theoretical spectrum as a HTML string.

Return values
stringdetails about a theoretical spectrum

◆ getLocalNeutralLosses()

set< string > & cSpectrumDetailWidget::getLocalNeutralLosses ( )

Get a set of local neutral losses.

Return values
set<int>get a set of local neutral losses

◆ getPartialPeaksTableAsHTMLString()

string cSpectrumDetailWidget::getPartialPeaksTableAsHTMLString ( int  id,
bool  exportisomers 
)

Get a partial table of peaks as a HTML string.

Parameters
ididentifier of a spectrum
exportisomersif true then isomers of building blocks are exported
Return values
stringa partial table of peaks as a HTML string

◆ getPeaksTableAsHTMLString()

string cSpectrumDetailWidget::getPeaksTableAsHTMLString ( bool  unmatchedtheoreticalpeaks,
bool  unmatchedexperimentalpeaks,
bool  exportisomers 
)

Get a table of peaks as a HTML string.

Parameters
unmatchedtheoreticalpeaksif true then unmatched theoretical peaks are included
unmatchedexperimentalpeaksif true then unmatched experimental peaks are included
exportisomersif true then isomers of building blocks are exported
Return values
stringa table of peaks as a HTML string

◆ getTheoreticalSpectrum()

cTheoreticalSpectrum & cSpectrumDetailWidget::getTheoreticalSpectrum ( )

Get the theoretical spectrum.

Return values
cTheoreticalSpectrumreference to a theoretical spectrum

◆ hasAbsoluteIntensityEnabled()

bool cSpectrumDetailWidget::hasAbsoluteIntensityEnabled ( )

Check if the absolute intensity mode is enabled.

Return values
booltrue if the absolute intensity mode is enabled

◆ hasHideMatchedPeaksEnabled()

bool cSpectrumDetailWidget::hasHideMatchedPeaksEnabled ( )

Check if the hide matched peaks mode is enabled.

Return values
booltrue if the hide matched peaks mode is enabled

◆ hasHidePeakLabelsEnabled()

bool cSpectrumDetailWidget::hasHidePeakLabelsEnabled ( )

Check if the hide peak labels mode is enabled.

Return values
booltrue if the hide peak labels mode is enabled

◆ hasHideScrambledPeaksEnabled()

bool cSpectrumDetailWidget::hasHideScrambledPeaksEnabled ( )

Check if the hide scrambled peaks mode is enabled.

Return values
booltrue if the hide scrambled peaks mode is enabled

◆ hasHideUnmatchedPeaksEnabled()

bool cSpectrumDetailWidget::hasHideUnmatchedPeaksEnabled ( )

Check if the hide unmatched peaks mode is enabled.

Return values
booltrue if the hide unmatched peaks mode is enabled

◆ hasMouseMzSelectionEnabled()

bool cSpectrumDetailWidget::hasMouseMzSelectionEnabled ( )

Check if the mouse m/z selection tool is enabled.

Return values
booltrue if the mouse m/z selection tool is enabled

◆ hasProfileSpectrumEnabled()

bool cSpectrumDetailWidget::hasProfileSpectrumEnabled ( )

Check if the profile spectrum visualization is enabled.

Return values
booltrue if the profile spectrum is enabled

◆ initialize()

void cSpectrumDetailWidget::initialize ( int  rowid,
string  scantitle,
int  activefileid,
cGlobalPreferences globalpreferences,
cParameters parameters,
cTheoreticalSpectrum theoreticalspectrum,
QWidget *  parent 
)

Initialize the widget.

Parameters
rowidid of a row
scantitlescan title
activefileidid of an active file
globalpreferencesglobal preferences of the application
parametersa pointer to parameters
theoreticalspectruma reference to a theoretical spectrum
parentpointer to a parent widget

◆ keyPressEvent()

void cSpectrumDetailWidget::keyPressEvent ( QKeyEvent *  event)
protected

Handle a key press event.

Parameters
eventpointer to QKeyEvent

◆ lastActiveDetail

void cSpectrumDetailWidget::lastActiveDetail ( int  rowid)
signal

The signal is emitted when the widget has been moved.

Parameters
rowidrowid of the widget

◆ moveEvent()

void cSpectrumDetailWidget::moveEvent ( QMoveEvent *  event)
protected

Handle a move event.

Parameters
eventpointer to QMoveEvent

◆ operator=()

cSpectrumDetailWidget & cSpectrumDetailWidget::operator= ( const cSpectrumDetailWidget sd)

Overloaded operator=.

Parameters
sdreference to a cSpectrumDetailWidget

◆ prepareToShow()

void cSpectrumDetailWidget::prepareToShow ( QAction *  actionShowIsomers,
cPeakListSeries rawdata,
vector< cImzMLItem > *  imzmlprofilemetadata,
bool  profilemz64precision,
bool  profileintensity64precision,
bool  usedefaultsize 
)

Prepare the widget to show.

Parameters
actionShowIsomersreference to QAction to show isomers of building blocks
rawdataa pointer to a structure handling raw data
imzmlprofilemetadataimzml profile metadata
profilemz64precisiontrue if 64 mz precision is used, false if 32 bit mz precision is used
profileintensity64precisiontrue if 64 intensity precision is used, false if 32 bit intensity precision is used
usedefaultsizeif true, the default size is used

◆ rawDataStateChangedSignal

void cSpectrumDetailWidget::rawDataStateChangedSignal ( bool  state)
signal

The signal is emitted when raw data state was changed.

Parameters
statecurrent state

◆ setAbsoluteIntensityEnabled()

void cSpectrumDetailWidget::setAbsoluteIntensityEnabled ( bool  enable)

Set the state of absolute intensity mode.

Parameters
enablestate of absolute intensity mode

◆ setHideMatchedPeaksEnabled()

void cSpectrumDetailWidget::setHideMatchedPeaksEnabled ( bool  enable)

Set the state of hide matched peaks mode.

Parameters
enablestate of hide matched peaks mode

◆ setHidePeakLabelsEnabled()

void cSpectrumDetailWidget::setHidePeakLabelsEnabled ( bool  enable)

Set the state of hide peak labels mode.

Parameters
enablestate of hide peak labels mode

◆ setHideScrambledPeaksEnabled()

void cSpectrumDetailWidget::setHideScrambledPeaksEnabled ( bool  enable)

Set the state of hide scrambled peaks mode.

Parameters
enablestate of hide scrambled peaks mode

◆ setHideUnmatchedPeaksEnabled()

void cSpectrumDetailWidget::setHideUnmatchedPeaksEnabled ( bool  enable)

Set the state of hide unmatched peaks mode.

Parameters
enablestate of hide unmatched peaks mode

◆ setMouseMzSelectionEnabled()

void cSpectrumDetailWidget::setMouseMzSelectionEnabled ( bool  enable)

Set the state of mouse m/z selection tool.

Parameters
enablestate of mouse m/z selection tool

◆ setProfileSpectrumEnabled()

void cSpectrumDetailWidget::setProfileSpectrumEnabled ( bool  enable)

Set the state of profile spectrum visualization.

Parameters
enablestate of profile spectrum visualization

◆ zoomToPeak()

void cSpectrumDetailWidget::zoomToPeak ( double  value)

Zoom to a peak determined by the value.

Parameters
valuemz ratio of a peak

The documentation for this class was generated from the following files: