OpenMS
TOPPASWidget.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Johannes Veit $
6 // $Authors: Johannes Junker $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 // OpenMS_GUI config
12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13 
14 #include <OpenMS/CONCEPT/Types.h>
17 
18 #include <QtWidgets/QGraphicsView>
19 
20 namespace OpenMS
21 {
22  class TOPPASScene;
23  class Param;
24 
34  class OPENMS_GUI_DLLAPI TOPPASWidget :
35  public QGraphicsView,
37  {
38  Q_OBJECT
39 
40 public:
41 
43  TOPPASWidget(const Param & preferences, QWidget * parent = nullptr, const String & tmp_path = "");
44 
46  ~TOPPASWidget() override;
47 
51  void zoom(bool zoom_in);
52 
53 signals:
54 
56  void sendStatusMessage(std::string message, OpenMS::UInt time);
58  void sendCursorStatus(double x = 0.0, double y = 0.0);
60  void toolDroppedOnWidget(double x = 0.0, double y = 0.0);
62  void pipelineDroppedOnWidget(const String & filename, bool new_window);
63 
64 protected:
65 
68 
70 
71  void wheelEvent(QWheelEvent * event) override;
72  void keyPressEvent(QKeyEvent * e) override;
73  void keyReleaseEvent(QKeyEvent * e) override;
74  void leaveEvent(QEvent * e) override;
75  void enterEvent(QEvent * e) override;
76  void dragEnterEvent(QDragEnterEvent * event) override;
77  void dragMoveEvent(QDragMoveEvent * event) override;
78  void dropEvent(QDropEvent * event) override;
79  void resizeEvent(QResizeEvent * event) override;
80  void closeEvent(QCloseEvent * e) override;
82  };
83 }
84 
Widgets that are placed into an EnhancedTabBar must implement this interface.
Definition: EnhancedTabBarWidgetInterface.h:59
Management and storage of parameters / INI files.
Definition: Param.h:44
A more convenient string class.
Definition: String.h:34
Definition: TOPPASScene.h:61
Widget visualizing and allowing to edit TOPP pipelines.
Definition: TOPPASWidget.h:37
void closeEvent(QCloseEvent *e) override
void enterEvent(QEvent *e) override
~TOPPASWidget() override
Destructor.
void leaveEvent(QEvent *e) override
void keyReleaseEvent(QKeyEvent *e) override
void dragMoveEvent(QDragMoveEvent *event) override
void keyPressEvent(QKeyEvent *e) override
void sendCursorStatus(double x=0.0, double y=0.0)
Emitted when the cursor position changes (for displaying e.g. in status bar)
void pipelineDroppedOnWidget(const String &filename, bool new_window)
Emitted when a drop event occurs.
TOPPASScene * getScene()
Returns the scene.
void dragEnterEvent(QDragEnterEvent *event) override
void toolDroppedOnWidget(double x=0.0, double y=0.0)
Emitted when a drop event occurs.
void zoom(bool zoom_in)
Zooms in or out, depending on zoom_in.
void resizeEvent(QResizeEvent *event) override
TOPPASScene * scene_
The scene visualized by this widget.
Definition: TOPPASWidget.h:67
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 displ...
void wheelEvent(QWheelEvent *event) override
TOPPASWidget(const Param &preferences, QWidget *parent=nullptr, const String &tmp_path="")
Default constructor.
void dropEvent(QDropEvent *event) override
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19