COVISE Core
Public Slots | Signals | Public Member Functions | Properties | Private Slots | Private Attributes | List of all members
covise::WSModule Class Reference

#include <WSModule.h>

Inheritance diagram for covise::WSModule:
Inheritance graph
[legend]
Collaboration diagram for covise::WSModule:
Collaboration graph
[legend]

Public Slots

QString getHost () const
 
QString getName () const
 
QString getID () const
 
QString getDescription () const
 
QString getCategory () const
 
void setTitle (const QString &title)
 
QString getTitle () const
 
WSParametergetParameter (const QString &name) const
 
QPoint getPosition () const
 
void setPosition (int x, int y)
 
QString getInstance () const
 
QStringList getParameterNames () const
 
bool isDead () const
 

Signals

void changed ()
 
void parameterChanged (covise::WSParameter *)
 
void died ()
 
void deleted (const QString &moduleID)
 

Public Member Functions

 WSModule (const QString &name, const QString &category, const QString &host)
 
 WSModule (const covise::covise__Module &module)
 
 ~WSModule ()
 
WSPortaddInputPort (const QString &inName, const QStringList &inTypes, WSPort::PortType inPortType=WSPort::Default)
 
WSPortaddOutputPort (const QString &name, const QStringList &types, WSPort::PortType portType=WSPort::Default)
 
WSParameteraddParameter (const QString &name, const QString &type, const QString &description)
 
WSPortgetOutputPort (const QString &name) const
 
WSPortgetInputPort (const QString &name) const
 
const QMap< QString, WSPort * > & getInputPorts () const
 
const QMap< QString, WSPort * > & getOutputPorts () const
 
const QMap< QString, WSParameter * > & getParameters () const
 
virtual covise::covise__Module getSerialisable () const
 
void setFromSerialisable (const covise::covise__Module &serialisable)
 
void instantiate (const QString &host, const QString &instance)
 
void setID (const QString &id)
 
void setCategory (const QString &category)
 
void setDescription (const QString &description)
 
void setDead (bool dead)
 

Properties

QString name
 
QString id
 
QString host
 
QString description
 
QString category
 
QString title
 
QString instance
 
bool dead
 

Private Slots

void parameterChangedCB (covise::WSParameter *)
 

Private Attributes

QMap< QString, WSParameter * > parameters
 
QMap< QString, WSPort * > inputPorts
 
QMap< QString, WSPort * > outputPorts
 
QPoint position
 

Constructor & Destructor Documentation

◆ WSModule() [1/2]

covise::WSModule::WSModule ( const QString &  name,
const QString &  category,
const QString &  host 
)

◆ WSModule() [2/2]

covise::WSModule::WSModule ( const covise::covise__Module &  module)
explicit

◆ ~WSModule()

covise::WSModule::~WSModule ( )

Member Function Documentation

◆ addInputPort()

covise::WSPort * covise::WSModule::addInputPort ( const QString &  inName,
const QStringList &  inTypes,
WSPort::PortType  inPortType = WSPort::Default 
)
Returns
WSPort *
Parameters
nameThe name of input port
typesThe data types that can be connected to this port
portTypeType of the port

◆ addOutputPort()

covise::WSPort * covise::WSModule::addOutputPort ( const QString &  name,
const QStringList &  types,
WSPort::PortType  portType = WSPort::Default 
)
Returns
WSPort *
Parameters
nameThe name of output port
typesThe data types that can be connected to this port
portTypeType of the port

◆ addParameter()

covise::WSParameter * covise::WSModule::addParameter ( const QString &  name,
const QString &  type,
const QString &  description 
)
Returns
WSParameter *
Parameters
nameThe name of parameter
typeThe type of parameter
descriptionDescription of the parameter

◆ changed

void covise::WSModule::changed ( )
signal

◆ deleted

void covise::WSModule::deleted ( const QString &  moduleID)
signal

◆ died

void covise::WSModule::died ( )
signal

◆ getCategory

QString covise::WSModule::getCategory ( ) const
inlineslot

Get the category of the module

Returns
QString: category

◆ getDescription

QString covise::WSModule::getDescription ( ) const
inlineslot

Get the description of module

Returns
QString: description

◆ getHost

QString covise::WSModule::getHost ( ) const
inlineslot

Get the host the module is running on, may be empty

Returns
QString: host

◆ getID

QString covise::WSModule::getID ( ) const
inlineslot

Get the ID of the module

Returns
QString: name

◆ getInputPort()

covise::WSPort * covise::WSModule::getInputPort ( const QString &  name) const

◆ getInputPorts()

const QMap< QString, WSPort * > & covise::WSModule::getInputPorts ( ) const
inline

Get the output ports

Returns
QMap: inputPorts

◆ getInstance

QString covise::WSModule::getInstance ( ) const
inlineslot

◆ getName

QString covise::WSModule::getName ( ) const
inlineslot

Get the name of the module

Returns
QString: name

◆ getOutputPort()

covise::WSPort * covise::WSModule::getOutputPort ( const QString &  name) const

◆ getOutputPorts()

const QMap< QString, WSPort * > & covise::WSModule::getOutputPorts ( ) const
inline

Get the output ports

Returns
QMap: outputPorts

◆ getParameter

covise::WSParameter * covise::WSModule::getParameter ( const QString &  name) const
slot

Get a named parameter of the module

Returns
WSParameter: the parameter with given name or 0 if nothing found

◆ getParameterNames

QStringList covise::WSModule::getParameterNames ( ) const
slot

◆ getParameters()

const QMap< QString, WSParameter * > & covise::WSModule::getParameters ( ) const
inline

Get the parameters of the module

Returns
QMap: parameters

◆ getPosition

QPoint covise::WSModule::getPosition ( ) const
inlineslot

Get the location on the canvas of the module

Returns
QPoint: the X and Y position

◆ getSerialisable()

covise::covise__Module covise::WSModule::getSerialisable ( ) const
virtual

◆ getTitle

QString covise::WSModule::getTitle ( ) const
inlineslot

Get the title of the module

Returns
QString: title

◆ instantiate()

void covise::WSModule::instantiate ( const QString &  host,
const QString &  instance 
)

This method is called when a non-running module is instantiated.

◆ isDead

bool covise::WSModule::isDead ( ) const
inlineslot

◆ parameterChanged

void covise::WSModule::parameterChanged ( covise::WSParameter )
signal

◆ parameterChangedCB

void covise::WSModule::parameterChangedCB ( covise::WSParameter p)
privateslot

◆ setCategory()

void covise::WSModule::setCategory ( const QString &  category)
inline

Set the category of the module. Not propagated to COVISE.

Parameters
categorythe new category

◆ setDead()

void covise::WSModule::setDead ( bool  dead)

Marks the module as crashed. Not propagated to COVISE.

Parameters
deadif true marks the module as dead.

◆ setDescription()

void covise::WSModule::setDescription ( const QString &  description)
inline

Set the description of the module. Not propagated to COVISE.

Parameters
descriptionthe new description

◆ setFromSerialisable()

void covise::WSModule::setFromSerialisable ( const covise::covise__Module &  serialisable)

◆ setID()

void covise::WSModule::setID ( const QString &  id)
inline

Set the module ID. Not propagated to COVISE.

Parameters
idthe new module ID

◆ setPosition

void covise::WSModule::setPosition ( int  x,
int  y 
)
inlineslot

Set the location on the canvas of the module

Parameters
xthe X position
ythe Y position

◆ setTitle

void covise::WSModule::setTitle ( const QString &  title)
slot

Set the title of the module

Parameters
titleThe new value of category

Member Data Documentation

◆ inputPorts

QMap<QString, WSPort *> covise::WSModule::inputPorts
private

◆ outputPorts

QMap<QString, WSPort *> covise::WSModule::outputPorts
private

◆ parameters

QMap<QString, WSParameter *> covise::WSModule::parameters
private

◆ position

QPoint covise::WSModule::position
private

Property Documentation

◆ category

QString covise::WSModule::category
read

◆ dead

bool covise::WSModule::dead
read

◆ description

QString covise::WSModule::description
read

◆ host

QString covise::WSModule::host
read

◆ id

QString covise::WSModule::id
read

◆ instance

QString covise::WSModule::instance
read

◆ name

QString covise::WSModule::name
read

◆ title

QString covise::WSModule::title
readwrite

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