#include <cmdparam.h>
Inheritance diagram for CmdParam:

Public Member Functions | |
| CmdParam (const char *formalVarName, const char *defaultValue, const char *exactTypeName="unknown_type", SuperPtrList< CmdParam > *extVarElements=NULL) | |
| virtual | ~CmdParam () |
| virtual const QString & | formalVarName () const |
| virtual const QString & | defaultValue () const |
| virtual const QString & | typeName () const |
| virtual QPtrList< CmdParam > * | extVarElements () |
| virtual int | numExtVarElements () const |
| virtual void | setFormalVarName (const QString &name) |
| virtual void | setDefaultValue (const QString &value) |
| virtual void | setTypeName (const QString &name) |
| virtual void | setExtVarElements (QPtrList< CmdParam > *extVarElements) |
| virtual QWidget * | createWidget (QWidget *parent, const char *name, const QObject *slotOwner, const char *member)=0 |
| virtual void | setWidgetValue (QWidget *widget, const QString &value)=0 |
| virtual QString | getWidgetValue (QWidget *widget)=0 |
| virtual int | maxWidgetWidth () const |
| virtual QString | getStringRep (const QString &value) const |
Protected Attributes | |
| QString | myFormalVarName |
| QString | myDefaultValue |
| QString | myTypeName |
| QPtrList< CmdParam > * | myExtVarElements |
It has a type name, formal argument name and default value properties.
It is designed to be inherited by classes to implement the behaviour. It ALSO handles a QT widget (e.g. QLineEdit) to edit the given parameter.
Note: Glicth COMMUNICATES with command parameters ON A STRING VALUE LEVEL.
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||||||||||
|
Create an editor widget for editing the parameter. Note: the member slot will be called when the parameter value is changed Example usage: QWidget* w = param->createWidget( editorParent, param->formalVarName(),
this, SLOT(widgetValueChanged()) );
This method is designed to be reimplemented by derivitive classes. Implemented in ArrayParam, DoubleParam, EnumParam, and IntParam. |
|
|
|
|
|
|
|
|
|
|
|
This function is helpful with parameters that have a different string representation to that of their value, such as with enumerations. Hence, only re-implement it if the string representation is different. Note: EnumParam re-implements this Reimplemented in DoubleParam, and EnumParam. |
|
|
Implemented in ArrayParam, DoubleParam, EnumParam, and IntParam. |
|
|
Get a hint on what width to use for the widget. For example, combo boxes need to be wider than line edit boxes. Hence, it is designed to be reimplemented by derivitive classes that wish to change this value. Reimplemented in DoubleParam, EnumParam, and IntParam. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Implemented in ArrayParam, DoubleParam, EnumParam, and IntParam. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.2