gSAFE
1.3.8
|
#include <datalib.h>
Signals | |
void | dataChangedNongui (void) |
Public Member Functions | |
HDynTable (void) | |
HDynTable (const HDynTable &t) | |
void | addition (double d, QString limitTo="") |
void | addition (HDynTable dt, QString limitTo="") |
void | clear (void) |
int | countElements (QString limitTo="") |
QString | currentElementColumnName (void) |
bool | currentElementIsNumeric (void) |
QStringList | currentElementLabels (void) |
QString | currentElementName (void) |
QString | currentElementRowName (void) |
QString | currentElementSqlName (void) |
double | currentElementValueDouble (void) |
QString | currentElementValueString (void) |
void | defN (QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="") |
void | defS (QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="") |
void | defT (int type, QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="") |
void | divide (double d, QString limitTo="") |
void | divide (HDynTable dt, QString limitTo="") |
QString | dumpElements (void) |
bool | elementHasLabel (QString name, QString label, bool *found=NULL) |
void | emptyall (QString limitTo="") |
void | firstElement (void) |
QString | getElementSqlName (QString name) |
double | getElementValueDouble (QString name, bool *found=NULL) |
double | getElementValueDoubleByRowColName (QString r, QString c, bool *found=NULL) |
QString | getElementValueString (QString name, bool *found=NULL) |
QString | getElementValueStringByRowColName (QString r, QString c, bool *found=NULL) |
double | getIndexedValueDouble (int index, bool *found=NULL) |
QString | getIndexedValueString (int index, bool *found=NULL) |
QString | indexedElementName (int index) |
QString | indexedElementSqlName (int index) |
bool | isEnded (void) |
double | max (QString limitTo="") |
double | min (QString limitTo="") |
void | multiplicate (double d, QString limitTo="") |
void | multiplicate (HDynTable dt, QString limitTo="") |
void | nextElement (void) |
HDynTable & | operator= (HDynTable s) |
HDynTableElementNameReferencer | operator[] (QString name) |
void | setCurrentElementValue (double d) |
void | setCurrentElementValue (QString s) |
void | setElementValue (QString name, double value) |
void | setElementValue (QString name, QString value) |
void | setElementValueByRowColName (QString r, QString c, double value) |
void | setElementValueByRowColName (QString r, QString c, QString value) |
void | setIndexedElementValue (int index, double d) |
void | setIndexedElementValue (int index, QString s) |
double | sum (QString limitTo="") |
void | sustraction (double d, QString limitTo="") |
void | sustraction (HDynTable dt, QString limitTo="") |
void | zeroall (QString limitTo="") |
Public Member Functions inherited from HBase | |
HBase (void) | |
~HBase (void) | |
QString | getWhoami (void) |
Additional Inherited Members | |
Protected Attributes inherited from HBase | |
QString | whoami |
The HDynTable contains the collection of numeric or textual typed fileds referenced by names.\n After you define the elements, you can easely set/get elements value referenced by it's name. The HDynTable has many batch mathematical function to easely work with the all element together. The mathematical functions only works on numeric elements, they don't affect the textual elements.
The HDynTable can dynamically build a QTableWidget from the elements you defined. (See HDynTableDispConnector)
You can define element with different column/row names, and the HDynTable will be generate the appropirate QTableWiget, It means: The same row named elements will appear in same row, if an element have unique rowname it will appear in separated row. The classes will automatically handles the refreshing the data in the memory. It means that the user changes will automatically apply on HDynTable's values. It also can handle the SQL query/update of the fileds. (See HDynTableSqlConnector)
The code above is generates a QTableWidget look like this:
HDynTable::HDynTable | ( | void | ) |
Creates an empty HDynTable
Definition at line 7796 of file datalib.cpp.
HDynTable::HDynTable | ( | const HDynTable & | t | ) |
Creates a copy of the given HDynTable
Definition at line 7802 of file datalib.cpp.
void HDynTable::addition | ( | double | d, |
QString | limitTo = "" |
||
) |
Add a double value to all double cell
Definition at line 8167 of file datalib.cpp.
void HDynTable::addition | ( | HDynTable | dt, |
QString | limitTo = "" |
||
) |
Field to field addition of the tables (The two tables field's must be same)
Definition at line 8179 of file datalib.cpp.
|
inline |
int HDynTable::countElements | ( | QString | limitTo = "" | ) |
Returns the number of all defined elements(with no argument) or a specified labelled elements. (if nonempty argument passed)
Definition at line 8245 of file datalib.cpp.
QString HDynTable::currentElementColumnName | ( | void | ) |
Returns the column name of the element in the position of internal iterator
Definition at line 8018 of file datalib.cpp.
bool HDynTable::currentElementIsNumeric | ( | void | ) |
Returns true if the element in the position of internal iterator is numeric
Definition at line 8033 of file datalib.cpp.
QStringList HDynTable::currentElementLabels | ( | void | ) |
Returns the labels of the element in the position of internal iterator
Definition at line 8028 of file datalib.cpp.
QString HDynTable::currentElementName | ( | void | ) |
Returns the name of the element in the position of internal iterator
Definition at line 8008 of file datalib.cpp.
QString HDynTable::currentElementRowName | ( | void | ) |
Returns the row name of the element in the position of internal iterator
Definition at line 8013 of file datalib.cpp.
QString HDynTable::currentElementSqlName | ( | void | ) |
Returns the sql name of the element in the position of internal iterator
Definition at line 8023 of file datalib.cpp.
double HDynTable::currentElementValueDouble | ( | void | ) |
Returns the double value of the element in the position of internal iterator
Definition at line 8038 of file datalib.cpp.
QString HDynTable::currentElementValueString | ( | void | ) |
Returns the string name of the element in the position of internal iterator
Definition at line 8043 of file datalib.cpp.
|
signal |
Emitted when the data changed in the memory. It does not emits when the element's structure changed (added/cleared)
|
inline |
Define a new numeric typed element (Handles double data)
name | The name to identify the field. Must be unique. You can set/get values by this name (t["name"] = 0.1;) |
sqlname | The sql filed name assigned to this element |
rowName | This element will be show in this named row in the dynamically builded HDynTable |
colName | This element will be show in this named column in the dynamically builded HDynTable |
labels | This parameters contains the "|" separated collections of text labels. You can filter many mathematical |
|
inline |
Define a new string typed element (Handles textual data)
name | The name to identify the field. Must be unique. You can set/get values by this name (t["name"] = 0.1;) |
sqlname | The sql filed name assigned to this element |
rowName | This element will be show in this named row in the dynamically builded HDynTable |
colName | This element will be show in this named column in the dynamically builded HDynTable |
labels | This parameters contains the "|" separated collections of text labels. You can filter many mathematical |
|
inline |
void HDynTable::divide | ( | double | d, |
QString | limitTo = "" |
||
) |
Divide all double cell with a double value
Definition at line 8215 of file datalib.cpp.
void HDynTable::divide | ( | HDynTable | dt, |
QString | limitTo = "" |
||
) |
Field to field divide of the tables (The two tables field's must be same)
Definition at line 8228 of file datalib.cpp.
QString HDynTable::dumpElements | ( | void | ) |
Dump out all elements name and value in one concatenated string
Definition at line 7838 of file datalib.cpp.
bool HDynTable::elementHasLabel | ( | QString | name, |
QString | label, | ||
bool * | found = NULL |
||
) |
Returns true if the given named element has a given label. Otherwise returns false.
name | The examided element's name |
label | The label name to check |
If | you give this bool pointer the pointer will be set to true any cases the element has been found |
Definition at line 8298 of file datalib.cpp.
void HDynTable::emptyall | ( | QString | limitTo = "" | ) |
Sets all elements value to zero and empty string.
limitTo | if you give this parameter only the given labelled element's are zeroed |
Definition at line 8060 of file datalib.cpp.
void HDynTable::firstElement | ( | void | ) |
Set the internal intetator to the first element. You can walk throught the elements with this functions
Definition at line 7990 of file datalib.cpp.
QString HDynTable::getElementSqlName | ( | QString | name | ) |
Queries the given named element's sql name
Definition at line 7855 of file datalib.cpp.
double HDynTable::getElementValueDouble | ( | QString | name, |
bool * | found = NULL |
||
) |
Queries the given named element's double value
Definition at line 7892 of file datalib.cpp.
double HDynTable::getElementValueDoubleByRowColName | ( | QString | r, |
QString | c, | ||
bool * | found = NULL |
||
) |
Queries the specified row and column crossed element's double value
Definition at line 7954 of file datalib.cpp.
QString HDynTable::getElementValueString | ( | QString | name, |
bool * | found = NULL |
||
) |
Queries the given named element's string value
Definition at line 7911 of file datalib.cpp.
QString HDynTable::getElementValueStringByRowColName | ( | QString | r, |
QString | c, | ||
bool * | found = NULL |
||
) |
Queries the specified row and column crossed element's string value
Definition at line 7972 of file datalib.cpp.
double HDynTable::getIndexedValueDouble | ( | int | index, |
bool * | found = NULL |
||
) |
Returns the value name of the index'th element
If | you give this bool pointer the pointer will be set to true any cases the element has been found |
Definition at line 8278 of file datalib.cpp.
QString HDynTable::getIndexedValueString | ( | int | index, |
bool * | found = NULL |
||
) |
Returns the value name of the index'th element
If | you give this bool pointer the pointer will be set to true any cases the element has been found |
Definition at line 8283 of file datalib.cpp.
QString HDynTable::indexedElementName | ( | int | index | ) |
Returns the name of the index'th element
Definition at line 8258 of file datalib.cpp.
QString HDynTable::indexedElementSqlName | ( | int | index | ) |
Returns the sql name of the index'th element
Definition at line 8273 of file datalib.cpp.
bool HDynTable::isEnded | ( | void | ) |
Check if the internal iterator reach the end of the fields.
Definition at line 7996 of file datalib.cpp.
double HDynTable::max | ( | QString | limitTo = "" | ) |
Returns the maximum valued element.
limitTo | if you give this parameter only the given labelled element's are examined |
Definition at line 8092 of file datalib.cpp.
double HDynTable::min | ( | QString | limitTo = "" | ) |
Returns the minimum valued element.
limitTo | if you give this parameter only the given labelled element's are examined |
Definition at line 8111 of file datalib.cpp.
void HDynTable::multiplicate | ( | double | d, |
QString | limitTo = "" |
||
) |
Multiplicate all double cell with a double value
Definition at line 8191 of file datalib.cpp.
void HDynTable::multiplicate | ( | HDynTable | dt, |
QString | limitTo = "" |
||
) |
Field to field multiplication of the tables (The two tables field's must be same)
Definition at line 8203 of file datalib.cpp.
void HDynTable::nextElement | ( | void | ) |
Steps the internal iterator to the next element.
Definition at line 8003 of file datalib.cpp.
|
inline |
void HDynTable::setCurrentElementValue | ( | double | d | ) |
Sets the value of the element in the position of internal iterator
Definition at line 8048 of file datalib.cpp.
void HDynTable::setCurrentElementValue | ( | QString | s | ) |
Sets the value of the element in the position of internal iterator
Definition at line 8054 of file datalib.cpp.
void HDynTable::setElementValue | ( | QString | name, |
double | value | ||
) |
Sets the given named element's value
Definition at line 7867 of file datalib.cpp.
void HDynTable::setElementValue | ( | QString | name, |
QString | value | ||
) |
Sets the given named element's value
Definition at line 7880 of file datalib.cpp.
void HDynTable::setElementValueByRowColName | ( | QString | r, |
QString | c, | ||
double | value | ||
) |
Sets the specified row and column crossed element's double value
Definition at line 7930 of file datalib.cpp.
void HDynTable::setElementValueByRowColName | ( | QString | r, |
QString | c, | ||
QString | value | ||
) |
Sets the specified row and column crossed element's string value
Definition at line 7942 of file datalib.cpp.
void HDynTable::setIndexedElementValue | ( | int | index, |
double | d | ||
) |
Sets the index'th elements value
Definition at line 8288 of file datalib.cpp.
void HDynTable::setIndexedElementValue | ( | int | index, |
QString | s | ||
) |
Sets the index'th elements value
Definition at line 8293 of file datalib.cpp.
double HDynTable::sum | ( | QString | limitTo = "" | ) |
Returns the sum of element's value.
limitTo | if you give this parameter only the given labelled element's are examined |
Definition at line 8130 of file datalib.cpp.
void HDynTable::sustraction | ( | double | d, |
QString | limitTo = "" |
||
) |
Substract a double value from all double cell
Definition at line 8143 of file datalib.cpp.
void HDynTable::sustraction | ( | HDynTable | dt, |
QString | limitTo = "" |
||
) |
Field to field substraction of the tables (The two tables field's must be same)
Definition at line 8155 of file datalib.cpp.
void HDynTable::zeroall | ( | QString | limitTo = "" | ) |
Sets all element's value to zero.
limitTo | if you give this parameter only the given labelled element's are zeroed |
Definition at line 8078 of file datalib.cpp.