COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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

covise::WSModule::WSModule ( const QString &  name,
const QString &  category,
const QString &  host 
)
covise::WSModule::WSModule ( const covise::covise__Module &  module)
explicit
covise::WSModule::~WSModule ( )

Member Function Documentation

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
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
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
void covise::WSModule::changed ( )
signal
void covise::WSModule::deleted ( const QString &  moduleID)
signal
void covise::WSModule::died ( )
signal
QString covise::WSModule::getCategory ( ) const
inlineslot

Get the category of the module

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

Get the description of module

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

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

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

Get the ID of the module

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

Get the output ports

Returns
QMap: inputPorts
QString covise::WSModule::getInstance ( ) const
inlineslot
QString covise::WSModule::getName ( ) const
inlineslot

Get the name of the module

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

Get the output ports

Returns
QMap: outputPorts
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
QStringList covise::WSModule::getParameterNames ( ) const
slot
const QMap<QString, WSParameter *>& covise::WSModule::getParameters ( ) const
inline

Get the parameters of the module

Returns
QMap: parameters
QPoint covise::WSModule::getPosition ( ) const
inlineslot

Get the location on the canvas of the module

Returns
QPoint: the X and Y position
covise::covise__Module covise::WSModule::getSerialisable ( ) const
virtual
QString covise::WSModule::getTitle ( ) const
inlineslot

Get the title of the module

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

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

bool covise::WSModule::isDead ( ) const
inlineslot
void covise::WSModule::parameterChanged ( covise::WSParameter )
signal
void covise::WSModule::parameterChangedCB ( covise::WSParameter p)
privateslot
void covise::WSModule::setCategory ( const QString &  category)
inline

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

Parameters
categorythe new category
void covise::WSModule::setDead ( bool  dead)

Marks the module as crashed. Not propagated to COVISE.

Parameters
deadif true marks the module as dead.
void covise::WSModule::setDescription ( const QString &  description)
inline

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

Parameters
descriptionthe new description
void covise::WSModule::setFromSerialisable ( const covise::covise__Module &  serialisable)
void covise::WSModule::setID ( const QString &  id)
inline

Set the module ID. Not propagated to COVISE.

Parameters
idthe new module ID
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
void covise::WSModule::setTitle ( const QString &  title)
slot

Set the title of the module

Parameters
titleThe new value of category

Member Data Documentation

QMap<QString, WSPort *> covise::WSModule::inputPorts
private
QMap<QString, WSPort *> covise::WSModule::outputPorts
private
QMap<QString, WSParameter *> covise::WSModule::parameters
private
QPoint covise::WSModule::position
private

Property Documentation

QString covise::WSModule::category
read
bool covise::WSModule::dead
read
QString covise::WSModule::description
read
QString covise::WSModule::host
read
QString covise::WSModule::id
read
QString covise::WSModule::instance
read
QString covise::WSModule::name
read
QString covise::WSModule::title
readwrite

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