35 #ifndef OPENMS_VISUAL_TOPPASSCENE_H
36 #define OPENMS_VISUAL_TOPPASSCENE_H
38 #include <OpenMS/config.h>
43 #include <QtGui/QGraphicsScene>
44 #include <QtCore/QProcess>
49 class TOPPASToolVertex;
50 class TOPPASMergerVertex;
51 class TOPPASOutputFileListVertex;
53 class TOPPASResources;
64 virtual void start(
const QString & program,
const QStringList & arguments, OpenMode mode = ReadWrite);
127 ST_REFRESH_REMAINSINVALID
169 void paste(QPointF pos = QPointF());
171 void removeSelected();
175 void updateEdgeColors();
181 bool store(
const String & file);
183 void load(
const String & file);
185 void include(
TOPPASScene * new_scene, QPointF pos = QPointF());
187 const String & getSaveFileName();
189 void setSaveFileName(
const String & name);
193 const QString & getOutDir();
195 const QString & getTempDir();
197 void setOutDir(
const QString & dir);
199 bool saveIfChanged();
201 void setChanged(
bool b);
203 bool isPipelineRunning();
205 bool askForOutputDir(
bool always_ask =
true);
209 void runNextProcess();
211 void resetProcessesQueue();
233 bool isDryRun()
const;
235 QString getDescription()
const;
237 void setDescription(
const QString & desc);
239 void setAllowedThreads(
int num_threads);
243 void checkIfWeAreDone();
249 void abortPipeline();
255 void updateHoveringEdgePos(
const QPointF & new_pos);
257 void addHoveringEdge(
const QPointF & pos);
259 void finishHoveringEdge();
261 void pipelineErrorSlot(
const QString msg =
"");
263 void moveSelectedItems(qreal dx, qreal dy);
268 void setPipelineRunning(
bool b =
true);
270 void changedParameter(
const bool invalidates_running_pipeline);
272 void processFinished();
274 void quitWithError();
279 void logTOPPOutput(
const QString & out);
282 void logToolStarted();
284 void logToolFinished();
286 void logToolFailed();
288 void logToolCrashed();
290 void logOutputFileWritten(
const String & file);
296 void entirePipelineFinished();
298 void pipelineExecutionFailed();
302 void terminateCurrentPipeline();
306 void requestClipboardContent();
308 void mainWindowNeedsUpdate();
310 void openInTOPPView(QStringList all_files);
312 void dryRunFinished(
int, QProcess::ExitStatus);
314 void messageReady(
const QString & msg);
368 bool sanityCheck_(
bool allowUserOverride);
372 void contextMenuEvent(QGraphicsSceneContextMenuEvent * event);
376 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:344
A container for all visual items of a TOPPAS workflow.
Definition: TOPPASScene.h:84
A more convenient string class.
Definition: String.h:56
QProcess * proc
The process.
Definition: TOPPASScene.h:104
bool changed_
Flag that indicates if the pipeline has been changed since the last save.
Definition: TOPPASScene.h:338
QList< TOPPASVertex * > VertexContainer
The container for vertices.
Definition: TOPPASScene.h:138
A dictionary mapping string keys to lists of TOPPASResource objects.
Definition: TOPPASResources.h:54
The base class of the different vertex classes.
Definition: TOPPASVertex.h:98
int threads_active_
currently running processes...
Definition: TOPPASScene.h:352
TOPPASVertex * potential_target_
The current potential target vertex of the hovering edge.
Definition: TOPPASScene.h:328
QString out_dir_
The directory where the output files will be written.
Definition: TOPPASScene.h:336
bool error_occured_
true if an error occurred during pipeline execution
Definition: TOPPASScene.h:342
A FakeProcess class.
Definition: TOPPASScene.h:58
ActionMode
The current action mode (creation of a new edge, or panning of the widget)
Definition: TOPPASScene.h:114
QList< TOPPASEdge * > EdgeContainer
The container for edges.
Definition: TOPPASScene.h:132
An edge representing a data flow in TOPPAS.
Definition: TOPPASEdge.h:58
bool dry_run_
dry run mode (no tools are actually called)
Definition: TOPPASScene.h:350
Stores the information for a TOPP process.
Definition: TOPPASScene.h:92
TOPPASToolVertex * tv
The tool which is started (used to call its slots)
Definition: TOPPASScene.h:110
QStringList args
The arguments.
Definition: TOPPASScene.h:108
QList< TOPPProcess > topp_processes_queue_
The queue of pending TOPP processes.
Definition: TOPPASScene.h:346
Definition: TOPPASScene.h:126
TOPPProcess(QProcess *p, const QString &cmd, const QStringList &arg, TOPPASToolVertex *const tool)
Constructor.
Definition: TOPPASScene.h:95
String file_name_
The file name of this pipeline.
Definition: TOPPASScene.h:330
int allowed_threads_
maximum number of allowed threads
Definition: TOPPASScene.h:356
virtual void start(const QString &program, const QStringList &arguments, OpenMode mode=ReadWrite)
VertexContainer::const_iterator ConstVertexIterator
A const iterator for vertices.
Definition: TOPPASScene.h:142
Definition: TOPPASScene.h:124
RefreshStatus
Pipeline status after refreshParameters() was called.
Definition: TOPPASScene.h:122
TOPPASEdge * hover_edge_
The hovering edge which is currently being created.
Definition: TOPPASScene.h:326
A vertex representing an output file list.
Definition: TOPPASOutputFileListVertex.h:47
TOPPASToolVertex * resume_source_
last node where 'resume' was started
Definition: TOPPASScene.h:358
VertexContainer vertices_
The list of all vertices.
Definition: TOPPASScene.h:322
Definition: TOPPASScene.h:125
bool running_
Indicates if a pipeline is currently running.
Definition: TOPPASScene.h:340
A special vertex that allows to merge several inputs.
Definition: TOPPASMergerVertex.h:56
VertexContainer::iterator VertexIterator
A mutable iterator for vertices.
Definition: TOPPASScene.h:140
Definition: TOPPASScene.h:116
QString command
The command.
Definition: TOPPASScene.h:106
EdgeContainer edges_
The list of all edges.
Definition: TOPPASScene.h:324
EdgeContainer::iterator EdgeIterator
A mutable iterator for edges.
Definition: TOPPASScene.h:134
bool gui_
Are we in a GUI or is the scene used by ExecutePipeline (at the command line)?
Definition: TOPPASScene.h:334
EdgeContainer::const_iterator ConstEdgeIterator
A const iterator for edges.
Definition: TOPPASScene.h:136
TOPPASScene * clipboard_
Stores the clipboard content when requested from TOPPASBase.
Definition: TOPPASScene.h:348
QString description_text_
description text
Definition: TOPPASScene.h:354
ActionMode action_mode_
The current action mode.
Definition: TOPPASScene.h:320
QString tmp_path_
The path for temporary files.
Definition: TOPPASScene.h:332