OpenWalnut
1.5.0dev
|
Implements a UI that executes scripts. More...
#include <WScriptUI.h>
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... | |
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.
WScriptUI::WScriptUI | ( | int | argc, |
char ** | argv, | ||
boost::program_options::variables_map const & | options | ||
) |
Constructor.
argc | number of arguments given on command line. |
argv | arguments given on command line. |
options | The program options. |
Definition at line 44 of file WScriptUI.cpp.
|
virtual |
Destructor.
Definition at line 50 of file WScriptUI.cpp.
|
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.
Implements WUI.
Definition at line 224 of file WScriptUI.cpp.
|
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.
configPath | This 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().
|
virtual |
Runs the UI.
Implements WUI.
Definition at line 54 of file WScriptUI.cpp.
References wlog::error(), WGraphicsEngine::getGraphicsEngine(), WPathHelper::getHomePath(), WPathHelper::getPathHelper(), WKernel::getRunningKernel(), WKernel::getScriptEngine(), WKernel::instance(), loadToolboxes(), WUI::m_argv, WUI::m_isInitialized, m_programOptions, WThreadedRunner::wait(), and WException::what().
|
protected |