gSAFE  1.3.8
Public Slots | Public Member Functions | Protected Attributes | List of all members
HFloatTablesAsHList Class Reference

#include <datalib.h>

Inheritance diagram for HFloatTablesAsHList:
HList HTableBase HSqlHandler HSqlInterface HBase

Public Slots

virtual int clearList (void)
 
virtual int readList (QString filter="", bool all=true)
 
- Public Slots inherited from HList
int actLine (void)
 
int alternateActLine (void)
 
int captureNotify (QString tblname)
 
virtual int clearList (void)
 
virtual int readList (QString filter="", bool all=true)
 
int reReadList (void)
 
- Public Slots inherited from HTableBase
void addDependTableName (QString n)
 
int errorPassSlot (QString err)
 

Public Member Functions

 HFloatTablesAsHList (HFloatTables *memt, HList *templ=NULL, bool clone_struct_from_memt=false)
 
 ~HFloatTablesAsHList ()
 
HTablegetActiveTable (void)
 
virtual QStringList * getKeys (void)
 
virtual QList< QStringList * > * getValues (void)
 
void refreshValuesKeys (bool updSignal=false)
 
- Public Member Functions inherited from HList
 HList (QString t)
 
 HList (HList *t)
 
 ~HList (void)
 
QString activeKey (void)
 
void deepcopy_from_hlist (HList *x)
 
QString operator[] (int i)
 
QString queryCurrKey (void)
 
QStringList * queryCurrValues (void)
 
QString queryNextKey (void)
 
bool queryNextRecord (void)
 
QStringList * queryNextValues (void)
 
void queryToFirst (void)
 
int recordCount (void)
 
void setActiveKey (QString k)
 
- Public Member Functions inherited from HTableBase
 HTableBase (QString t)
 
 HTableBase (HTableBase *t)
 
 ~HTableBase (void)
 
void addField (HDataField *i)
 
void blockReInitializeBase (QString hide_marker, QString ro_marker)
 
void clearAndFreeConnections (void)
 
void clearConnections (void)
 
void clearRoles (void)
 
void clearSqlSynced (void)
 
void connectTable (HTableBase *ct, int type=INNER_JOIN, QString connconstraint="")
 
void connectTable (HTableBase *ct, QString thiskey, QString thatkey, int type=INNER_JOIN, QString connconstraint="")
 
void dataUpdated (void)
 
void deepcopy_from_htablebase (HTableBase *x)
 
void delRole (QString name)
 
HDataFieldfieldByIndex (int i, bool all=false)
 
HDataFieldfieldBySqlName (QString sqln, bool all=false, QString containerSqlTable="")
 
int fieldCount (bool withconnect=false)
 
void firstField (void)
 
void freeTable (void)
 
QStringList getExplainHeads (void)
 
QStringList getHeads (int what)
 
QStringList getShortTitleHeads (void)
 
bool isChanged (bool all=false)
 
bool isReallyChanged (void)
 
HDataFieldnextField (void)
 
HDataFieldnextFieldAll (void)
 
QVariant operator[] (int i)
 
void removeSqlCooseButtons (void)
 
void resetLogging (void)
 
void returnToDefaultAllMarked (QString mark)
 
void setAllNOSet (void)
 
void setAllYESSet (void)
 
void setColor (int r, int g, int b)
 
void setColorAllMarked (QString mark, int r, int g, int b)
 
void setEditable (void)
 
void setEditableAllMarked (QString mark)
 
void setGuiDisabledAllMarked (QString mark)
 
void setGuiEnabledAllMarked (QString mark)
 
void setHide (void)
 
void setHideAllMarked (QString mark)
 
void setLogging (void)
 
void setLoggingAllMarked (QString mark)
 
void setReadolnyAllMarked (QString mark)
 
void setReadonly (void)
 
void setShow (void)
 
void setShowAllMarked (QString mark)
 
void setTableTitle (QString s)
 
QString sqlCreateString (QString switches="")
 
QString sqlSelect (QString tail="", bool all=false, bool keypart=false)
 
QString sqlSelectAll (QString tail="")
 
QString sqlSelectWk (QString tail="", bool all=false)
 
QString sqlSelectWkAll (QString tail="")
 
void sqlSynced (HDataChangeLogger *dclog=NULL, bool forcechange=false, bool forcelog=false)
 
QString sqlTableName (void)
 
HDataFieldstaticFieldByTitle (QString title="")
 
QString tableTitle (void)
 
void useRole (QString name)
 
QString validate (bool all=true)
 
- Public Member Functions inherited from HSqlHandler
 HSqlHandler (void)
 
 ~HSqlHandler (void)
 
QSqlQuery * allocateQSqlQuery (void)
 
void cloneSqlSettingsFrom (HSqlHandler *other)
 
void commit (void)
 
bool errorStatus (void)
 
void rollback (void)
 
bool submit0ResultQuery (QString q, QString err, bool tdisabled=false)
 
QVariant submit1ResultQuery (QString q, QString err, bool tdisabled=false)
 
HPlainDataMatrixsubmitNResultQuery (int N, QString q, QString err, bool tdisabled=false)
 
void transaction (void)
 
QSqlDatabase workDB (void)
 
- Public Member Functions inherited from HSqlInterface
 HSqlInterface ()
 
 ~HSqlInterface ()
 
void cloneSqlInterfaceSettingsFrom (HSqlInterface *other)
 
HSqlSingleInterfacemyInterface (void)
 
QString sqlConcatenateToLocal (QString string)
 
QString sqlConcatenateToLocal (QStringList fields)
 
- Public Member Functions inherited from HBase
 HBase (void)
 
 ~HBase (void)
 
QString getWhoami (void)
 

Protected Attributes

HFloatTablesmem
 
- Protected Attributes inherited from HList
QString active_key
 
QStringList * keys
 
QStringList::iterator query_keyiter
 
QList< QStringList * >::iterator query_valiter
 
QList< QStringList * > * values
 
- Protected Attributes inherited from HTableBase
QString conn_part
 
QStack< HTableBase * > * connectedTableBases
 
QStringList * depend
 
int field
 
QString imc_thatkey
 
HTableBaseimc_thattable
 
QString imc_thiskey
 
HDataField_List * run
 
QString sqlTable
 
HDataField_List * table
 
QString tabletitle
 
- Protected Attributes inherited from HSqlHandler
bool query_error_occured
 
- Protected Attributes inherited from HBase
QString whoami
 

Additional Inherited Members

- Signals inherited from HList
void actionOnRecord (QString key)
 
void alternateActionOnRecord (QString key)
 
- Signals inherited from HTableBase
void dataChanged (void)
 
void dataModifiedSignal (void)
 
void dataUpdatedSignal (void)
 
void doWorking (void)
 
void endWorking (void)
 
void startWorking (void)
 
- Signals inherited from HSqlHandler
void errorSignal (QString err)
 
- Static Public Member Functions inherited from HSqlHandler
static void setCustomSqlDatabase (QString databaseName, QString sqlinterfacename="")
 
static void setDefaultSqlDatabase (void)
 
- Static Public Member Functions inherited from HSqlInterface
static HSqlSingleInterfacecurrentDefaultSqlInterface (void)
 
static HSqlSingleInterfacegetSqlInterface (QString interfacename)
 
static void setSqlMode (QString modename)
 
static void setSqlModeBackToFirst (void)
 
- Public Attributes inherited from HList
bool last_all
 
QString last_filter
 
QString soft_current_key
 
- Public Attributes inherited from HTableBase
QString errstr
 
bool extrafeatures
 
bool gui_showtabletitle
 
- Static Public Attributes inherited from HSqlHandler
static int trans = 0
 

Detailed Description

The HFloatTablesAsHList class is fake a HFloatTables to act as a HList. With this class you can browse and see an unexisting (sql point of view) table.
You can put a HFloatTables instance to the HFloatTablesAsHList, and after it you can use the class as a HList.

Warning
(1) The keys are generated (key in HList). This generated keys are independent from the keys in sql. The reason of the generated keys is that it can be same records which does not appear in the database so they can't have any key value. This records are tipically the NEW and UNDEF and CANCELLED records.
So keep in mind that the keys are generated! This mean for example: you can't find the value of the active_key in the HFloatTables!

(2) If there is any changes on the data tables (in HFloatTables) the changes are only actualized, when the refreshValuesKeys() function is called! The reason is the speeding up the system. If you modify anything on the HFloatTable it would trigger a new data copy cycle. Because this modification signals are triggered every time when the gui cells is modified, it would be trigger many unnecessary refresh cycle.
So the values from the HFloatTables only copied to HFloatTablesAsHList when you call this refreshValuesKeys() function.
That means for exmample: if the user edit a record of the HFloatTable it is recommend to call refreshValuesKeys() only when the user hit Ok to the edit dialog.

If you have a HSmallText typed field in the tempate list which sql name is "NON_SQL_LIST_SERIAL" that case the refreshValuesKeys() will fill that field values with an index number.

Definition at line 1901 of file datalib.h.

Constructor & Destructor Documentation

HFloatTablesAsHList::HFloatTablesAsHList ( HFloatTables memt,
HList templ = NULL,
bool  clone_struct_from_memt = false 
)

Constructor. Creates a HFloatTablesAsHList which fakes a HFloatTable get in memt parameter as HList

Parameters
memtthe HFloatTables class to fake as Hlist
templif we dont want to specify the data fields of the HList (which faked) we can put this templ parameter and the constructor clones the data fields from this parameter
clone_struct_from_memtif this true (false by default!) and the templ is NULL the HList (which faked) will be clones the data fields from the baserecord of the HFloatTables.
So if you would like to the HList view same as the base record of FloatTables you should call HFloatTablesAsHList(some_pointer,NULL,true);
This means that by default the HFloatTablesAsHList will be created with undefined data fields! (Have to fill with HTableBase functions)

Definition at line 4763 of file datalib.cpp.

HFloatTablesAsHList::~HFloatTablesAsHList ( void  )

Destructor

Definition at line 4782 of file datalib.cpp.

Member Function Documentation

int HFloatTablesAsHList::clearList ( void  )
virtualslot
Inherited function(HList): Only clears the temporally lists and refresh the values.

If you would like to delete the table data use the HFloatTables::clearMem() !

Definition at line 4899 of file datalib.cpp.

HTable * HFloatTablesAsHList::getActiveTable ( void  )

Returns the active table/record.

Definition at line 4790 of file datalib.cpp.

virtual QStringList* HFloatTablesAsHList::getKeys ( void  )
inlinevirtual

Inherited function. See HList::getValues()

Reimplemented from HList.

Definition at line 1932 of file datalib.h.

virtual QList<QStringList *>* HFloatTablesAsHList::getValues ( void  )
inlinevirtual

Inherited function. See HList::getValues()

Reimplemented from HList.

Definition at line 1930 of file datalib.h.

int HFloatTablesAsHList::readList ( QString  filter = "",
bool  all = true 
)
virtualslot

Inherited function(HList): calls the HFloatTables::readDBTable() with the filter and calls refreshValuesKeys() after it.

Parameters
filterthis parameter is passed to HFloatTables::readDBTable()
alldoes't do anything.

Definition at line 4909 of file datalib.cpp.

void HFloatTablesAsHList::refreshValuesKeys ( bool  updSignal = false)

Refresh the values and the keys from the base HFloatTables. See the class description from details.

Parameters
updSignalemits an updateSignal or not.
See Also
HFloatTablesAsHList

Definition at line 4800 of file datalib.cpp.


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