Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Slots | Public Member Functions | Static Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends

TOPPViewBase Class Reference
[TOPPView]

Main window of TOPPView tool. More...

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

Inheritance diagram for TOPPViewBase:
QMainWindow DefaultParamHandler

List of all members.

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
ExperimentType::SpectrumType 
SpectrumType
 Peak spectrum type.

Public Slots

void updateCurrentPath ()
 changes the current path according to the currently active window/layer
void showURL ()
 shows the URL stored in the data of the sender QAction
void openFileDialog ()
 shows the file dialog for opening files
void openExampleDialog ()
 shows the file dialog for opening example files
void openDatabaseDialog ()
 shows the DB dialog for opening files
void showGoToDialog ()
 shows the goto dialog
void preferencesDialog ()
 shows the preferences dialog
void layerStatistics ()
 Shows statistics (count,min,max,avg) about Intensity, Quality, Charge and meta data.
void editMetadata ()
 lets the user edit the meta data of a layer
void layerActivated ()
 get's called if a layer got activated
void layerZoomChanged ()
 gets called when a layer changes in zoom
void linkZoom ()
 link the zoom of individual windows
void layerDeactivated ()
 get's called if a layer got deactivated
void activate1DSpectrum (int index)
 Activation of 1D spectrum.
void activate1DSpectrum (std::vector< int, std::allocator< int > > indices)
 Activation of 1D with multiple entries (e.g. chromatograms).
void deactivate1DSpectrum (int index)
 Deactivation of 1D spectrum.
void closeFile ()
 closes the active window
void updateToolBar ()
 updates the toolbar
void updateLayerBar ()
 adapts the layer bar to the active window
void updateViewBar ()
 adapts view bar to the active window
void viewChanged (int)
 changes the behavior according to the selected view in the spectra view bar and calls updateSpectraViewBar()
void updateFilterBar ()
 adapts the filter bar to the active window
void updateMenu ()
 enabled/disabled menu entries depending on the current state
void updateTabBar (QWidget *w)
 brings the tab corresponding to the active window in front
void tileVertical ()
 tile the open windows vertically
void tileHorizontal ()
 tile the open windows horizontally
void showStatusMessage (std::string msg, OpenMS::UInt time)
 Shows a status message in the status bar.
void showCursorStatus (double mz, double rt)
 shows m/z and rt in the status bar
void showCursorStatusInvert (double mz, double rt)
 shows m/z and rt in the status bar (inverting RT and m/z)
void showTOPPDialog ()
 Apply TOPP tool.
void annotateWithID ()
 Annotates current layer with ID data.
void showSpectrumGenerationDialog ()
 Shows the theoretical spectrum generation dialog.
void showSpectrumAlignmentDialog ()
 Shows the spectrum alignment dialog.
void showSpectrumAs1D (int index)
 Shows the spectrum with index index of the active layer in 1D.
void showSpectrumAs1D (std::vector< int, std::allocator< int > > indices)
void showCurrentPeaksAs2D ()
 Shows the current peak data of the active layer in 2D.
void showCurrentPeaksAs3D ()
 Shows the current peak data of the active layer in 3D.
void showAboutDialog ()
 Shows the 'About' dialog.
void saveLayerAll ()
 Saves the whole current layer data.
void saveLayerVisible ()
 Saves the visible layer data.
void toggleGridLines ()
 Toggles the grid lines.
void toggleAxisLegends ()
 Toggles the axis legends.
void showPreferences ()
 Shows current layer preferences.
void metadataDatabaseDialog ()
 dialog for inspecting database meta data
void metadataFileDialog ()
 dialog for inspecting file meta data
void loadFile (QString)
 Loads a file given by the passed string.
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=0)
 Constructor.
 ~TOPPViewBase ()
 Destructor.
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.
void addDataDB (UInt db_id, bool show_options, String caption="", UInt window_id=0)
 Opens and displays a data from a database.
void addData (FeatureMapSharedPtrType feature_map, ConsensusMapSharedPtrType consensus_map, std::vector< PeptideIdentification > &peptides, ExperimentSharedPtrType 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.
void loadFiles (const StringList &list, QSplashScreen *splash_screen)
 Opens all the files in the string list.
void loadPreferences (String filename="")
 Loads the preferences from the filename given.
void savePreferences ()
 Stores the preferences (used when this window is closed).
Param getSpectrumParameters (UInt dim)
 Returns the parameters for a SpectrumCanvas of dimension dim.
const LayerDatagetCurrentLayer () const
 Returns the active Layer data (0 if no layer is active).
SpectrumCanvasgetActiveCanvas () const
 returns a pointer to the active SpectrumCanvas (0 if none is active)
SpectraIdentificationViewWidgetgetSpectraIdentificationViewWidget ()
 returns a pointer to the SpectraIdentificationViewWidget
void showSpectrumWidgetInWindow (SpectrumWidget *sw, const String &caption)
 Opens the provided spectrum widget in a new window.
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.

EnhancedWorkspacegetWorkspace () const
 returns a pointer to the EnhancedWorkspace containing SpectrumWidgets
SpectrumWidgetgetActiveSpectrumWidget () const
 returns a pointer to the active SpectrumWidget (0 if none is active)
Spectrum1DWidgetgetActive1DWidget () const
 returns a pointer to the active Spectrum1DWidget (0 the active window is no Spectrum1DWidget or there is no active window)
Spectrum2DWidgetgetActive2DWidget () const
 returns a pointer to the active Spectrum2DWidget (0 the active window is no Spectrum2DWidget or there is no active window)
Spectrum3DWidgetgetActive3DWidget () const
 returns a pointer to the active Spectrum3DWidget (0 the active window is no Spectrum2DWidget or there is no active window)

Static Public Member Functions

static bool containsMS1Scans (const ExperimentType &exp)
 Returns true if contains at least one MS1 spectrum.
static UInt countMS1Zeros (const ExperimentType &exp)
 Counts the number of exact zero valued intensities in all MS1 spectra.
static bool hasPeptideIdentifications (const ExperimentType &map)
 Returns true if the experiment map contains peptide identifications.

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
void abortTOPPTool ()
 aborts the execution of a TOPP tool
void rerunTOPPTool ()
 retuns the last invoked TOPP tool with the same parameters
void showSpectrumBrowser ()
 shows the spectrum browser and updates it
void showSpectrumMetaData (int spectrum_index)
 shows the spectrum metadata
void updateProcessLog ()
 Appends process output to log window.
void fileChanged_ (const String &)
 Called if a data file has been externally changed.
Layer manager and filter manager slots

void layerSelectionChange (int)
 slot for layer manager selection change
void layerFilterVisibilityChange (bool)
 Enables/disables the data filters for the current layer.
void layerContextMenu (const QPoint &pos)
 slot for layer manager context menu
void logContextMenu (const QPoint &pos)
 slot for log window context menu
void layerVisibilityChange (QListWidgetItem *item)
 slot for layer manager visibility change (check box)
void filterContextMenu (const QPoint &pos)
 slot for filter manager context menu
void filterEdit (QListWidgetItem *item)
 slot for editing a filter
void layerEdit (QListWidgetItem *)
 slot for editing the preferences of the current layer
Tabbar slots

void closeByTab (int id)
 Closes the window corresponding to the data of the tab with identifier id.
void enhancedWorkspaceWindowChanged (int id)
 Raises the window corresponding to the data of the tab with identifier id.
void openRecentFile ()
 Opens a file from the recent files menu.
void copyLayer (const QMimeData *data, QWidget *source, int id=-1)
 Slot for drag-and-drop of layer manager to tabbar.

Protected Member Functions

void initializeDefaultParameters_ ()
 Initializes the default parameters on TOPPView construction.
std::set< StringgetFilenamesOfOpenFiles_ ()
 unique list of files referenced by all layers
void connectToDB_ (DBConnection &db)
 Tries to open a db connection (queries the user for the DB password).
QStringList getFileList_ (const String &path_overwrite="")
 Shows a dialog where the user can select files.
EnhancedTabBarWidgetInterfacewindow_ (int id) const
 Returns the enhanced tabbar widget with id id.
void checkPreferences_ ()
 check if all available preferences get set by the .ini file. If there are some missing entries fill them with default values.
void showLogMessage_ (LogState state, const String &heading, const String &body)
 Shows a log message in the log_ window.
void showTOPPDialog_ (bool visible)
 Apply TOPP tool. If visible is true, only the visible data is used, otherwise the whole layer is used.
reimplemented Qt events

void closeEvent (QCloseEvent *event)

Protected Attributes

QListWidgetlayer_manager_
 Layer management widget.
FileWatcherwatcher_
 Watcher that tracks file changes (in order to update the data in the different views).
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).
bool zoom_together_
 Stores whether the individual windows should zoom together (be linked) or not.
QAction * linkZoom_action_
QTextEditlog_
 Log output window.
EnhancedWorkspacews_
 Main workspace.
EnhancedTabBartab_bar_
 Tab bar. The address of the corresponding window to a tab is stored as an int in tabData().
QMenu * add_2d_context_
 Additional context menu for 2D layers.
String current_path_
QTabWidget * views_tabwidget_
 Tabwidget that hold the different views on the loaded data.
TOPPViewBehaviorInterfaceview_behavior_
 The current TOPPView view behavior.
TOPPViewIdentificationViewBehavioridentificationview_behavior_
 TOPPView behavior for the identification view.
TOPPViewSpectraViewBehaviorspectraview_behavior_
 TOPPView behavior for the spectra view.
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.
QLabel * mz_label_
 m/z label for messages in the status bar
QLabel * rt_label_
 RT label for messages in the status bar.

Static Private Attributes

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

Friends

class TestTOPPView

Recent files



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

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.
void runTOPPTool_ ()
 Runs the TOPP tool according to the information in topp_.

Detailed Description

Main window of TOPPView tool.

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)
Todo:
Add TOPPView live-tutorial (Stephan, Marc)

Member Typedef Documentation

Peak spectrum type.


Member Enumeration Documentation

enum LogState [protected]

Log message states.

Enumerator:
LS_NOTICE 

Notice.

LS_WARNING 

Warning.

LS_ERROR 

Fatal error.


Constructor & Destructor Documentation

TOPPViewBase ( QWidget parent = 0  ) 

Constructor.

References TOPPViewBase::activate1DSpectrum(), EnhancedTabBar::addTab(), TOPPViewBase::annotateWithID(), TOPPViewBase::changeLabel(), TOPPViewBase::changeLayerFlag(), TOPPViewBase::changeUnassigned(), TOPPViewBase::closeByTab(), TOPPViewBase::closeFile(), TOPPViewBase::copyLayer(), StringList::create(), TOPPViewBase::current_path_, TOPPViewBase::deactivate1DSpectrum(), 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(), File::exists(), TOPPViewBase::fileChanged_(), TOPPViewBase::filter_dock_widget_, TOPPViewBase::filterContextMenu(), TOPPViewBase::filterEdit(), TOPPViewBase::filters_, TOPPViewBase::filters_check_box_, File::getOpenMSDataPath(), 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::metadataDatabaseDialog(), TOPPViewBase::metadataFileDialog(), TOPPViewBase::mz_label_, LayerData::NamesOfLabelType, TOPPViewBase::openDatabaseDialog(), 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(), 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::view_behavior_, TOPPViewBase::viewChanged(), TOPPViewBase::views_dockwidget_, TOPPViewBase::views_tabwidget_, TOPPViewBase::watcher_, TOPPViewBase::ws_, and TOPPViewBase::zoom_together_.


Member Function Documentation

void abortTOPPTool (  )  [protected, slot]

aborts the execution of a TOPP tool

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

Referenced by TOPPViewBase::~TOPPViewBase().

void activate1DSpectrum ( int  index  )  [slot]
void activate1DSpectrum ( std::vector< int, std::allocator< int > >  indices  )  [slot]

Activation of 1D with multiple entries (e.g. chromatograms).

References TOPPViewBehaviorInterface::activate1DSpectrum(), TOPPViewBase::getActive1DWidget(), and TOPPViewBase::view_behavior_.

void addData ( FeatureMapSharedPtrType  feature_map,
ConsensusMapSharedPtrType  consensus_map,
std::vector< PeptideIdentification > &  peptides,
ExperimentSharedPtrType  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_map The feature data (empty if not feature data)
consensus_map The consensus feature data (empty if not consensus feature data)
peptides The peptide identifications (empty if not ID data)
peak_map The peak data (empty if not peak data)
data_type Type of the data
show_as_1d Force dataset to be opened in 1D mode (even if it contains several spectra)
show_options If the options dialog should be shown (otherwise the defaults are used)
filename source file name (if the data came from a file)
caption Sets the layer name and window caption of the data. If unset the file name is used. If set, the file is not monitored foro changes.
window_id in which window the file is opened if opened as a new layer (0 or default equals current
spectrum_id determines the spectrum to show in 1D view.

add filter

add filter

References Spectrum1DCanvas::activateSpectrum(), SpectrumCanvas::activeLayerIndex(), DataFilters::add(), SpectrumCanvas::addLayer(), Spectrum1DWidget::canvas(), SpectrumWidget::canvas(), TOPPViewBase::countMS1Zeros(), 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(), TOPPViewOpenDialog::isCutoffEnabled(), Spectrum2DCanvas::mergeIntoLayer(), LayerData::name, DataFilters::DataFilter::op, TOPPViewOpenDialog::openAsNewWindow(), DefaultParamHandler::param_, SpectrumCanvas::setFilters(), SpectrumCanvas::setLayerName(), TOPPViewOpenDialog::setMergeLayers(), TOPPViewBase::showSpectrumWidgetInWindow(), LayerData::type, TOPPViewBase::updateFilterBar(), TOPPViewBase::updateLayerBar(), TOPPViewBase::updateMenu(), TOPPViewBase::updateViewBar(), DataFilters::DataFilter::value, TOPPViewOpenDialog::viewMapAs1D(), TOPPViewOpenDialog::viewMapAs2D(), TOPPViewBase::views_tabwidget_, TOPPViewBase::window_(), and TOPPViewBase::ws_.

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

void addDataDB ( UInt  db_id,
bool  show_options,
String  caption = "",
UInt  window_id = 0 
)

Opens and displays a data from a database.

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

Parameters:
db_id The id in the database
show_options If the options dialog should be shown (otherwise the defaults are used)
caption Sets the layer name and window caption of the data. If unset the file name is used.
window_id in which window the file is opened if opened as a new layer (0 or default equals current window).

References TOPPViewBase::addData(), TOPPViewBase::connectToDB_(), LayerData::DT_CHROMATOGRAM, LayerData::DT_PEAK, DBConnection::executeQuery(), DBConnection::isConnected(), DBAdapter::loadExperiment(), and BaseException::what().

Referenced by TOPPViewBase::openDatabaseDialog().

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:
filename The file to open
show_options If the options dialog should be shown (otherwise the defaults are used)
caption Sets the layer name and window caption of the data. If unset the file name is used.
add_to_recent If the file should be added to the recent files after opening
window_id in which window the file is opened if opened as a new layer (0 or default equals current window).
spectrum_id determines the spectrum to show in 1D view.

References File::absolutePath(), TOPPViewBase::addData(), FileWatcher::addFile(), TOPPViewBase::addRecentFile_(), File::basename(), FileTypes::CONSENSUSXML, TOPPViewBase::containsMS1Scans(), File::exists(), FileTypes::FEATUREXML, FileHandler::getType(), ProgressLogger::GUI, FileTypes::IDXML, FileTypes::INI, FileHandler::loadExperiment(), TOPPViewBase::LS_ERROR, TOPPViewBase::showLogMessage_(), FileTypes::typeToName(), FileTypes::UNKNOWN, TOPPViewBase::watcher_, and BaseException::what().

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

void addRecentFile_ ( const String filename  )  [protected]
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.

void closeByTab ( int  id  )  [protected, slot]

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

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

Referenced by TOPPViewBase::TOPPViewBase().

void closeEvent ( QCloseEvent *  event  )  [protected]

References TOPPViewBase::ws_.

void closeFile (  )  [slot]

closes the active window

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

Referenced by TOPPViewBase::TOPPViewBase().

bool containsMS1Scans ( const ExperimentType exp  )  [static]

Returns true if contains at least one MS1 spectrum.

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

UInt countMS1Zeros ( const ExperimentType exp  )  [static]

Counts the number of exact zero valued intensities in all MS1 spectra.

References TOPPViewBase::containsMS1Scans().

Referenced by TOPPViewBase::addData().

void deactivate1DSpectrum ( int  index  )  [slot]
void enhancedWorkspaceWindowChanged ( int  id  )  [protected, slot]
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().

Referenced by TOPPViewBase::addData().

void finishTOPPToolExecution ( int  exitCode,
QProcess::ExitStatus  exitStatus 
) [protected, slot]
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().

QStringList getFileList_ ( const String path_overwrite = ""  )  [protected]
std::set< String > getFilenamesOfOpenFiles_ (  )  [protected]
SpectraIdentificationViewWidget * getSpectraIdentificationViewWidget (  ) 
EnhancedWorkspace * getWorkspace (  )  const

returns a pointer to the EnhancedWorkspace containing SpectrumWidgets

References TOPPViewBase::ws_.

bool hasPeptideIdentifications ( const ExperimentType map  )  [static]

Returns true if the experiment map contains peptide identifications.

Referenced by TOPPViewBase::enhancedWorkspaceWindowChanged().

void layerActivated (  )  [slot]
void layerDeactivated (  )  [slot]

get's called if a layer got deactivated

void layerEdit ( QListWidgetItem *   )  [protected, slot]

slot for editing the preferences of the current layer

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

Referenced by TOPPViewBase::TOPPViewBase().

void layerFilterVisibilityChange ( bool  on  )  [protected, slot]

Enables/disables the data filters for the current layer.

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

Referenced by TOPPViewBase::TOPPViewBase().

void layerSelectionChange ( int  i  )  [protected, slot]
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().

void layerVisibilityChange ( QListWidgetItem *  item  )  [protected, slot]
void linkZoom (  )  [slot]

link the zoom of individual windows

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

Referenced by TOPPViewBase::TOPPViewBase().

void loadFile ( QString  filename  )  [slot]

Loads a file given by the passed string.

References TOPPViewBase::addDataFile().

void logContextMenu ( const QPoint &  pos  )  [protected, slot]

slot for log window context menu

References TOPPViewBase::log_.

Referenced by TOPPViewBase::TOPPViewBase().

void openDatabaseDialog (  )  [slot]
void openExampleDialog (  )  [slot]

shows the file dialog for opening example files

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

Referenced by TOPPViewBase::TOPPViewBase().

void openFileDialog (  )  [slot]

shows the file dialog for opening files

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

Referenced by TOPPViewBase::TOPPViewBase().

void openRecentFile (  )  [protected, slot]

Opens a file from the recent files menu.

References TOPPViewBase::addDataFile().

Referenced by TOPPViewBase::TOPPViewBase().

void rerunTOPPTool (  )  [protected, slot]
void saveLayerAll (  )  [slot]

Saves the whole current layer data.

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

Referenced by TOPPViewBase::TOPPViewBase().

void saveLayerVisible (  )  [slot]

Saves the visible layer data.

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

Referenced by TOPPViewBase::TOPPViewBase().

void showAboutDialog (  )  [slot]

Shows the 'About' dialog.

References VersionInfo::getVersion().

Referenced by TOPPViewBase::TOPPViewBase().

void showCursorStatus ( double  mz,
double  rt 
) [slot]
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().

void showGoToDialog (  )  [slot]
void showPreferences (  )  [slot]
void showSpectrumBrowser (  )  [protected, slot]

shows the spectrum browser and updates it

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

void showSpectrumMetaData ( int  spectrum_index  )  [protected, slot]

shows the spectrum metadata

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

Referenced by TOPPViewBase::TOPPViewBase().

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().

void showTOPPDialog (  )  [slot]

Apply TOPP tool.

References TOPPViewBase::showTOPPDialog_().

Referenced by TOPPViewBase::TOPPViewBase().

void showURL (  )  [slot]

shows the URL stored in the data of the sender QAction

Referenced by TOPPViewBase::TOPPViewBase().

void tileHorizontal (  )  [slot]
void tileVertical (  )  [slot]
void toggleAxisLegends (  )  [slot]
void toggleGridLines (  )  [slot]

Toggles the grid lines.

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

Referenced by TOPPViewBase::TOPPViewBase().

void updateCurrentPath (  )  [slot]
void updateProcessLog (  )  [protected, slot]

Appends process output to log window.

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

Referenced by TOPPViewBase::runTOPPTool_().

void updateRecentMenu_ (  )  [protected]
void updateTabBar ( QWidget 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().

EnhancedTabBarWidgetInterface * window_ ( int  id  )  const [protected]

Friends And Related Function Documentation

friend class TestTOPPView [friend]

Member Data Documentation

QMenu* add_2d_context_ [protected]

Additional context menu for 2D layers.

const String CAPTION_3D_SUFFIX_ = " (3D)" [static, private]

Suffix appended to caption of tabs when layer is shown in 3D.

Referenced by TOPPViewBase::showCurrentPeaksAs2D(), and TOPPViewBase::showCurrentPeaksAs3D().

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().

QActionGroup* group_label_2d_ [protected]
QActionGroup* group_unassigned_2d_ [protected]
QDockWidget* layer_dock_widget_ [protected]
QLabel* message_label_ [protected]

Label for messages in the status bar.

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

QLabel* mz_label_ [protected]

m/z label for messages in the status bar

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

QAction* projections_2d_ [protected]
std::vector<QAction*> recent_actions_ [protected]

list of the recently opened files actions (menu entries)

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

QLabel* rt_label_ [protected]

RT label for messages in the status bar.

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

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().

QTime timer
QToolBar* tool_bar_ [protected]
QToolBar* tool_bar_1d_ [protected]
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().

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_().

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().


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:58 using doxygen 1.7.1