Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
Core::EnvisionManager Class Reference

The EnvisionManager interface provides various information about the Envision system. More...

Public Types

using EventPrePostAction = std::function< void(QObject *receiver, QEvent *event)>
 

Public Member Functions

 ~EnvisionManager ()
 
void addPostEventAction (EventPrePostAction action)
 Adds action to the list of actions that will be executed after dispatching an event. More...
 
void addPreEventAction (EventPrePostAction action)
 Adds action to the list of actions that will be executed prior to dispatching an event. More...
 
bool areSelfTestsPending () const
 Returns true if there are any self tests that will be run after all plug-ins have been initialized. More...
 
void exit ()
 
QList< PluginInfogetAllLoadedPluginsInfo ()
 Returns a list of all the plug-ins currently loaded in the system. More...
 
QMainWindow * getMainWindow ()
 Returns the main window of the application. More...
 

Static Public Member Functions

static void processPostEventActions (QObject *receiver, QEvent *event)
 
static void processPreEventActions (QObject *receiver, QEvent *event)
 

Private Member Functions

void setMainWindow (QMainWindow *mainWindow)
 
void setPluginManager (PluginManager *pm)
 
void setTestRunner (TestRunner *tr)
 

Static Private Member Functions

static QList< EventPrePostAction > & postEventActions ()
 
static QList< EventPrePostAction > & preEventActions ()
 

Private Attributes

bool exitSet_ {}
 
QMainWindow * mainWindow_ {}
 
PluginManagerpm_ {}
 
TestRunnertestRunner_ {}
 

Friends

int coreMain (int argc, char *argv[])
 This function is executed when Envision is started. More...
 

Detailed Description

The EnvisionManager interface provides various information about the Envision system.

An instance of an object implementing this interface is passed to each plug-in that is loaded in the system.

Member Typedef Documentation

◆ EventPrePostAction

using Core::EnvisionManager::EventPrePostAction = std::function<void (QObject* receiver, QEvent* event)>

Constructor & Destructor Documentation

◆ ~EnvisionManager()

Core::EnvisionManager::~EnvisionManager ( )

Member Function Documentation

◆ addPostEventAction()

void Core::EnvisionManager::addPostEventAction ( EventPrePostAction  action)

Adds action to the list of actions that will be executed after dispatching an event.

The provided action function will be called after any event for any object is dispatched.

◆ addPreEventAction()

void Core::EnvisionManager::addPreEventAction ( EventPrePostAction  action)

Adds action to the list of actions that will be executed prior to dispatching an event.

The provided action function will be called before any event for any object is dispatched.

◆ areSelfTestsPending()

bool Core::EnvisionManager::areSelfTestsPending ( ) const

Returns true if there are any self tests that will be run after all plug-ins have been initialized.

◆ exit()

void Core::EnvisionManager::exit ( )

◆ getAllLoadedPluginsInfo()

QList< PluginInfo > Core::EnvisionManager::getAllLoadedPluginsInfo ( )

Returns a list of all the plug-ins currently loaded in the system.

If this method is called during the initialization phase of Envision, only the plug-ins loaded so far will be included in the list. If a list of all plug-ins is needed, make sure to call this method after Envision has been fully initialized.

◆ getMainWindow()

QMainWindow * Core::EnvisionManager::getMainWindow ( )

Returns the main window of the application.

This can be used by visualization plug-ins to draw custom components.

◆ postEventActions()

QList< EnvisionManager::EventPrePostAction > & Core::EnvisionManager::postEventActions ( )
staticprivate

◆ preEventActions()

QList< EnvisionManager::EventPrePostAction > & Core::EnvisionManager::preEventActions ( )
staticprivate

◆ processPostEventActions()

void Core::EnvisionManager::processPostEventActions ( QObject *  receiver,
QEvent *  event 
)
static

◆ processPreEventActions()

void Core::EnvisionManager::processPreEventActions ( QObject *  receiver,
QEvent *  event 
)
static

◆ setMainWindow()

void Core::EnvisionManager::setMainWindow ( QMainWindow *  mainWindow)
private

◆ setPluginManager()

void Core::EnvisionManager::setPluginManager ( PluginManager pm)
private

◆ setTestRunner()

void Core::EnvisionManager::setTestRunner ( TestRunner tr)
private

Friends And Related Function Documentation

◆ coreMain

int coreMain ( int  argc,
char *  argv[] 
)
friend

This function is executed when Envision is started.

It shows the main window, loads all plug-ins and starts the event loop.

Member Data Documentation

◆ exitSet_

bool Core::EnvisionManager::exitSet_ {}
private

◆ mainWindow_

QMainWindow* Core::EnvisionManager::mainWindow_ {}
private

◆ pm_

PluginManager* Core::EnvisionManager::pm_ {}
private

◆ testRunner_

TestRunner* Core::EnvisionManager::testRunner_ {}
private