OpenMS
Loading...
Searching...
No Matches
TOPPASBase.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Johannes Veit $
6// $Authors: Johannes Junker, Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11// OpenMS_GUI config
12#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13
14//OpenMS
19
20//QT
21#include <QtWidgets/QButtonGroup>
22#include <QtWidgets/QMainWindow>
23#include <QtWidgets/QMdiArea>
24#include <QtWidgets/QSplashScreen>
25
26class QToolBar;
27class QListWidget;
28class QTextEdit;
29class QMdiArea;
30class QLabel;
31class QPushButton;
32class QWidget;
33class QTreeWidget;
34class QTreeWidgetItem;
35
36
37namespace OpenMS
38{
39 class EnhancedWorkSpace;
40 class EnhancedTabBar;
41 class TOPPASWidget;
42 class TOPPASScene;
43 class LogWindow;
44 class TOPPASResources;
45
51 class OPENMS_GUI_DLLAPI TOPPASBase :
52 public QMainWindow,
54 {
55 Q_OBJECT
56
57public:
58
60 TOPPASBase(QWidget* parent = nullptr);
62 ~TOPPASBase() override;
63
69 void loadPreferences(String filename = "");
71 void savePreferences();
73 void loadFiles(const std::vector<String>& list, QSplashScreen* splash_screen);
74
75public slots:
77 void addTOPPASFile(const String& file_name, bool in_new_window = true);
79 void openFilesByDialog();
81 void openExampleDialog();
83 void newPipeline();
85 void includePipeline();
87 void saveCurrentPipelineAs();
89 void savePipeline();
91 void exportAsImage();
93 void loadPipelineResourceFile();
95 void savePipelineResourceFile();
97 void preferencesDialog();
99 void updateCurrentPath();
101 void updateTabBar(QMdiSubWindow* w);
103 void showAboutDialog();
105 void showURL();
112 void showStatusMessage(const std::string& msg, OpenMS::UInt time);
114 void showCursorStatus(double x, double y);
116 void closeFile();
118 void updateToolBar();
120 void runPipeline();
122 void abortPipeline();
124 void toolStarted();
126 void toolFinished();
128 void toolCrashed();
130 void toolFailed();
132 void outputVertexFinished(const String& file);
134 void updateTOPPOutputLog(const QString& out);
136 void showPipelineFinishedLogMessage();
138 void saveToClipboard(TOPPASScene* scene);
140 void sendClipboardContent();
142 void refreshParameters();
144 void openFilesInTOPPView(QStringList all_files);
146 void openToppasFile(const QString& filename);
147protected slots:
148
153 void closeByTab(int id);
155 void focusByTab(int id);
157
159 void updateMenu();
161 void showAsWindow_(TOPPASWidget* sw, const String& caption);
163 void insertNewVertex_(double x, double y, QTreeWidgetItem* item = nullptr);
165 void insertNewVertexInCenter_(QTreeWidgetItem* item);
166
168 void descriptionUpdated_();
169
170protected:
171
176
180 QToolBar* tool_bar_;
182
184 RecentFilesMenu recent_files_menu_; // needs to be declared before 'menu_', because its needed there
185
188
191
197 QPushButton* tools_expand_all_;
202
209
211 TOPPASWidget* window_(int id) const;
212
213 void filterToolTree_();
214
218
221
223 static int node_offset_;
224
226 static qreal z_value_;
227
229 TOPPASWidget* activeSubWindow_() const;
230
232
233 void closeEvent(QCloseEvent* event) override;
234 void keyPressEvent(QKeyEvent* e) override;
236
239
240
241public:
243
244
245 static TOPPASTreeView* createTOPPToolsTreeWidget(QWidget* parent_widget = nullptr);
246
249 static QString savePipelineAs(TOPPASWidget* w, const QString& current_path);
250
252 static QString loadPipelineResourceFile(TOPPASWidget* w, const QString& current_path);
253
255 static QString savePipelineResourceFile(TOPPASWidget* w, const QString& current_path);
256
258 static QString refreshPipelineParameters(TOPPASWidget* tw, QString current_path);
260 }; //class
261
262} //namespace
263
subpage TOPP_TargetedFileConverter Converts targeted feature or consensus feature files subpage TOPP_FileInfo Shows basic information about the file
Definition TOPP.doxygen:44
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 log window (QTextEdit) with convenience functions.
Definition LogWindow.h:29
Manages recent files opened by the user and provides a QMenu to go with it.
Definition RecentFilesMenu.h:35
A more convenient string class.
Definition String.h:34
Main window of the TOPPAS tool.
Definition TOPPASBase.h:54
QLineEdit * tools_filter_
Filter for the Tree view.
Definition TOPPASBase.h:195
QTextEdit * desc_
Workflow Description window.
Definition TOPPASBase.h:175
QPushButton * tools_collapse_all_
Collapse button for the Tree view.
Definition TOPPASBase.h:199
EnhancedTabBar * tab_bar_
Tab bar. The address of the corresponding window to a tab is stored as an int in tabData()
Definition TOPPASBase.h:190
static int node_offset_
Offset counter for new inserted nodes (to avoid invisible stacking)
Definition TOPPASBase.h:223
QListWidget * blocks_list_
List of ready analysis pipelines.
Definition TOPPASBase.h:201
TOPPASTreeView * tools_tree_view_
Tree view of all available TOPP tools.
Definition TOPPASBase.h:193
EnhancedWorkspace * ws_
Main workspace.
Definition TOPPASBase.h:187
static qreal z_value_
z-value counter for new inserted nodes (new nodes should be on top)
Definition TOPPASBase.h:226
String tmp_path_
The path for temporary files.
Definition TOPPASBase.h:220
QLabel * message_label_
Label for messages in the status bar.
Definition TOPPASBase.h:207
QToolBar * tool_bar_
Definition TOPPASBase.h:180
RecentFilesMenu recent_files_menu_
manages recent list of filenames and the menu that goes with it
Definition TOPPASBase.h:184
String current_path_
Definition TOPPASBase.h:217
TOPPASScene * clipboard_scene_
The clipboard.
Definition TOPPASBase.h:238
QPushButton * tools_expand_all_
Expand button for the Tree view.
Definition TOPPASBase.h:197
LogWindow * log_
Log output window.
Definition TOPPASBase.h:173
Definition TOPPASScene.h:62
Tree view implementation for the list of TOPP tools.
Definition TOPPASTreeView.h:30
Widget visualizing and allowing to edit TOPP pipelines.
Definition TOPPASWidget.h:37
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19