OpenMS
2.7.0
|
The file menu items for TOPPView. More...
#include <OpenMS/VISUAL/TOPPViewMenu.h>
Classes | |
struct | ActionRequirement_ |
Public Slots | |
void | update (const FS_TV status, const LayerData::DataType layer_type) |
enable/disable entries according to a given state of TOPPViewBase More... | |
Public Member Functions | |
TOPPViewMenu (TOPPViewBase *const parent, EnhancedWorkspace *const ws, RecentFilesMenu *const recent_files) | |
Constructor which connects slots/signals of this class with the objects given as arguments. More... | |
void | addWindowToggle (QAction *const window_toggle) |
add a menu entry at 'Windows -> [Windowname]' to allow hiding/showing a TOPPView subwindow (e.g. Log, Layers, Filters, ...) More... | |
Private Member Functions | |
QAction * | addAction_ (QAction *action, const TV_STATUS req, const FS_LAYER layer_set=FS_LAYER()) |
QAction * | addAction_ (QAction *action, const FS_TV req, const FS_LAYER layer_set=FS_LAYER()) |
overload for multiple requirements More... | |
Private Attributes | |
std::vector< ActionRequirement_ > | menu_items_ |
holds all actions which have a set of requirements, i.e. depend on the state of TOPPViewBase More... | |
QMenu * | m_windows_ |
the windows submenu (holds all windows added via addWindowToggle()) More... | |
The file menu items for TOPPView.
TOPPViewMenu | ( | TOPPViewBase *const | parent, |
EnhancedWorkspace *const | ws, | ||
RecentFilesMenu *const | recent_files | ||
) |
Constructor which connects slots/signals of this class with the objects given as arguments.
parent | Base class which actually shows the menu (as part of a QMainWindow) |
ws | Workspace to connect some signals to |
recent_files | A submenu for recent files which will be integrated as part of 'File -> Recent files' |
|
private |
overload for multiple requirements
|
private |
fills menu_items_ members with ActionRequirements and returns the just created object Only use this for items which depend on the state of TOPPViewBase, e.g. close() can only work if something is open. But open() is always allowed.
void addWindowToggle | ( | QAction *const | window_toggle | ) |
add a menu entry at 'Windows -> [Windowname]' to allow hiding/showing a TOPPView subwindow (e.g. Log, Layers, Filters, ...)
Referenced by TOPPViewBase::TOPPViewBase().
|
slot |
enable/disable entries according to a given state of TOPPViewBase
Referenced by TOPPViewBase::updateMenu().
|
private |
the windows submenu (holds all windows added via addWindowToggle())
|
private |
holds all actions which have a set of requirements, i.e. depend on the state of TOPPViewBase