The PrtFormatManager class.
More...
Inherits QObject, and QScriptable.
PrtFormatManager::PrtFormatManager |
( |
QObject * |
parent = NULL | ) |
|
The PrtFormatManager constructor.
You do not need to specify the parent object. The BrainStim script engine automatically retrieves the parent role
PrtFormatManager::~PrtFormatManager |
( |
| ) |
|
The PrtFormatManager destructor.
You do not need call the destructor. The BrainStim script engine automatically performs the garbage collection after you set the object to NULL and the script ends
Appends a new Condition to the in-memory stimulation protocol.
This function can append a new Condition to the current stimulation protocol in memory.
- Parameters
-
- Returns
- an integer value holding the new internal index of the appended Condition. See also PrtFormatManager::appendInterval().
int PrtFormatManager::appendInterval |
( |
const int |
nConditionIndex = 0 , |
|
|
const int |
nBegin = 0 , |
|
|
const int |
nEnd = 1 |
|
) |
| |
|
slot |
Appends a Interval to an existing Condition to the in-memory stimulation protocol.
This function can append a Interval to an existing Condition to the current in-memory stimulation protocol.
- Parameters
-
nConditionIndex | an integer value containing the index of the Condition to which the Interval should be appended. |
nBegin | an integer value specifying the Start of the first piece of time belonging to the Interval that should be appended. |
nEnd | an integer value specifying the End of the first piece of time belonging to the Interval that should be appended. |
- Returns
- an integer value holding the new internal index of the appended Interval. See also PrtFormatManager::appendCondition().
bool PrtFormatManager::clearAll |
( |
| ) |
|
|
slot |
bool PrtFormatManager::clearConditions |
( |
| ) |
|
|
slot |
Clears all Conditions of the stimulation protocol.
This function clears all Conditions of the current stimulation protocol in memory.
- Returns
- a Boolean value representing whether the Conditions could be cleared.
bool PrtFormatManager::clearParameters |
( |
| ) |
|
|
slot |
Clears all Parameters of the stimulation protocol.
This function clears all Parameters of the current stimulation protocol in memory.
- Returns
- a Boolean value representing whether the Parameters could be cleared.
QString PrtFormatManager::getParameterDescription |
( |
const QString |
sParamName | ) |
|
|
slot |
Returns a Parameter description of the stimulation protocol.
This function can return a Parameter description of the current stimulation protocol in memory.
- Parameters
-
sParamName | a String containing the requested Parameter's Name. |
- Returns
- a String value holding the requested Parameter description of the current in-memory stimulation protocol. If no parameter with the defined Name could be found then this function will return a PrtFormatManagerDefines::PRT_UNDEF_DESC_STRING.
QString PrtFormatManager::getParameterValue |
( |
const QString |
sParamName | ) |
|
|
slot |
Returns a Parameter value of the stimulation protocol.
This function can return a Parameter value of the current stimulation protocol in memory.
- Parameters
-
sParamName | a String containing the requested Parameter's Name. |
- Returns
- a String value holding the requested Parameter value of the current in-memory stimulation protocol. If no parameter with the defined Name could be found then this function will return a PrtFormatManagerDefines::PRT_UNDEF_VALUE_STRING.
QString PrtFormatManager::getRGBPaletteColorString |
( |
const int |
nSteps, |
|
|
const int |
nIndex |
|
) |
| |
|
slot |
Returns a specific color ("R G B" string).
Returns a Color String from a location of a color palette divided in steps.
- Parameters
-
nSteps | an integer representing the number of steps the color palette should be divided to. |
nIndex | an integer representing the index location (0-based) of color at the divided color palette. |
- Returns
- a String (a "R G B" String value) holding the Color value. See also PrtFormatManager::appendCondition();
bool PrtFormatManager::loadFile |
( |
const QString |
sFileName | ) |
|
|
slot |
Loads an stimulation protocol (*.prt) file into memory.
This function can loads an existing stimulation protocol (*.prt) file into memory for further editing.
- Parameters
-
sFileName | a String containing the path to the stimulation protocol (*.prt) file. |
- Returns
- a Boolean value representing whether the stimulation protocol (*.prt) file could be loaded.
bool PrtFormatManager::saveFile |
( |
const QString |
sFileName, |
|
|
const bool |
bOverWrite = false |
|
) |
| |
|
slot |
Saves an stimulation protocol from memory to a stimulation protocol(*.prt) file.
This function can save the current an existing stimulation protocol file in memory to a file.
- Parameters
-
sFileName | a String containing the path to the target stimulation protocol (*.prt) file. |
bOverWrite | a Boolean value determing whether the target file should be automatically overwritten when it already exists. |
- Returns
- a Boolean value representing whether the stimulation protocol could be saved to the file.
bool PrtFormatManager::setConditionColor |
( |
const int |
nConditionIndex, |
|
|
const QString |
sColor |
|
) |
| |
|
slot |
sets a specific color for a condition ("R G B" string).
Sets a Color String for a specific condition.
- Parameters
-
nConditionIndex | an integer representing the index of the condition to set the color from. |
sColor | a String (a "R G B" String value) holding the Color value for the condition. |
- Returns
- a Boolean value determining whether the color value for that condition could be successfully changed. See also PrtFormatManager::appendCondition();
Sets an Parameter value for the stimulation protocol.
This function sets a Parameter value for the current stimulation protocol in memory.
- Parameters
-
sParamName | a String containing the Parameter Name. |
sParamValue | a String containing the Parameter Value. |
sParamDescription | a String containing the Parameter Description. |
- Returns
- a Boolean value representing whether the Parameter value for the current stimulation protocol could be set.
bool PrtFormatManager::SortandMergeAllConditionIntervals |
( |
| ) |
|
|
slot |
Sorts a Merges all the Condition Intervals of the current Stimulation Protocol.
This function tries to Sort and Merge the Condition Intervals of the current in-memory Stimulation Protocol. After editing a Stimulation Protocol this function could be called prior to the PrtFormatManager::saveFile() to optimize the protocol structure.
- Returns
- a Boolean value representing whether the Condition Intervals could be parsed.