ImFusion SDK 4.3
PythonSettings Class Reference

#include <ImFusion/Python/PythonSettings.h>

Settings for the Python plugin. More...

+ Inheritance diagram for PythonSettings:

Detailed Description

Settings for the Python plugin.

Public Types

enum  ConsoleType : int { NoConsole = 0 , StandardConsole = 1 , IPythonConsole = 2 }
 

Public Member Functions

std::vector< std::stringenvironmentsList () const
 Same as "environments" but already split into a list.
 
void setEnvironmentsList (const std::vector< std::string > &environments)
 Sets "environment" to the given list. Does not change activeEnvironment.
 
void autoDetectPythonEnvironments ()
 Auto-detects installed Python environments and adds them to the "environments" setting.
 
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< ConsoleType > consoleType {"consoleType", ConsoleType::NoConsole, this}
 The ConsoleType of the embedded interactive console.
 
Parameter< std::stringconsoleStartupCommands {"consoleStartupCommands", "", this}
 Start-up commands which run when the interactive console starts.
 
Parameter< std::stringstartupScript {"startupScript", "", this}
 Optional path to a script that should be executed when the interpreter is started.
 
Parameter< bool > dontModifySysPath {"dontModifySysPath", false, this}
 Whether the ImFusionPython plugin is allowed to modify sys.path to locate the imfusion module.
 
Parameter< std::stringactiveEnvironment {"activeEnvironment", "", this}
 The path to the Python interpreter (or to the Python shared library) that should be used by the ImFusionPython plugin.
 
Parameter< std::stringenvironments {"environments", "", this}
 List of all available Python environments separated by spaces.
 
Parameter< bool > lastInitializationCrashed {"lastInitializationCrashed", false, this}
 This is an internal setting that is used to detect if the initialization of the interpreter crashed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Additional Inherited Members

- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ autoDetectPythonEnvironments()

void autoDetectPythonEnvironments ( )

Auto-detects installed Python environments and adds them to the "environments" setting.

Only adds entries that are not already in the list.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from Configurable.

Member Data Documentation

◆ consoleStartupCommands

Parameter<std::string> consoleStartupCommands {"consoleStartupCommands", "", this}

Start-up commands which run when the interactive console starts.

These only affect the console.

◆ environments

Parameter<std::string> environments {"environments", "", this}

List of all available Python environments separated by spaces.

The exact format depends on Properties::setParam<std::vector<std::string>>. Use environmentsList instead.

◆ lastInitializationCrashed

Parameter<bool> lastInitializationCrashed {"lastInitializationCrashed", false, this}

This is an internal setting that is used to detect if the initialization of the interpreter crashed.

This should only be used by the PythonPlugin and PythonInterpreter!


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close