35 #ifndef OPENMS_VISUAL_TOPPASSCENE_H 36 #define OPENMS_VISUAL_TOPPASSCENE_H 39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 45 #include <QtGui/QGraphicsScene> 46 #include <QtCore/QProcess> 51 class TOPPASToolVertex;
52 class TOPPASMergerVertex;
53 class TOPPASOutputFileListVertex;
55 class TOPPASResources;
66 virtual void start(
const QString & program,
const QStringList & arguments, OpenMode mode = ReadWrite);
129 ST_REFRESH_REMAINSINVALID
161 VertexIterator verticesBegin();
163 VertexIterator verticesEnd();
165 EdgeIterator edgesBegin();
167 EdgeIterator edgesEnd();
171 void paste(QPointF pos = QPointF());
173 void removeSelected();
177 void updateEdgeColors();
183 bool store(
const String & file);
185 void load(
const String & file);
187 void include(
TOPPASScene * new_scene, QPointF pos = QPointF());
189 const String & getSaveFileName();
191 void setSaveFileName(
const String & name);
195 const QString & getOutDir()
const;
197 const QString & getTempDir()
const;
199 void setOutDir(
const QString & dir);
201 bool saveIfChanged();
203 void setChanged(
bool b);
205 bool isPipelineRunning();
207 bool askForOutputDir(
bool always_ask =
true);
211 void runNextProcess();
213 void resetProcessesQueue();
236 bool isGUIMode()
const;
239 bool isDryRun()
const;
241 QString getDescription()
const;
243 void setDescription(
const QString & desc);
245 void setAllowedThreads(
int num_threads);
249 void checkIfWeAreDone();
255 void abortPipeline();
261 void updateHoveringEdgePos(
const QPointF & new_pos);
263 void addHoveringEdge(
const QPointF & pos);
265 void finishHoveringEdge();
267 void pipelineErrorSlot(
const QString msg =
"");
269 void moveSelectedItems(qreal dx, qreal dy);
274 void setPipelineRunning(
bool b =
true);
276 void changedParameter(
const bool invalidates_running_pipeline);
278 void changedOutputFolder();
280 void processFinished();
282 void quitWithError();
287 void logTOPPOutput(
const QString & out);
290 void logToolStarted();
292 void logToolFinished();
294 void logToolFailed();
296 void logToolCrashed();
298 void logOutputFileWritten(
const String & file);
304 void entirePipelineFinished();
306 void pipelineExecutionFailed();
310 void terminateCurrentPipeline();
314 void requestClipboardContent();
316 void mainWindowNeedsUpdate();
318 void openInTOPPView(QStringList all_files);
320 void dryRunFinished(
int, QProcess::ExitStatus);
322 void messageReady(
const QString & msg);
376 bool sanityCheck_(
bool allowUserOverride);
380 void contextMenuEvent(QGraphicsSceneContextMenuEvent * event);
384 void writeToLogFile_(
const QString & text);
bool user_specified_out_dir_
Indicates if the output directory has been specified by the user already.
Definition: TOPPASScene.h:352
A container for all visual items of a TOPPAS workflow.
Definition: TOPPASScene.h:86
A more convenient string class.
Definition: String.h:57
QProcess * proc
The process.
Definition: TOPPASScene.h:106
bool changed_
Flag that indicates if the pipeline has been changed since the last save.
Definition: TOPPASScene.h:346
QList< TOPPASVertex * > VertexContainer
The container for vertices.
Definition: TOPPASScene.h:140
A dictionary mapping string keys to lists of TOPPASResource objects.
Definition: TOPPASResources.h:56
The base class of the different vertex classes.
Definition: TOPPASVertex.h:101
int threads_active_
currently running processes...
Definition: TOPPASScene.h:360
TOPPASVertex * potential_target_
The current potential target vertex of the hovering edge.
Definition: TOPPASScene.h:336
QString out_dir_
The directory where the output files will be written.
Definition: TOPPASScene.h:344
bool error_occured_
true if an error occurred during pipeline execution
Definition: TOPPASScene.h:350
A FakeProcess class.
Definition: TOPPASScene.h:60
ActionMode
The current action mode (creation of a new edge, or panning of the widget)
Definition: TOPPASScene.h:116
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
QList< TOPPASEdge * > EdgeContainer
The container for edges.
Definition: TOPPASScene.h:134
An edge representing a data flow in TOPPAS.
Definition: TOPPASEdge.h:60
bool dry_run_
dry run mode (no tools are actually called)
Definition: TOPPASScene.h:358
Stores the information for a TOPP process.
Definition: TOPPASScene.h:94
TOPPASToolVertex * tv
The tool which is started (used to call its slots)
Definition: TOPPASScene.h:112
QStringList args
The arguments.
Definition: TOPPASScene.h:110
QList< TOPPProcess > topp_processes_queue_
The queue of pending TOPP processes.
Definition: TOPPASScene.h:354
Definition: TOPPASScene.h:128
TOPPProcess(QProcess *p, const QString &cmd, const QStringList &arg, TOPPASToolVertex *const tool)
Constructor.
Definition: TOPPASScene.h:97
String file_name_
The file name of this pipeline.
Definition: TOPPASScene.h:338
int allowed_threads_
maximum number of allowed threads
Definition: TOPPASScene.h:364
virtual void start(const QString &program, const QStringList &arguments, OpenMode mode=ReadWrite)
VertexContainer::const_iterator ConstVertexIterator
A const iterator for vertices.
Definition: TOPPASScene.h:144
Definition: TOPPASScene.h:126
RefreshStatus
Pipeline status after refreshParameters() was called.
Definition: TOPPASScene.h:124
TOPPASEdge * hover_edge_
The hovering edge which is currently being created.
Definition: TOPPASScene.h:334
A vertex representing an output file list.
Definition: TOPPASOutputFileListVertex.h:50
TOPPASToolVertex * resume_source_
last node where 'resume' was started
Definition: TOPPASScene.h:366
VertexContainer vertices_
The list of all vertices.
Definition: TOPPASScene.h:330
Definition: TOPPASScene.h:127
bool running_
Indicates if a pipeline is currently running.
Definition: TOPPASScene.h:348
A special vertex that allows to merge several inputs.
Definition: TOPPASMergerVertex.h:59
VertexContainer::iterator VertexIterator
A mutable iterator for vertices.
Definition: TOPPASScene.h:142
Definition: TOPPASScene.h:118
QString command
The command.
Definition: TOPPASScene.h:108
EdgeContainer edges_
The list of all edges.
Definition: TOPPASScene.h:332
EdgeContainer::iterator EdgeIterator
A mutable iterator for edges.
Definition: TOPPASScene.h:136
bool gui_
Are we in a GUI or is the scene used by ExecutePipeline (at the command line)?
Definition: TOPPASScene.h:342
EdgeContainer::const_iterator ConstEdgeIterator
A const iterator for edges.
Definition: TOPPASScene.h:138
TOPPASScene * clipboard_
Stores the clipboard content when requested from TOPPASBase.
Definition: TOPPASScene.h:356
QString description_text_
description text
Definition: TOPPASScene.h:362
ActionMode action_mode_
The current action mode.
Definition: TOPPASScene.h:328
QString tmp_path_
The path for temporary files.
Definition: TOPPASScene.h:340