35 #ifndef OPENMS_VISUAL_APPLICATIONS_TOPPVIEWBASE_H
36 #define OPENMS_VISUAL_APPLICATIONS_TOPPVIEWBASE_H
58 #include <QtGui/QMainWindow>
59 #include <QtGui/QButtonGroup>
60 #include <QtGui/QActionGroup>
61 #include <QtCore/QStringList>
62 #include <QtCore/QProcess>
69 class QListWidgetItem;
71 class QTreeWidgetItem;
83 class EnhancedWorkspace;
85 class Spectrum1DWidget;
86 class Spectrum2DWidget;
87 class Spectrum3DWidget;
89 class MultiGradientSelector;
112 friend class TestTOPPView;
152 void addDataFile(
const String& filename,
bool show_options,
bool add_to_recent,
String caption =
"",
UInt window_id = 0,
Size spectrum_id = 0);
169 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);
172 void loadFiles(
const StringList& list, QSplashScreen* splash_screen);
179 void loadPreferences(
String filename =
"");
182 void savePreferences();
188 const LayerData* getCurrentLayer()
const;
221 void updateCurrentPath();
225 void openFileDialog();
227 void openExampleDialog();
229 void showGoToDialog();
231 void preferencesDialog();
233 void layerStatistics();
237 void layerActivated();
239 void layerZoomChanged();
243 void layerDeactivated();
245 void activate1DSpectrum(
int index);
247 void activate1DSpectrum(std::vector<
int, std::allocator<int> > indices);
249 void deactivate1DSpectrum(
int index);
253 void updateToolBar();
255 void updateLayerBar();
257 void updateViewBar();
259 void viewChanged(
int);
261 void updateFilterBar();
269 void tileHorizontal();
276 void showStatusMessage(std::string msg,
OpenMS::UInt time);
278 void showCursorStatus(
double mz,
double rt);
280 void showCursorStatusInvert(
double mz,
double rt);
282 void showTOPPDialog();
284 void annotateWithID();
286 void showSpectrumGenerationDialog();
288 void showSpectrumAlignmentDialog();
290 void showSpectrumAs1D(
int index);
291 void showSpectrumAs1D(std::vector<
int, std::allocator<int> > indices);
293 void showCurrentPeaksAs2D();
295 void showCurrentPeaksAs3D();
297 void showAboutDialog();
301 void saveLayerVisible();
303 void toggleGridLines();
305 void toggleAxisLegends();
307 void showPreferences();
309 void metadataFileDialog();
314 void setDrawMode1D(
int);
315 void setIntensityMode(
int);
316 void changeLayerFlag(
bool);
317 void changeLabel(QAction*);
318 void changeUnassigned(QAction*);
320 void toggleProjections();
324 void loadFile(QString);
330 void layerSelectionChange(
int);
333 void layerFilterVisibilityChange(
bool);
335 void layerContextMenu(
const QPoint& pos);
337 void logContextMenu(
const QPoint& pos);
339 void layerVisibilityChange(QListWidgetItem* item);
341 void filterContextMenu(
const QPoint& pos);
343 void filterEdit(QListWidgetItem* item);
345 void layerEdit(QListWidgetItem* );
349 void finishTOPPToolExecution(
int exitCode, QProcess::ExitStatus exitStatus);
351 void abortTOPPTool();
353 void rerunTOPPTool();
355 void showSpectrumBrowser();
357 void showSpectrumMetaData(
int spectrum_index);
362 void closeByTab(
int id);
365 void enhancedWorkspaceWindowChanged(
int id);
367 void openRecentFile();
369 void copyLayer(
const QMimeData* data,
QWidget* source,
int id = -1);
373 void updateProcessLog();
376 void fileChanged_(
const String&);
379 void initializeDefaultParameters_();
383 bool annotateMS1FromMassFingerprinting_(
const FeatureMap& identifications);
386 std::set<String> getFilenamesOfOpenFiles_();
391 QStringList getFileList_(
const String& path_overwrite =
"");
470 QLabel* message_label_;
480 void addRecentFile_(
const String& filename);
483 void updateRecentMenu_();
513 void checkPreferences_();
516 void closeEvent(QCloseEvent* event);
527 void showLogMessage_(LogState state,
const String& heading,
const String& body);
533 void showTOPPDialog_(
bool visible);
String layer_name
Definition: TOPPViewBase.h:503
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Definition: TOPPViewBase.h:125
QLabel * rt_label_
RT label for messages in the status bar.
Definition: TOPPViewBase.h:475
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:111
TOPPViewIdentificationViewBehavior * identificationview_behavior_
TOPPView behavior for the identification view.
Definition: TOPPViewBase.h:544
QDockWidget * filter_dock_widget_
Definition: TOPPViewBase.h:400
QAction * linkZoom_action_
Definition: TOPPViewBase.h:427
QButtonGroup * draw_group_1d_
Definition: TOPPViewBase.h:442
QToolBar * tool_bar_1d_
Definition: TOPPViewBase.h:441
Behavior of TOPPView in identification mode.
Definition: TOPPViewIdentificationViewBehavior.h:50
std::vector< QAction * > recent_actions_
list of the recently opened files actions (menu entries)
Definition: TOPPViewBase.h:487
A more convenient string class.
Definition: String.h:57
QAction * dm_hulls_2d_
Definition: TOPPViewBase.h:451
QToolBar * tool_bar_2d_ident_
Definition: TOPPViewBase.h:448
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Definition: TOPPViewBase.h:130
bool visible
Definition: TOPPViewBase.h:508
LayerData::ConsensusMapType ConsensusMapType
Definition: TOPPViewBase.h:123
QListWidget * filters_
Definition: TOPPViewBase.h:414
TOPPViewBehaviorInterface * view_behavior_
The current TOPPView view behavior.
Definition: TOPPViewBase.h:542
Main window of TOPPView tool.
Definition: TOPPViewBase.h:106
String tool
Definition: TOPPViewBase.h:499
String file_name
Definition: TOPPViewBase.h:502
QToolBar * tool_bar_2d_feat_
Definition: TOPPViewBase.h:446
DataType
Dataset types.
Definition: LayerData.h:67
A container for features.
Definition: FeatureMap.h:93
QToolBar * tool_bar_2d_cons_
Definition: TOPPViewBase.h:447
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:445
SpectraIdentificationViewWidget * spectra_identification_view_widget_
Definition: TOPPViewBase.h:406
QAction * dm_elements_2d_
Definition: TOPPViewBase.h:456
QAction * dm_hull_2d_
Definition: TOPPViewBase.h:450
FileWatcher * watcher_
Watcher that tracks file changes (in order to update the data in the different views) ...
Definition: TOPPViewBase.h:419
String in
Definition: TOPPViewBase.h:500
bool zoom_together_
Stores whether the individual windows should zoom together (be linked) or not.
Definition: TOPPViewBase.h:425
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:123
QTime timer
Definition: TOPPViewBase.h:507
QDockWidget * layer_dock_widget_
Definition: TOPPViewBase.h:398
bool watcher_msgbox_
Holds the messageboxes for each layer that are currently popped up (to avoid popping them up again...
Definition: TOPPViewBase.h:422
QAction * dm_ident_2d_
Definition: TOPPViewBase.h:458
Size spectrum_id
Definition: TOPPViewBase.h:505
SpectraViewWidget * spectra_view_widget_
Definition: TOPPViewBase.h:405
QLabel * mz_label_
m/z label for messages in the status bar
Definition: TOPPViewBase.h:473
TOPPViewSpectraViewBehavior * spectraview_behavior_
TOPPView behavior for the spectra view.
Definition: TOPPViewBase.h:546
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Definition: TOPPViewBase.h:120
UInt window_id
Definition: TOPPViewBase.h:504
Param param
Definition: TOPPViewBase.h:498
QActionGroup * group_label_2d_
Definition: TOPPViewBase.h:453
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:117
Warning.
Definition: TOPPViewBase.h:523
QTabWidget * views_tabwidget_
Tabwidget that hold the different views on the loaded data.
Definition: TOPPViewBase.h:540
static const String CAPTION_3D_SUFFIX_
Suffix appended to caption of tabs when layer is shown in 3D.
Definition: TOPPViewBase.h:564
String out
Definition: TOPPViewBase.h:501
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:50
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:69
QButtonGroup * intensity_button_group_
Definition: TOPPViewBase.h:438
QToolButton * dm_unassigned_2d_
Definition: TOPPViewBase.h:454
QToolBar * tool_bar_
Definition: TOPPViewBase.h:435
Notice.
Definition: TOPPViewBase.h:522
QStringList recent_files_
list of the recently opened files
Definition: TOPPViewBase.h:485
Definition: EnhancedWorkspace.h:50
Interface class to model different behaviors of TOPPView.
Definition: TOPPViewBehaviorInterface.h:47
LogState
Log message states.
Definition: TOPPViewBase.h:520
QDockWidget * views_dockwidget_
Definition: TOPPViewBase.h:399
LayerData::FeatureMapType FeatureMapType
Definition: TOPPViewBase.h:118
QTextEdit * log_
Log output window.
Definition: TOPPViewBase.h:430
QListWidget * layer_manager_
Layer management widget.
Definition: TOPPViewBase.h:410
QActionGroup * group_unassigned_2d_
Definition: TOPPViewBase.h:455
EnhancedWorkspace * ws_
Main workspace.
Definition: TOPPViewBase.h:462
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
String current_path_
Definition: TOPPViewBase.h:537
EnhancedTabBar * tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData() ...
Definition: TOPPViewBase.h:465
Watcher that monitors file changes.
Definition: FileWatcher.h:66
QCheckBox * filters_check_box_
Definition: TOPPViewBase.h:415
QMenu * add_2d_context_
Additional context menu for 2D layers.
Definition: TOPPViewBase.h:530
QToolButton * dm_label_2d_
Definition: TOPPViewBase.h:452
QAction * dm_precursors_2d_
Definition: TOPPViewBase.h:449
QProcess * process
Definition: TOPPViewBase.h:506
Class that stores the data for one layer.
Definition: LayerData.h:61
LayerData::ExperimentType ExperimentType
Definition: TOPPViewBase.h:128
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:61
QAction * projections_2d_
Definition: TOPPViewBase.h:457
ExperimentType::SpectrumType SpectrumType
Peak spectrum type.
Definition: TOPPViewBase.h:132