| OpenMS 2.5.0

Signals | Public Member Functions | Protected Attributes | List of all members
TOPPASWidget Class Reference
Visual » TOPPAS

Widget visualizing and allowing to edit TOPP pipelines. More...

`#include <OpenMS/VISUAL/TOPPASWidget.h>`

Inheritance diagram for TOPPASWidget:

## Signals

void | sendStatusMessage (std::string message, OpenMS::UInt time)
| Emits a status message that should be displayed for `time` ms. If `time` is 0 the message should be displayed until the next message is emitted. More...
void | sendCursorStatus (double x=0.0, double y=0.0)
| Emitted when the cursor position changes (for displaying e.g. in status bar) More...
void | aboutToBeDestroyed (int w_id)
| Message about the destruction of this widget. More...
void | toolDroppedOnWidget (double x=0.0, double y=0.0)
| Emitted when a drop event occurs. More...
void | pipelineDroppedOnWidget (const String &filename, bool new_window)
| Emitted when a drop event occurs. More...

## Public Member Functions

| TOPPASWidget (const Param &preferences, QWidget *parent=nullptr, const String &tmp_path="")
| Default constructor. More...
| ~TOPPASWidget () override
| Destructor. More...
void | setWindowId (Int id) override
| setter from EnhancedTabBarWidgetInterface More...
Int | getWindowId () override
| getter from EnhancedTabBarWidgetInterface More...
TOPPASScene * | getScene ()
| Returns the scene. More...
void | zoom (bool zoom_in)
| Zooms in or out, depending on `zoom_in`. More...
Public Member Functions inherited from EnhancedTabBarWidgetInterface
virtual | ~EnhancedTabBarWidgetInterface ()
| Destructor. More...

## Protected Member Functions

reimplemented QT events
void | wheelEvent (QWheelEvent *event) override
void | keyPressEvent (QKeyEvent *e) override
void | keyReleaseEvent (QKeyEvent *e) override
void | leaveEvent (QEvent *e) override
void | enterEvent (QEvent *e) override
void | dragEnterEvent (QDragEnterEvent *event) override
void | dragMoveEvent (QDragMoveEvent *event) override
void | dropEvent (QDropEvent *event) override
void | resizeEvent (QResizeEvent *event) override
void | closeEvent (QCloseEvent *e) override

## Protected Attributes

TOPPASScene * | scene_
| The scene visualized by this widget. More...
Int | window_id_
| Widget id used as identifier. More...

## Detailed Description

Widget visualizing and allowing to edit TOPP pipelines.

This class is a subclass of QGraphicsView and visualizes a TOPPASScene. Several TOPPASWidgets can be opened in TOPPAS at the same time, managed by a QWorkspace.

## Constructor & Destructor Documentation

## ◆ TOPPASWidget()

TOPPASWidget | ( | const Param & | preferences,
|  | QWidget * | parent = `nullptr`,
|  | const String & | tmp_path = `""`
| ) |  |

Default constructor.

## ◆ ~TOPPASWidget()

~TOPPASWidget | ( |  | ) |

override

Destructor.

## Member Function Documentation

## ◆ aboutToBeDestroyed

void aboutToBeDestroyed | ( | int | w_id | ) |

signal

Message about the destruction of this widget.

## ◆ closeEvent()

void closeEvent | ( | QCloseEvent * | e | ) |

override protected

## ◆ dragEnterEvent()

void dragEnterEvent | ( | QDragEnterEvent * | event | ) |

override protected

## ◆ dragMoveEvent()

void dragMoveEvent | ( | QDragMoveEvent * | event | ) |

override protected

## ◆ dropEvent()

void dropEvent | ( | QDropEvent * | event | ) |

override protected

## ◆ enterEvent()

void enterEvent | ( | QEvent * | e | ) |

override protected

## ◆ getScene()

TOPPASScene* getScene | ( |  | ) |

Returns the scene.

Referenced by TOPPASBase::abortPipeline(), TOPPASBase::addTOPPASFile(), TOPPASBase::closeEvent(), TOPPASBase::descriptionUpdated_(), TOPPASBase::exportAsImage(), TOPPASBase::focusByTab(), TOPPASBase::insertNewVertex_(), TOPPASBase::keyPressEvent(), TOPPASBase::loadPipelineResourceFile(), TOPPASBase::refreshPipelineParameters(), TOPPASBase::runPipeline(), TOPPASBase::savePipeline(), TOPPASBase::savePipelineAs(), TOPPASBase::savePipelineResourceFile(), TOPPASBase::showAsWindow_(), and TOPPASBase::updateMenu().

## ◆ getWindowId()

Int getWindowId | ( |  | ) |

override virtual

getter from EnhancedTabBarWidgetInterface

Implements EnhancedTabBarWidgetInterface.

Referenced by TOPPASBase::showAsWindow_(), TOPPASBase::updateTabBar(), and TOPPASBase::window_().

## ◆ keyPressEvent()

void keyPressEvent | ( | QKeyEvent * | e | ) |

override protected

## ◆ keyReleaseEvent()

void keyReleaseEvent | ( | QKeyEvent * | e | ) |

override protected

## ◆ leaveEvent()

void leaveEvent | ( | QEvent * | e | ) |

override protected

## ◆ pipelineDroppedOnWidget

void pipelineDroppedOnWidget | ( | const String & | filename,
|  | bool | new_window
| ) |  |

signal

Emitted when a drop event occurs.

## ◆ resizeEvent()

void resizeEvent | ( | QResizeEvent * | event | ) |

override protected

## ◆ sendCursorStatus

void sendCursorStatus | ( | double | x = `0.0`,
|  | double | y = `0.0`
| ) |  |

signal

Emitted when the cursor position changes (for displaying e.g. in status bar)

## ◆ sendStatusMessage

void sendStatusMessage | ( | std::string | message,
|  | OpenMS::UInt | time
| ) |  |

signal

Emits a status message that should be displayed for `time` ms. If `time` is 0 the message should be displayed until the next message is emitted.

## ◆ setWindowId()

void setWindowId | ( | Int | id | ) |

override virtual

setter from EnhancedTabBarWidgetInterface

Implements EnhancedTabBarWidgetInterface.

Referenced by TOPPASBase::showAsWindow_().

## ◆ toolDroppedOnWidget

void toolDroppedOnWidget | ( | double | x = `0.0`,
|  | double | y = `0.0`
| ) |  |

signal

Emitted when a drop event occurs.

## ◆ wheelEvent()

void wheelEvent | ( | QWheelEvent * | event | ) |

override protected

## ◆ zoom()

void zoom | ( | bool | zoom_in | ) |

Zooms in or out, depending on `zoom_in`.

## Member Data Documentation

## ◆ scene_

TOPPASScene* scene_

protected

The scene visualized by this widget.

## ◆ window_id_

Int window_id_

protected

Widget id used as identifier.