gSAFE
1.3.8
|
#include <datalib.h>
Public Slots | |
int | actLine (QString key) |
int | alternateActLine (QString key) |
Signals | |
void | actionOnRecord (QString key) |
void | alternateActionOnRecord (QString key) |
Public Member Functions | |
HPlainDataMatrix (int col) | |
~HPlainDataMatrix (void) | |
void | addRow (QList< QVariant > listdata, QString ctrl="") |
void | addRowStr (QList< QString > strlistdata, QString ctrl="") |
void | addRowStr (QString d1="", QString d2="", QString d3="", QString d4="", QString d5="", QString d6="", QString d7="", QString d8="", QString d9="", QString d10="", QString d11="", QString d12="", QString d13="", QString d14="", QString d15="") |
void | addRowStrCTRL (QString ctrl, QString d1="", QString d2="", QString d3="", QString d4="", QString d5="", QString d6="", QString d7="", QString d8="", QString d9="", QString d10="", QString d11="", QString d12="", QString d13="", QString d14="", QString d15="") |
void | appendHPainDataMatrix (HPlainDataMatrix *tail) |
void | clearAll () |
void | clearData () |
int | columnCount () |
QString | concatenateCoulmn (int col, QString separator) |
QList< QVariant > | currentRow (void) |
QString | currentRowControl (void) |
QList< QString > | currentRowStr (void) |
QString | currentRowStr (QString separator) |
int | fieldCount () |
void | firstRow (void) |
QVariant | getCell (int row, int col) |
QString | getCellStr (int row, int col) |
QString | getColumn (int col, QString separator) |
int | getColumnPrintMaxWidth (int col) |
bool | getColumnPrintWrap (int col) |
QString | getContentAsHtml (QString params) |
QList< QString > | getHeader (void) |
QString | getHeaderItem (int col) |
QList< QVariant > | getRow (int row) |
QList< QString > | getRowStr (int row) |
QString | getRowStr (int row, QString separator) |
QString | getTitle (void) |
bool | isEnded (void) |
bool | nextRow (void) |
int | recordCount () |
void | removeCurrentRow (void) |
void | removeHTMLTags (bool force_all=false) |
void | replaceSameUnderCellToEmpty (int col) |
void | replaceTextInColumn (int col, QString find, QString replace, bool parts=false) |
int | rowCount () |
void | setAppendPrependColumn (int col, QString prepend, QString append) |
void | setCell (int row, int col, QVariant vdata) |
void | setCellStr (int row, int col, QString strdata) |
void | setColumnPrintMaxWidth (int col, int m) |
void | setColumnPrintWrap (int col, bool wrap) |
void | setExtendedTitle (QString xt) |
void | setHeader (QList< QString > strlistdata) |
void | setHeader (QString d1="", QString d2="", QString d3="", QString d4="", QString d5="", QString d6="", QString d7="", QString d8="", QString d9="", QString d10="", QString d11="", QString d12="", QString d13="", QString d14="", QString d15="") |
void | setHeaderCell (int col, QString strdata) |
void | setHtmlCssText (QString css) |
void | setRowControl (int row, QString ctrl) |
void | setTitle (QString t) |
double | sumCoulmnAsDouble (int col) |
int | sumCoulmnAsInt (int col) |
Public Member Functions inherited from HBase | |
HBase (void) | |
~HBase (void) | |
QString | getWhoami (void) |
Public Attributes | |
int | keyfield |
Additional Inherited Members | |
Protected Attributes inherited from HBase | |
QString | whoami |
HPlainDataMatrix is a class store a table (X rows and Y columns). However it is usally contains sql tables this class is not an sql related class. It is usally used as a result of a complex sql query. ( submitNResultQuery() ) With this class you can manipulate simple data tables, can make reports, printigs, xml tables or do anything with the data.
HPlainDataMatrix::HPlainDataMatrix | ( | int | col | ) |
Created an empty table with a specified column number
Definition at line 1356 of file datalib.cpp.
HPlainDataMatrix::~HPlainDataMatrix | ( | void | ) |
Destructor
Definition at line 1378 of file datalib.cpp.
|
signal |
This signal is emitted when the user (left) clicked on a record (Can be emitted directly by slot actLine() )
|
slot |
Emits the actionOnRecord signal with the given parametered key. Usally the gui call this slot to emit the signal.
Definition at line 2170 of file datalib.cpp.
void HPlainDataMatrix::addRow | ( | QList< QVariant > | listdata, |
QString | ctrl = "" |
||
) |
Adds a new row to the end of the table.
Definition at line 1512 of file datalib.cpp.
void HPlainDataMatrix::addRowStr | ( | QList< QString > | strlistdata, |
QString | ctrl = "" |
||
) |
Adds a new row to the end of the table.
Definition at line 1543 of file datalib.cpp.
|
inline |
void HPlainDataMatrix::addRowStrCTRL | ( | QString | ctrl, |
QString | d1 = "" , |
||
QString | d2 = "" , |
||
QString | d3 = "" , |
||
QString | d4 = "" , |
||
QString | d5 = "" , |
||
QString | d6 = "" , |
||
QString | d7 = "" , |
||
QString | d8 = "" , |
||
QString | d9 = "" , |
||
QString | d10 = "" , |
||
QString | d11 = "" , |
||
QString | d12 = "" , |
||
QString | d13 = "" , |
||
QString | d14 = "" , |
||
QString | d15 = "" |
||
) |
Adds a new row to the end of the table.
Definition at line 1560 of file datalib.cpp.
|
signal |
This signal is emitted when the user right clicked on a record (Can be emitted directly by slot alternateActLine() )
|
slot |
Emits the alternateActionOnRecord signal with the given parametered key. Usally the gui call this slot to emit the signal.
Definition at line 2176 of file datalib.cpp.
void HPlainDataMatrix::appendHPainDataMatrix | ( | HPlainDataMatrix * | tail | ) |
Appends an external HPlainDataMatrix to this table.
Definition at line 1529 of file datalib.cpp.
void HPlainDataMatrix::clearAll | ( | ) |
Clears all data from HPlainDataMatrix. It only keeps the column count data. Erase all cell data, header, and title data.
Definition at line 1416 of file datalib.cpp.
void HPlainDataMatrix::clearData | ( | ) |
Clears all cell data from HPlainDataMatrix. It keeps the header and title data.
Definition at line 1389 of file datalib.cpp.
int HPlainDataMatrix::columnCount | ( | ) |
Returns the number of coumns
Definition at line 1431 of file datalib.cpp.
QString HPlainDataMatrix::concatenateCoulmn | ( | int | col, |
QString | separator | ||
) |
Returns a string which contains the concatenated values of the specified column with the specified separator
Definition at line 1907 of file datalib.cpp.
QList< QVariant > HPlainDataMatrix::currentRow | ( | void | ) |
Returns the current row by returning a list of QVariants
Definition at line 1755 of file datalib.cpp.
QString HPlainDataMatrix::currentRowControl | ( | void | ) |
Returns the control string of the current row (Control string is needed for making fancy report)
Definition at line 1770 of file datalib.cpp.
QList< QString > HPlainDataMatrix::currentRowStr | ( | void | ) |
Returns the current row by returning a list of QStrings (All cells are converted to QString)
Definition at line 1775 of file datalib.cpp.
QString HPlainDataMatrix::currentRowStr | ( | QString | separator | ) |
Returns the current row by returning only one concatenated string with the specified separator (All cells are converted to QString)
Definition at line 1790 of file datalib.cpp.
|
inline |
Returns the number of fields. Same as rowCount()
void HPlainDataMatrix::firstRow | ( | void | ) |
Sets the first row as current
Definition at line 1716 of file datalib.cpp.
QVariant HPlainDataMatrix::getCell | ( | int | row, |
int | col | ||
) |
Returns the content of the specified cell
Definition at line 1598 of file datalib.cpp.
QString HPlainDataMatrix::getCellStr | ( | int | row, |
int | col | ||
) |
Returns the content of the specified cell
Definition at line 1609 of file datalib.cpp.
QString HPlainDataMatrix::getColumn | ( | int | col, |
QString | separator | ||
) |
Returns a string which contains the concatenated values of the specified column with the specified separator
Definition at line 1619 of file datalib.cpp.
|
inline |
|
inline |
QString HPlainDataMatrix::getContentAsHtml | ( | QString | params | ) |
It generates a html output from the object. Makes a report from the table. The params parameter can contains the combinations of the following flags/attributes/modifiers:
The control string in rows can contains the combinations of flags/attributes/modifiers:
Definition at line 1960 of file datalib.cpp.
QList< QString > HPlainDataMatrix::getHeader | ( | void | ) |
Returns the whole table header
Definition at line 1500 of file datalib.cpp.
QString HPlainDataMatrix::getHeaderItem | ( | int | col | ) |
Returns the specified header text
Definition at line 1495 of file datalib.cpp.
QList< QVariant > HPlainDataMatrix::getRow | ( | int | row | ) |
Returns the specified row
Definition at line 1672 of file datalib.cpp.
QList< QString > HPlainDataMatrix::getRowStr | ( | int | row | ) |
Returns the specified row
Definition at line 1687 of file datalib.cpp.
QString HPlainDataMatrix::getRowStr | ( | int | row, |
QString | separator | ||
) |
Returns the specified row in one concatenated string with the specified separator (All cells are converted to QString)
Definition at line 1702 of file datalib.cpp.
|
inline |
bool HPlainDataMatrix::isEnded | ( | void | ) |
Check if there is next row
Definition at line 1736 of file datalib.cpp.
bool HPlainDataMatrix::nextRow | ( | void | ) |
Makes the next row as current
Definition at line 1722 of file datalib.cpp.
|
inline |
Returns the number of records in the table. Same as rowCount()
void HPlainDataMatrix::removeCurrentRow | ( | void | ) |
Removes the current row from the table
Definition at line 1743 of file datalib.cpp.
void HPlainDataMatrix::removeHTMLTags | ( | bool | force_all = false | ) |
Removes every html tags <*> from the data cells if the control string contains : "optionalhtmltags". If the force_all is true it removes every even if the "optionalhtmltags" is missing.
Definition at line 1926 of file datalib.cpp.
void HPlainDataMatrix::replaceSameUnderCellToEmpty | ( | int | col | ) |
Run down on the specified column row by row, and if found more cells with same text, it's only keep the first occurance. The other cells contains same text will be replaced an empty string
Definition at line 1834 of file datalib.cpp.
void HPlainDataMatrix::replaceTextInColumn | ( | int | col, |
QString | find, | ||
QString | replace, | ||
bool | parts = false |
||
) |
Do an ordinary find & replace process in the texts of cells but only in the specified column. If the parts parameter is false it is only replace in case of full cell matching.
Definition at line 1804 of file datalib.cpp.
int HPlainDataMatrix::rowCount | ( | ) |
Returns the number of rows
Definition at line 1436 of file datalib.cpp.
void HPlainDataMatrix::setAppendPrependColumn | ( | int | col, |
QString | prepend, | ||
QString | append | ||
) |
Appends and prepends the specified string to every cell of the specified column
Definition at line 1853 of file datalib.cpp.
void HPlainDataMatrix::setCell | ( | int | row, |
int | col, | ||
QVariant | vdata | ||
) |
Sets the content of the specified cell
Definition at line 1642 of file datalib.cpp.
void HPlainDataMatrix::setCellStr | ( | int | row, |
int | col, | ||
QString | strdata | ||
) |
Sets the content of the specified cell
Definition at line 1662 of file datalib.cpp.
|
inline |
|
inline |
|
inline |
void HPlainDataMatrix::setHeader | ( | QList< QString > | strlistdata | ) |
Sets the whole table header text with a QString list
Definition at line 1448 of file datalib.cpp.
void HPlainDataMatrix::setHeader | ( | QString | d1 = "" , |
QString | d2 = "" , |
||
QString | d3 = "" , |
||
QString | d4 = "" , |
||
QString | d5 = "" , |
||
QString | d6 = "" , |
||
QString | d7 = "" , |
||
QString | d8 = "" , |
||
QString | d9 = "" , |
||
QString | d10 = "" , |
||
QString | d11 = "" , |
||
QString | d12 = "" , |
||
QString | d13 = "" , |
||
QString | d14 = "" , |
||
QString | d15 = "" |
||
) |
Sets the whole table header text with a list of QStrings
Definition at line 1460 of file datalib.cpp.
void HPlainDataMatrix::setHeaderCell | ( | int | col, |
QString | strdata | ||
) |
Sets a specified table header cell text
Definition at line 1441 of file datalib.cpp.
|
inline |
Set html css text. If you call getContentAsHtml() and you use the "css" in parameter this text is used as css definitions
void HPlainDataMatrix::setRowControl | ( | int | row, |
QString | ctrl | ||
) |
Sets the control string of the specified row
Definition at line 1652 of file datalib.cpp.
|
inline |
double HPlainDataMatrix::sumCoulmnAsDouble | ( | int | col | ) |
Calculates the sum of the values of the specified column. (The cells have to be convertable to float)
Definition at line 1890 of file datalib.cpp.
int HPlainDataMatrix::sumCoulmnAsInt | ( | int | col | ) |
Calculates the sum of the values of the specified column. (The cells have to be convertable to integer)
Definition at line 1872 of file datalib.cpp.
int HPlainDataMatrix::keyfield |
The default keyfield. Used when you put this object in HDispPlainDataMatrix. With keyfield you can specify the key of the HTableBrowser elements. This is important when the user clicks on an element. That case the "activateItem" signal will be emitted which tell the key of the activated item. This key value came from: