gSAFE  1.3.8
Public Member Functions | Public Attributes | List of all members
HDataFieldRole Class Reference

#include <datalib.h>

Public Member Functions

 HDataFieldRole (void)
 
 HDataFieldRole (QString name, QString mod="", QString val="")
 
void addEditableMod (void)
 
void addGuidisabledMod (void)
 
void addGuienabledMod (void)
 
void addHideMod (void)
 
void addReadonlyMod (void)
 
void addResetMod (void)
 
void addSetvalMod (void)
 
void addShowMod (void)
 
bool hasEditableMod (void)
 
bool hasGuidisabledMod (void)
 
bool hasGuienabledMod (void)
 
bool hasHideMod (void)
 
bool hasReadonlyMod (void)
 
bool hasResetMod (void)
 
bool hasSetvalMod (void)
 
bool hasShowMod (void)
 

Public Attributes

QString mod
 
QString name
 
QString val
 

Detailed Description

The HDataFieldRole is a attribute modifier object for HDataField. It's the base class of the role system.
You can use this role system to achive that a single meta table acts different ways in different situations. For example you can show/hide different data fields in different situations.
The HDataFieldRole object is represent a single "role". Every role has to have a name. Later you can activate a role with this name. This role name represent a "situation". You can add roles to every (or some) data fields of a HTableBase, and later you can "activate" this roles with HTableBase::useRole() function. It means that every HDataField can have more roles. (with different names)
A role can set the following attributes:

The HDataFieldRole contstructor can receive a rolename a mod string and a value string (You can use this string in HFactory's xml format the following way: <role name="rolename" mod="hide;setval;" val="0"> )
The modifier string can contains the combination of the following strings:

A valid mod string looks like this way: "show;readonly;setval;" You can also set the mod string by hand or use the add... functions below the generate it.

See Also
HDataField

Definition at line 1981 of file datalib.h.

Constructor & Destructor Documentation

HDataFieldRole::HDataFieldRole ( void  )

Creates an empty role

Definition at line 4932 of file datalib.cpp.

HDataFieldRole::HDataFieldRole ( QString  name,
QString  mod = "",
QString  val = "" 
)

Creates a role

Definition at line 4939 of file datalib.cpp.

Member Function Documentation

void HDataFieldRole::addEditableMod ( void  )

Sets the editable attribute in this role

Definition at line 4966 of file datalib.cpp.

void HDataFieldRole::addGuidisabledMod ( void  )

Sets the guidisabled attribute in this role

Definition at line 4989 of file datalib.cpp.

void HDataFieldRole::addGuienabledMod ( void  )

Sets the guienabled attribute in this role

Definition at line 4981 of file datalib.cpp.

void HDataFieldRole::addHideMod ( void  )

Sets the hide attribute in this role

Definition at line 4958 of file datalib.cpp.

void HDataFieldRole::addReadonlyMod ( void  )

Sets the readonly attribute in this role

Definition at line 4973 of file datalib.cpp.

void HDataFieldRole::addResetMod ( void  )

Sets the role to reset the value to default

Definition at line 4997 of file datalib.cpp.

void HDataFieldRole::addSetvalMod ( void  )

Sets the role to set the value to the "val"

Definition at line 5005 of file datalib.cpp.

void HDataFieldRole::addShowMod ( void  )

Sets the show attribute in this role

Definition at line 4950 of file datalib.cpp.

bool HDataFieldRole::hasEditableMod ( void  )

Returns true if the role has the editable attribute

Definition at line 5027 of file datalib.cpp.

bool HDataFieldRole::hasGuidisabledMod ( void  )

Returns true if the role has the guidisable attribute

Definition at line 5048 of file datalib.cpp.

bool HDataFieldRole::hasGuienabledMod ( void  )

Returns true if the role has the guienable attribute

Definition at line 5041 of file datalib.cpp.

bool HDataFieldRole::hasHideMod ( void  )

Returns true if the role has the hide attribute

Definition at line 5020 of file datalib.cpp.

bool HDataFieldRole::hasReadonlyMod ( void  )

Returns true if the role has the readonly attribute

Definition at line 5034 of file datalib.cpp.

bool HDataFieldRole::hasResetMod ( void  )

Returns true if the role will reset the value to the default

Definition at line 5055 of file datalib.cpp.

bool HDataFieldRole::hasSetvalMod ( void  )

Returns true if the role will set it's own value

Definition at line 5062 of file datalib.cpp.

bool HDataFieldRole::hasShowMod ( void  )

Returns true if the role has the show attribute

Definition at line 5013 of file datalib.cpp.

Member Data Documentation

QString HDataFieldRole::mod

The mod string

Definition at line 1987 of file datalib.h.

QString HDataFieldRole::name

The name of the role

Definition at line 1985 of file datalib.h.

QString HDataFieldRole::val

The value to set (If the mod contains "setval")

Definition at line 1989 of file datalib.h.


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