OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WScriptUI Class Reference

Implements a UI that executes scripts. More...

#include <WScriptUI.h>

+ Inheritance diagram for WScriptUI:
+ Collaboration diagram for WScriptUI:

Public Member Functions

 WScriptUI (int argc, char **argv, boost::program_options::variables_map const &options)
 Constructor. More...
 
virtual ~WScriptUI ()
 Destructor. More...
 
virtual int run ()
 Runs the UI. More...
 
virtual WUIWidgetFactory::SPtr getWidgetFactory () const
 Returns the widget factory of the UI. More...
 
- Public Member Functions inherited from WUI
 WUI (int argc, char **argv)
 Constructor. More...
 
virtual ~WUI ()
 Destructor. More...
 
virtual const WFlag< bool > & isInitialized () const
 Returns the init flag. More...
 

Protected Member Functions

virtual void loadToolboxes (boost::filesystem::path configPath)
 If you need to load additional modules from your toolboxes, you might want specify these paths in a config file. More...
 

Protected Attributes

boost::program_options::variables_map const & m_programOptions
 The programm options. More...
 
- Protected Attributes inherited from WUI
WFlag< bool > m_isInitialized
 Flag determining whether the UI is properly initialized. More...
 
int m_argc
 Number of command line arguments given. More...
 
char ** m_argv
 Command line arguments given. More...
 

Detailed Description

Implements a UI that executes scripts.

These can be read from files or input by the user, depending on the parameters supplied to the executable.

Definition at line 42 of file WScriptUI.h.

Constructor & Destructor Documentation

◆ WScriptUI()

WScriptUI::WScriptUI ( int  argc,
char **  argv,
boost::program_options::variables_map const &  options 
)

Constructor.

Parameters
argcnumber of arguments given on command line.
argvarguments given on command line.
optionsThe program options.

Definition at line 44 of file WScriptUI.cpp.

◆ ~WScriptUI()

WScriptUI::~WScriptUI ( )
virtual

Destructor.

Definition at line 50 of file WScriptUI.cpp.

Member Function Documentation

◆ getWidgetFactory()

WUIWidgetFactory::SPtr WScriptUI::getWidgetFactory ( ) const
virtual

Returns the widget factory of the UI.

The Script UI always returns NULL as it does not support widgets. The WUIRequirement checks for this too and thus disallows modules using WUI.

Returns
the factory. Use this to create your widget instances.

Implements WUI.

Definition at line 224 of file WScriptUI.cpp.

◆ loadToolboxes()

void WScriptUI::loadToolboxes ( boost::filesystem::path  configPath)
protectedvirtual

If you need to load additional modules from your toolboxes, you might want specify these paths in a config file.

In that file we need a line starting with: "additionalModulePaths=" followed by a comma separated list of paths. Please note this is the same format as in the config.qt4gui file, so you may symlink it.

Parameters
configPathThis is the path to the config file. If not existent, nothing will be thrown or done.

Definition at line 197 of file WScriptUI.cpp.

References WPathHelper::getPathHelper(), and wlog::info().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

int WScriptUI::run ( )
virtual

Member Data Documentation

◆ m_programOptions

boost::program_options::variables_map const& WScriptUI::m_programOptions
protected

The programm options.

Definition at line 85 of file WScriptUI.h.

Referenced by run().


The documentation for this class was generated from the following files: