EnumerationParameter Class Reference

Class representing parameters for enumeration values. More...

#include <EnumerationParameter.h>

Inheritance diagram for EnumerationParameter:

Inheritance graph
[legend]
Collaboration diagram for EnumerationParameter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EnumerationParameter (const QString &name, const QVariant &value)
 Constructor of the EnumerationParameter class.
 EnumerationParameter (const EnumerationParameter &parameter)
 Copy constructor of the EnumerationParameter class.
virtual ~EnumerationParameter ()
 Destructor of the EnumerationParameter class.
virtual AbstractParameterclone ()
 Creates an exact copy of the parameter.
int getCurrentIndex ()
 Returns the index of the item currently selected in the enumeration.
QString getCurrentLiteral ()
 Returns the literal of the item currently selected in the enumeration.
QString getCurrentValue ()
 Returns the value of the item currently selected in the enumeration.
QStringList getLiterals () const
 Returns the list of string literals of the enumeration.
void setLiterals (QStringList literals)
 Sets the list of string literals for the enumeration.
QStringList getValues () const
 Returns the list of values of the enumeration.
void setValues (QStringList values)
 Sets the list of values for the enumeration.

Private Attributes

QStringList m_literals
 The list of string literals of the enumeration.
QStringList m_values
 The list of values of the enumeration.


Detailed Description

Class representing parameters for enumeration values.

Constructor & Destructor Documentation

EnumerationParameter::EnumerationParameter ( const QString &  name,
const QVariant &  value 
)

Constructor of the EnumerationParameter class.

Constructors and Destructors.

Parameters:
name The name of the parameter.
value The parameter's value.
Constructor of the EnumerationParameter class.

Parameters:
name The name of the parameter.
value The parameter's value.

EnumerationParameter::EnumerationParameter ( const EnumerationParameter parameter  ) 

Copy constructor of the EnumerationParameter class.

Parameters:
parameter The parameter to copy.

EnumerationParameter::~EnumerationParameter (  )  [virtual]

Destructor of the EnumerationParameter class.


Member Function Documentation

AbstractParameter * EnumerationParameter::clone (  )  [virtual]

Creates an exact copy of the parameter.

Public Functions.

Returns:
An exact copy of the parameter.
Creates an exact copy of the parameter.

Returns:
An exact copy of the parameter.

Reimplemented from Parameter.

int EnumerationParameter::getCurrentIndex (  ) 

Returns the index of the item currently selected in the enumeration.

Convenience function that calls getValue().toInt() on the parameter.

Returns:
The index of the item currently selected in the enumeration.

QString EnumerationParameter::getCurrentLiteral (  ) 

Returns the literal of the item currently selected in the enumeration.

Returns:
The literal of the item currently selected in the enumeration, or an invalid QString when no item is currently selected.

The literal of the item currently selected in the enumeration.

QString EnumerationParameter::getCurrentValue (  ) 

Returns the value of the item currently selected in the enumeration.

Returns:
The value of the item currently selected in the enumeration, or an invalid QString when no item is currently selected.

QStringList EnumerationParameter::getLiterals (  )  const

Returns the list of string literals of the enumeration.

Returns:
The list of string literals of the enumeration.

The list of string literals of the enumeration, or an invalid QString when no item is currently selected.

void EnumerationParameter::setLiterals ( QStringList  literals  ) 

Sets the list of string literals for the enumeration.

Parameters:
literals The list of string literals for the enumeration.

QStringList EnumerationParameter::getValues (  )  const

Returns the list of values of the enumeration.

Returns:
The list of values of the enumeration.

void EnumerationParameter::setValues ( QStringList  values  ) 

Sets the list of values for the enumeration.

Parameters:
values The list of values for the enumeration.


Member Data Documentation

QStringList EnumerationParameter::m_literals [private]

The list of string literals of the enumeration.

QStringList EnumerationParameter::m_values [private]

The list of values of the enumeration.


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

Generated on Wed Feb 24 15:01:00 2010 for Frapper by  doxygen 1.5.9