12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
32 #include <QtWidgets/QMainWindow>
33 #include <QtWidgets/QButtonGroup>
34 #include <QtWidgets/QActionGroup>
35 #include <QtCore/QStringList>
36 #include <QtCore/QProcess>
37 #include <QElapsedTimer>
44 class QListWidgetItem;
46 class QTreeWidgetItem;
56 class DataSelectionTabs;
60 class MultiGradientSelector;
106 friend class TestTOPPView;
140 SCAN_IF_NEWER_VERSION,
152 explicit TOPPViewBase(TOOL_SCAN scan_mode = TOOL_SCAN::SCAN_IF_NEWER_VERSION, VERBOSITY verbosity = VERBOSITY::DEFAULT,
QWidget* parent =
nullptr);
161 FILETYPE_UNSUPPORTED,
177 LOAD_RESULT addDataFile(
const String& filename,
bool show_options,
bool add_to_recent,
String caption =
"",
UInt window_id = 0,
Size spectrum_id = 0);
196 void addData(
const FeatureMapSharedPtrType& feature_map,
197 const ConsensusMapSharedPtrType& consensus_map,
198 std::vector<PeptideIdentification>& peptides,
199 const ExperimentSharedPtrType& peak_map,
200 const ODExperimentSharedPtrType& on_disc_peak_map,
204 bool as_new_window =
true,
205 const String& filename =
"",
206 const String& caption =
"",
208 Size spectrum_id = 0);
211 void loadFiles(
const StringList& list, QSplashScreen* splash_screen);
218 void loadPreferences(
String filename =
"");
221 void savePreferences();
224 Param getCanvasParameters(
UInt dim)
const;
259 void updateCurrentPath();
261 void openFilesByDialog(
const String& initial_directory =
"");
263 void showGoToDialog()
const;
265 void preferencesDialog();
267 void layerStatistics()
const;
271 void layerActivated();
273 void zoomOtherWindows()
const;
277 void layerDeactivated();
282 void rerunTOPPTool();
285 void updateBarsAndMenus();
287 void updateToolBar();
289 void updateLayerBar();
291 void updateViewBar();
295 void updateFilterBar();
302 void showStatusMessage(
const std::string& msg,
OpenMS::UInt time);
304 void showCursorStatus(
const String& x,
const String& y);
306 void showTOPPDialog();
308 void annotateWithAMS();
310 void annotateWithID();
312 void annotateWithOSW();
314 void showSpectrumGenerationDialog();
316 void showSpectrumAlignmentDialog();
318 void showCurrentPeaksAs2D();
320 void showCurrentPeaksAs3D();
322 void showCurrentPeaksAsIonMobility(
const MSSpectrum& spec);
326 void saveLayerAll()
const;
328 void saveLayerVisible()
const;
330 void toggleGridLines()
const;
332 void toggleAxisLegends()
const;
334 void toggleInterestingMZs()
const;
336 void showPreferences()
const;
338 void metadataFileDialog();
343 void setDrawMode1D(
int)
const;
344 void setIntensityMode(
int);
345 void changeLayerFlag(
bool);
346 void changeLabel(QAction*);
347 void changeUnassigned(QAction*);
348 void resetZoom()
const;
349 void toggleProjections();
354 void openFile(
const String& filename);
357 void layerFilterVisibilityChange(
bool)
const;
360 void showSpectrumMetaData(
int spectrum_index)
const;
364 void finishTOPPToolExecution(
int exitCode, QProcess::ExitStatus exitStatus);
366 void abortTOPPTool();
368 void showSpectrumBrowser();
374 void closeByTab(
int id);
376 void showWindow(
int id);
378 void copyLayer(
const QMimeData* data,
QWidget* source,
int id = -1);
382 void updateProcessLog();
385 void fileChanged_(
const String&);
388 void initializeDefaultParameters_();
393 QStringList chooseFilesDialog_(
const String& path_overwrite =
"");
416 bool watcher_msgbox_ =
false;
419 bool zoom_together_ =
false;
466 QMdiSubWindow* lastActiveSubwindow_ =
nullptr;
487 void addRecentFile_(
const String& filename);
510 bool visible_area_only;
518 void closeEvent(QCloseEvent* event)
override;
525 void showTOPPDialog_(
bool visible);
A container for consensus elements.
Definition: ConsensusMap.h:66
A tabbed view, to browse lists of spectra or identifications.
Definition: DataSelectionTabs.h:51
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:36
Definition: EnhancedWorkspace.h:27
A container for features.
Definition: FeatureMap.h:80
Watcher that monitors file changes.
Definition: FileWatcher.h:41
A widget which shows a list of DataFilter items.
Definition: FilterList.h:35
Class that stores the data for one layer.
Definition: LayerDataBase.h:169
Pimped QListView for Layers of a Canvas.
Definition: LayerListView.h:28
A log window (QTextEdit) with convenience functions.
Definition: LogWindow.h:29
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Management and storage of parameters / INI files.
Definition: Param.h:44
Base class for visualization canvas classes.
Definition: PlotCanvas.h:120
Precursor meta information.
Definition: Precursor.h:35
A more convenient string class.
Definition: String.h:34
Main window of TOPPView tool.
Definition: TOPPViewBase.h:103
QDockWidget * filter_dock_widget_
Definition: TOPPViewBase.h:399
QLabel * y_label_
y-axis label for messages in the status bar
Definition: TOPPViewBase.h:482
TheoreticalSpectrumGenerationDialog spec_gen_dialog_
This dialog is a member so that its settings can be perserved upon closing.
Definition: TOPPViewBase.h:536
QDockWidget * views_dockwidget_
Definition: TOPPViewBase.h:398
LayerDataBase::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Definition: TOPPViewBase.h:119
TOPPViewMenu menu_
manages the menu items (active/inactive) and recent files etc
Definition: TOPPViewBase.h:472
VERBOSITY verbosity_
Verbosity of TV.
Definition: TOPPViewBase.h:430
TOOL_SCAN
Used for deciding whether new tool/util params should be generated or reused from TOPPView's ini file...
Definition: TOPPViewBase.h:133
LayerDataBase::FeatureMapSharedPtrType FeatureMapSharedPtrType
Definition: TOPPViewBase.h:114
QToolButton * dm_label_2d_
Definition: TOPPViewBase.h:452
QButtonGroup * draw_group_1d_
Definition: TOPPViewBase.h:442
ExperimentType::SpectrumType SpectrumType
Peak spectrum type.
Definition: TOPPViewBase.h:128
QToolBar * tool_bar_2d_feat_
Definition: TOPPViewBase.h:446
static const String CAPTION_3D_SUFFIX_
Suffix appended to caption of tabs when layer is shown in 3D.
Definition: TOPPViewBase.h:533
EnhancedTabBar tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData()
Definition: TOPPViewBase.h:468
QActionGroup * group_label_2d_
Definition: TOPPViewBase.h:453
TVToolDiscovery tool_scanner_
Scans for tools and generates a param for each.
Definition: TOPPViewBase.h:427
FilterList * filter_list_
Definition: TOPPViewBase.h:409
QAction * dm_precursors_2d_
Definition: TOPPViewBase.h:449
void checkPreferences_()
check if all available preferences get set by the .ini file. If there are some missing entries fill t...
QButtonGroup * intensity_button_group_
Definition: TOPPViewBase.h:438
QActionGroup * group_unassigned_2d_
Definition: TOPPViewBase.h:455
QAction * dm_hull_2d_
Definition: TOPPViewBase.h:450
DataSelectionTabs * selection_view_
Definition: TOPPViewBase.h:405
QAction * dm_ident_2d_
Definition: TOPPViewBase.h:458
LayerDataBase::FeatureMapType FeatureMapType
Definition: TOPPViewBase.h:112
QAction * dm_hulls_2d_
Definition: TOPPViewBase.h:451
EnhancedWorkspace ws_
Main workspace.
Definition: TOPPViewBase.h:462
QToolBar * tool_bar_2d_peak_
Definition: TOPPViewBase.h:445
QAction * dm_elements_2d_
Definition: TOPPViewBase.h:456
TOOL_SCAN scan_mode_
Determines TVToolDiscovery scans for tools and generates new params.
Definition: TOPPViewBase.h:425
VERBOSITY
Definition: TOPPViewBase.h:146
RecentFilesMenu recent_files_
manages recent list of filenames and the menu that goes with it
Definition: TOPPViewBase.h:470
QAction * projections_2d_
Definition: TOPPViewBase.h:457
QLabel * message_label_
Label for messages in the status bar.
Definition: TOPPViewBase.h:478
QMenu * add_2d_context_
Additional context menu for 2D layers.
Definition: TOPPViewBase.h:522
LayerListView * layers_view_
Layer management widget.
Definition: TOPPViewBase.h:403
LOAD_RESULT
Definition: TOPPViewBase.h:157
QToolBar * tool_bar_
Definition: TOPPViewBase.h:435
QLabel * x_label_
x-axis label for messages in the status bar
Definition: TOPPViewBase.h:480
QToolBar * tool_bar_2d_cons_
Definition: TOPPViewBase.h:447
QToolButton * dm_unassigned_2d_
Definition: TOPPViewBase.h:454
String current_path_
Definition: TOPPViewBase.h:529
LayerDataBase::ConsensusMapType ConsensusMapType
Definition: TOPPViewBase.h:117
LayerDataBase::ExperimentSharedPtrType ExperimentSharedPtrType
Definition: TOPPViewBase.h:124
QToolBar * tool_bar_1d_
Definition: TOPPViewBase.h:441
QToolBar * tool_bar_2d_ident_
Definition: TOPPViewBase.h:448
LayerDataBase::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: TOPPViewBase.h:126
QDockWidget * layer_dock_widget_
Definition: TOPPViewBase.h:397
LogWindow * log_
Log output window.
Definition: TOPPViewBase.h:422
LayerDataBase::ExperimentType ExperimentType
Definition: TOPPViewBase.h:122
Dialog which allows to enter an AA or NA sequence and generates a theoretical spectrum for it.
Definition: TheoreticalSpectrumGenerationDialog.h:49
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerDataBase.h:126
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerDataBase.h:131
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerDataBase.h:114
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerDataBase.h:120
DataType
Definition: LayerDataBase.h:73