38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
58 #include <QtWidgets/QMainWindow>
59 #include <QtWidgets/QButtonGroup>
60 #include <QtWidgets/QActionGroup>
61 #include <QtCore/QStringList>
62 #include <QtCore/QProcess>
63 #include <QElapsedTimer>
70 class QListWidgetItem;
72 class QTreeWidgetItem;
82 class DataSelectionTabs;
86 class MultiGradientSelector;
132 friend class TestTOPPView;
166 SCAN_IF_NEWER_VERSION,
178 explicit TOPPViewBase(TOOL_SCAN scan_mode = TOOL_SCAN::SCAN_IF_NEWER_VERSION, VERBOSITY verbosity = VERBOSITY::DEFAULT,
QWidget* parent =
nullptr);
187 FILETYPE_UNSUPPORTED,
203 LOAD_RESULT addDataFile(
const String& filename,
bool show_options,
bool add_to_recent,
String caption =
"",
UInt window_id = 0,
Size spectrum_id = 0);
222 void addData(
const FeatureMapSharedPtrType& feature_map,
223 const ConsensusMapSharedPtrType& consensus_map,
224 std::vector<PeptideIdentification>& peptides,
225 const ExperimentSharedPtrType& peak_map,
226 const ODExperimentSharedPtrType& on_disc_peak_map,
230 bool as_new_window =
true,
231 const String& filename =
"",
232 const String& caption =
"",
234 Size spectrum_id = 0);
237 void loadFiles(
const StringList& list, QSplashScreen* splash_screen);
244 void loadPreferences(
String filename =
"");
247 void savePreferences();
250 Param getCanvasParameters(
UInt dim)
const;
285 void updateCurrentPath();
287 void openFilesByDialog(
const String& initial_directory =
"");
289 void showGoToDialog()
const;
291 void preferencesDialog();
293 void layerStatistics()
const;
297 void layerActivated();
299 void zoomOtherWindows()
const;
303 void layerDeactivated();
308 void rerunTOPPTool();
311 void updateBarsAndMenus();
313 void updateToolBar();
315 void updateLayerBar();
317 void updateViewBar();
321 void updateFilterBar();
328 void showStatusMessage(
const std::string& msg,
OpenMS::UInt time);
330 void showCursorStatus(
const String& x,
const String& y);
332 void showTOPPDialog();
334 void annotateWithAMS();
336 void annotateWithID();
338 void annotateWithOSW();
340 void showSpectrumGenerationDialog();
342 void showSpectrumAlignmentDialog();
344 void showCurrentPeaksAs2D();
346 void showCurrentPeaksAs3D();
348 void showCurrentPeaksAsIonMobility(
const MSSpectrum& spec);
352 void saveLayerAll()
const;
354 void saveLayerVisible()
const;
356 void toggleGridLines()
const;
358 void toggleAxisLegends()
const;
360 void toggleInterestingMZs()
const;
362 void showPreferences()
const;
364 void metadataFileDialog();
369 void setDrawMode1D(
int)
const;
370 void setIntensityMode(
int);
371 void changeLayerFlag(
bool);
372 void changeLabel(QAction*);
373 void changeUnassigned(QAction*);
374 void resetZoom()
const;
375 void toggleProjections();
380 void openFile(
const String& filename);
383 void layerFilterVisibilityChange(
bool)
const;
386 void showSpectrumMetaData(
int spectrum_index)
const;
390 void finishTOPPToolExecution(
int exitCode, QProcess::ExitStatus exitStatus);
392 void abortTOPPTool();
394 void showSpectrumBrowser();
400 void closeByTab(
int id);
402 void showWindow(
int id);
404 void copyLayer(
const QMimeData* data,
QWidget* source,
int id = -1);
408 void updateProcessLog();
411 void fileChanged_(
const String&);
414 void initializeDefaultParameters_();
419 QStringList chooseFilesDialog_(
const String& path_overwrite =
"");
442 bool watcher_msgbox_ =
false;
445 bool zoom_together_ =
false;
492 QMdiSubWindow* lastActiveSubwindow_ =
nullptr;
513 void addRecentFile_(
const String& filename);
536 bool visible_area_only;
544 void closeEvent(QCloseEvent* event)
override;
551 void showTOPPDialog_(
bool visible);
A container for consensus elements.
Definition: ConsensusMap.h:92
A tabbed view, to browse lists of spectra or identifications.
Definition: DataSelectionTabs.h:77
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:62
Definition: EnhancedWorkspace.h:53
A container for features.
Definition: FeatureMap.h:106
Watcher that monitors file changes.
Definition: FileWatcher.h:67
A widget which shows a list of DataFilter items.
Definition: FilterList.h:61
Class that stores the data for one layer.
Definition: LayerDataBase.h:195
Pimped QListView for Layers of a Canvas.
Definition: LayerListView.h:54
A log window (QTextEdit) with convenience functions.
Definition: LogWindow.h:55
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:72
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
Management and storage of parameters / INI files.
Definition: Param.h:70
Base class for visualization canvas classes.
Definition: PlotCanvas.h:146
Precursor meta information.
Definition: Precursor.h:61
A more convenient string class.
Definition: String.h:60
Main window of TOPPView tool.
Definition: TOPPViewBase.h:129
QDockWidget * filter_dock_widget_
Definition: TOPPViewBase.h:425
QLabel * y_label_
y-axis label for messages in the status bar
Definition: TOPPViewBase.h:508
TheoreticalSpectrumGenerationDialog spec_gen_dialog_
This dialog is a member so that its settings can be perserved upon closing.
Definition: TOPPViewBase.h:562
QDockWidget * views_dockwidget_
Definition: TOPPViewBase.h:424
LayerDataBase::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Definition: TOPPViewBase.h:145
TOPPViewMenu menu_
manages the menu items (active/inactive) and recent files etc
Definition: TOPPViewBase.h:498
VERBOSITY verbosity_
Verbosity of TV.
Definition: TOPPViewBase.h:456
TOOL_SCAN
Used for deciding whether new tool/util params should be generated or reused from TOPPView's ini file...
Definition: TOPPViewBase.h:159
LayerDataBase::FeatureMapSharedPtrType FeatureMapSharedPtrType
Definition: TOPPViewBase.h:140
QToolButton * dm_label_2d_
Definition: TOPPViewBase.h:478
QButtonGroup * draw_group_1d_
Definition: TOPPViewBase.h:468
ExperimentType::SpectrumType SpectrumType
Peak spectrum type.
Definition: TOPPViewBase.h:154
QToolBar * tool_bar_2d_feat_
Definition: TOPPViewBase.h:472
static const String CAPTION_3D_SUFFIX_
Suffix appended to caption of tabs when layer is shown in 3D.
Definition: TOPPViewBase.h:559
EnhancedTabBar tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData()
Definition: TOPPViewBase.h:494
QActionGroup * group_label_2d_
Definition: TOPPViewBase.h:479
TVToolDiscovery tool_scanner_
Scans for tools/utils and generates a param for each.
Definition: TOPPViewBase.h:453
FilterList * filter_list_
Definition: TOPPViewBase.h:435
QAction * dm_precursors_2d_
Definition: TOPPViewBase.h:475
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:464
QActionGroup * group_unassigned_2d_
Definition: TOPPViewBase.h:481
QAction * dm_hull_2d_
Definition: TOPPViewBase.h:476
DataSelectionTabs * selection_view_
Definition: TOPPViewBase.h:431
QAction * dm_ident_2d_
Definition: TOPPViewBase.h:484
LayerDataBase::FeatureMapType FeatureMapType
Definition: TOPPViewBase.h:138
QAction * dm_hulls_2d_
Definition: TOPPViewBase.h:477
EnhancedWorkspace ws_
Main workspace.
Definition: TOPPViewBase.h:488
QToolBar * tool_bar_2d_peak_
Definition: TOPPViewBase.h:471
QAction * dm_elements_2d_
Definition: TOPPViewBase.h:482
TOOL_SCAN scan_mode_
Determines TVToolDiscovery scans for tool/utils and generates new params.
Definition: TOPPViewBase.h:451
VERBOSITY
Definition: TOPPViewBase.h:172
RecentFilesMenu recent_files_
manages recent list of filenames and the menu that goes with it
Definition: TOPPViewBase.h:496
QAction * projections_2d_
Definition: TOPPViewBase.h:483
QLabel * message_label_
Label for messages in the status bar.
Definition: TOPPViewBase.h:504
QMenu * add_2d_context_
Additional context menu for 2D layers.
Definition: TOPPViewBase.h:548
LayerListView * layers_view_
Layer management widget.
Definition: TOPPViewBase.h:429
LOAD_RESULT
Definition: TOPPViewBase.h:183
QToolBar * tool_bar_
Definition: TOPPViewBase.h:461
QLabel * x_label_
x-axis label for messages in the status bar
Definition: TOPPViewBase.h:506
QToolBar * tool_bar_2d_cons_
Definition: TOPPViewBase.h:473
QToolButton * dm_unassigned_2d_
Definition: TOPPViewBase.h:480
String current_path_
Definition: TOPPViewBase.h:555
LayerDataBase::ConsensusMapType ConsensusMapType
Definition: TOPPViewBase.h:143
LayerDataBase::ExperimentSharedPtrType ExperimentSharedPtrType
Definition: TOPPViewBase.h:150
QToolBar * tool_bar_1d_
Definition: TOPPViewBase.h:467
QToolBar * tool_bar_2d_ident_
Definition: TOPPViewBase.h:474
LayerDataBase::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: TOPPViewBase.h:152
QDockWidget * layer_dock_widget_
Definition: TOPPViewBase.h:423
LogWindow * log_
Log output window.
Definition: TOPPViewBase.h:448
LayerDataBase::ExperimentType ExperimentType
Definition: TOPPViewBase.h:148
Dialog which allows to enter an AA or NA sequence and generates a theoretical spectrum for it.
Definition: TheoreticalSpectrumGenerationDialog.h:75
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerDataBase.h:152
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerDataBase.h:157
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerDataBase.h:140
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerDataBase.h:146
DataType
Definition: LayerDataBase.h:99