MorphoGraphX  2.0-1-227
Public Member Functions | Static Public Member Functions | List of all members
mgx::ProcessParms Class Reference

#include <ProcessParms.hpp>

+ Inheritance diagram for mgx::ProcessParms:

Public Member Functions

 ProcessParms ()
 
virtual ~ProcessParms ()
 
QString name () const
 Process name that is using the parameters. More...
 
QString description () const
 Process description. More...
 
QStringList parmNames () const
 List of named parameters. More...
 
QStringList parmDescs () const
 List of parameters descriptions. More...
 
QStringList parmDefaults () const
 List of default parms. More...
 
ParmChoiceList parmChoice () const
 Allows the parameter to have a pick list in the GUI. More...
 
QIcon icon () const
 Icon to use to represent the process in the GUI. More...
 
QString parm (const QString &name) const
 Get a single parameter value by name. More...
 
const QStringList & getParms ()
 Get the list of parameter values. More...
 
bool setName (const QString &name)
 Set the name. More...
 
bool setDesc (const QString &description)
 Set the description. More...
 
bool addParm (const QString &parmName, const QString &desc, const QString &def, const QStringList &choices=QStringList())
 Add a parameter to the list. More...
 
bool insertParm (const QString &parmName, const QString &desc, const QString &def, int pos, const QStringList &choices=QStringList())
 Insert a parameter to the list. More...
 
bool setParm (const QString &parmName, const QString &parm)
 Set the parameter's value. More...
 
bool setParms (const QStringList &parms)
 Set all the parameter values. More...
 
bool setParmDesc (const QString &parmName, const QString &desc)
 Set the parameter's description. More...
 
bool setParmDefault (const QString &parmName, const QString &def)
 Set the parameter's default value. More...
 
bool setParmChoices (const QString &parmName, const QStringList &choices)
 Set the parameter's choices. More...
 
bool setIcon (const QIcon &icon)
 Set the icon. More...
 
QStringList parmList (const QString &key=QString()) const
 Return a list of parameter names. More...
 

Static Public Member Functions

static QStringList booleanChoice ()
 Helper function that provides a list of choices for a boolean argument. More...
 
static QStringList storeChoice ()
 Helper function that provides a list of choices for choosing from the main or work stack. More...
 
static QStringList stackChoice ()
 Helper function that provides a list of choices for choosing between stack 1 and 2. More...
 
static QStringList meshChoice ()
 Helper function that provides a list of choices for choosing between stack 1 and 2. More...
 
static QStringList dimensionChoice ()
 Helper function that provides a list of choices for choosing the dimension. More...
 
static QStringList dimChoice ()
 Helper function that provides a list of choices for choosing the dimension. More...
 

Detailed Description

Definition at line 33 of file ProcessParms.hpp.

Constructor & Destructor Documentation

◆ ProcessParms()

mgx::ProcessParms::ProcessParms ( )
inline

Definition at line 36 of file ProcessParms.hpp.

◆ ~ProcessParms()

virtual mgx::ProcessParms::~ProcessParms ( )
inlinevirtual

Definition at line 40 of file ProcessParms.hpp.

Member Function Documentation

◆ addParm()

bool mgx::ProcessParms::addParm ( const QString &  parmName,
const QString &  desc,
const QString &  def,
const QStringList &  choices = QStringList() 
)

Add a parameter to the list.

◆ booleanChoice()

static QStringList mgx::ProcessParms::booleanChoice ( )
inlinestatic

Helper function that provides a list of choices for a boolean argument.

Definition at line 83 of file ProcessParms.hpp.

◆ description()

QString mgx::ProcessParms::description ( ) const

Process description.

◆ dimChoice()

static QStringList mgx::ProcessParms::dimChoice ( )
inlinestatic

Helper function that provides a list of choices for choosing the dimension.

Definition at line 103 of file ProcessParms.hpp.

◆ dimensionChoice()

static QStringList mgx::ProcessParms::dimensionChoice ( )
inlinestatic

Helper function that provides a list of choices for choosing the dimension.

Definition at line 99 of file ProcessParms.hpp.

◆ getParms()

const QStringList& mgx::ProcessParms::getParms ( )

Get the list of parameter values.

◆ icon()

QIcon mgx::ProcessParms::icon ( ) const

Icon to use to represent the process in the GUI.

To use an icon present in the resources, you must precede the path with a colon ":/images/myicon.png".

◆ insertParm()

bool mgx::ProcessParms::insertParm ( const QString &  parmName,
const QString &  desc,
const QString &  def,
int  pos,
const QStringList &  choices = QStringList() 
)

Insert a parameter to the list.

◆ meshChoice()

static QStringList mgx::ProcessParms::meshChoice ( )
inlinestatic

Helper function that provides a list of choices for choosing between stack 1 and 2.

Definition at line 95 of file ProcessParms.hpp.

◆ name()

QString mgx::ProcessParms::name ( ) const

Process name that is using the parameters.

Note that the name must be a valid identifier in Python once the spaces are replaced by underscores. The name can contain spaces, but should not contain underscores or slashes. Slashed are translated double underscore, so double spaces are not allowed.

◆ parm()

QString mgx::ProcessParms::parm ( const QString &  name) const

Get a single parameter value by name.

◆ parmChoice()

ParmChoiceList mgx::ProcessParms::parmChoice ( ) const

Allows the parameter to have a pick list in the GUI.

Note that no mechanism forces the user to choose one the choices in the list, any text may still be entered.

◆ parmDefaults()

QStringList mgx::ProcessParms::parmDefaults ( ) const

List of default parms.

◆ parmDescs()

QStringList mgx::ProcessParms::parmDescs ( ) const

List of parameters descriptions.

There must be as many parameters than defaults.

◆ parmList()

QStringList mgx::ProcessParms::parmList ( const QString &  key = QString()) const

Return a list of parameter names.

◆ parmNames()

QStringList mgx::ProcessParms::parmNames ( ) const

List of named parameters.

There must be as many parameters than defaults.

◆ setDesc()

bool mgx::ProcessParms::setDesc ( const QString &  description)

Set the description.

◆ setIcon()

bool mgx::ProcessParms::setIcon ( const QIcon &  icon)

Set the icon.

◆ setName()

bool mgx::ProcessParms::setName ( const QString &  name)

Set the name.

◆ setParm()

bool mgx::ProcessParms::setParm ( const QString &  parmName,
const QString &  parm 
)

Set the parameter's value.

◆ setParmChoices()

bool mgx::ProcessParms::setParmChoices ( const QString &  parmName,
const QStringList &  choices 
)

Set the parameter's choices.

◆ setParmDefault()

bool mgx::ProcessParms::setParmDefault ( const QString &  parmName,
const QString &  def 
)

Set the parameter's default value.

◆ setParmDesc()

bool mgx::ProcessParms::setParmDesc ( const QString &  parmName,
const QString &  desc 
)

Set the parameter's description.

◆ setParms()

bool mgx::ProcessParms::setParms ( const QStringList &  parms)

Set all the parameter values.

◆ stackChoice()

static QStringList mgx::ProcessParms::stackChoice ( )
inlinestatic

Helper function that provides a list of choices for choosing between stack 1 and 2.

Definition at line 91 of file ProcessParms.hpp.

◆ storeChoice()

static QStringList mgx::ProcessParms::storeChoice ( )
inlinestatic

Helper function that provides a list of choices for choosing from the main or work stack.

Definition at line 87 of file ProcessParms.hpp.


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