Workspace 6.21.5
Public Member Functions | List of all members
EmptyPluginMenu Class Reference

A default implementation of PluginMenu for plugins that do not supply a custom menu for the Workspace editor. More...

#include <Workspace/Application/Plugins/emptypluginmenu.h>

Inheritance diagram for EmptyPluginMenu:
[legend]

Public Member Functions

 EmptyPluginMenu ()
 
 ~EmptyPluginMenu () override
 
void createMenu () override
 Ignored as the getMenu() implementation returns NULL.
 
void destroy () override
 
QMenu * getMenu () override
 Returns a null pointer to indicate to the framework that this plugin does not require an integrated menu.
 
QString getMenuName () const override
 Ignored as the getMenu() implementation returns NULL.
 
bool isTopLevelMenu () const override
 Ignored as the getMenu() implementation returns NULL.
 
virtual void createMenu ()=0
 Here is where the menu items are created and connections made.
 
virtual void destroy ()=0
 
virtual QMenu * getMenu ()
 This returns a pointer to the main plugin menu.
 
virtual QString getMenuName () const =0
 
virtual bool isTopLevelMenu () const
 Returns true if the menu is to be directly inserted into the application's main menu bar.
 

Additional Inherited Members

- Public Slots inherited from PluginMenu
virtual void onCurrentWorkflowChanged (const QString &workflowFileName)
 
- Signals inherited from PluginMenu
void openWorkflow (const QString &filePath)
 Sends a request to the Workspace editor to open a new workflow.
 
- Protected Member Functions inherited from PluginMenu
 PluginMenu ()
 
 ~PluginMenu () override=default
 
QMainWindow * applicationWindow ()
 Returns a pointer to the main application window.
 
- Protected Attributes inherited from PluginMenu
QString currentWorkflow_
 
std::unique_ptr< QMenu > mainMenu_
 

Detailed Description

Constructor & Destructor Documentation

◆ EmptyPluginMenu()

◆ ~EmptyPluginMenu()

~EmptyPluginMenu ( )
overridedefault

Deletes the plugin menu .

Member Function Documentation

◆ createMenu()

void createMenu ( )
inlineoverridevirtual

Implements PluginMenu.

◆ destroy()

void destroy ( )
overridevirtual

Subclasses will almost always implement this function simply as a call to the delete operator, or to some kind of factory singleton which does this. Since PluginMenu subclass objects are usually instantiated by a singleton within the plugin, the destroy() function is necessary to ensure that the plugin also deletes instances.

Implements PluginMenu.

◆ getMenu()

QMenu * getMenu ( )
inlineoverridevirtual

Reimplemented from PluginMenu.

◆ getMenuName()

QString getMenuName ( ) const
inlineoverridevirtual

Implements PluginMenu.

◆ isTopLevelMenu()

bool isTopLevelMenu ( ) const
overridevirtual

Reimplemented from PluginMenu.