35 #ifndef OPENMS_VISUAL_APPLICATIONS_TOPPVIEWBASE_H 36 #define OPENMS_VISUAL_APPLICATIONS_TOPPVIEWBASE_H 39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 57 #include <QtGui/QMainWindow> 58 #include <QtGui/QButtonGroup> 59 #include <QtGui/QActionGroup> 60 #include <QtCore/QStringList> 61 #include <QtCore/QProcess> 68 class QListWidgetItem;
70 class QTreeWidgetItem;
82 class EnhancedWorkspace;
84 class Spectrum1DWidget;
85 class Spectrum2DWidget;
86 class Spectrum3DWidget;
88 class MultiGradientSelector;
111 friend class TestTOPPView;
151 void addDataFile(
const String& filename,
bool show_options,
bool add_to_recent,
String caption =
"",
UInt window_id = 0,
Size spectrum_id = 0);
168 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);
171 void loadFiles(
const StringList& list, QSplashScreen* splash_screen);
178 void loadPreferences(
String filename =
"");
181 void savePreferences();
187 const LayerData* getCurrentLayer()
const;
220 void updateCurrentPath();
224 void openFileDialog();
226 void openExampleDialog();
228 void showGoToDialog();
230 void preferencesDialog();
232 void layerStatistics();
236 void layerActivated();
238 void layerZoomChanged();
242 void layerDeactivated();
246 void updateToolBar();
248 void updateLayerBar();
250 void updateViewBar();
252 void viewChanged(
int);
254 void updateFilterBar();
262 void tileHorizontal();
269 void showStatusMessage(std::string msg,
OpenMS::UInt time);
271 void showCursorStatus(
double mz,
double rt);
273 void showCursorStatusInvert(
double mz,
double rt);
275 void showTOPPDialog();
277 void annotateWithID();
279 void showSpectrumGenerationDialog();
281 void showSpectrumAlignmentDialog();
283 void showSpectrumAs1D(
int index);
284 void showSpectrumAs1D(std::vector<
int, std::allocator<int> > indices);
286 void showCurrentPeaksAs2D();
288 void showCurrentPeaksAs3D();
290 void showAboutDialog();
294 void saveLayerVisible();
296 void toggleGridLines();
298 void toggleAxisLegends();
300 void showPreferences();
302 void metadataFileDialog();
307 void setDrawMode1D(
int);
308 void setIntensityMode(
int);
309 void changeLayerFlag(
bool);
310 void changeLabel(QAction*);
311 void changeUnassigned(QAction*);
313 void toggleProjections();
317 void loadFile(QString);
323 void layerSelectionChange(
int);
326 void layerFilterVisibilityChange(
bool);
328 void layerContextMenu(
const QPoint& pos);
330 void logContextMenu(
const QPoint& pos);
332 void layerVisibilityChange(QListWidgetItem* item);
334 void filterContextMenu(
const QPoint& pos);
336 void filterEdit(QListWidgetItem* item);
338 void layerEdit(QListWidgetItem* );
342 void finishTOPPToolExecution(
int exitCode, QProcess::ExitStatus exitStatus);
344 void abortTOPPTool();
346 void rerunTOPPTool();
348 void showSpectrumBrowser();
350 void showSpectrumMetaData(
int spectrum_index);
355 void closeByTab(
int id);
358 void enhancedWorkspaceWindowChanged(
int id);
360 void openRecentFile();
362 void copyLayer(
const QMimeData* data,
QWidget* source,
int id = -1);
366 void updateProcessLog();
369 void fileChanged_(
const String&);
372 void initializeDefaultParameters_();
376 bool annotateMS1FromMassFingerprinting_(
const FeatureMap& identifications);
379 std::set<String> getFilenamesOfOpenFiles_();
384 QStringList getFileList_(
const String& path_overwrite =
"");
463 QLabel* message_label_;
473 void addRecentFile_(
const String& filename);
476 void updateRecentMenu_();
506 void checkPreferences_();
509 void closeEvent(QCloseEvent* event);
526 void showTOPPDialog_(
bool visible);
543 static bool containsMS1Scans(
const ExperimentType& exp);
546 float estimateNoiseFromRandomMS1Scans(
const ExperimentType& exp,
UInt n_scans = 10);
549 static bool hasMS1Zeros(
const ExperimentType& exp);
552 static bool hasPeptideIdentifications(
const ExperimentType& map);
String layer_name
Definition: TOPPViewBase.h:496
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Definition: TOPPViewBase.h:124
QLabel * rt_label_
RT label for messages in the status bar.
Definition: TOPPViewBase.h:468
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:112
TOPPViewIdentificationViewBehavior * identificationview_behavior_
TOPPView behavior for the identification view.
Definition: TOPPViewBase.h:536
QDockWidget * filter_dock_widget_
Definition: TOPPViewBase.h:393
QAction * linkZoom_action_
Definition: TOPPViewBase.h:420
QButtonGroup * draw_group_1d_
Definition: TOPPViewBase.h:435
QToolBar * tool_bar_1d_
Definition: TOPPViewBase.h:434
Behavior of TOPPView in identification mode.
Definition: TOPPViewIdentificationViewBehavior.h:49
std::vector< QAction * > recent_actions_
list of the recently opened files actions (menu entries)
Definition: TOPPViewBase.h:480
A more convenient string class.
Definition: String.h:57
QAction * dm_hulls_2d_
Definition: TOPPViewBase.h:444
QToolBar * tool_bar_2d_ident_
Definition: TOPPViewBase.h:441
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Definition: TOPPViewBase.h:129
bool visible
Definition: TOPPViewBase.h:501
LayerData::ConsensusMapType ConsensusMapType
Definition: TOPPViewBase.h:122
QListWidget * filters_
Definition: TOPPViewBase.h:407
Main window of TOPPView tool.
Definition: TOPPViewBase.h:105
String tool
Definition: TOPPViewBase.h:492
String file_name
Definition: TOPPViewBase.h:495
QToolBar * tool_bar_2d_feat_
Definition: TOPPViewBase.h:439
DataType
Dataset types.
Definition: LayerData.h:68
A container for features.
Definition: FeatureMap.h:94
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
QToolBar * tool_bar_2d_cons_
Definition: TOPPViewBase.h:440
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:96
A container for consensus elements.
Definition: ConsensusMap.h:72
QToolBar * tool_bar_2d_peak_
Definition: TOPPViewBase.h:438
SpectraIdentificationViewWidget * spectra_identification_view_widget_
Definition: TOPPViewBase.h:399
QAction * dm_elements_2d_
Definition: TOPPViewBase.h:449
QAction * dm_hull_2d_
Definition: TOPPViewBase.h:443
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
FileWatcher * watcher_
Watcher that tracks file changes (in order to update the data in the different views) ...
Definition: TOPPViewBase.h:412
String in
Definition: TOPPViewBase.h:493
bool zoom_together_
Stores whether the individual windows should zoom together (be linked) or not.
Definition: TOPPViewBase.h:418
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:124
QTime timer
Definition: TOPPViewBase.h:500
QDockWidget * layer_dock_widget_
Definition: TOPPViewBase.h:391
bool watcher_msgbox_
Holds the messageboxes for each layer that are currently popped up (to avoid popping them up again...
Definition: TOPPViewBase.h:415
QAction * dm_ident_2d_
Definition: TOPPViewBase.h:451
Size spectrum_id
Definition: TOPPViewBase.h:498
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
SpectraViewWidget * spectra_view_widget_
Definition: TOPPViewBase.h:398
QLabel * mz_label_
m/z label for messages in the status bar
Definition: TOPPViewBase.h:466
TOPPViewSpectraViewBehavior * spectraview_behavior_
TOPPView behavior for the spectra view.
Definition: TOPPViewBase.h:538
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Definition: TOPPViewBase.h:119
UInt window_id
Definition: TOPPViewBase.h:497
Param param
Definition: TOPPViewBase.h:491
QActionGroup * group_label_2d_
Definition: TOPPViewBase.h:446
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:118
Warning.
Definition: TOPPViewBase.h:516
QTabWidget * views_tabwidget_
Tabwidget that hold the different views on the loaded data.
Definition: TOPPViewBase.h:533
static const String CAPTION_3D_SUFFIX_
Suffix appended to caption of tabs when layer is shown in 3D.
Definition: TOPPViewBase.h:556
String out
Definition: TOPPViewBase.h:494
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:74
Management and storage of parameters / INI files.
Definition: Param.h:75
Behavior of TOPPView in spectra view mode.
Definition: TOPPViewSpectraViewBehavior.h:49
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
QButtonGroup * intensity_button_group_
Definition: TOPPViewBase.h:431
QToolButton * dm_unassigned_2d_
Definition: TOPPViewBase.h:447
QToolBar * tool_bar_
Definition: TOPPViewBase.h:428
Notice.
Definition: TOPPViewBase.h:515
QStringList recent_files_
list of the recently opened files
Definition: TOPPViewBase.h:478
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Definition: EnhancedWorkspace.h:50
LogState
Log message states.
Definition: TOPPViewBase.h:513
QDockWidget * views_dockwidget_
Definition: TOPPViewBase.h:392
LayerData::FeatureMapType FeatureMapType
Definition: TOPPViewBase.h:117
QTextEdit * log_
Log output window.
Definition: TOPPViewBase.h:423
QListWidget * layer_manager_
Layer management widget.
Definition: TOPPViewBase.h:403
QActionGroup * group_unassigned_2d_
Definition: TOPPViewBase.h:448
EnhancedWorkspace * ws_
Main workspace.
Definition: TOPPViewBase.h:455
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
String current_path_
Definition: TOPPViewBase.h:530
EnhancedTabBar * tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData() ...
Definition: TOPPViewBase.h:458
Watcher that monitors file changes.
Definition: FileWatcher.h:66
QCheckBox * filters_check_box_
Definition: TOPPViewBase.h:408
QMenu * add_2d_context_
Additional context menu for 2D layers.
Definition: TOPPViewBase.h:523
QToolButton * dm_label_2d_
Definition: TOPPViewBase.h:445
QAction * dm_precursors_2d_
Definition: TOPPViewBase.h:442
QProcess * process
Definition: TOPPViewBase.h:499
Class that stores the data for one layer.
Definition: LayerData.h:62
LayerData::ExperimentType ExperimentType
Definition: TOPPViewBase.h:127
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:61
QAction * projections_2d_
Definition: TOPPViewBase.h:450
ExperimentType::SpectrumType SpectrumType
Peak spectrum type.
Definition: TOPPViewBase.h:131