OpenMS  2.4.0
Public Slots | Public Member Functions | Static Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends | List of all members
TOPPViewBase Class Reference

Main window of TOPPView tool. More...

#include <OpenMS/VISUAL/APPLICATIONS/TOPPViewBase.h>

Inheritance diagram for TOPPViewBase:
QMainWindow DefaultParamHandler

Public Types

Type definitions
typedef LayerData::FeatureMapType FeatureMapType
 
typedef LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
 
typedef LayerData::ConsensusMapType ConsensusMapType
 
typedef LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
 
typedef LayerData::ExperimentType ExperimentType
 
typedef LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
 
typedef LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
 
typedef ExperimentType::SpectrumType SpectrumType
 Peak spectrum type. More...
 

Public Slots

void updateCurrentPath ()
 changes the current path according to the currently active window/layer More...
 
void showURL ()
 shows the URL stored in the data of the sender QAction More...
 
void openFileDialog ()
 shows the file dialog for opening files More...
 
void openExampleDialog ()
 shows the file dialog for opening example files More...
 
void showGoToDialog ()
 shows the DB dialog for opening files More...
 
void preferencesDialog ()
 shows the preferences dialog More...
 
void layerStatistics ()
 Shows statistics (count,min,max,avg) about Intensity, Quality, Charge and meta data. More...
 
void editMetadata ()
 lets the user edit the meta data of a layer More...
 
void layerActivated ()
 gets called if a layer got activated More...
 
void layerZoomChanged ()
 gets called when a layer changes in zoom More...
 
void linkZoom ()
 link the zoom of individual windows More...
 
void layerDeactivated ()
 gets called if a layer got deactivated More...
 
void closeFile ()
 closes the active window More...
 
void updateToolBar ()
 updates the toolbar More...
 
void updateLayerBar ()
 adapts the layer bar to the active window More...
 
void updateViewBar ()
 adapts view bar to the active window More...
 
void viewChanged (int)
 changes the behavior according to the selected view in the spectra view bar and calls updateSpectraViewBar() More...
 
void viewTabwidgetDoubleClicked (int)
 adds empty ID structure to allow manual annotations More...
 
void updateFilterBar ()
 adapts the filter bar to the active window More...
 
void updateMenu ()
 enabled/disabled menu entries depending on the current state More...
 
void updateTabBar (QMdiSubWindow *w)
 brings the tab corresponding to the active window in front More...
 
void tileVertical ()
 tile the open windows vertically More...
 
void tileHorizontal ()
 tile the open windows horizontally More...
 
void showStatusMessage (std::string msg, OpenMS::UInt time)
 Shows a status message in the status bar. More...
 
void showCursorStatus (double mz, double rt)
 shows m/z and rt in the status bar More...
 
void showCursorStatusInvert (double mz, double rt)
 shows m/z and rt in the status bar (inverting RT and m/z) More...
 
void showTOPPDialog ()
 Apply TOPP tool. More...
 
void annotateWithID ()
 Annotates current layer with ID data. More...
 
void showSpectrumGenerationDialog ()
 Shows the theoretical spectrum generation dialog. More...
 
void showSpectrumAlignmentDialog ()
 Shows the spectrum alignment dialog. More...
 
void showSpectrumAs1D (int index)
 Shows the spectrum with index index of the active layer in 1D. More...
 
void showSpectrumAs1D (std::vector< int, std::allocator< int > > indices)
 
void showCurrentPeaksAs2D ()
 Shows the current peak data of the active layer in 2D. More...
 
void showCurrentPeaksAs3D ()
 Shows the current peak data of the active layer in 3D. More...
 
void showCurrentPeaksAsIonMobility ()
 Shows the current peak data of the active layer as ion mobility. More...
 
void showCurrentPeaksAsDIA ()
 Shows the current peak data of the active layer as DIA data. More...
 
void showAboutDialog ()
 Shows the 'About' dialog. More...
 
void saveLayerAll ()
 Saves the whole current layer data. More...
 
void saveLayerVisible ()
 Saves the visible layer data. More...
 
void toggleGridLines ()
 Toggles the grid lines. More...
 
void toggleAxisLegends ()
 Toggles the axis legends. More...
 
void showPreferences ()
 Shows current layer preferences. More...
 
void metadataFileDialog ()
 dialog for inspecting database meta data More...
 
void loadFile (QString)
 Loads a file given by the passed string. More...
 
Toolbar slots
void setDrawMode1D (int)
 
void setIntensityMode (int)
 
void changeLayerFlag (bool)
 
void changeLabel (QAction *)
 
void changeUnassigned (QAction *)
 
void resetZoom ()
 
void toggleProjections ()
 

Public Member Functions

 TOPPViewBase (QWidget *parent=nullptr)
 Constructor. More...
 
 ~TOPPViewBase () override
 Destructor. More...
 
void addDataFile (const String &filename, bool show_options, bool add_to_recent, String caption="", UInt window_id=0, Size spectrum_id=0)
 Opens and displays data from a file. More...
 
void addData (FeatureMapSharedPtrType feature_map, ConsensusMapSharedPtrType consensus_map, std::vector< PeptideIdentification > &peptides, ExperimentSharedPtrType peak_map, ODExperimentSharedPtrType on_disc_peak_map, LayerData::DataType data_type, bool show_as_1d, bool show_options, bool as_new_window=true, const String &filename="", const String &caption="", UInt window_id=0, Size spectrum_id=0)
 Adds a peak or feature map to the viewer. More...
 
void loadFiles (const StringList &list, QSplashScreen *splash_screen)
 Opens all the files in the string list. More...
 
void loadPreferences (String filename="")
 Loads the preferences from the filename given. More...
 
void savePreferences ()
 Stores the preferences (used when this window is closed) More...
 
Param getSpectrumParameters (UInt dim)
 Returns the parameters for a SpectrumCanvas of dimension dim. More...
 
const LayerDatagetCurrentLayer () const
 Returns the active Layer data (0 if no layer is active) More...
 
SpectrumCanvasgetActiveCanvas () const
 returns a pointer to the active SpectrumCanvas (0 if none is active) More...
 
SpectraIdentificationViewWidgetgetSpectraIdentificationViewWidget ()
 returns a pointer to the SpectraIdentificationViewWidget More...
 
void showSpectrumWidgetInWindow (SpectrumWidget *sw, const String &caption)
 Opens the provided spectrum widget in a new window. More...
 
float estimateNoiseFromRandomMS1Scans (const ExperimentType &exp, UInt n_scans=10)
 Estimates the noise by evaluating n_scans random scans of MS level 1. Assumes that 4/5 of intensities is noise. More...
 
EnhancedWorkspacegetWorkspace () const
 returns a pointer to the EnhancedWorkspace containing SpectrumWidgets More...
 
SpectrumWidgetgetActiveSpectrumWidget () const
 returns a pointer to the active SpectrumWidget (0 if none is active) More...
 
Spectrum1DWidgetgetActive1DWidget () const
 returns a pointer to the active Spectrum1DWidget (0 the active window is no Spectrum1DWidget or there is no active window) More...
 
Spectrum2DWidgetgetActive2DWidget () const
 returns a pointer to the active Spectrum2DWidget (0 the active window is no Spectrum2DWidget or there is no active window) More...
 
Spectrum3DWidgetgetActive3DWidget () const
 returns a pointer to the active Spectrum3DWidget (0 the active window is no Spectrum2DWidget or there is no active window) More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Static Public Member Functions

static bool containsMS1Scans (const ExperimentType &exp)
 Returns true if contains at least one MS1 spectrum. More...
 
static bool containsIMData (const MSSpectrum &s)
 Returns true if contains ion mobility data. More...
 
static bool hasMS1Zeros (const ExperimentType &exp)
 Returns true of experiment has at least one exact zero valued peak in any of its MS1 spectra. More...
 
static bool hasPeptideIdentifications (const ExperimentType &map)
 Returns true if the experiment map contains peptide identifications. More...
 

Protected Types

enum  LogState { LS_NOTICE, LS_WARNING, LS_ERROR }
 Log message states. More...
 

Protected Slots

void finishTOPPToolExecution (int exitCode, QProcess::ExitStatus exitStatus)
 slot for the finished signal of the TOPP tools execution More...
 
void abortTOPPTool ()
 aborts the execution of a TOPP tool More...
 
void rerunTOPPTool ()
 returns the last invoked TOPP tool with the same parameters More...
 
void showSpectrumBrowser ()
 shows the spectrum browser and updates it More...
 
void showSpectrumMetaData (int spectrum_index)
 shows the spectrum metadata More...
 
void updateProcessLog ()
 Appends process output to log window. More...
 
void fileChanged_ (const String &)
 Called if a data file has been externally changed. More...
 
Layer manager and filter manager slots
void layerSelectionChange (int)
 slot for layer manager selection change More...
 
void layerFilterVisibilityChange (bool)
 Enables/disables the data filters for the current layer. More...
 
void layerContextMenu (const QPoint &pos)
 slot for layer manager context menu More...
 
void logContextMenu (const QPoint &pos)
 slot for log window context menu More...
 
void layerVisibilityChange (QListWidgetItem *item)
 slot for layer manager visibility change (check box) More...
 
void filterContextMenu (const QPoint &pos)
 slot for filter manager context menu More...
 
void filterEdit (QListWidgetItem *item)
 slot for editing a filter More...
 
void layerEdit (QListWidgetItem *)
 slot for editing the preferences of the current layer More...
 
Tabbar slots
void closeByTab (int id)
 Closes the window corresponding to the data of the tab with identifier id. More...
 
void enhancedWorkspaceWindowChanged (int id)
 Raises the window corresponding to the data of the tab with identifier id. More...
 
void openRecentFile ()
 Opens a file from the recent files menu. More...
 
void copyLayer (const QMimeData *data, QWidget *source, int id=-1)
 Slot for drag-and-drop of layer manager to tabbar. More...
 

Protected Member Functions

void initializeDefaultParameters_ ()
 Initializes the default parameters on TOPPView construction. More...
 
bool annotateMS1FromMassFingerprinting_ (const FeatureMap &identifications)
 
std::set< StringgetFilenamesOfOpenFiles_ ()
 unique list of files referenced by all layers More...
 
QStringList getFileList_ (const String &path_overwrite="")
 Shows a dialog where the user can select files. More...
 
EnhancedTabBarWidgetInterfacewindow_ (int id) const
 Returns the enhanced tabbar widget with id id. More...
 
void checkPreferences_ ()
 check if all available preferences get set by the .ini file. If there are some missing entries fill them with default values. More...
 
void showLogMessage_ (LogState state, const String &heading, const String &body)
 Shows a log message in the log_ window. More...
 
void showTOPPDialog_ (bool visible)
 Apply TOPP tool. If visible is true, only the visible data is used, otherwise the whole layer is used. More...
 
reimplemented Qt events
void closeEvent (QCloseEvent *event) override
 
- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

QListWidgetlayer_manager_
 Layer management widget. More...
 
FileWatcherwatcher_
 Watcher that tracks file changes (in order to update the data in the different views) More...
 
bool watcher_msgbox_
 Holds the messageboxes for each layer that are currently popped up (to avoid popping them up again, if file changes again before the messagebox is closed) More...
 
bool zoom_together_
 Stores whether the individual windows should zoom together (be linked) or not. More...
 
QAction * linkZoom_action_
 
QTextEditlog_
 Log output window. More...
 
EnhancedWorkspacews_
 Main workspace. More...
 
EnhancedTabBartab_bar_
 Tab bar. The address of the corresponding window to a tab is stored as an int in tabData() More...
 
QMenu * add_2d_context_
 Additional context menu for 2D layers. More...
 
String current_path_
 
QTabWidget * views_tabwidget_
 Tabwidget that hold the different views on the loaded data. More...
 
TOPPViewIdentificationViewBehavioridentificationview_behavior_
 TOPPView behavior for the identification view. More...
 
TOPPViewSpectraViewBehaviorspectraview_behavior_
 TOPPView behavior for the spectra view. More...
 
dock widgets
QDockWidget * layer_dock_widget_
 
QDockWidget * views_dockwidget_
 
QDockWidget * filter_dock_widget_
 
Spectrum selection widgets
SpectraViewWidgetspectra_view_widget_
 
SpectraIdentificationViewWidgetspectra_identification_view_widget_
 
Filter widgets
QListWidgetfilters_
 
QCheckBox * filters_check_box_
 
Toolbar
QToolBar * tool_bar_
 
QButtonGroup * intensity_button_group_
 
QToolBar * tool_bar_1d_
 
QButtonGroup * draw_group_1d_
 
QToolBar * tool_bar_2d_peak_
 
QToolBar * tool_bar_2d_feat_
 
QToolBar * tool_bar_2d_cons_
 
QToolBar * tool_bar_2d_ident_
 
QAction * dm_precursors_2d_
 
QAction * dm_hull_2d_
 
QAction * dm_hulls_2d_
 
QToolButton * dm_label_2d_
 
QActionGroup * group_label_2d_
 
QToolButton * dm_unassigned_2d_
 
QActionGroup * group_unassigned_2d_
 
QAction * dm_elements_2d_
 
QAction * projections_2d_
 
QAction * dm_ident_2d_
 
Status bar
QLabel * message_label_
 Label for messages in the status bar. More...
 
QLabel * mz_label_
 m/z label for messages in the status bar More...
 
QLabel * rt_label_
 RT label for messages in the status bar. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Static Private Attributes

static const String CAPTION_3D_SUFFIX_ = " (3D)"
 Suffix appended to caption of tabs when layer is shown in 3D. More...
 

Friends

class TestTOPPView
 

Recent files

QStringList recent_files_
 list of the recently opened files More...
 
std::vector< QAction * > recent_actions_
 list of the recently opened files actions (menu entries) More...
 
void addRecentFile_ (const String &filename)
 adds a Filename to the recent files More...
 
void updateRecentMenu_ ()
 update the recent files menu More...
 

TOPP tool execution

struct {
   Param   param
 
   String   tool
 
   String   in
 
   String   out
 
   String   file_name
 
   String   layer_name
 
   UInt   window_id
 
   Size   spectrum_id
 
   QProcess *   process
 
   QTime   timer
 
   bool   visible
 
topp_
 Information needed for execution of TOPP tools. More...
 
void runTOPPTool_ ()
 Runs the TOPP tool according to the information in topp_. More...
 

Detailed Description

Main window of TOPPView tool.

Uses the default QMainWindow layout (see Qt documentation) with a central widget in the middle (consistent of a EnhancedTabBar and an EnhancedWorkspace) and multiple docked widgets around it (to the right and below) and multiple tool bars. On top and bottom are a menu bar and a status bar.

The main layout is using

The views_dockwidget_ internally holds a tab widget views_tabwidget_ which holds the two different views on the data (spectra and identification view) which are implemented using identificationview_behavior_ and spectraview_behavior_.

Improvement:
Use DataRepository singleton to share data between TOPPView and the canvas classes (Hiwi)
Improvement:
For painting single mass traces with no width we currently paint each line twice (once going down, and then coming back up). This could be more efficient...
Improvement:
Keep spectrum browser widgets of all layers in memory in order to avoid rebuilding the entire tree view every time the active layer changes (Hiwi, Johannes)

Member Typedef Documentation

◆ ConsensusMapSharedPtrType

◆ ConsensusMapType

◆ ExperimentSharedPtrType

◆ ExperimentType

◆ FeatureMapSharedPtrType

◆ FeatureMapType

◆ ODExperimentSharedPtrType

◆ SpectrumType

Peak spectrum type.

Member Enumeration Documentation

◆ LogState

enum LogState
protected

Log message states.

Enumerator
LS_NOTICE 

Notice.

LS_WARNING 

Warning.

LS_ERROR 

Fatal error.

Constructor & Destructor Documentation

◆ TOPPViewBase()

TOPPViewBase ( QWidget parent = nullptr)

Constructor.

References EnhancedTabBar::addTab(), TOPPViewBase::annotateWithID(), TOPPViewBase::changeLabel(), TOPPViewBase::changeLayerFlag(), TOPPViewBase::changeUnassigned(), TOPPViewBase::closeByTab(), TOPPViewBase::closeFile(), TOPPViewBase::copyLayer(), TOPPViewBase::current_path_, DefaultParamHandler::defaultsToParam_(), Spectrum1DCanvas::DM_CONNECTEDLINES, TOPPViewBase::dm_elements_2d_, TOPPViewBase::dm_hull_2d_, TOPPViewBase::dm_hulls_2d_, TOPPViewBase::dm_ident_2d_, TOPPViewBase::dm_label_2d_, Spectrum1DCanvas::DM_PEAKS, TOPPViewBase::dm_precursors_2d_, TOPPViewBase::dm_unassigned_2d_, TOPPViewBase::draw_group_1d_, TOPPViewBase::editMetadata(), TOPPViewBase::enhancedWorkspaceWindowChanged(), TOPPViewBase::fileChanged_(), TOPPViewBase::filter_dock_widget_, TOPPViewBase::filterContextMenu(), TOPPViewBase::filterEdit(), TOPPViewBase::filters_, TOPPViewBase::filters_check_box_, Param::getValue(), TOPPViewBase::group_label_2d_, TOPPViewBase::group_unassigned_2d_, TOPPViewBase::identificationview_behavior_, SpectrumCanvas::IM_LOG, SpectrumCanvas::IM_NONE, SpectrumCanvas::IM_PERCENTAGE, SpectrumCanvas::IM_SNAP, TOPPViewBase::initializeDefaultParameters_(), TOPPViewBase::intensity_button_group_, TOPPViewBase::layer_dock_widget_, TOPPViewBase::layer_manager_, TOPPViewBase::layerContextMenu(), TOPPViewBase::layerEdit(), TOPPViewBase::layerFilterVisibilityChange(), TOPPViewBase::layerSelectionChange(), TOPPViewBase::layerStatistics(), TOPPViewBase::layerVisibilityChange(), TOPPViewBase::linkZoom(), TOPPViewBase::linkZoom_action_, TOPPViewBase::loadPreferences(), TOPPViewBase::log_, TOPPViewBase::logContextMenu(), TOPPViewBase::message_label_, TOPPViewBase::metadataFileDialog(), TOPPViewBase::mz_label_, LayerData::NamesOfLabelType, TOPPViewBase::openExampleDialog(), TOPPViewBase::openFileDialog(), TOPPViewBase::openRecentFile(), DefaultParamHandler::param_, TOPPViewBase::preferencesDialog(), TOPPViewBase::projections_2d_, TOPPViewBase::recent_actions_, EnhancedTabBar::removeId(), TOPPViewBase::rerunTOPPTool(), TOPPViewBase::resetZoom(), TOPPViewBase::rt_label_, TOPPViewBase::saveLayerAll(), TOPPViewBase::saveLayerVisible(), TOPPViewBase::setDrawMode1D(), TOPPViewBase::setIntensityMode(), TOPPViewBase::showAboutDialog(), TOPPViewBase::showGoToDialog(), TOPPViewBase::showPreferences(), TOPPViewBase::showSpectrumAlignmentDialog(), TOPPViewBase::showSpectrumAs1D(), TOPPViewBase::showSpectrumGenerationDialog(), TOPPViewBase::showSpectrumMetaData(), TOPPViewBase::showTOPPDialog(), TOPPViewBase::showURL(), LayerData::SIZE_OF_LABEL_TYPE, TOPPViewBase::spectra_identification_view_widget_, TOPPViewBase::spectra_view_widget_, TOPPViewBase::spectraview_behavior_, TOPPViewBase::tab_bar_, TOPPViewBase::tileHorizontal(), TOPPViewBase::tileVertical(), TOPPViewBase::toggleAxisLegends(), TOPPViewBase::toggleGridLines(), TOPPViewBase::toggleProjections(), TOPPViewBase::tool_bar_, TOPPViewBase::tool_bar_1d_, TOPPViewBase::tool_bar_2d_cons_, TOPPViewBase::tool_bar_2d_feat_, TOPPViewBase::tool_bar_2d_ident_, TOPPViewBase::tool_bar_2d_peak_, TOPPViewBase::topp_, TOPPViewBase::updateCurrentPath(), TOPPViewBase::updateFilterBar(), TOPPViewBase::updateLayerBar(), TOPPViewBase::updateMenu(), TOPPViewBase::updateTabBar(), TOPPViewBase::updateToolBar(), TOPPViewBase::updateViewBar(), TOPPViewBase::viewChanged(), TOPPViewBase::views_dockwidget_, TOPPViewBase::views_tabwidget_, TOPPViewBase::viewTabwidgetDoubleClicked(), TOPPViewBase::watcher_, TOPPViewBase::ws_, and TOPPViewBase::zoom_together_.

◆ ~TOPPViewBase()

~TOPPViewBase ( )
override

Member Function Documentation

◆ abortTOPPTool

void abortTOPPTool ( )
protectedslot

aborts the execution of a TOPP tool

References TOPPViewBase::log_, TOPPViewBase::topp_, and TOPPViewBase::updateMenu().

Referenced by TOPPViewBase::~TOPPViewBase().

◆ addData()

void addData ( FeatureMapSharedPtrType  feature_map,
ConsensusMapSharedPtrType  consensus_map,
std::vector< PeptideIdentification > &  peptides,
ExperimentSharedPtrType  peak_map,
ODExperimentSharedPtrType  on_disc_peak_map,
LayerData::DataType  data_type,
bool  show_as_1d,
bool  show_options,
bool  as_new_window = true,
const String filename = "",
const String caption = "",
UInt  window_id = 0,
Size  spectrum_id = 0 
)

Adds a peak or feature map to the viewer.

Parameters
feature_mapThe feature data (empty if not feature data)
consensus_mapThe consensus feature data (empty if not consensus feature data)
peptidesThe peptide identifications (empty if not ID data)
peak_mapThe peak data (empty if not peak data)
on_disc_peak_mapThe peak data managed on disc (empty if not peak data)
data_typeType of the data
show_as_1dForce dataset to be opened in 1D mode (even if it contains several spectra)
show_optionsIf the options dialog should be shown (otherwise the defaults are used)
filenamesource file name (if the data came from a file)
captionSets the layer name and window caption of the data. If unset the file name is used. If set, the file is not monitored for changes.
window_idin which window the file is opened if opened as a new layer (0 or default equals current
spectrum_iddetermines the spectrum to show in 1D view.

add filter

References Spectrum1DCanvas::activateSpectrum(), SpectrumCanvas::activeLayerIndex(), DataFilters::add(), SpectrumCanvas::addLayer(), Spectrum1DWidget::canvas(), SpectrumWidget::canvas(), TOPPViewOpenDialog::disableCutoff(), TOPPViewOpenDialog::disableDimension(), TOPPViewOpenDialog::disableLocation(), LayerData::DT_CONSENSUS, LayerData::DT_FEATURE, LayerData::DT_IDENT, TOPPViewBase::estimateNoiseFromRandomMS1Scans(), DataFilters::DataFilter::field, TOPPViewBase::getActiveSpectrumWidget(), SpectrumCanvas::getCurrentLayer(), SpectrumCanvas::getLayer(), SpectrumCanvas::getLayerCount(), TOPPViewOpenDialog::getMergeLayer(), LayerData::getPeakData(), TOPPViewBase::getSpectrumParameters(), Param::getValue(), DataFilters::GREATER_EQUAL, TOPPViewBase::hasMS1Zeros(), DataFilters::INTENSITY, TOPPViewOpenDialog::isCutoffEnabled(), TOPPViewOpenDialog::isDataDIA(), Spectrum2DCanvas::mergeIntoLayer(), LayerData::name, DataFilters::DataFilter::op, TOPPViewOpenDialog::openAsNewWindow(), DefaultParamHandler::param_, SpectrumCanvas::setFilters(), SpectrumCanvas::setLayerName(), TOPPViewOpenDialog::setMergeLayers(), TOPPViewBase::showSpectrumWidgetInWindow(), TOPPViewBase::spectrum_id, LayerData::type, TOPPViewBase::updateFilterBar(), TOPPViewBase::updateLayerBar(), TOPPViewBase::updateMenu(), TOPPViewBase::updateViewBar(), DataFilters::DataFilter::value, TOPPViewOpenDialog::viewMapAs1D(), TOPPViewOpenDialog::viewMapAs2D(), TOPPViewBase::views_tabwidget_, TOPPViewBase::window_(), TOPPViewBase::window_id, and TOPPViewBase::ws_.

Referenced by TOPPViewBase::addDataFile(), TOPPViewBase::copyLayer(), and TOPPViewBase::showSpectrumGenerationDialog().

◆ addDataFile()

void addDataFile ( const String filename,
bool  show_options,
bool  add_to_recent,
String  caption = "",
UInt  window_id = 0,
Size  spectrum_id = 0 
)

Opens and displays data from a file.

Loads the data and adds it to the application by calling addData_()

Parameters
filenameThe file to open
show_optionsIf the options dialog should be shown (otherwise the defaults are used)
captionSets the layer name and window caption of the data. If unset the file name is used.
add_to_recentIf the file should be added to the recent files after opening
window_idin which window the file is opened if opened as a new layer (0 or default equals current window).
spectrum_iddetermines the spectrum to show in 1D view.

References File::absolutePath(), TOPPViewBase::addData(), FileWatcher::addFile(), TOPPViewBase::addRecentFile_(), File::basename(), FileTypes::CONSENSUSXML, TOPPViewBase::containsMS1Scans(), LayerData::DT_CHROMATOGRAM, LayerData::DT_CONSENSUS, LayerData::DT_FEATURE, LayerData::DT_IDENT, LayerData::DT_PEAK, File::exists(), FileTypes::FEATUREXML, IndexedMzMLHandler::getNrChromatograms(), IndexedMzMLHandler::getNrSpectra(), IndexedMzMLHandler::getParsingSuccess(), FileHandler::getType(), Param::getValue(), ProgressLogger::GUI, FileTypes::IDXML, FileTypes::INI, OpenMS::Constants::k, ConsensusXMLFile::load(), MzIdentMLFile::load(), IdXMLFile::load(), FeatureXMLFile::load(), FileHandler::loadExperiment(), LOG_INFO, TOPPViewBase::LS_ERROR, TOPPViewBase::LS_WARNING, FileTypes::MZIDENTML, FileTypes::MZML, IndexedMzMLHandler::openFile(), DefaultParamHandler::param_, TOPPViewBase::showLogMessage_(), TOPPViewBase::spectrum_id, FileTypes::typeToName(), FileTypes::UNKNOWN, TOPPViewBase::watcher_, BaseException::what(), and TOPPViewBase::window_id.

Referenced by TOPPViewBase::copyLayer(), TOPPViewBase::finishTOPPToolExecution(), TOPPViewBase::loadFile(), TOPPViewBase::loadFiles(), TOPPViewBase::openExampleDialog(), TOPPViewBase::openFileDialog(), and TOPPViewBase::openRecentFile().

◆ addRecentFile_()

void addRecentFile_ ( const String filename)
protected

◆ annotateMS1FromMassFingerprinting_()

bool annotateMS1FromMassFingerprinting_ ( const FeatureMap identifications)
protected

◆ annotateWithID

void annotateWithID ( )
slot

◆ changeLabel

void changeLabel ( QAction *  action)
slot

◆ changeLayerFlag

void changeLayerFlag ( bool  on)
slot

◆ changeUnassigned

void changeUnassigned ( QAction *  action)
slot

◆ checkPreferences_()

void checkPreferences_ ( )
protected

check if all available preferences get set by the .ini file. If there are some missing entries fill them with default values.

◆ closeByTab

void closeByTab ( int  id)
protectedslot

Closes the window corresponding to the data of the tab with identifier id.

References TOPPViewBase::updateMenu(), and TOPPViewBase::window_().

Referenced by TOPPViewBase::TOPPViewBase().

◆ closeEvent()

void closeEvent ( QCloseEvent *  event)
overrideprotected

References TOPPViewBase::ws_.

◆ closeFile

void closeFile ( )
slot

closes the active window

References TOPPViewBase::updateMenu(), and TOPPViewBase::ws_.

Referenced by TOPPViewBase::TOPPViewBase().

◆ containsIMData()

bool containsIMData ( const MSSpectrum s)
static

Returns true if contains ion mobility data.

References MSSpectrum::getFloatDataArrays().

Referenced by TOPPViewBase::showCurrentPeaksAsIonMobility().

◆ containsMS1Scans()

bool containsMS1Scans ( const ExperimentType exp)
static

Returns true if contains at least one MS1 spectrum.

References MSExperiment::size().

Referenced by TOPPViewBase::addDataFile(), TOPPViewBase::estimateNoiseFromRandomMS1Scans(), and TOPPViewBase::hasMS1Zeros().

◆ copyLayer

void copyLayer ( const QMimeData *  data,
QWidget source,
int  id = -1 
)
protectedslot

◆ editMetadata

void editMetadata ( )
slot

◆ enhancedWorkspaceWindowChanged

void enhancedWorkspaceWindowChanged ( int  id)
protectedslot

◆ estimateNoiseFromRandomMS1Scans()

float estimateNoiseFromRandomMS1Scans ( const ExperimentType exp,
UInt  n_scans = 10 
)

Estimates the noise by evaluating n_scans random scans of MS level 1. Assumes that 4/5 of intensities is noise.

References TOPPViewBase::containsMS1Scans(), MSExperiment::end(), and MSExperiment::size().

Referenced by TOPPViewBase::addData().

◆ fileChanged_

void fileChanged_ ( const String filename)
protectedslot

◆ filterContextMenu

void filterContextMenu ( const QPoint &  pos)
protectedslot

◆ filterEdit

void filterEdit ( QListWidgetItem *  item)
protectedslot

◆ finishTOPPToolExecution

void finishTOPPToolExecution ( int  exitCode,
QProcess::ExitStatus  exitStatus 
)
protectedslot

◆ getActive1DWidget()

Spectrum1DWidget * getActive1DWidget ( ) const

◆ getActive2DWidget()

Spectrum2DWidget * getActive2DWidget ( ) const

◆ getActive3DWidget()

Spectrum3DWidget * getActive3DWidget ( ) const

returns a pointer to the active Spectrum3DWidget (0 the active window is no Spectrum2DWidget or there is no active window)

References TOPPViewBase::getActiveSpectrumWidget().

Referenced by TOPPViewBase::loadFiles(), and TOPPViewBase::updateToolBar().

◆ getActiveCanvas()

SpectrumCanvas * getActiveCanvas ( ) const

◆ getActiveSpectrumWidget()

SpectrumWidget * getActiveSpectrumWidget ( ) const

◆ getCurrentLayer()

const LayerData * getCurrentLayer ( ) const

◆ getFileList_()

QStringList getFileList_ ( const String path_overwrite = "")
protected

◆ getFilenamesOfOpenFiles_()

std::set< String > getFilenamesOfOpenFiles_ ( )
protected

◆ getSpectraIdentificationViewWidget()

SpectraIdentificationViewWidget * getSpectraIdentificationViewWidget ( )

◆ getSpectrumParameters()

Param getSpectrumParameters ( UInt  dim)

◆ getWorkspace()

EnhancedWorkspace * getWorkspace ( ) const

returns a pointer to the EnhancedWorkspace containing SpectrumWidgets

References TOPPViewBase::ws_.

◆ hasMS1Zeros()

bool hasMS1Zeros ( const ExperimentType exp)
static

Returns true of experiment has at least one exact zero valued peak in any of its MS1 spectra.

References TOPPViewBase::containsMS1Scans(), and MSExperiment::size().

Referenced by TOPPViewBase::addData().

◆ hasPeptideIdentifications()

bool hasPeptideIdentifications ( const ExperimentType map)
static

Returns true if the experiment map contains peptide identifications.

References MSExperiment::empty(), and MSExperiment::size().

Referenced by TOPPViewBase::enhancedWorkspaceWindowChanged().

◆ initializeDefaultParameters_()

void initializeDefaultParameters_ ( )
protected

◆ layerActivated

void layerActivated ( )
slot

◆ layerContextMenu

void layerContextMenu ( const QPoint &  pos)
protectedslot

◆ layerDeactivated

void layerDeactivated ( )
slot

gets called if a layer got deactivated

◆ layerEdit

void layerEdit ( QListWidgetItem *  )
protectedslot

slot for editing the preferences of the current layer

References TOPPViewBase::getActiveCanvas(), and SpectrumCanvas::showCurrentLayerPreferences().

Referenced by TOPPViewBase::TOPPViewBase().

◆ layerFilterVisibilityChange

void layerFilterVisibilityChange ( bool  on)
protectedslot

Enables/disables the data filters for the current layer.

References SpectrumCanvas::changeLayerFilterState(), and TOPPViewBase::getActiveCanvas().

Referenced by TOPPViewBase::TOPPViewBase().

◆ layerSelectionChange

void layerSelectionChange ( int  i)
protectedslot

◆ layerStatistics

void layerStatistics ( )
slot

Shows statistics (count,min,max,avg) about Intensity, Quality, Charge and meta data.

References TOPPViewBase::getActiveSpectrumWidget(), SpectrumWidget::showStatistics(), and TOPPViewBase::updateFilterBar().

Referenced by TOPPViewBase::TOPPViewBase().

◆ layerVisibilityChange

void layerVisibilityChange ( QListWidgetItem *  item)
protectedslot

◆ layerZoomChanged

void layerZoomChanged ( )
slot

◆ linkZoom

void linkZoom ( )
slot

link the zoom of individual windows

References TOPPViewBase::linkZoom_action_, and TOPPViewBase::zoom_together_.

Referenced by TOPPViewBase::TOPPViewBase().

◆ loadFile

void loadFile ( QString  filename)
slot

Loads a file given by the passed string.

References TOPPViewBase::addDataFile().

◆ loadFiles()

void loadFiles ( const StringList list,
QSplashScreen *  splash_screen 
)

◆ loadPreferences()

void loadPreferences ( String  filename = "")

◆ logContextMenu

void logContextMenu ( const QPoint &  pos)
protectedslot

slot for log window context menu

References TOPPViewBase::log_.

Referenced by TOPPViewBase::TOPPViewBase().

◆ metadataFileDialog

void metadataFileDialog ( )
slot

◆ openExampleDialog

void openExampleDialog ( )
slot

shows the file dialog for opening example files

References TOPPViewBase::addDataFile(), TOPPViewBase::getFileList_(), and File::getOpenMSDataPath().

Referenced by TOPPViewBase::TOPPViewBase().

◆ openFileDialog

void openFileDialog ( )
slot

shows the file dialog for opening files

References TOPPViewBase::addDataFile(), and TOPPViewBase::getFileList_().

Referenced by TOPPViewBase::TOPPViewBase().

◆ openRecentFile

void openRecentFile ( )
protectedslot

Opens a file from the recent files menu.

References TOPPViewBase::addDataFile().

Referenced by TOPPViewBase::TOPPViewBase().

◆ preferencesDialog

void preferencesDialog ( )
slot

◆ rerunTOPPTool

void rerunTOPPTool ( )
protectedslot

◆ resetZoom

void resetZoom ( )
slot

◆ runTOPPTool_()

void runTOPPTool_ ( )
protected

◆ saveLayerAll

void saveLayerAll ( )
slot

Saves the whole current layer data.

References TOPPViewBase::getActiveCanvas(), and SpectrumCanvas::saveCurrentLayer().

Referenced by TOPPViewBase::TOPPViewBase().

◆ saveLayerVisible

void saveLayerVisible ( )
slot

Saves the visible layer data.

References TOPPViewBase::getActiveCanvas(), and SpectrumCanvas::saveCurrentLayer().

Referenced by TOPPViewBase::TOPPViewBase().

◆ savePreferences()

void savePreferences ( )

◆ setDrawMode1D

void setDrawMode1D ( int  index)
slot

◆ setIntensityMode

void setIntensityMode ( int  index)
slot

◆ showAboutDialog

void showAboutDialog ( )
slot

Shows the 'About' dialog.

References QApplicationTOPP::showAboutDialog().

Referenced by TOPPViewBase::TOPPViewBase().

◆ showCurrentPeaksAs2D

void showCurrentPeaksAs2D ( )
slot

◆ showCurrentPeaksAs3D

void showCurrentPeaksAs3D ( )
slot

◆ showCurrentPeaksAsDIA

void showCurrentPeaksAsDIA ( )
slot

◆ showCurrentPeaksAsIonMobility

void showCurrentPeaksAsIonMobility ( )
slot

◆ showCursorStatus

void showCursorStatus ( double  mz,
double  rt 
)
slot

◆ showCursorStatusInvert

void showCursorStatusInvert ( double  mz,
double  rt 
)
slot

shows m/z and rt in the status bar (inverting RT and m/z)

References TOPPViewBase::showCursorStatus().

Referenced by TOPPViewBase::showSpectrumWidgetInWindow().

◆ showGoToDialog

void showGoToDialog ( )
slot

shows the DB dialog for opening files

References TOPPViewBase::getActiveSpectrumWidget(), and SpectrumWidget::showGoToDialog().

Referenced by TOPPViewBase::TOPPViewBase().

◆ showLogMessage_()

void showLogMessage_ ( TOPPViewBase::LogState  state,
const String heading,
const String body 
)
protected

◆ showPreferences

void showPreferences ( )
slot

◆ showSpectrumAlignmentDialog

void showSpectrumAlignmentDialog ( )
slot

◆ showSpectrumAs1D [1/2]

void showSpectrumAs1D ( int  index)
slot

◆ showSpectrumAs1D [2/2]

void showSpectrumAs1D ( std::vector< int, std::allocator< int > >  indices)
slot

◆ showSpectrumBrowser

void showSpectrumBrowser ( )
protectedslot

shows the spectrum browser and updates it

References TOPPViewBase::updateViewBar(), and TOPPViewBase::views_dockwidget_.

◆ showSpectrumGenerationDialog

void showSpectrumGenerationDialog ( )
slot

◆ showSpectrumMetaData

void showSpectrumMetaData ( int  spectrum_index)
protectedslot

shows the spectrum metadata

References TOPPViewBase::getActiveCanvas(), and SpectrumCanvas::showMetaData().

Referenced by TOPPViewBase::TOPPViewBase().

◆ showSpectrumWidgetInWindow()

void showSpectrumWidgetInWindow ( SpectrumWidget sw,
const String caption 
)

◆ showStatusMessage

void showStatusMessage ( std::string  msg,
OpenMS::UInt  time 
)
slot

Shows a status message in the status bar.

If time is 0 the status message is displayed until showStatusMessage is called with an empty message or a new message. Otherwise the message is displayed for time ms.

References TOPPViewBase::message_label_.

Referenced by TOPPViewBase::showSpectrumWidgetInWindow().

◆ showTOPPDialog

void showTOPPDialog ( )
slot

Apply TOPP tool.

References TOPPViewBase::showTOPPDialog_().

Referenced by TOPPViewBase::TOPPViewBase().

◆ showTOPPDialog_()

void showTOPPDialog_ ( bool  visible)
protected

◆ showURL

void showURL ( )
slot

shows the URL stored in the data of the sender QAction

References GUIHelpers::openURL().

Referenced by TOPPViewBase::TOPPViewBase().

◆ tileHorizontal

void tileHorizontal ( )
slot

◆ tileVertical

void tileVertical ( )
slot

◆ toggleAxisLegends

void toggleAxisLegends ( )
slot

◆ toggleGridLines

void toggleGridLines ( )
slot

Toggles the grid lines.

References TOPPViewBase::getActiveCanvas(), and SpectrumCanvas::showGridLines().

Referenced by TOPPViewBase::TOPPViewBase().

◆ toggleProjections

void toggleProjections ( )
slot

◆ updateCurrentPath

void updateCurrentPath ( )
slot

◆ updateFilterBar

void updateFilterBar ( )
slot

◆ updateLayerBar

void updateLayerBar ( )
slot

◆ updateMenu

void updateMenu ( )
slot

◆ updateProcessLog

void updateProcessLog ( )
protectedslot

Appends process output to log window.

References TOPPViewBase::log_, and TOPPViewBase::topp_.

Referenced by TOPPViewBase::runTOPPTool_().

◆ updateRecentMenu_()

void updateRecentMenu_ ( )
protected

◆ updateTabBar

void updateTabBar ( QMdiSubWindow *  w)
slot

brings the tab corresponding to the active window in front

References EnhancedTabBarWidgetInterface::getWindowId(), EnhancedTabBar::setCurrentId(), TOPPViewBase::tab_bar_, and TOPPViewBase::window_id.

Referenced by TOPPViewBase::TOPPViewBase().

◆ updateToolBar

void updateToolBar ( )
slot

◆ updateViewBar

void updateViewBar ( )
slot

◆ viewChanged

void viewChanged ( int  tab_index)
slot

◆ viewTabwidgetDoubleClicked

void viewTabwidgetDoubleClicked ( int  tab_index)
slot

◆ window_()

EnhancedTabBarWidgetInterface * window_ ( int  id) const
protected

Friends And Related Function Documentation

◆ TestTOPPView

friend class TestTOPPView
friend

Member Data Documentation

◆ add_2d_context_

QMenu* add_2d_context_
protected

Additional context menu for 2D layers.

◆ CAPTION_3D_SUFFIX_

const String CAPTION_3D_SUFFIX_ = " (3D)"
staticprivate

◆ current_path_

String current_path_
protected

The current path (used for loading and storing). Depending on the preferences this is static or changes with the current window/layer.

Referenced by TOPPViewBase::annotateWithID(), TOPPViewBase::getFileList_(), TOPPViewBase::showTOPPDialog_(), TOPPViewBase::TOPPViewBase(), and TOPPViewBase::updateCurrentPath().

◆ dm_elements_2d_

QAction* dm_elements_2d_
protected

◆ dm_hull_2d_

QAction* dm_hull_2d_
protected

◆ dm_hulls_2d_

QAction* dm_hulls_2d_
protected

◆ dm_ident_2d_

QAction* dm_ident_2d_
protected

◆ dm_label_2d_

QToolButton* dm_label_2d_
protected

◆ dm_precursors_2d_

QAction* dm_precursors_2d_
protected

◆ dm_unassigned_2d_

QToolButton* dm_unassigned_2d_
protected

◆ draw_group_1d_

QButtonGroup* draw_group_1d_
protected

◆ file_name

String file_name

◆ filter_dock_widget_

QDockWidget* filter_dock_widget_
protected

◆ filters_

QListWidget* filters_
protected

◆ filters_check_box_

QCheckBox* filters_check_box_
protected

◆ group_label_2d_

QActionGroup* group_label_2d_
protected

◆ group_unassigned_2d_

QActionGroup* group_unassigned_2d_
protected

◆ identificationview_behavior_

TOPPViewIdentificationViewBehavior* identificationview_behavior_
protected

◆ in

String in

◆ intensity_button_group_

QButtonGroup* intensity_button_group_
protected

◆ layer_dock_widget_

QDockWidget* layer_dock_widget_
protected

◆ layer_manager_

QListWidget* layer_manager_
protected

◆ layer_name

String layer_name

◆ linkZoom_action_

QAction* linkZoom_action_
protected

◆ log_

QTextEdit* log_
protected

◆ message_label_

QLabel* message_label_
protected

Label for messages in the status bar.

Referenced by TOPPViewBase::showCursorStatus(), TOPPViewBase::showStatusMessage(), and TOPPViewBase::TOPPViewBase().

◆ mz_label_

QLabel* mz_label_
protected

m/z label for messages in the status bar

Referenced by TOPPViewBase::showCursorStatus(), and TOPPViewBase::TOPPViewBase().

◆ out

String out

◆ param

Param param

◆ process

QProcess* process

◆ projections_2d_

QAction* projections_2d_
protected

◆ recent_actions_

std::vector<QAction*> recent_actions_
protected

list of the recently opened files actions (menu entries)

Referenced by TOPPViewBase::TOPPViewBase(), and TOPPViewBase::updateRecentMenu_().

◆ recent_files_

QStringList recent_files_
protected

◆ rt_label_

QLabel* rt_label_
protected

RT label for messages in the status bar.

Referenced by TOPPViewBase::showCursorStatus(), and TOPPViewBase::TOPPViewBase().

◆ spectra_identification_view_widget_

SpectraIdentificationViewWidget* spectra_identification_view_widget_
protected

◆ spectra_view_widget_

SpectraViewWidget* spectra_view_widget_
protected

◆ spectraview_behavior_

TOPPViewSpectraViewBehavior* spectraview_behavior_
protected

◆ spectrum_id

Size spectrum_id

◆ tab_bar_

EnhancedTabBar* tab_bar_
protected

Tab bar. The address of the corresponding window to a tab is stored as an int in tabData()

Referenced by TOPPViewBase::layerContextMenu(), TOPPViewBase::showSpectrumWidgetInWindow(), TOPPViewBase::TOPPViewBase(), and TOPPViewBase::updateTabBar().

◆ timer

QTime timer

◆ tool

String tool

◆ tool_bar_

QToolBar* tool_bar_
protected

◆ tool_bar_1d_

QToolBar* tool_bar_1d_
protected

◆ tool_bar_2d_cons_

QToolBar* tool_bar_2d_cons_
protected

◆ tool_bar_2d_feat_

QToolBar* tool_bar_2d_feat_
protected

◆ tool_bar_2d_ident_

QToolBar* tool_bar_2d_ident_
protected

◆ tool_bar_2d_peak_

QToolBar* tool_bar_2d_peak_
protected

◆ topp_

struct { ... } topp_

◆ views_dockwidget_

QDockWidget* views_dockwidget_
protected

◆ views_tabwidget_

QTabWidget* views_tabwidget_
protected

◆ visible

bool visible

◆ watcher_

FileWatcher* watcher_
protected

Watcher that tracks file changes (in order to update the data in the different views)

Referenced by TOPPViewBase::addDataFile(), TOPPViewBase::fileChanged_(), and TOPPViewBase::TOPPViewBase().

◆ watcher_msgbox_

bool watcher_msgbox_
protected

Holds the messageboxes for each layer that are currently popped up (to avoid popping them up again, if file changes again before the messagebox is closed)

Referenced by TOPPViewBase::fileChanged_().

◆ window_id

UInt window_id

◆ ws_

EnhancedWorkspace* ws_
protected

◆ zoom_together_

bool zoom_together_
protected

Stores whether the individual windows should zoom together (be linked) or not.

Referenced by TOPPViewBase::layerZoomChanged(), TOPPViewBase::linkZoom(), and TOPPViewBase::TOPPViewBase().