OpenMS
EnhancedWorkspace Class Reference

#include <OpenMS/VISUAL/EnhancedWorkspace.h>

Inheritance diagram for EnhancedWorkspace:
[legend]
Collaboration diagram for EnhancedWorkspace:
[legend]

Signals

void dropReceived (const QMimeData *data, QWidget *source, int id)
 Signal that is emitted, when a drag-and-drop action ends on this widget. More...
 

Public Member Functions

 EnhancedWorkspace (QWidget *parent)
 Constructor. More...
 
 ~EnhancedWorkspace () override
 Destructor. More...
 
QMdiSubWindow * addSubWindow (QWidget *widget)
 
void tileHorizontal ()
 arrange all windows horizontally More...
 
void tileVertical ()
 arrange all windows vertically More...
 
EnhancedTabBarWidgetInterfacegetWidget (int id) const
 

Protected Member Functions

Reimplemented Qt events
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 

Constructor & Destructor Documentation

◆ EnhancedWorkspace()

EnhancedWorkspace ( QWidget parent)

Constructor.

◆ ~EnhancedWorkspace()

~EnhancedWorkspace ( )
override

Destructor.

Member Function Documentation

◆ addSubWindow()

QMdiSubWindow* addSubWindow ( QWidget widget)

Adds a subwindow to the QMdiArea Qt will add a System menu (which shows when you right-click on the subwindows' local top bar). This menu will contain a shortcut for Ctrl-W, which makes our custom Ctrl-W in TOPPView's menu ambiguous. Upon pressing it, you will get a QAction::event: Ambiguous shortcut overload: Ctrl+W on the console and no triggered signal. To prevent this we simply set the SystemMenu to null (no menu will show when you right-click). If you do not want that, call Qt's overload of addSubWindow

Referenced by TOPPASBase::showAsWindow_(), and TOPPViewBase::showPlotWidgetInWindow().

◆ dragEnterEvent()

void dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected

◆ dragMoveEvent()

void dragMoveEvent ( QDragMoveEvent *  event)
overrideprotected

◆ dropEvent()

void dropEvent ( QDropEvent *  event)
overrideprotected

◆ dropReceived

void dropReceived ( const QMimeData *  data,
QWidget source,
int  id 
)
signal

Signal that is emitted, when a drag-and-drop action ends on this widget.

Referenced by TOPPViewBase::TOPPViewBase().

◆ getWidget()

EnhancedTabBarWidgetInterface* getWidget ( int  id) const

get the subwindow with the given id (for all subwindows which inherit from EnhancedTabBarWidgetInterface) Returns nullptr if window is not present

Referenced by TOPPViewBase::addData(), TOPPViewBase::closeByTab(), TOPPViewBase::showWindow(), and TOPPASBase::window_().

◆ tileHorizontal()

void tileHorizontal ( )

arrange all windows horizontally

◆ tileVertical()

void tileVertical ( )

arrange all windows vertically