gSAFE  1.3.8
datalib.h
1 /* gSAFE - LIB
2  general Sql dAtabase FrontEnd
3  http://hyperprog.com/gsafe/
4 
5  (C) 2005-2013 Peter Deak (hyper80@gmail.com)
6 
7  License: GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
8 
9  datalib.h
10 */
11 
12 #ifndef GSAFE__DATALIB_HEADER_FILE_X_
13 #define GSAFE__DATALIB_HEADER_FILE_X_
14 
15 #include <QtCore>
16 
34 /* @{ */
35 
36 #include "gstexts.h"
37 
39 #define GSAFE_VERSION "1.3.8"
40 
41 // ///////////////////////////////////
42 // BEGIN - CONFIG/MODIFIERS/MODULES //
43 // ///////////////////////////////////
44 
45 #define PROGRESS_POSSIBILITY 1
46 
47 #define MODULE_REFRESHAGENT_NETSERVER 1
48 #define REFRESHAGENT_TCPPORT 1234
49 
50 #define MODULE_REFRESHAGENT_NETCLIENT 1
51 
55 #define HASHMUL 1.5
56 
57 //#define VALIDATE_HALT_ON_FIRST_ERROR
58 
59 // //////////////////////////////////
60 // END - CONFIG/MODIFIERS/MODULES //
61 // //////////////////////////////////
62 
63 #define MAX_SQL_INTERFACES 7
64 
65 #define INNER_JOIN 0
66 #define LEFT_OUTER_JOIN 1
67 
68 #define HEAD true
69 #define VALUE false
70 
71 #ifdef MODULE_REFRESHAGENT_NETSERVER
72 #include <QtNetwork>
73 #endif
74 #ifdef MODULE_REFRESHAGENT_NETCLIENT
75 #include <QtNetwork>
76 #endif
77 
78 // Global functions //
79 
80 int getIndexOf(QStringList l,QString s);
81 void setErrorLocal(QString s);
82 
86 void error(QString s);
87 
97 int my_dtoa(double v,char *buffer,int bufflen,int min,int max,int group);
98 
101 QString doubleToQString(double val,int min,int max,int group);
102 
103 #define ROUND_MATH 0
104 #define ROUND_FLOOR 1
105 
108 double dRound(double val,int mode=ROUND_MATH);
109 
111 QStringList * deep_copy_stringlist(QStringList *target,QStringList *source);
112 
113 // Classes //
114 
115 class QTextCodec;
116 class QSqlDatabase;
117 class QSqlQuery;
118 
119 QString convNationalToHtmlCodes(QString input);
120 
125 {
126  private:
127  QString codec_name;
128  int indent_pos;
129  QTextStream *output_stream;
130  QStack<QString> *node_stack;
131  QTextCodec *tc;
132  bool no_recode;
133 
134  private:
135  void eatData(QString d);
136 
137  public:
139  HXmlWriter(void);
141  ~HXmlWriter(void);
142 
144  QTextStream *getStream(void);
146  void setStream(QTextStream *oo);
147 
151  void putHead(QString enc,bool nullhead = false);
152 
157  void beginNode(QString n,QString parameters="");
158 
161  void endNode(void);
162 
167  void putCData(QString n,QString data,QString parameters="");
168 
172  void putEmptyNode(QString n,QString parameters="");
173 
176  void putRawData(QString data);
177 
179  QByteArray recodeDataNoconvert(QString d);
180 
182  QByteArray recodeData(QString d);
183 };
184 
194 class HRefreshAgent : public QObject
195 {
196  Q_OBJECT
197 
198  protected:
199  static HRefreshAgent *theone;
200 
201  public slots:
202  int notifySlot(QString tblname);
203 
204  public:
206  HRefreshAgent(void);
207  ~HRefreshAgent(void);
208 
212  static void notify(QString tblname);
213 
215  static HRefreshAgent* getNotifyAgent(void) { return theone; }
216 
217 
218  protected:
219  void internalNotify(QString tblname);
220 
221  signals:
223  void getnotify(QString tblname);
224 };
225 
226 #ifdef MODULE_REFRESHAGENT_NETSERVER
227 
232 class HRefreshAgentNetserver : public QObject
233 {
234  Q_OBJECT
235 
236  public:
241 
243  static bool isRunning(void);
245  static HRefreshAgentNetserver * getHRefreshAgentNetserver(void) { return theone; }
247  static QString serverAddress();
248 
249  protected:
250  static bool inNotify;
251  static HRefreshAgentNetserver *theone;
252 
253  private:
254  QTcpServer *tcpServer;
255  QList<QTcpSocket *> tcps_list;
256  QString laddr;
257 
258  private slots:
259  int newConn(void);
260  int request(void);
261  int clientLeaving(void);
262  int action(QString name,int sendernum);
263 
264 };
265 #endif
266 
267 #ifdef MODULE_REFRESHAGENT_NETCLIENT
268 
275 class HRefreshAgentNetclient : public QObject
276 {
277  Q_OBJECT
278 
279  public:
281  HRefreshAgentNetclient(QString server_ip);
284 
286  static bool isConnected(void);
288  static HRefreshAgentNetclient * getHRefreshAgentNetclient(void) { return theone; }
289 
290  protected:
291  static bool inNotify;
292  static HRefreshAgentNetclient *theone;
293 
294  private:
295  QTcpSocket *socket;
296  bool c_ok;
297 
298  private slots:
299  int request(void);
300  int serverClosing(void);
301  int action(QString name);
302 
303  signals:
305  void connectionLost();
307  void connectionEstablished();
308 };
309 #endif
310 
312 class HBase : public QObject
313 {
314  Q_OBJECT
315 
316  protected:
318  QString whoami;
319  public:
321  QString getWhoami(void);
322 
323  public:
325  HBase(void);
327  ~HBase(void);
328 };
329 
336 class HPlainDataMatrix : public HBase
337 {
338  Q_OBJECT
339 
340  private:
341  int col_count;
342  QString title;
343  QString exp_title;
344 
345  QString* hheader;
346 
347  QList<QVariant *> data;
348  QList<QString> control;
349  QList<QVariant *>::iterator iter;
350  QList<QString>::iterator iter_ctrl;
351  bool *printCellWrap;
352  int *printMaxCellWidth;
353  QString htmlcss;
354  public:
362  int keyfield;
363 
364  public:
366  QString getTitle(void) { return title; }
368  void setTitle(QString t) { title = t; }
370  void setExtendedTitle(QString xt) { exp_title = xt; }
371 
373  HPlainDataMatrix(int col);
375  ~HPlainDataMatrix(void);
376 
378  void clearData();
381  void clearAll();
382 
384  int columnCount();
386  int rowCount();
388  int recordCount() { return rowCount(); }
390  int fieldCount() { return columnCount(); }
391 
392 
394  void setHeaderCell(int col,QString strdata);
395 
397  void setHeader(QList<QString> strlistdata);
399  void setHeader(QString d1="",QString d2="",QString d3=""
400  ,QString d4="",QString d5="",QString d6=""
401  ,QString d7="",QString d8="",QString d9=""
402  ,QString d10="",QString d11="",QString d12=""
403  ,QString d13="",QString d14="",QString d15="");
405  QString getHeaderItem(int col);
407  QList<QString> getHeader(void);
408 
410  void setColumnPrintWrap(int col,bool wrap) { if(col <= col_count) printCellWrap[col] = wrap; }
412  bool getColumnPrintWrap(int col) { if(col <= col_count) return printCellWrap[col]; else return false; }
414  void setColumnPrintMaxWidth(int col,int m) { if(col <= col_count) printMaxCellWidth[col] = m; }
416  int getColumnPrintMaxWidth(int col) { if(col <= col_count) return printMaxCellWidth[col]; else return 0; }
417 
420  void replaceTextInColumn(int col,QString find,QString replace,bool parts=false);
423  void replaceSameUnderCellToEmpty(int col);
424 
426  void firstRow(void);
428  bool nextRow(void);
430  bool isEnded(void);
432  void removeCurrentRow(void);
434  QList<QVariant> currentRow(void);
436  QList<QString> currentRowStr(void);
439  QString currentRowStr(QString separator);
442  QString currentRowControl(void);
443 
445  void addRow(QList<QVariant> listdata,QString ctrl="");
447  void addRowStr(QList<QString> strlistdata,QString ctrl="");
449  void addRowStr(QString d1="",QString d2="",QString d3=""
450  ,QString d4="",QString d5="",QString d6=""
451  ,QString d7="",QString d8="",QString d9=""
452  ,QString d10="",QString d11="",QString d12=""
453  ,QString d13="",QString d14="",QString d15="")
454  {
455  addRowStrCTRL("",d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15);
456  }
458  void addRowStrCTRL(QString ctrl,QString d1="",QString d2="",QString d3=""
459  ,QString d4="",QString d5="",QString d6=""
460  ,QString d7="",QString d8="",QString d9=""
461  ,QString d10="",QString d11="",QString d12=""
462  ,QString d13="",QString d14="",QString d15="");
463 
466 
468  QList<QVariant> getRow(int row);
470  QList<QString> getRowStr(int row);
473  QString getRowStr(int row,QString separator);
474 
476  QVariant getCell(int row,int col);
478  QString getCellStr(int row,int col);
480  void setCell(int row,int col,QVariant vdata);
482  void setCellStr(int row,int col,QString strdata);
483 
485  void setRowControl(int row,QString ctrl);
486 
488  void setAppendPrependColumn(int col,QString prepend,QString append);
489 
492  void removeHTMLTags(bool force_all=false);
493 
495  int sumCoulmnAsInt(int col);
497  double sumCoulmnAsDouble(int col);
499  QString concatenateCoulmn(int col,QString separator);
500 
527  QString getContentAsHtml(QString params);
528 
531  void setHtmlCssText(QString css) { htmlcss = css; }
532 
534  QString getColumn(int col,QString separator);
535 
536  public slots:
539  int actLine(QString key);
542  int alternateActLine(QString key);
543  signals:
546  void actionOnRecord(QString key);
549  void alternateActionOnRecord(QString key);
550 
551 };
552 
557 {
558  public:
560 
561  public:
562 
565 
569 
572 
575 
578 
581 
584 
587 
590 
594 
597 
600 
603 
607 
610 
613 
616 
619 
622 
625 
628 
631 
634 
642 };
643 
646 {
647  public:
649 };
650 
653 {
654  public:
656 };
657 
660 {
661  public:
663 };
664 
667 {
668  public:
670 };
671 
674 {
675  public:
677 };
678 
681 {
682  public:
684 };
685 
692 class HSqlInterface : public HBase
693 {
694  Q_OBJECT
695 
696  private:
697  static bool isset;
698  static int currentDefaultInterface;
699  static int defaultDefaultInterface;
700  static HSqlSingleInterface *interfaces[MAX_SQL_INTERFACES];
701 
705  int myinterface;
706 
707  public:
709  HSqlInterface();
711  ~HSqlInterface();
712 
724  static void setSqlMode(QString modename);
725 
729  static void setSqlModeBackToFirst(void);
730 
733  void cloneSqlInterfaceSettingsFrom(HSqlInterface *other) { myinterface = other->myinterface; }
734 
738  HSqlSingleInterface *myInterface(void) { return interfaces[myinterface]; }
739 
743  static HSqlSingleInterface *getSqlInterface(QString interfacename);
744 
747  QString sqlConcatenateToLocal(QString string);
748 
751  QString sqlConcatenateToLocal(QStringList fields);
752 };
753 
770 {
771  Q_OBJECT
772 
773  protected:
774  bool query_error_occured;
775 
776  private:
777  static bool globalnew_nodefault;
778  static QString globalnew_current_database;
779 
780  bool nodefault;
781  QString current_database;
782 
783  public:
785  static int trans;
786 
787  public:
789  HSqlHandler(void);
791  ~HSqlHandler(void);
792 
816  static void setCustomSqlDatabase(QString databaseName,QString sqlinterfacename = "");
820  static void setDefaultSqlDatabase(void);
821 
827  QSqlDatabase workDB(void);
828 
830  QSqlQuery *allocateQSqlQuery(void);
831 
835  void cloneSqlSettingsFrom(HSqlHandler *other);
836 
841  void transaction(void);
842 
847  void commit(void);
848 
853  void rollback(void);
854 
860  bool submit0ResultQuery(QString q,QString err,bool tdisabled=false);
861 
867  QVariant submit1ResultQuery(QString q,QString err,bool tdisabled=false);
868 
876  HPlainDataMatrix* submitNResultQuery(int N,QString q,QString err,bool tdisabled=false);
877 
880  bool errorStatus(void) { return query_error_occured; }
881 
882  signals:
884  void errorSignal(QString err);
885 };
886 
887 class HDataField;
888 /* NOT DOCUMENTED: This is a helper class which is makes list from the HDataField-s. Don't use directly!
889  * It is used by the HTableBase class automatically. */
890 class HDataField_List : public HSqlHandler
891 {
892  Q_OBJECT
893 
894  public:
895  HDataField_List(void);
896  ~HDataField_List(void);
897 
898  void addElement(HDataField *d);
899  void clearElements(void);
900  void connectElement(HDataField_List *c);
901  void disconnectElement(void);
902 
903  public:
904  HDataField *data;
905  HDataField_List *next;
906  HDataField_List *nextall;
907 
908 };
909 
910 class HDataChangeLogger;
911 
918 class HTableBase : public HSqlHandler
919 {
920  Q_OBJECT
921 
922  protected:
923 
924  QString tabletitle;
925  int field;
926  HDataField_List *table,*run; // < Head of the list
927  QString sqlTable;
928  QStringList *depend;
929 
933  QString conn_part;
934 
937  QString imc_thiskey,imc_thatkey;
938  HTableBase *imc_thattable;
939 
942  QStack<HTableBase *> *connectedTableBases;
943 
944  public:
949 
953 
955  QString errstr;
956 
959  HTableBase(QString t);
961  ~HTableBase(void);
962 
969 
976 
986  void connectTable(HTableBase *ct,int type=INNER_JOIN,QString connconstraint="");
987 
997  void connectTable(HTableBase *ct,QString thiskey,QString thatkey,int type=INNER_JOIN,QString connconstraint="");
998 
1003  void clearConnections(void);
1004 
1008  void clearAndFreeConnections(void);
1009 
1013  void freeTable(void);
1014 
1022  void addField(HDataField *i);
1023 
1027  void firstField(void);
1028 
1033  HDataField *nextField(void);
1034 
1039  HDataField *nextFieldAll(void);
1040 
1052  HDataField *fieldBySqlName(QString sqln,bool all=false,QString containerSqlTable="");
1053 
1060  HDataField *fieldByIndex(int i,bool all=false);
1061 
1068  HDataField *staticFieldByTitle(QString title="");
1069 
1072  int fieldCount(bool withconnect=false);
1073 
1075  void setEditable(void);
1076 
1078  void setReadonly(void);
1079 
1081  void setHide(void);
1082 
1084  void setShow(void);
1085 
1091  void setColor(int r,int g,int b);
1092 
1098  void setAllNOSet(void);
1104  void setAllYESSet(void);
1105 
1111  void resetLogging(void);
1117  void setLogging(void);
1118 
1124  bool isChanged(bool all=false);
1125 
1127  QString tableTitle(void) { return tabletitle; }
1129  void setTableTitle(QString s) { tabletitle = s; }
1130 
1132  QString sqlTableName(void);
1133 
1135  QStringList getExplainHeads(void) { return getHeads(1); }
1136 
1138  QStringList getShortTitleHeads(void) { return getHeads(2); }
1139 
1144  QStringList getHeads(int what);
1145 
1157  QString sqlSelect(QString tail="",bool all=false,bool keypart=false);
1158 
1162  QString sqlSelectAll(QString tail="") { return sqlSelect(tail,true,false); }
1163 
1167  QString sqlSelectWk(QString tail="",bool all=false) { return sqlSelect(tail,all,true); }
1168 
1172  QString sqlSelectWkAll(QString tail="") { return sqlSelect(tail,true,true); }
1173 
1175  QVariant operator[](int i);
1176 
1181  void dataUpdated(void);
1182 
1185  void sqlSynced(HDataChangeLogger *dclog = NULL,bool forcechange=false,bool forcelog = false);
1188  void clearSqlSynced(void);
1192  bool isReallyChanged(void);
1193 
1198  QString validate(bool all=true);
1199 
1203  QString sqlCreateString(QString switches="");
1204 
1207  void setShowAllMarked(QString mark);
1210  void setHideAllMarked(QString mark);
1213  void setEditableAllMarked(QString mark);
1216  void setReadolnyAllMarked(QString mark);
1219  void returnToDefaultAllMarked(QString mark);
1220 
1224  void setGuiEnabledAllMarked(QString mark);
1228  void setGuiDisabledAllMarked(QString mark);
1234  void setLoggingAllMarked(QString mark);
1235 
1241  void setColorAllMarked(QString mark,int r,int g,int b);
1242 
1245  void removeSqlCooseButtons(void);
1246 
1256  void blockReInitializeBase(QString hide_marker,QString ro_marker);
1257 
1261  void useRole(QString name);
1266  void delRole(QString name);
1270  void clearRoles(void);
1271 
1272  public slots:
1276  int errorPassSlot(QString err);
1277 
1288  void addDependTableName(QString n);
1289 
1290  signals:
1294  void dataChanged(void);
1295 
1298  void dataUpdatedSignal(void);
1299 
1302  void dataModifiedSignal(void);
1303 
1304 #ifdef PROGRESS_POSSIBILITY
1305 
1307  void startWorking(void);
1309  void doWorking(void);
1311  void endWorking(void);
1312 
1313 #endif
1314 
1315 };
1316 
1350 class HTable : public HTableBase
1351 {
1352  Q_OBJECT
1353 
1354  protected:
1355  bool ro_mask;
1356  bool reread_key;
1357  QString insertedKey;
1358 
1359  HDataChangeLogger *dclog;
1360 
1361  public:
1365  HTable(QString t);
1367  ~HTable(void);
1368 
1374  HTable(HTable *t);
1375 
1381  void deepcopy_from_htable(HTable *x);
1382 
1389  QString sqlInsert(bool insertkey=false);
1390 
1399  QString sqlInsertAll(void);
1400 
1405  QString sqlUpdate(bool all=false);
1408  QString sqlUpdateAll(void) { return sqlUpdate(true); }
1409 
1414  QString getKey(bool head_val,QString intable="");
1415 
1418  QVariant operator[](int i);
1419 
1424  void setSqlFieldValue(QString sqln,QVariant v,bool sdisable=false);
1425 
1429  QVariant getSqlFieldValue(QString sqln);
1430 
1440  bool readonlyMask(void) { return ro_mask; }
1441 
1457  void blockReInitialize(QString hide_marker,QString ro_marker);
1458 
1462  void setDataChangeLogger(HDataChangeLogger *dcl) { dclog = dcl; }
1466  void clearDataChangeLogger(void) { dclog = NULL; }
1467 
1470  int recordCount(void) { return 1; }
1471 
1472  public slots:
1481  int updateWithKey(QString key="",bool all=false,bool update = true,bool tdisabled=false);
1482 
1485  int updateWithKeyAll(QString key="",bool update=true,bool tdisabled=false) { return updateWithKey(key,true,update,tdisabled); }
1486 
1489  int setKey(QString key);
1490 
1497  int saveRecord(bool all=false,bool tdisabled=false);
1498 
1501  int saveRecordAll(bool tdisabled=false) { return saveRecord(true,tdisabled); }
1502 
1512  int insertRecord(bool insertkey=false,bool disable_tr=false,bool resetafterinsert=true);
1513 
1521  int insertRecordAll(bool disable_tr=false);
1522 
1550  QString getInsertedKey(void) { return insertedKey; }
1553  void rereadNextInsertedKey(void) { insertedKey=""; reread_key = true; }
1554 
1558  int returnToDefault(bool all=true);
1559 
1568  int enableReadonlyMask(void) { ro_mask = true; return 0; }
1577  int disableReadonlyMask(void) { ro_mask = false; return 0; }
1578 
1579  protected:
1580  QString getKeyValueAfterInsert(void);
1581 
1582  QString specifyKey(QString tablename);
1583 };
1584 
1585 
1586 #define FLOATTABLES_STS_UNDEF 0
1587 #define FLOATTABLES_STS_ALIVE 1
1588 #define FLOATTABLES_STS_NEW 2
1589 #define FLOATTABLES_STS_DELETED 3
1590 #define FLOATTABLES_STS_CANCELLED 4
1591 
1611 {
1612  protected:
1613  QString sqlTable;
1614  bool fiter;
1615  QList<HTable *>::iterator titer;
1616  QList<int>::iterator siter;
1617 
1618  public:
1622  QList<int> *sts;
1624  QList<HTable *> *tbls;
1625 
1626  public:
1632  HFloatTables(HTable *baserec);
1634  ~HFloatTables(void);
1635 
1637  QString sqlTableName(void) { return sqlTable; }
1638 
1641  int count(void);
1643  int recordCount(void) { return count(); }
1646  int countAllStat(void);
1647 
1652  HTable *getTByField(QString field,QString key);
1656  HTable *getTByKey(QString key);
1660  HTable *getTByNum(int idx);
1661 
1665  void allAliveToNew(void);
1669  void setAllField(QString fname,QVariant value);
1670 
1675  void first(void);
1681  HTable *nextRecord(void);
1687  QString nextKey(void);
1688 
1696  HTable *createRecord(void);
1709  HTable *createRecordAsUndef(void);
1712  void markedRecordToNew(HTable *r);
1715  void removeUndef(void);
1716 
1719  int deleteRecord(HTable *d);
1722  int deleteRecord(int idx);
1723 
1725  int clearMem(void);
1726 
1736  int readDBTable(QString filter,bool tdisabled=false);
1737 
1740  int saveDBTable(bool tdisabled=false);
1741 };
1742 
1756 class HList : public HTableBase
1757 {
1758  Q_OBJECT
1759 
1760  protected:
1761 
1762  QStringList *keys;
1763  QList<QStringList *> *values;
1764  QString active_key;
1765 
1766  QList<QStringList *>::iterator query_valiter;
1767  QStringList::iterator query_keyiter;
1768 
1769  public:
1771  QString last_filter;
1773  bool last_all;
1774 
1775  public:
1776 
1779  HList(QString t);
1781  ~HList(void);
1782 
1788  HList(HList *t);
1794  void deepcopy_from_hlist(HList *x);
1795 
1798  virtual QList<QStringList *>* getValues(void) { return values; }
1801  virtual QStringList* getKeys(void) { return keys; }
1802 
1804  QString operator[](int i);
1805 
1807  int recordCount(void) { return keys->count(); }
1808 
1810  QString activeKey(void);
1812  void setActiveKey(QString k);
1813 
1816  virtual QString getSqlFieldValue(QString sqln);
1817 
1825 
1827  void queryToFirst(void);
1831  bool queryNextRecord(void);
1835  QString queryNextKey(void);
1839  QStringList* queryNextValues(void);
1843  QString queryCurrKey(void);
1847  QStringList* queryCurrValues(void);
1848 
1849  public slots:
1851  virtual int clearList(void);
1852 
1854  int actLine(void);
1856  int alternateActLine(void);
1857 
1863  virtual int readList(QString filter="",bool all=true);
1870  int reReadList(void) { return readList(last_filter,last_all); }
1871 
1873  int captureNotify(QString tblname);
1874 
1875  signals:
1877  void actionOnRecord(QString key);
1879  void alternateActionOnRecord(QString key);
1880 
1881 };
1882 
1902 {
1903  Q_OBJECT
1904 
1905  protected:
1906  HFloatTables *mem;
1907 
1908  public:
1917  HFloatTablesAsHList(HFloatTables *memt,HList *templ=NULL,bool clone_struct_from_memt=false);
1920 
1922  HTable *getActiveTable(void);
1923 
1927  void refreshValuesKeys(bool updSignal=false);
1928 
1930  virtual QList<QStringList *>* getValues(void) { return values; }
1932  virtual QStringList* getKeys(void) { return keys; }
1933 
1934  public slots:
1937  virtual int clearList(void);
1941  virtual int readList(QString filter="",bool all=true);
1942 
1943  private:
1944  //don't use this (that's why it is private)
1945  virtual QString getSqlFieldValue(QString sqln);
1946 
1947 };
1948 
1949 // ///////////////////////////////////////////////////////////////////////////////
1950 // / Classes of data fields (and related) ////////////////////////////////////////
1951 // ///////////////////////////////////////////////////////////////////////////////
1952 
1982 {
1983  public:
1985  QString name;
1987  QString mod;
1989  QString val;
1990 
1991  public:
1993  HDataFieldRole(void);
1995  HDataFieldRole(QString name,QString mod="",QString val="");
1996 
1997  ~HDataFieldRole(void);
1998 
2000  void addShowMod(void);
2002  void addHideMod(void);
2003 
2005  void addEditableMod(void);
2007  void addReadonlyMod(void);
2008 
2010  void addGuienabledMod(void);
2012  void addGuidisabledMod(void);
2013 
2015  void addResetMod(void);
2017  void addSetvalMod(void);
2018 
2019 
2021  bool hasShowMod(void);
2023  bool hasHideMod(void);
2024 
2026  bool hasEditableMod(void);
2028  bool hasReadonlyMod(void);
2029 
2031  bool hasGuienabledMod(void);
2033  bool hasGuidisabledMod(void);
2034 
2036  bool hasResetMod(void);
2038  bool hasSetvalMod(void);
2039 
2040 };
2041 
2069 class HDataField : public HSqlHandler
2070 {
2071  Q_OBJECT
2072 
2073  protected:
2075  int set;
2077  QString explain;
2079  QString title;
2081  QString tailstr;
2083  QString sqlColumn;
2085  QString defval;
2087  QString valid;
2089  QStringList notvalid;
2091  QString function;
2093  QString derived;
2100 
2103 
2104  bool lastvalidate_result;
2105  bool permanentvalidate_result;
2106  QString manual_validate_error;
2107 
2109  bool editable;
2111  bool sql;
2113  bool show;
2116 
2117  int wcellw_print;
2118  bool wcell_print;
2119 
2121  int color_r,color_g,color_b;
2122 
2124  QStringList markers;
2126  QList<HDataFieldRole> roles;
2127 
2129  bool logged;
2137  QString valueInSql;
2138 
2139  public:
2145  QString conn_sqlTable;
2146 
2147  public:
2154  HDataField(QString _sqlColumn,QString _explain,QString tit,
2155  QString _tailstr="",bool _editable=true);
2157  ~HDataField(void);
2158 
2162  HDataField(HDataField *t);
2163 
2170  void setData(QString _sqlColumn,QString _explain,QString tit,
2171  QString _tailstr="",bool _editable=true);
2172 
2173  public:
2178 
2181  virtual HDataField* get_clone(void);
2182 
2184  QString getExplainText(void) { return explain; }
2186  QString getTitleText(void) { return title; }
2188  QString getTailText(void) { return tailstr; }
2189 
2192  void setExplainText(QString expl);
2195  void setTitleText(QString titl);
2198  void setTailText(QString tail);
2199 
2208  QString getSpecDisplaySortMode(void) { return spec_disp_sort; }
2209 
2213  virtual int setValue (QVariant v,bool sdisabled=false);
2215  virtual QVariant getValue(void);
2218  virtual int setDefval(QVariant v);
2220  QString getDefaultValue(void) { return defval; }
2222  virtual QString getSQLValue(void);
2227  virtual QString getSQLValueAsString(void);
2230  virtual QString sqlInsertHead(void);
2233  virtual QString sqlInsertValue(void);
2236  virtual QString sqlUpdate(void);
2239  virtual QString sqlSelectHead(void);
2240 
2243  virtual void value_changed();
2244 
2262  virtual QVariant dbValueToDispValue(QVariant v);
2263 
2267  virtual QVariant getDispValue() { return dbValueToDispValue(getValue()); }
2268 
2270  bool isSQLField(void) { return sql; }
2274  bool isEditable(void) { return editable; }
2278  bool isShow(void) { return show; }
2282  bool isSet(void) { if(set) return true; else return false; }
2286  bool isGuienabled(void) { return guienabled; }
2287 
2290  void setEditable(void);
2293  void setReadonly(void);
2296  void setShow(void) { show = true; }
2299  void setHide(void) { show = false; }
2302  void setGuienabled(void) { guienabled = true; }
2305  void setGuidisabled(void) { guienabled = false; }
2308  void notSet(void) { set=0; }
2311  void doSet(void) { set=1; }
2314  void setLogging(void) { logged = true; }
2317  void resetLogging(void) { logged = false; }
2321  bool isLogged(void) { return logged; }
2322 
2324  HDataField * asConstant(void) { setReadonly(); return this; }
2326  HDataField * asHide(void) { setHide(); return this; }
2327 
2332  void setColor(int r,int g,int b);
2334  int getRColor(void) { return color_r; }
2336  int getGColor(void) { return color_g; }
2338  int getBColor(void) { return color_b; }
2344  HDataField * asColored(int r,int g,int b) { setColor(r,g,b); return this;}
2345 
2354  void meldWithNext(void) { meldwithnext = true; }
2357  void resetMeldWithNext(void) { meldwithnext = false; }
2360  bool isMeldedWithNext(void) { return meldwithnext; }
2361 
2368  void noMiddleStretch(void) { nomiddlestretch = true; }
2371  void resetNoMiddleStretch(void) { nomiddlestretch = false;}
2374  bool isNoMiddleStretch(void) { return nomiddlestretch; }
2375 
2379  void setEditBoxMaxWidth(int max) { editboxmaxwidth = max; }
2382  int editBoxMaxWidth(void) { return editboxmaxwidth; }
2383 
2388  virtual bool acceptFunction(void) { return false; }
2395  void setFunction(QString func);
2398  void resetFunction(void) { function = ""; }
2401  QString getFunction(void) { return function; }
2402 
2407  virtual bool acceptSubselect(void) { return false; }
2414  void setSubselect(QString subs);
2417  void resetSubselect(void) { derived = ""; }
2420  QString getSubselect(void) { return derived; }
2421 
2423  void setPrintCellWidth (int w) { wcellw_print = w; }
2425  int getPrintCellWidth (void) { return wcellw_print; }
2426 
2428  void setPrintCellWrap (void) { wcell_print = true; }
2430  void setPrintCellNoWrap(void) { wcell_print = true; }
2432  bool isPrintCellWrap (void) { return wcell_print; }
2433 
2435  virtual QString sqlCreateStringPart(QString switches="");
2436 
2438  int returnToDefault(void);
2439 
2444  QVariant defvalParser(QString s);
2445 
2457  void sqlSynced(HDataChangeLogger *dclog = NULL,bool forcechange=false,bool forcelog = false);
2463  void clearSqlSynced(void);
2469  bool isReallyChanged(void);
2470 
2475  void setValidator(QString v="");
2478  QString validate(void);
2482  virtual QString lowerValidate(void) { return QString(""); }
2483 
2486  void addNotValidValue(QString v);
2489  void setNotValidValues(QStringList nvl);
2492  void clearNotValidValues(void);
2493 
2502  void addMark(QString mark);
2505  void addMark(QStringList pmarkers);
2508  bool hasMark(QString mark);
2511  void clearMarkers(void);
2514  QStringList allMarker(void);
2515 
2518  void addRole(HDataFieldRole role);
2521  void delRole(QString name);
2524  void clearRoles(void);
2535  void useRole(QString name);
2536 
2542  bool getLastValidateStatus() { return lastvalidate_result; }
2546  void resetValidateStatus() { lastvalidate_result=false; }
2554  bool getPermanentValidateStatus() { return permanentvalidate_result; }
2559  void setMaulallyValidateError(QString message);
2560 
2561  public slots:
2565  void disableControlSlot(void) { emit disableControl(); }
2568  void enableControlSlot(void) { emit enableControl(); }
2569 
2570  signals:
2571 
2573  void dataChanged(void);
2574 
2575  void disableControl(void);
2576  void enableControl(void);
2577 
2581 };
2582 
2591 class HKey : public HDataField
2592 {
2593  Q_OBJECT
2594 
2595  protected:
2596  QString value;
2597 
2598  public:
2604  HKey(QString sqlc,QString ex,QString tit,QString def);
2606  ~HKey(void);
2607 
2609  HKey(HKey *t);
2611  void deepcopy_from(HKey *x);
2613  virtual HDataField* get_clone(void);
2614 
2615  virtual int setValue (QVariant v,bool sdisabled=false);
2616  virtual int setDefval(QVariant v);
2617  virtual QVariant getValue(void);
2618  virtual QString getSQLValue(void);
2619  virtual QString getSQLValueAsString(void);
2620  virtual QString sqlInsertHead(void);
2621  virtual QString sqlInsertValue(void);
2622  virtual QString sqlUpdate(void);
2623  virtual QString sqlSelectHead(void);
2624 
2625  virtual QString sqlCreateStringPart(QString switches="");
2626 };
2627 
2633 class HConnect : public HDataField
2634 {
2635  Q_OBJECT
2636 
2637  protected:
2638  QString connected_table;
2639  QString value;
2640 
2641  public:
2645  HConnect(QString sqlc,QString connected_tablep);
2647  ~HConnect(void);
2648 
2650  HConnect(HConnect *t);
2652  void deepcopy_from(HConnect *x);
2654  virtual HDataField* get_clone(void);
2655 
2656  /* Returns the name of the connected table */
2657  QString getConnectedTable(void) { return connected_table; }
2658 
2659  virtual int setValue (QVariant v,bool sdisabled=false);
2660  virtual int setDefval(QVariant v);
2661  virtual QVariant getValue(void);
2662  virtual QString getSQLValue(void);
2663  virtual QString getSQLValueAsString(void);
2664  virtual QString sqlInsertHead(void);
2665  virtual QString sqlInsertValue(void);
2666  virtual QString sqlUpdate(void);
2667  virtual QString sqlSelectHead(void);
2668 
2669  virtual QString sqlCreateStringPart(QString switches="");
2670 };
2671 
2676 class HSmallText : public HDataField
2677 {
2678  Q_OBJECT
2679 
2680  protected:
2681  QString value;
2682  bool initial_selected;
2683 
2684  public:
2691  HSmallText(QString sqlc,QString ex,QString tit,QString t,QString def);
2693  ~HSmallText(void);
2694 
2696  HSmallText(HSmallText *t);
2698  void deepcopy_from(HSmallText *x);
2700  virtual HDataField* get_clone(void);
2701 
2702  virtual QVariant dbValueToDispValue(QVariant v);
2703  virtual int setValue (QVariant v,bool sdisabled=false);
2704  virtual int setDefval(QVariant v);
2705  virtual QVariant getValue(void);
2706  virtual QString getSQLValue(void);
2707  virtual QString getSQLValueAsString(void);
2708  virtual QString sqlInsertHead(void);
2709  virtual QString sqlInsertValue(void);
2710  virtual QString sqlUpdate(void);
2711  virtual QString sqlSelectHead(void);
2712 
2713  virtual bool acceptFunction(void) { return true; }
2714  virtual bool acceptSubselect(void) { return true; }
2715 
2716  virtual QString sqlCreateStringPart(QString switches="");
2717 
2721  void setInitialSelected(bool selected) { initial_selected = selected; }
2724  bool isInitialSelected(void) { return initial_selected; }
2725 };
2726 
2731 class HLargeText : public HDataField
2732 {
2733  Q_OBJECT
2734 
2735  protected:
2736  QString value;
2737 
2738  public:
2744  HLargeText(QString sqlc,QString ex,QString tit,QString def);
2746  ~HLargeText(void);
2747 
2749  HLargeText(HLargeText *t);
2751  void deepcopy_from(HLargeText *x);
2753  virtual HDataField* get_clone(void);
2754 
2755  virtual int setValue (QVariant v,bool sdisabled=false);
2756  virtual int setDefval(QVariant v);
2757  virtual QVariant getValue(void);
2758  virtual QString getSQLValue(void);
2759  virtual QString getSQLValueAsString(void);
2760  virtual QString sqlInsertHead(void);
2761  virtual QString sqlInsertValue(void);
2762  virtual QString sqlUpdate(void);
2763  virtual QString sqlSelectHead(void);
2764 
2765  virtual bool acceptFunction(void) { return true; }
2766  virtual bool acceptSubselect(void) { return true; }
2767 
2768  virtual QString sqlCreateStringPart(QString switches="");
2769 };
2770 
2781 class HCharHash : public HDataField
2782 {
2783  Q_OBJECT
2784 
2785  protected:
2786  QString value;
2787 
2788  public:
2790  QStringList keys;
2792  QStringList values;
2793 
2794  public:
2803  HCharHash(QString sqlc,QString ex,QString tit,QString t,QString def,
2804  QStringList k,QStringList v);
2806  ~HCharHash();
2807 
2809  HCharHash(HCharHash *t);
2811  void deepcopy_from(HCharHash *x);
2813  virtual HDataField* get_clone(void);
2814 
2815  virtual QVariant dbValueToDispValue(QVariant v);
2816  virtual int setValue (QVariant v,bool sdisabled=false);
2817  virtual int setDefval(QVariant v);
2818  virtual QVariant getValue(void);
2819  virtual QString getSQLValue(void);
2820  virtual QString getSQLValueAsString(void);
2821  virtual QString sqlInsertHead(void);
2822  virtual QString sqlInsertValue(void);
2823  virtual QString sqlUpdate(void);
2824  virtual QString sqlSelectHead(void);
2825 
2826  virtual QString sqlCreateStringPart(QString switches="");
2827 
2829  QString getKeyOfValue(QString s);
2831  QString getValueOfKey(QString s);
2832 };
2833 
2844 class HNumHash : public HDataField
2845 {
2846  Q_OBJECT
2847 
2848  protected:
2849  int value;
2850 
2851  public:
2853  QStringList keys;
2855  QStringList values;
2856 
2857  public:
2866  HNumHash(QString sqlc,QString ex,QString tit,QString t,QString def,
2867  QStringList k,QStringList v);
2869  ~HNumHash();
2870 
2872  HNumHash(HNumHash *t);
2874  void deepcopy_from(HNumHash *x);
2876  virtual HDataField* get_clone(void);
2877 
2878  virtual QVariant dbValueToDispValue(QVariant v);
2879  virtual int setValue (QVariant v,bool sdisabled=false);
2880  virtual int setDefval(QVariant v);
2881  virtual QVariant getValue(void);
2882  virtual QString getSQLValue(void);
2883  virtual QString getSQLValueAsString(void);
2884  virtual QString sqlInsertHead(void);
2885  virtual QString sqlInsertValue(void);
2886  virtual QString sqlUpdate(void);
2887  virtual QString sqlSelectHead(void);
2888 
2889  virtual QString sqlCreateStringPart(QString switches="");
2890 
2892  QString getKeyOfValue(QString s);
2894  QString getValueOfKey(QString s);
2895 
2896 };
2897 
2902 class HNumber : public HDataField
2903 {
2904  Q_OBJECT
2905 
2906  protected:
2907  int value;
2908  long int minimum,maximum;
2909 
2910  public:
2917  HNumber(QString sqlc,QString ex,QString tit,QString t,QString def);
2919  ~HNumber(void);
2920 
2922  HNumber(HNumber *t);
2924  void deepcopy_from(HNumber *x);
2926  virtual HDataField* get_clone(void);
2927 
2928  virtual int setValue (QVariant v,bool sdisabled=false);
2929  virtual int setDefval(QVariant v);
2930  virtual QVariant getValue(void);
2931  virtual QString getSQLValue(void);
2932  virtual QString getSQLValueAsString(void);
2933  virtual QString sqlInsertHead(void);
2934  virtual QString sqlInsertValue(void);
2935  virtual QString sqlUpdate(void);
2936  virtual QString sqlSelectHead(void);
2937 
2938  virtual bool acceptFunction(void) { return true; }
2939  virtual bool acceptSubselect(void) { return true; }
2940 
2941  virtual QVariant dbValueToDispValue(QVariant v);
2942 
2943  virtual QString sqlCreateStringPart(QString switches="");
2944 
2945  virtual QString lowerValidate(void);
2946 
2948  void setMinimum(long int m) { minimum = m; }
2950  void setMaximum(long int m) { maximum = m; }
2952  long int getMinimum(void) { return minimum; }
2954  long int getMaximum(void) { return maximum; }
2955 
2956 };
2957 
2964 class HStatic : public HDataField
2965 {
2966  Q_OBJECT
2967 
2968  protected:
2969  QString value;
2970 
2971  public:
2976  HStatic(QString ex,QString tit="",QString def="");
2978  ~HStatic(void);
2979 
2981  HStatic(HStatic *t);
2983  void deepcopy_from(HStatic *x);
2985  virtual HDataField* get_clone(void);
2986 
2987  virtual int setValue (QVariant v,bool sdisabled=false);
2988  virtual int setDefval(QVariant v);
2989  virtual QVariant getValue(void);
2990  virtual QString getSQLValue(void);
2991  virtual QString getSQLValueAsString(void);
2992  virtual QString sqlInsertHead(void);
2993  virtual QString sqlInsertValue(void);
2994  virtual QString sqlUpdate(void);
2995  virtual QString sqlSelectHead(void);
2996 
2997  virtual QString sqlCreateStringPart(QString switches="");
2998 };
2999 
3007 class HCheck : public HDataField
3008 {
3009  Q_OBJECT
3010 
3011  protected:
3012  bool value;
3013 
3014  public:
3016  QString trues;
3018  QString falses;
3019 
3020  public:
3029  HCheck(QString sqlc,QString ex,QString tit,QString t,QString def,QString ts=GSAFETEXT_YES_HAVE,QString fs=GSAFETEXT_NO_HAVENOT);
3031  ~HCheck(void);
3032 
3034  HCheck(HCheck *t);
3036  void deepcopy_from(HCheck *x);
3038  virtual HDataField* get_clone(void);
3039 
3040  virtual QVariant dbValueToDispValue(QVariant v);
3041  virtual int setValue (QVariant v,bool sdisabled=false);
3042  virtual int setDefval(QVariant v);
3043  virtual QVariant getValue(void);
3044  virtual QString getSQLValue(void);
3045  virtual QString getSQLValueAsString(void);
3046  virtual QString sqlInsertHead(void);
3047  virtual QString sqlInsertValue(void);
3048  virtual QString sqlUpdate(void);
3049  virtual QString sqlSelectHead(void);
3050 
3051  virtual QString sqlCreateStringPart(QString switches="");
3052 };
3053 
3058 class HFloating : public HDataField
3059 {
3060  Q_OBJECT
3061 
3062  protected:
3063  double value;
3064  double minimum,maximum;
3065  int dMminDf,dMmaxDf,dMgroup;
3066 
3067  public:
3074  HFloating(QString sqlc,QString ex,QString tit,QString t,QString def);
3076  ~HFloating(void);
3077 
3079  HFloating(HFloating *t);
3081  void deepcopy_from(HFloating *x);
3083  virtual HDataField* get_clone(void);
3084 
3085  virtual int setValue (QVariant v,bool sdisabled=false);
3086  virtual int setDefval(QVariant v);
3087  virtual QVariant getValue(void);
3088  virtual QString getSQLValue(void);
3089  virtual QString getSQLValueAsString(void);
3090  virtual QString sqlInsertHead(void);
3091  virtual QString sqlInsertValue(void);
3092  virtual QString sqlUpdate(void);
3093  virtual QString sqlSelectHead(void);
3094 
3095  virtual bool acceptFunction(void) { return true; }
3096  virtual bool acceptSubselect(void) { return true; }
3097 
3098  virtual QVariant dbValueToDispValue(QVariant v);
3099  virtual QString sqlCreateStringPart(QString switches="");
3100  virtual QString lowerValidate(void);
3101 
3103  void setMinimum(double m) { minimum = m; }
3105  void setMaximum(double m) { maximum = m; }
3107  double getMinimum(void) { return minimum; }
3109  double getMaximum(void) { return maximum; }
3110 
3117  void setDisplayMode(int minDf,int maxDf,int groupDf) {dMminDf=minDf; dMmaxDf=maxDf; dMgroup=groupDf; }
3118 
3122  QString getValueAsString(void);
3123 
3124 };
3125 
3139 class HDate : public HDataField
3140 {
3141  Q_OBJECT
3142 
3143  protected:
3145  QDate value;
3147  bool u_alive;
3149  bool unknown;
3150 
3151  public:
3159  HDate(QString sqlc,QString ex,QString tit,QString def,bool u_a=true,bool unk=true);
3161  ~HDate(void);
3162 
3164  HDate(HDate *t);
3166  void deepcopy_from(HDate *x);
3168  virtual HDataField* get_clone(void);
3169 
3170  virtual int setValue (QVariant v,bool sdisabled=false);
3171  virtual int setDefval(QVariant v);
3172  virtual QVariant getValue(void);
3173  virtual QString getSQLValue(void);
3174  virtual QString getSQLValueAsString(void);
3175  virtual QString sqlInsertHead(void);
3176  virtual QString sqlInsertValue(void);
3177  virtual QString sqlUpdate(void);
3178  virtual QString sqlSelectHead(void);
3179 
3180  virtual bool acceptFunction(void) { return true; }
3181  virtual bool acceptSubselect(void) { return true; }
3182 
3184  void possible_unknown(void) { u_alive=true; }
3186  void impossible_unknown(void) { u_alive=false; }
3188  bool is_unknown_alive(void) { return u_alive; }
3189 
3191  void value_is_unknown(void);
3193  void value_is_known(void);
3195  bool is_value_unknown(void) { return unknown; }
3196 
3198  virtual QVariant getKnownValue(void);
3199 
3200  virtual QString sqlCreateStringPart(QString switches="");
3201 };
3202 
3216 class HTimestamp : public HDataField
3217 {
3218  Q_OBJECT
3219 
3220  protected:
3221  QString value;
3222  bool check;
3223  bool readed;
3224 
3225  public:
3232  HTimestamp(QString sqlc,QString ex,QString tit,QString def,bool c);
3234  ~HTimestamp(void);
3235 
3237  HTimestamp(HTimestamp *t);
3239  void deepcopy_from(HTimestamp *x);
3241  virtual HDataField* get_clone(void);
3242 
3243  virtual QVariant dbValueToDispValue(QVariant v);
3244  virtual int setValue (QVariant v,bool sdisabled=false);
3245  virtual int setDefval(QVariant v);
3246  virtual QVariant getValue(void);
3247  virtual QString getSQLValue(void);
3248  virtual QString getSQLValueAsString(void);
3249  virtual QString sqlInsertHead(void);
3250  virtual QString sqlInsertValue(void);
3251  virtual QString sqlUpdate(void);
3252  virtual QString sqlSelectHead(void);
3253 
3255  void set_havetocheck(void) { check = true; }
3257  void set_donthavetocheck(void) { check = false; }
3259  bool is_checkenabled(void) { return check; }
3260 
3261  void read_from_sql(void) { readed = true; }
3262  bool is_sqlreaded(void) { return readed; }
3263 
3264  virtual QString sqlCreateStringPart(QString switches="");
3265 };
3266 
3267 /* NOT DOCUMENTED: Key - Value pair. Helper class of HSqlChoose. Don't use directly! */
3268 class KVPair
3269 {
3270  public:
3271  KVPair(void) { key = ""; value = ""; busy = false; }
3272  QString key,value;
3273  bool busy;
3274 };
3275 
3319 class HSqlChoose : public HDataField
3320 {
3321  Q_OBJECT
3322 
3323  protected:
3325  int (*hash)(const char*);
3326 
3327  QString value;
3328 
3329  QString connected_table;
3330  QString key_field;
3331  QString showed_field;
3332 
3333  QString showed_field_head;
3334  QString filter_part;
3335  QString order_part;
3336  QString popupdialog_title;
3337  int sortc; // gui based sort/sort by column c; c=-1(no sort)
3338 
3339  //If this attribute is false the referenced table is have not readed yet.
3340  // (It means the "keys" "values" "spevalues" has invalid status)
3341  bool readed_reftable;
3342 
3343  QStringList keys; //cache
3344  QStringList values; //cache
3345  QStringList sepvalues; //cache
3346 
3347  int maxhash;
3348  KVPair *pairs;
3349 
3351  bool easyform;
3352 
3353  public:
3356  const QObject *toolbrec;
3359  QString btext;
3360  QString toolbarbutton_down_text;
3361 
3364 
3367  const QObject* extrafunc_receiver[5];
3370  QString extrafunc_text[5];
3371 
3372  public:
3386  HSqlChoose(QString sqlc,QString ex,QString tit,QString def,
3387  QString ct,QString kf,QString sf,QString sfh,QString fp,QString op,
3388  QString inthash="",bool easyf=true);
3390  ~HSqlChoose(void);
3391 
3393  HSqlChoose(HSqlChoose *t);
3395  void deepcopy_from(HSqlChoose *x);
3397  virtual HDataField* get_clone(void);
3398 
3399  virtual QVariant dbValueToDispValue(QVariant v);
3400  virtual int setValue (QVariant v,bool sdisabled=false);
3401  virtual int setDefval(QVariant v);
3402  virtual QVariant getValue(void);
3403  virtual QString getSQLValue(void);
3404  virtual QString getSQLValueAsString(void);
3405  virtual QString sqlInsertHead(void);
3406  virtual QString sqlInsertValue(void);
3407  virtual QString sqlUpdate(void);
3408  virtual QString sqlSelectHead(void);
3409 
3410  QString getConnectedTableName(void) { return connected_table; }
3411 
3413  void setFilterPart(QString fp);
3415  void enableEasyForm(void);
3417  void disableEasyForm(void);
3419  bool getEasyForm(void) { return easyform; }
3420 
3423  void deferredSqlRefresh(void) { readed_reftable = false; }
3427  int refreshSqlValues(bool emitsignal=true,bool tdisabled=false);
3429  QStringList& getKeys (void);
3431  QStringList& getValues(void);
3433  QStringList& getSeparatedValues(void);
3435  QString getFieldHeads(void) { return showed_field_head; }
3436 
3439  void setGuiSortIndicator(int i) { sortc = i; }
3441  int getGuiSortIndicator(void) { return sortc; }
3442 
3455  void addToolButton(const QObject* receiver,QString text);
3458  void removeToolButton(void);
3459 
3473  void addExtraFunction(int pos,const QObject* receiver,QString text);
3476  void removeExtraFunction(void);
3477 
3479  void setPopupDialogTitle(QString title) { popupdialog_title = title; }
3481  void resetPopupDialogTitle(void) { popupdialog_title = ""; }
3483  QString getPopupDialogTitle(void) { return popupdialog_title; }
3484 
3486  void setHashFunction(int (*nh)(const char*) ) { hash = nh; }
3488  void setInernalHashFunction(QString hashname);
3489 
3490  virtual QString sqlCreateStringPart(QString switches="");
3491 
3492  signals:
3493  void dataUpdatedSignal(void);
3494 
3495  #ifdef PROGRESS_POSSIBILITY
3496 
3497  void startWorking(void);
3499  void doWorking(void);
3501  void endWorking(void);
3502  #endif
3503 
3504 };
3505 
3506 //The default hash functions.
3507 int nullhash (const char *c); //Codename: "nullhash"
3508 int charcodehash(const char *c); //Codename: "charcodehash"
3509 int dropchar (const char *c); //Codename: "dropchar"
3510 
3511 // ///////////////////////////////////////////////////////////////////////////////
3512 // / Classes of HDataChangeLoggerdata fields (and related) ///////////////////////
3513 // ///////////////////////////////////////////////////////////////////////////////
3514 
3515 /* NOT DOCUMENTED: Helper struct of HDataChangeLogger, do not use directly */
3516 struct HOneDataChange
3517 {
3518  QString pos;
3519  QString user;
3520  QString tablename;
3521  QString changedkey;
3522  QString fieldname;
3523  QString oldvalue;
3524  QString newvalue;
3525 };
3526 
3640 {
3641  Q_OBJECT
3642 
3643  friend class HTable;
3644  friend class HDataField;
3645 
3646 public:
3651  HDataChangeLogger(HTable *logtable,QString startpos=GSAFETEXT_UNKNOWN,QString startuser=GSAFETEXT_UNKNOWN);
3654  ~HDataChangeLogger(void);
3655 
3657  void setPosAndUser(QString pos,QString user) { curr_pos = pos; curr_user = user; }
3659  void setPos(QString pos) { curr_pos = pos; }
3661  void setUser(QString user) { curr_user = user; }
3662 
3663 private:
3664  void setTablename(QString tablename) { curr_table = tablename; }
3665  void setChangedKey(QString changedkey) { curr_ckey = changedkey; }
3666  void addChange(QString fieldname,QString oldval,QString newval);
3667  void writeOut(bool tdisabled = false);
3668 
3669 private:
3670  QString curr_pos;
3671  QString curr_user;
3672  QString curr_table;
3673  QString curr_ckey;
3674  HTable *logtable;
3675  QList<HOneDataChange> changes;
3676 };
3677 
3678 
3679 // ///////////////////////////////////////////////////////////////////////////////
3680 // / Classes of HDynTable (and related) //////////////////////////////////////////
3681 // ///////////////////////////////////////////////////////////////////////////////
3682 
3683 #define HDYNELEMENT_STRING 0
3684 #define HDYNELEMENT_DOUBLE 1
3685 
3690 {
3691  friend class HDynTable;
3692 
3693 private:
3694  QString name;
3695  QString rowName,colName;
3696  QString sqlname;
3697  QList<QString> labels;
3698 
3699  int type; // HDYNELEMENT_STRING:textual 1:double
3700  QString textual_value;
3701  double double_value;
3702 
3703 private:
3704 
3706  HDynTableElement(int type,QString name,QString sqlname,QString rowName,QString colName,QString labels="");
3707 
3708  int getType(void);
3709  bool isNumeric(void);
3710  bool isTextual(void);
3711 
3712  void setDoubleValue(double d);
3713  void setTextualValue(QString s);
3714  double getDoubleValue(void);
3715  QString getTextualValue(void);
3716 
3717  void addLabel(QString l);
3718  bool hasLabel(QString l);
3719 };
3720 
3721 
3781 class HDynTable : public HBase
3782 {
3783  Q_OBJECT
3784 
3785 private:
3786  QList<HDynTableElement> elements;
3787  QList<HDynTableElement>::iterator internal_iterator;
3788 
3791  void add(HDynTableElement e);
3792 public:
3794  HDynTable(void);
3796  HDynTable(const HDynTable& t);
3797  ~HDynTable(void);
3798 
3805  void defN(QString name,QString sqlname="",QString rowName="",QString colName="",QString labels="")
3806  { add(HDynTableElement(HDYNELEMENT_DOUBLE,name,sqlname,rowName,colName,labels)); }
3807 
3814  void defS(QString name,QString sqlname="",QString rowName="",QString colName="",QString labels="")
3815  { add(HDynTableElement(HDYNELEMENT_STRING,name,sqlname,rowName,colName,labels)); }
3816 
3822  void defT(int type,QString name,QString sqlname="",QString rowName="",QString colName="",QString labels="")
3823  { add(HDynTableElement(type,name,sqlname,rowName,colName,labels)); }
3824 
3826  void clear(void) { elements.clear(); }
3827 
3829  QString dumpElements(void);
3830 
3832  void setElementValue(QString name,double value);
3834  void setElementValue(QString name,QString value);
3835 
3837  double getElementValueDouble(QString name,bool *found=NULL);
3839  QString getElementValueString(QString name,bool *found=NULL);
3840 
3842  void setElementValueByRowColName(QString r,QString c,double value);
3844  void setElementValueByRowColName(QString r,QString c,QString value);
3845 
3847  double getElementValueDoubleByRowColName(QString r,QString c,bool *found=NULL);
3849  QString getElementValueStringByRowColName(QString r,QString c,bool *found=NULL);
3850 
3852  QString getElementSqlName(QString name);
3853 
3854 
3870  void firstElement(void);
3873  bool isEnded(void);
3876  void nextElement(void);
3877 
3879  QString currentElementName(void);
3881  QString currentElementRowName(void);
3883  QString currentElementColumnName(void);
3885  QString currentElementSqlName(void);
3887  QStringList currentElementLabels(void);
3888 
3890  bool currentElementIsNumeric(void);
3891 
3893  double currentElementValueDouble(void);
3895  QString currentElementValueString(void);
3896 
3898  void setCurrentElementValue(double d);
3900  void setCurrentElementValue(QString s);
3901 
3902 
3905  void emptyall(QString limitTo = "");
3908  void zeroall(QString limitTo = "");
3911  double max(QString limitTo = "");
3914  double min(QString limitTo = "");
3917  double sum(QString limitTo = "");
3918 
3920  void sustraction(double d,QString limitTo = "");
3922  void sustraction(HDynTable dt,QString limitTo = "");
3924  void addition(double d,QString limitTo = "");
3926  void addition(HDynTable dt,QString limitTo = "");
3928  void multiplicate(double d,QString limitTo = "");
3930  void multiplicate(HDynTable dt,QString limitTo = "");
3932  void divide(double d,QString limitTo = "");
3934  void divide(HDynTable dt,QString limitTo = "");
3935 
3937  int countElements(QString limitTo="");
3939  QString indexedElementName(int index);
3941  QString indexedElementSqlName(int index);
3944  double getIndexedValueDouble(int index,bool *found=NULL);
3947  QString getIndexedValueString(int index,bool *found=NULL);
3948 
3950  void setIndexedElementValue(int index,double d);
3952  void setIndexedElementValue(int index,QString s);
3953 
3958  bool elementHasLabel(QString name,QString label,bool *found=NULL);
3959 
3960 private:
3961  HDynTableElement& getElementByName(QString name);
3962 
3963  class HDynTableElementNameReferencer
3964  {
3965  private:
3966  HDynTable* ref;
3967  QString name;
3968 
3969  friend class HDynTable;
3970  HDynTableElementNameReferencer(HDynTable *ref,QString name)
3971  { this->ref = ref; this->name = name; }
3972  public:
3973  HDynTableElementNameReferencer operator=(double value)
3974  { ref->setElementValue(name,value); return *this; }
3975  HDynTableElementNameReferencer operator=(QString value)
3976  { ref->setElementValue(name,value); return *this; }
3977  operator double()
3978  { return ref->getElementValueDouble(name); }
3979  operator QString()
3980  { return ref->getElementValueString(name); }
3981 
3982  HDynTableElementNameReferencer operator+=(double value)
3983  { ref->setElementValue(name,ref->getElementValueDouble(name)+value); return *this; }
3984  HDynTableElementNameReferencer operator-=(double value)
3985  { ref->setElementValue(name,ref->getElementValueDouble(name)-value); return *this; }
3986  HDynTableElementNameReferencer operator*=(double value)
3987  { ref->setElementValue(name,ref->getElementValueDouble(name)*value); return *this; }
3988  HDynTableElementNameReferencer operator/=(double value)
3989  { ref->setElementValue(name,ref->getElementValueDouble(name)/value); return *this; }
3990  };
3991 
3992 public:
3993 
3995  HDynTableElementNameReferencer operator[](QString name) { return HDynTableElementNameReferencer(this,name); }
3996 
3997  HDynTable& operator=(HDynTable s);
3998 
3999 signals:
4002  void dataChangedNongui(void);
4003 
4004 };
4005 
4011 {
4012  Q_OBJECT
4013 
4014 public:
4020  QString errorText;
4021 
4027  HDynTableSqlConnector(HDynTable *dynt,QString tablename,QString filterpart="")
4028  {
4029  this->dynt = dynt;
4030  this->tablename = tablename;
4031  this->filterpart = filterpart;
4032  errorText = "Error in HDynTableSqlConnector";
4033  tdisabled = false;
4034  }
4035 
4036  ~HDynTableSqlConnector(void)
4037  {
4038  this->dynt = NULL;
4039  this->tablename = "";
4040  this->filterpart = "";
4041  }
4042 
4046  void insertSql(QString additionaldefpart="",QString additionalvaluepart="");
4047 
4051  QString sqlCreateString(QString switches="");
4052 
4053 public slots:
4055  int readSql(void);
4057  int updateSql(void);
4058 signals:
4060  void justReaded(void);
4062  void justUpdated(void);
4063 
4064 private:
4065  HDynTable *dynt;
4066  QString tablename;
4067  QString filterpart;
4068 
4069 };
4070 
4071 /* @} */
4072 #endif
4073 
4074 //End of gSAFE datalib.h
virtual QString sqlUpdate(void)
Definition: datalib.cpp:7049
HDataField * nextFieldAll(void)
Definition: datalib.cpp:2843
#define GSAFETEXT_YES_HAVE
Definition: gstexts.h:67
QString getValueAsString(void)
Definition: datalib.cpp:6635
HDataField * nextField(void)
Definition: datalib.cpp:2828
void rereadNextInsertedKey(void)
Definition: datalib.h:1553
virtual QString getSQLValue(void)
Definition: datalib.cpp:6434
QStringList getExplainHeads(void)
Definition: datalib.h:1135
virtual QString sqlUpdate(void)
Definition: datalib.cpp:5907
int editboxmaxwidth
Definition: datalib.h:2099
void setCell(int row, int col, QVariant vdata)
Definition: datalib.cpp:1642
double max(QString limitTo="")
Definition: datalib.cpp:8092
QStringList & getKeys(void)
Definition: datalib.cpp:7346
void resetSubselect(void)
Definition: datalib.h:2417
void setGuidisabled(void)
Definition: datalib.h:2305
void setGuiDisabledAllMarked(QString mark)
Definition: datalib.cpp:2977
QSqlDatabase workDB(void)
Definition: datalib.cpp:1164
HSqlHandler(void)
Definition: datalib.cpp:1139
bool isChanged(bool all=false)
Definition: datalib.cpp:2722
HNumber(QString sqlc, QString ex, QString tit, QString t, QString def)
Definition: datalib.cpp:6269
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:7060
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6774
void doWorking(void)
QString sqlInsertAll(void)
Definition: datalib.cpp:3694
QString sqlSelectAll(QString tail="")
Definition: datalib.h:1162
int getColumnPrintMaxWidth(int col)
Definition: datalib.h:416
void possible_unknown(void)
Definition: datalib.h:3184
QString hsqli_booleantypename
Definition: datalib.h:571
void enableEasyForm(void)
Definition: datalib.cpp:7473
void setHide(void)
Definition: datalib.cpp:2782
bool getEasyForm(void)
Definition: datalib.h:3419
int errorPassSlot(QString err)
Definition: datalib.cpp:2865
HDataField * asColored(int r, int g, int b)
Definition: datalib.h:2344
QString sqlSelectWkAll(QString tail="")
Definition: datalib.h:1172
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:7467
void setMaulallyValidateError(QString message)
Definition: datalib.cpp:5206
QStringList keys
Definition: datalib.h:2790
virtual QVariant getValue(void)
Definition: datalib.cpp:5978
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6125
HRefreshAgentNetclient(QString server_ip)
Definition: datalib.cpp:656
QString explain
Definition: datalib.h:2077
void appendHPainDataMatrix(HPlainDataMatrix *tail)
Definition: datalib.cpp:1529
QStringList & getSeparatedValues(void)
Definition: datalib.cpp:7360
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6661
void setFunction(QString func)
Definition: datalib.cpp:5214
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6120
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6994
virtual QVariant getValue(void)
Definition: datalib.cpp:6100
int insertRecordAll(bool disable_tr=false)
Definition: datalib.cpp:3614
virtual QString getSQLValue(void)
Definition: datalib.cpp:5887
void cloneSqlSettingsFrom(HSqlHandler *other)
Definition: datalib.cpp:1156
static void setSqlMode(QString modename)
Definition: datalib.cpp:1013
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6201
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6904
virtual bool acceptSubselect(void)
Definition: datalib.h:2714
QString valid
Definition: datalib.h:2087
int hsqli_largetext_varcharlength
Definition: datalib.h:606
void addRow(QList< QVariant > listdata, QString ctrl="")
Definition: datalib.cpp:1512
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6455
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:5786
void alternateActionOnRecord(QString key)
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6186
void setIndexedElementValue(int index, double d)
Definition: datalib.cpp:8288
virtual int setDefval(QVariant v)
Definition: datalib.cpp:5643
HFloating(QString sqlc, QString ex, QString tit, QString t, QString def)
Definition: datalib.cpp:6584
HTable * createRecord(void)
Definition: datalib.cpp:4149
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:5892
virtual QVariant getValue(void)
Definition: datalib.cpp:6539
void setMaximum(long int m)
Definition: datalib.h:2950
void defN(QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="")
Definition: datalib.h:3805
QString getColumn(int col, QString separator)
Definition: datalib.cpp:1619
bool nextRow(void)
Definition: datalib.cpp:1722
QString currentElementColumnName(void)
Definition: datalib.cpp:8018
void addSetvalMod(void)
Definition: datalib.cpp:5005
static bool isConnected(void)
Definition: datalib.cpp:676
void blockReInitialize(QString hide_marker, QString ro_marker)
Definition: datalib.cpp:3938
HTable * createRecordAsUndef(void)
Definition: datalib.cpp:4161
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6802
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:5423
static void setSqlModeBackToFirst(void)
Definition: datalib.cpp:1047
QString mod
Definition: datalib.h:1987
bool editable
Definition: datalib.h:2109
void setPrintCellNoWrap(void)
Definition: datalib.h:2430
QList< QVariant > currentRow(void)
Definition: datalib.cpp:1755
QString getElementValueString(QString name, bool *found=NULL)
Definition: datalib.cpp:7911
void clearSqlSynced(void)
Definition: datalib.cpp:3044
int editBoxMaxWidth(void)
Definition: datalib.h:2382
QString getFieldHeads(void)
Definition: datalib.h:3435
HDataField * fieldBySqlName(QString sqln, bool all=false, QString containerSqlTable="")
Definition: datalib.cpp:2342
bool progress_on_read
Definition: datalib.h:3363
void delRole(QString name)
Definition: datalib.cpp:3017
HStatic(QString ex, QString tit="", QString def="")
Definition: datalib.cpp:6389
int alternateActLine(void)
Definition: datalib.cpp:4511
QString valueInSql
Definition: datalib.h:2137
~HSqlChoose(void)
Definition: datalib.cpp:7150
QString sqlCreateString(QString switches="")
Definition: datalib.cpp:2871
QString getSubselect(void)
Definition: datalib.h:2420
~HLargeText(void)
Definition: datalib.cpp:5940
void rollback(void)
Definition: datalib.cpp:1210
void setShow(void)
Definition: datalib.cpp:2793
HTable * getTByField(QString field, QString key)
Definition: datalib.cpp:4090
~HKey(void)
Definition: datalib.cpp:5612
virtual HDataField * get_clone(void)
Definition: datalib.cpp:5855
virtual bool acceptSubselect(void)
Definition: datalib.h:2407
void startWorking(void)
void setShow(void)
Definition: datalib.h:2296
QStringList getShortTitleHeads(void)
Definition: datalib.h:1138
void deepcopy_from(HDate *x)
Definition: datalib.cpp:6767
void addition(double d, QString limitTo="")
Definition: datalib.cpp:8167
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:5390
bool hasReadonlyMod(void)
Definition: datalib.cpp:5034
bool logged
Definition: datalib.h:2129
virtual QStringList * getKeys(void)
Definition: datalib.h:1801
QString hsqli_truevalue
Definition: datalib.h:574
QString btext
Definition: datalib.h:3359
QString sqlCreateString(QString switches="")
Definition: datalib.cpp:8434
QString sqlUpdateAll(void)
Definition: datalib.h:1408
void emptyall(QString limitTo="")
Definition: datalib.cpp:8060
int alternateActLine(QString key)
Definition: datalib.cpp:2176
virtual bool acceptFunction(void)
Definition: datalib.h:3095
HPlainDataMatrix * submitNResultQuery(int N, QString q, QString err, bool tdisabled=false)
Definition: datalib.cpp:1302
void setReadolnyAllMarked(QString mark)
Definition: datalib.cpp:2937
bool sync_valueInSql
Definition: datalib.h:2132
~HFloating(void)
Definition: datalib.cpp:6600
void allAliveToNew(void)
Definition: datalib.cpp:4056
virtual QString getSQLValue(void)
Definition: datalib.cpp:6889
void deepcopy_from_htablebase(HTableBase *x)
Definition: datalib.cpp:2307
void setTailText(QString tail)
Definition: datalib.cpp:5240
int fieldCount()
Definition: datalib.h:390
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6416
void addRole(HDataFieldRole role)
Definition: datalib.cpp:5489
bool readonlyMask(void)
Definition: datalib.h:1440
void beginNode(QString n, QString parameters="")
Definition: datalib.cpp:353
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6063
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:5791
QString operator[](int i)
Definition: datalib.cpp:4680
void startWorking(void)
~HConnect(void)
Definition: datalib.cpp:5730
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:5413
double getMinimum(void)
Definition: datalib.h:3107
~HTableBase(void)
Definition: datalib.cpp:2335
QString sqlTableName(void)
Definition: datalib.cpp:2574
static HRefreshAgentNetclient * getHRefreshAgentNetclient(void)
Definition: datalib.h:288
QList< int > * sts
Definition: datalib.h:1622
bool isSQLField(void)
Definition: datalib.h:2270
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6511
void setMinimum(double m)
Definition: datalib.h:3103
virtual QString getSQLValue(void)
Definition: datalib.cpp:5983
QString dumpElements(void)
Definition: datalib.cpp:7838
QVariant submit1ResultQuery(QString q, QString err, bool tdisabled=false)
Definition: datalib.cpp:1260
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6569
void sqlSynced(HDataChangeLogger *dclog=NULL, bool forcechange=false, bool forcelog=false)
Definition: datalib.cpp:3035
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:7044
int(* hash)(const char *)
Definition: datalib.h:3325
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6068
bool isMeldedWithNext(void)
Definition: datalib.h:2360
QString getTitle(void)
Definition: datalib.h:366
QString falses
Definition: datalib.h:3018
~HTable(void)
Definition: datalib.cpp:3106
void setHideAllMarked(QString mark)
Definition: datalib.cpp:2915
HDataField * fieldByIndex(int i, bool all=false)
Definition: datalib.cpp:2363
void addMark(QString mark)
Definition: datalib.cpp:5460
virtual HDataField * get_clone(void)
Definition: datalib.cpp:5628
QString getFunction(void)
Definition: datalib.h:2401
void noMiddleStretch(void)
Definition: datalib.h:2368
void setTitleText(QString titl)
Definition: datalib.cpp:5234
bool submit0ResultQuery(QString q, QString err, bool tdisabled=false)
Definition: datalib.cpp:1225
void setPosAndUser(QString pos, QString user)
Definition: datalib.h:3657
~HSqlHandler(void)
Definition: datalib.cpp:1148
int getGColor(void)
Definition: datalib.h:2336
void disableControlSlot(void)
Definition: datalib.h:2565
HDynTableSqlConnector(HDynTable *dynt, QString tablename, QString filterpart="")
Definition: datalib.h:4027
virtual QString lowerValidate(void)
Definition: datalib.cpp:6310
void nextElement(void)
Definition: datalib.cpp:8003
long int getMaximum(void)
Definition: datalib.h:2954
double getElementValueDoubleByRowColName(QString r, QString c, bool *found=NULL)
Definition: datalib.cpp:7954
virtual bool acceptFunction(void)
Definition: datalib.h:2938
double min(QString limitTo="")
Definition: datalib.cpp:8111
void getnotify(QString tblname)
QVariant operator[](int i)
Definition: datalib.cpp:2645
void setUser(QString user)
Definition: datalib.h:3661
HKey(QString sqlc, QString ex, QString tit, QString def)
Definition: datalib.cpp:5601
bool u_alive
Definition: datalib.h:3147
void value_is_unknown(void)
Definition: datalib.cpp:6779
HDataField(QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true)
Definition: datalib.cpp:5073
void resetValidateStatus()
Definition: datalib.h:2546
virtual QString getSqlFieldValue(QString sqln)
Definition: datalib.cpp:4519
QStringList & getValues(void)
Definition: datalib.cpp:7353
QString getTitleText(void)
Definition: datalib.h:2186
virtual QVariant getValue(void)
Definition: datalib.cpp:6338
QStringList markers
Definition: datalib.h:2124
HSqlSingleInterface * myInterface(void)
Definition: datalib.h:738
void deepcopy_from(HFloating *x)
Definition: datalib.cpp:6611
void setMaximum(double m)
Definition: datalib.h:3105
void addGuienabledMod(void)
Definition: datalib.cpp:4981
QString getContentAsHtml(QString params)
Definition: datalib.cpp:1960
bool hasShowMod(void)
Definition: datalib.cpp:5013
void setMinimum(long int m)
Definition: datalib.h:2948
int countElements(QString limitTo="")
Definition: datalib.cpp:8245
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:5633
HTable * baserecord
Definition: datalib.h:1620
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6211
void dataChanged(void)
QString hsqli_timestamptypename
Definition: datalib.h:618
bool hasHideMod(void)
Definition: datalib.cpp:5020
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6470
~HTimestamp(void)
Definition: datalib.cpp:6967
void refreshValuesKeys(bool updSignal=false)
Definition: datalib.cpp:4800
virtual QString getSQLValue(void)
Definition: datalib.cpp:7027
void removeCurrentRow(void)
Definition: datalib.cpp:1743
int hsqli_varcharhkeylength
Definition: datalib.h:583
void setHeader(QList< QString > strlistdata)
Definition: datalib.cpp:1448
void setSqlFieldValue(QString sqln, QVariant v, bool sdisable=false)
Definition: datalib.cpp:3129
void setPopupDialogTitle(QString title)
Definition: datalib.h:3479
bool hsqli_appendsqlerrormsg
Definition: datalib.h:633
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:7055
void addDependTableName(QString n)
Definition: datalib.cpp:2408
~HDataField(void)
Definition: datalib.cpp:5180
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:7315
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6444
virtual QVariant getValue(void)
Definition: datalib.cpp:7022
QString getKeyOfValue(QString s)
Definition: datalib.cpp:6073
virtual QString sqlUpdate(void)
Definition: datalib.cpp:7460
void dataUpdatedSignal(void)
void meldWithNext(void)
Definition: datalib.h:2354
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:5781
void deepcopy_from(HConnect *x)
Definition: datalib.cpp:5741
int reReadList(void)
Definition: datalib.h:1870
virtual bool acceptFunction(void)
Definition: datalib.h:2713
QString soft_current_key
Definition: datalib.h:1824
void clearRoles(void)
Definition: datalib.cpp:5509
QString sqlTableName(void)
Definition: datalib.h:1637
void divide(double d, QString limitTo="")
Definition: datalib.cpp:8215
void removeSqlCooseButtons(void)
Definition: datalib.cpp:2996
void setExtendedTitle(QString xt)
Definition: datalib.h:370
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6363
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6012
void setAppendPrependColumn(int col, QString prepend, QString append)
Definition: datalib.cpp:1853
void setHeaderCell(int col, QString strdata)
Definition: datalib.cpp:1441
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6626
void addReadonlyMod(void)
Definition: datalib.cpp:4973
QString currentElementValueString(void)
Definition: datalib.cpp:8043
HDataField * asHide(void)
Definition: datalib.h:2326
QString getElementSqlName(QString name)
Definition: datalib.cpp:7855
QString title
Definition: datalib.h:2079
QString getDefaultValue(void)
Definition: datalib.h:2220
void blockReInitializeBase(QString hide_marker, QString ro_marker)
Definition: datalib.cpp:2987
~HFloatTables(void)
Definition: datalib.cpp:3993
QSqlQuery * allocateQSqlQuery(void)
Definition: datalib.cpp:1180
QStringList * queryNextValues(void)
Definition: datalib.cpp:4736
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6256
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6238
virtual QString getSQLValue(void)
Definition: datalib.cpp:5408
bool easyform
Definition: datalib.h:3351
void deepcopy_from(HCheck *x)
Definition: datalib.cpp:6504
HLargeText(QString sqlc, QString ex, QString tit, QString def)
Definition: datalib.cpp:5929
void putRawData(QString data)
Definition: datalib.cpp:382
bool isInitialSelected(void)
Definition: datalib.h:2724
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:5870
virtual QVariant getValue(void)
Definition: datalib.cpp:5882
void addToolButton(const QObject *receiver, QString text)
Definition: datalib.cpp:7486
virtual QString getSQLValue(void)
Definition: datalib.cpp:6544
bool getPermanentValidateStatus()
Definition: datalib.h:2554
bool isPrintCellWrap(void)
Definition: datalib.h:2432
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:5692
void replaceTextInColumn(int col, QString find, QString replace, bool parts=false)
Definition: datalib.cpp:1804
QString hsqli_timestampnowvalue
Definition: datalib.h:630
void commit(void)
Definition: datalib.cpp:1195
HCheck(QString sqlc, QString ex, QString tit, QString t, QString def, QString ts=GSAFETEXT_YES_HAVE, QString fs=GSAFETEXT_NO_HAVENOT)
Definition: datalib.cpp:6480
double sumCoulmnAsDouble(int col)
Definition: datalib.cpp:1890
void deepcopy_from(HLargeText *x)
Definition: datalib.cpp:5951
int returnToDefault(void)
Definition: datalib.cpp:5314
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6693
static HRefreshAgent * getNotifyAgent(void)
Definition: datalib.h:215
QStringList * queryCurrValues(void)
Definition: datalib.cpp:4751
QString currentElementName(void)
Definition: datalib.cpp:8008
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6559
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6358
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6649
void resetPopupDialogTitle(void)
Definition: datalib.h:3481
QString queryCurrKey(void)
Definition: datalib.cpp:4744
QString currentElementRowName(void)
Definition: datalib.cpp:8013
QList< HDataFieldRole > roles
Definition: datalib.h:2126
void clearRoles(void)
Definition: datalib.cpp:3026
virtual bool acceptFunction(void)
Definition: datalib.h:2388
void setColor(int r, int g, int b)
Definition: datalib.cpp:2662
virtual QList< QStringList * > * getValues(void)
Definition: datalib.h:1798
HDynTableElementNameReferencer operator[](QString name)
Definition: datalib.h:3995
int getRColor(void)
Definition: datalib.h:2334
void clear(void)
Definition: datalib.h:3826
bool elementHasLabel(QString name, QString label, bool *found=NULL)
Definition: datalib.cpp:8298
int returnToDefault(bool all=true)
Definition: datalib.cpp:3378
virtual int setDefval(QVariant v)
Definition: datalib.cpp:5762
void setPos(QString pos)
Definition: datalib.h:3659
QVariant getCell(int row, int col)
Definition: datalib.cpp:1598
bool isNoMiddleStretch(void)
Definition: datalib.h:2374
void setLogging(void)
Definition: datalib.cpp:3073
void setGuiSortIndicator(int i)
Definition: datalib.h:3439
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6465
void setColumnPrintWrap(int col, bool wrap)
Definition: datalib.h:410
QString hsqli_sequence_creation_string
Definition: datalib.h:589
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:5988
bool hsqli_hkeytype_varchar_int
Definition: datalib.h:580
int recordCount(void)
Definition: datalib.h:1643
int actLine(void)
Definition: datalib.cpp:4503
HXmlWriter(void)
Definition: datalib.cpp:299
int readDBTable(QString filter, bool tdisabled=false)
Definition: datalib.cpp:4249
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="")
Definition: datalib.cpp:1560
void setLogging(void)
Definition: datalib.h:2314
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:5860
void defT(int type, QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="")
Definition: datalib.h:3822
QString doubleToQString(double val, int min, int max, int group)
Definition: datalib.cpp:273
double dRound(double val, int mode)
Definition: datalib.cpp:286
int actLine(QString key)
Definition: datalib.cpp:2170
void setCurrentElementValue(double d)
Definition: datalib.cpp:8048
int refreshSqlValues(bool emitsignal=true, bool tdisabled=false)
Definition: datalib.cpp:7203
void dataChangedNongui(void)
void firstField(void)
Definition: datalib.cpp:2822
void resetNoMiddleStretch(void)
Definition: datalib.h:2371
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6549
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:7005
bool hasGuidisabledMod(void)
Definition: datalib.cpp:5048
virtual QString sqlUpdate(void)
Definition: datalib.cpp:5433
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6831
bool isLogged(void)
Definition: datalib.h:2321
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6927
bool is_unknown_alive(void)
Definition: datalib.h:3188
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6564
HList(QString t)
Definition: datalib.cpp:4396
void dataUpdated(void)
Definition: datalib.cpp:2858
double getElementValueDouble(QString name, bool *found=NULL)
Definition: datalib.cpp:7892
~HStatic(void)
Definition: datalib.cpp:6400
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6083
double sum(QString limitTo="")
Definition: datalib.cpp:8130
bool currentElementIsNumeric(void)
Definition: datalib.cpp:8033
void removeExtraFunction(void)
Definition: datalib.cpp:7504
QString getValueOfKey(QString s)
Definition: datalib.cpp:6078
void setActiveKey(QString k)
Definition: datalib.cpp:4706
int setKey(QString key)
Definition: datalib.cpp:3276
QString imc_thiskey
Definition: datalib.h:937
void putCData(QString n, QString data, QString parameters="")
Definition: datalib.cpp:366
QString extrafunc_text[5]
Definition: datalib.h:3370
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6115
void setPrintCellWrap(void)
Definition: datalib.h:2428
virtual int readList(QString filter="", bool all=true)
Definition: datalib.cpp:4909
QString hsqli_falsevalue
Definition: datalib.h:577
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6093
void useRole(QString name)
Definition: datalib.cpp:5514
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:5697
int deleteRecord(HTable *d)
Definition: datalib.cpp:4218
QString getHeaderItem(int col)
Definition: datalib.cpp:1495
void sustraction(double d, QString limitTo="")
Definition: datalib.cpp:8143
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6574
HConnect(QString sqlc, QString connected_tablep)
Definition: datalib.cpp:5718
void alternateActionOnRecord(QString key)
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6368
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:5919
bool is_value_unknown(void)
Definition: datalib.h:3195
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6688
~HList(void)
Definition: datalib.cpp:4419
~HDataChangeLogger(void)
Definition: datalib.cpp:7630
void setHashFunction(int(*nh)(const char *))
Definition: datalib.h:3486
bool unknown
Definition: datalib.h:3149
QStringList * deep_copy_stringlist(QStringList *target, QStringList *source)
Definition: datalib.cpp:54
QDate value
Definition: datalib.h:3145
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:6915
virtual int clearList(void)
Definition: datalib.cpp:4899
int updateWithKey(QString key="", bool all=false, bool update=true, bool tdisabled=false)
Definition: datalib.cpp:3291
QString getTailText(void)
Definition: datalib.h:2188
virtual QString getSQLValue(void)
Definition: datalib.cpp:6673
static HRefreshAgentNetserver * getHRefreshAgentNetserver(void)
Definition: datalib.h:245
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6999
QString sqlConcatenateToLocal(QString string)
Definition: datalib.cpp:1068
void setDisplayMode(int minDf, int maxDf, int groupDf)
Definition: datalib.h:3117
virtual QString lowerValidate(void)
Definition: datalib.h:2482
bool sql
Definition: datalib.h:2111
void errorSignal(QString err)
void deepcopy_from(HSqlChoose *x)
Definition: datalib.cpp:7162
~HSmallText(void)
Definition: datalib.cpp:5838
QVariant getSqlFieldValue(QString sqln)
Definition: datalib.cpp:3141
void setElementValueByRowColName(QString r, QString c, double value)
Definition: datalib.cpp:7930
virtual QList< QStringList * > * getValues(void)
Definition: datalib.h:1930
void setFilterPart(QString fp)
Definition: datalib.cpp:7340
void setSubselect(QString subs)
Definition: datalib.cpp:5246
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6017
QString nextKey(void)
Definition: datalib.cpp:4039
HDataField * staticFieldByTitle(QString title="")
Definition: datalib.cpp:2391
QString hsqli_numbertypename
Definition: datalib.h:609
virtual void value_changed()
Definition: datalib.cpp:5368
void deepcopy_from_htable(HTable *x)
Definition: datalib.cpp:3121
QString concatenateCoulmn(int col, QString separator)
Definition: datalib.cpp:1907
void setPrintCellWidth(int w)
Definition: datalib.h:2423
void set_havetocheck(void)
Definition: datalib.h:3255
bool meldwithnext
Definition: datalib.h:2095
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:7448
int disableReadonlyMask(void)
Definition: datalib.h:1577
virtual int clearList(void)
Definition: datalib.cpp:4490
HTable * nextRecord(void)
Definition: datalib.cpp:4010
void setTableTitle(QString s)
Definition: datalib.h:1129
void setGuienabled(void)
Definition: datalib.h:2302
void addField(HDataField *i)
Definition: datalib.cpp:2560
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6110
int color_r
Definition: datalib.h:2121
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:5914
~HPlainDataMatrix(void)
Definition: datalib.cpp:1378
QString trues
Definition: datalib.h:3016
void setExplainText(QString expl)
Definition: datalib.cpp:5228
bool errorStatus(void)
Definition: datalib.h:880
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6305
QString validate(bool all=true)
Definition: datalib.cpp:2741
virtual QString lowerValidate(void)
Definition: datalib.cpp:6640
Definition: datalib.h:312
void setEditable(void)
Definition: datalib.cpp:5443
HRefreshAgent(void)
Definition: datalib.cpp:406
virtual QString getSQLValue(void)
Definition: datalib.cpp:6343
QList< QVariant > getRow(int row)
Definition: datalib.cpp:1672
int clearMem(void)
Definition: datalib.cpp:3973
virtual QVariant getValue(void)
Definition: datalib.cpp:5771
void setStream(QTextStream *oo)
Definition: datalib.cpp:320
QVariant operator[](int i)
Definition: datalib.cpp:3231
void setReadonly(void)
Definition: datalib.cpp:2771
static void notify(QString tblname)
Definition: datalib.cpp:422
void clearNotValidValues(void)
Definition: datalib.cpp:5201
void notSet(void)
Definition: datalib.h:2308
HTable * getActiveTable(void)
Definition: datalib.cpp:4790
void updateStaticDisplayElementsSignal(void)
void setRowControl(int row, QString ctrl)
Definition: datalib.cpp:1652
HDynTable(void)
Definition: datalib.cpp:7796
void doSet(void)
Definition: datalib.h:2311
QString errstr
Definition: datalib.h:955
QString queryNextKey(void)
Definition: datalib.cpp:4728
virtual QVariant getValue(void)
Definition: datalib.cpp:6861
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:7443
QList< HTable * > * tbls
Definition: datalib.h:1624
int updateWithKeyAll(QString key="", bool update=true, bool tdisabled=false)
Definition: datalib.h:1485
void delRole(QString name)
Definition: datalib.cpp:5494
virtual QVariant getValue(void)
Definition: datalib.cpp:6218
QString sqlColumn
Definition: datalib.h:2083
~HCheck(void)
Definition: datalib.cpp:6493
HTable * getTByKey(QString key)
Definition: datalib.cpp:4108
void setColorAllMarked(QString mark, int r, int g, int b)
Definition: datalib.cpp:2947
QVariant defvalParser(QString s)
Definition: datalib.cpp:5326
void setCellStr(int row, int col, QString strdata)
Definition: datalib.cpp:1662
void putEmptyNode(QString n, QString parameters="")
Definition: datalib.cpp:374
int countAllStat(void)
Definition: datalib.cpp:4068
void addExtraFunction(int pos, const QObject *receiver, QString text)
Definition: datalib.cpp:7498
int count(void)
Definition: datalib.cpp:4073
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6181
QString getValueOfKey(QString s)
Definition: datalib.cpp:6196
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:7033
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6932
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6532
HTimestamp(QString sqlc, QString ex, QString tit, QString def, bool c)
Definition: datalib.cpp:6944
void setEditable(void)
Definition: datalib.cpp:2673
virtual HDataField * get_clone(void)
Definition: datalib.cpp:5956
QString val
Definition: datalib.h:1989
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6421
bool hsqli_need_create_sequence_before
Definition: datalib.h:586
void setElementValue(QString name, double value)
Definition: datalib.cpp:7867
bool hsqli_sqlchooseconstraint
Definition: datalib.h:627
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6621
QStringList values
Definition: datalib.h:2792
QTextStream * getStream(void)
Definition: datalib.cpp:315
void removeHTMLTags(bool force_all=false)
Definition: datalib.cpp:1926
int enableReadonlyMask(void)
Definition: datalib.h:1568
const QObject * extrafunc_receiver[5]
Definition: datalib.h:3367
QString sqlUpdate(bool all=false)
Definition: datalib.cpp:3152
void disableEasyForm(void)
Definition: datalib.cpp:7479
HFloatTables(HTable *baserec)
Definition: datalib.cpp:3947
void clearMarkers(void)
Definition: datalib.cpp:5479
void doWorking(void)
QString derived
Definition: datalib.h:2093
QString activeKey(void)
Definition: datalib.cpp:4701
QString getIndexedValueString(int index, bool *found=NULL)
Definition: datalib.cpp:8283
void setNotValidValues(QStringList nvl)
Definition: datalib.cpp:5190
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6132
QList< QString > currentRowStr(void)
Definition: datalib.cpp:1775
void cloneSqlInterfaceSettingsFrom(HSqlInterface *other)
Definition: datalib.h:733
HTable * getTByNum(int idx)
Definition: datalib.cpp:4126
virtual int setDefval(QVariant v)
Definition: datalib.cpp:6331
bool hsqli_largetext_sizemustdefine
Definition: datalib.h:602
void deepcopy_from(HNumber *x)
Definition: datalib.cpp:6293
void resetLogging(void)
Definition: datalib.h:2317
virtual int readList(QString filter="", bool all=true)
Definition: datalib.cpp:4541
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:5309
void addResetMod(void)
Definition: datalib.cpp:4997
HSqlChoose(QString sqlc, QString ex, QString tit, QString def, QString ct, QString kf, QString sf, QString sfh, QString fp, QString op, QString inthash="", bool easyf=true)
Definition: datalib.cpp:7101
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6243
virtual QVariant getDispValue()
Definition: datalib.h:2267
QString hsqli_currentModeName
Definition: datalib.h:564
QString getSpecDisplaySortMode(void)
Definition: datalib.h:2208
QString tailstr
Definition: datalib.h:2081
void setAllYESSet(void)
Definition: datalib.cpp:2695
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6703
QString currentRowControl(void)
Definition: datalib.cpp:1770
void endNode(void)
Definition: datalib.cpp:361
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6348
double getIndexedValueDouble(int index, bool *found=NULL)
Definition: datalib.cpp:8278
void addShowMod(void)
Definition: datalib.cpp:4950
bool connected
Definition: datalib.h:2141
HDate(QString sqlc, QString ex, QString tit, QString def, bool u_a=true, bool unk=true)
Definition: datalib.cpp:6720
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6450
void dataChanged(void)
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:5453
void addRowStr(QList< QString > strlistdata, QString ctrl="")
Definition: datalib.cpp:1543
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6228
bool show
Definition: datalib.h:2113
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6698
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:5803
QString validate(void)
Definition: datalib.cpp:5260
bool extrafeatures
Definition: datalib.h:948
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:5438
int sumCoulmnAsInt(int col)
Definition: datalib.cpp:1872
void addHideMod(void)
Definition: datalib.cpp:4958
HPlainDataMatrix(int col)
Definition: datalib.cpp:1356
QString getExplainText(void)
Definition: datalib.h:2184
int getBColor(void)
Definition: datalib.h:2338
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6373
QList< QString > getRowStr(int row)
Definition: datalib.cpp:1687
HCharHash(QString sqlc, QString ex, QString tit, QString t, QString def, QStringList k, QStringList v)
Definition: datalib.cpp:6030
void markedRecordToNew(HTable *r)
Definition: datalib.cpp:4173
bool isSet(void)
Definition: datalib.h:2282
virtual QVariant getValue(void)
Definition: datalib.cpp:6668
virtual QString getSQLValue(void)
Definition: datalib.cpp:6105
const QObject * toolbrec
Definition: datalib.h:3356
bool hasMark(QString mark)
Definition: datalib.cpp:5472
void queryToFirst(void)
Definition: datalib.cpp:4712
void freeTable(void)
Definition: datalib.cpp:2553
void setInitialSelected(bool selected)
Definition: datalib.h:2721
virtual QString getSQLValue(void)
Definition: datalib.cpp:5656
static HSqlSingleInterface * currentDefaultSqlInterface(void)
Definition: datalib.cpp:1053
QString getWhoami(void)
Definition: datalib.cpp:774
void transaction(void)
Definition: datalib.cpp:1185
int recordCount(void)
Definition: datalib.h:1470
bool isEnded(void)
Definition: datalib.cpp:1736
QString conn_sqlTable
Definition: datalib.h:2145
QStringList currentElementLabels(void)
Definition: datalib.cpp:8028
void multiplicate(double d, QString limitTo="")
Definition: datalib.cpp:8191
void clearDataChangeLogger(void)
Definition: datalib.h:1466
QStringList values
Definition: datalib.h:2855
static void setCustomSqlDatabase(QString databaseName, QString sqlinterfacename="")
Definition: datalib.cpp:1124
void setGuiEnabledAllMarked(QString mark)
Definition: datalib.cpp:2967
int recordCount()
Definition: datalib.h:388
void setShowAllMarked(QString mark)
Definition: datalib.cpp:2905
int getPrintCellWidth(void)
Definition: datalib.h:2425
HDataFieldRole(void)
Definition: datalib.cpp:4932
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6554
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6521
virtual HDataField * get_clone(void)
Definition: datalib.cpp:5747
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:5993
bool gui_showtabletitle
Definition: datalib.h:952
long int getMinimum(void)
Definition: datalib.h:2952
void endWorking(void)
void setEditableAllMarked(QString mark)
Definition: datalib.cpp:2926
void putHead(QString enc, bool nullhead=false)
Definition: datalib.cpp:325
~HDate(void)
Definition: datalib.cpp:6756
void clearSqlSynced(void)
Definition: datalib.cpp:5583
void firstRow(void)
Definition: datalib.cpp:1716
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6439
void endWorking(void)
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:5808
double getMaximum(void)
Definition: datalib.h:3109
void insertSql(QString additionaldefpart="", QString additionalvaluepart="")
Definition: datalib.cpp:8318
void replaceSameUnderCellToEmpty(int col)
Definition: datalib.cpp:1834
void removeToolButton(void)
Definition: datalib.cpp:7492
~HXmlWriter(void)
Definition: datalib.cpp:309
void deepcopy_from(HStatic *x)
Definition: datalib.cpp:6411
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:5752
virtual int setDefval(QVariant v)
Definition: datalib.cpp:5401
virtual QVariant getKnownValue(void)
Definition: datalib.cpp:6877
void setColor(int r, int g, int b)
Definition: datalib.cpp:5383
QString conn_part
Definition: datalib.h:933
QString defval
Definition: datalib.h:2085
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:6319
void setHtmlCssText(QString css)
Definition: datalib.h:531
void setAllNOSet(void)
Definition: datalib.cpp:2684
#define GSAFETEXT_NO_HAVENOT
Definition: gstexts.h:69
bool hsqli_hastimestamptype
Definition: datalib.h:615
void setTitle(QString t)
Definition: datalib.h:368
void firstElement(void)
Definition: datalib.cpp:7990
void dataModifiedSignal(void)
QByteArray recodeData(QString d)
Definition: datalib.cpp:387
int my_dtoa(double v, char *buffer, int bufflen, int min, int max, int group)
Definition: datalib.cpp:109
virtual QString sqlSelectHead(void)
Definition: datalib.cpp:6250
int captureNotify(QString tblname)
Definition: datalib.cpp:4472
int hsqli_hackconvert_stdsqlconcatenation_to_local
Definition: datalib.h:641
bool nomiddlestretch
Definition: datalib.h:2097
void actionOnRecord(QString key)
void setInernalHashFunction(QString hashname)
Definition: datalib.cpp:7525
QStringList keys
Definition: datalib.h:2853
QStringList allMarker(void)
Definition: datalib.cpp:5484
bool last_all
Definition: datalib.h:1773
void enableControlSlot(void)
Definition: datalib.h:2568
void setSpecDisplaySortMode(QString m)
Definition: datalib.h:2205
int saveRecord(bool all=false, bool tdisabled=false)
Definition: datalib.cpp:3403
virtual HDataField * get_clone(void)
Definition: datalib.cpp:6300
void returnToDefaultAllMarked(QString mark)
Definition: datalib.cpp:2957
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:5674
void defS(QString name, QString sqlname="", QString rowName="", QString colName="", QString labels="")
Definition: datalib.h:3814
void setDataChangeLogger(HDataChangeLogger *dcl)
Definition: datalib.h:1462
void sqlSynced(HDataChangeLogger *dclog=NULL, bool forcechange=false, bool forcelog=false)
Definition: datalib.cpp:5565
virtual QVariant getValue(void)
Definition: datalib.cpp:5651
void setLoggingAllMarked(QString mark)
Definition: datalib.cpp:3082
static void setDefaultSqlDatabase(void)
Definition: datalib.cpp:1132
virtual HDataField * get_clone(void)
Definition: datalib.cpp:7198
virtual QVariant getValue(void)
Definition: datalib.cpp:5418
QString indexedElementSqlName(int index)
Definition: datalib.cpp:8273
HDataChangeLogger(HTable *logtable, QString startpos=GSAFETEXT_UNKNOWN, QString startuser=GSAFETEXT_UNKNOWN)
Definition: datalib.cpp:7553
QString spec_disp_sort
Definition: datalib.h:2102
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:5664
virtual bool acceptFunction(void)
Definition: datalib.h:2765
virtual int setDefval(QVariant v)
Definition: datalib.cpp:5971
void deepcopy_from(HCharHash *x)
Definition: datalib.cpp:6056
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6920
void error(QString s)
Definition: datalib.cpp:37
void deepcopy_from(HNumHash *x)
Definition: datalib.cpp:6174
int hsqli_charhash_varcharlength
Definition: datalib.h:596
void connectTable(HTableBase *ct, int type=INNER_JOIN, QString connconstraint="")
Definition: datalib.cpp:2447
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6353
void setValidator(QString v="")
Definition: datalib.cpp:5185
Definition: datalib.h:2591
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:5669
QString getCellStr(int row, int col)
Definition: datalib.cpp:1609
bool isReallyChanged(void)
Definition: datalib.cpp:5589
HFloatTablesAsHList(HFloatTables *memt, HList *templ=NULL, bool clone_struct_from_memt=false)
Definition: datalib.cpp:4763
~HNumber(void)
Definition: datalib.cpp:6282
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:7453
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:5961
virtual QString getSQLValue(void)
Definition: datalib.cpp:6223
bool isShow(void)
Definition: datalib.h:2278
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:5999
void setAllField(QString fname, QVariant value)
Definition: datalib.cpp:4048
bool hasEditableMod(void)
Definition: datalib.cpp:5027
bool hasResetMod(void)
Definition: datalib.cpp:5055
void addEditableMod(void)
Definition: datalib.cpp:4966
QString indexedElementName(int index)
Definition: datalib.cpp:8258
virtual int setDefval(QVariant v)
Definition: datalib.cpp:7367
bool isGuienabled(void)
Definition: datalib.h:2286
QString sqlSelectWk(QString tail="", bool all=false)
Definition: datalib.h:1167
static HSqlSingleInterface * getSqlInterface(QString interfacename)
Definition: datalib.cpp:1059
QString hsqli_hkeyconstraint
Definition: datalib.h:593
QStringList getHeads(int what)
Definition: datalib.cpp:2804
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:7513
QString whoami
Definition: datalib.h:318
bool guienabled
Definition: datalib.h:2115
virtual QVariant dbValueToDispValue(QVariant v)
Definition: datalib.cpp:6516
void resetLogging(void)
Definition: datalib.cpp:3064
virtual QString getSQLValue(void)
Definition: datalib.cpp:5776
void setEditBoxMaxWidth(int max)
Definition: datalib.h:2379
bool isReallyChanged(void)
Definition: datalib.cpp:3053
void useRole(QString name)
Definition: datalib.cpp:3008
int recordCount(void)
Definition: datalib.h:1807
virtual bool acceptFunction(void)
Definition: datalib.h:3180
bool getColumnPrintWrap(int col)
Definition: datalib.h:412
virtual HDataField * get_clone(void)
Definition: datalib.cpp:5175
QString getInsertedKey(void)
Definition: datalib.h:1550
virtual QString getSQLValueAsString(void)
Definition: datalib.cpp:6678
virtual bool acceptSubselect(void)
Definition: datalib.h:3181
QStack< HTableBase * > * connectedTableBases
Definition: datalib.h:942
QString getKey(bool head_val, QString intable="")
Definition: datalib.cpp:3249
~HBase(void)
Definition: datalib.cpp:769
void setData(QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true)
Definition: datalib.cpp:5373
virtual int setDefval(QVariant v)
Definition: datalib.cpp:5875
QString getPopupDialogTitle(void)
Definition: datalib.h:3483
void clearAndFreeConnections(void)
Definition: datalib.cpp:2414
static QString serverAddress()
Definition: datalib.cpp:485
virtual QVariant getValue(void)
Definition: datalib.cpp:6429
QString getElementValueStringByRowColName(QString r, QString c, bool *found=NULL)
Definition: datalib.cpp:7972
int getGuiSortIndicator(void)
Definition: datalib.h:3441
void value_is_known(void)
Definition: datalib.cpp:6786
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6233
virtual bool acceptSubselect(void)
Definition: datalib.h:3096
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6910
void first(void)
Definition: datalib.cpp:4003
HSmallText(QString sqlc, QString ex, QString tit, QString t, QString def)
Definition: datalib.cpp:5826
void setReadonly(void)
Definition: datalib.cpp:5448
void addNotValidValue(QString v)
Definition: datalib.cpp:5196
QString name
Definition: datalib.h:1985
virtual QVariant getValue(void)
Definition: datalib.cpp:7430
HTable(QString t)
Definition: datalib.cpp:3096
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:6683
virtual QString getSQLValue(void)
Definition: datalib.cpp:7435
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:5902
int saveRecordAll(bool tdisabled=false)
Definition: datalib.h:1501
bool getLastValidateStatus()
Definition: datalib.h:2542
#define GSAFETEXT_UNKNOWN
Definition: gstexts.h:62
QString currentElementSqlName(void)
Definition: datalib.cpp:8023
void deepcopy_from_hdatafield(HDataField *x)
Definition: datalib.cpp:5123
QString sqlInsert(bool insertkey=false)
Definition: datalib.cpp:3660
void deepcopy_from_hlist(HList *x)
Definition: datalib.cpp:4454
void set_donthavetocheck(void)
Definition: datalib.h:3257
HTableBase(QString t)
Definition: datalib.cpp:2270
HNumHash(QString sqlc, QString ex, QString tit, QString t, QString def, QStringList k, QStringList v)
Definition: datalib.cpp:6149
void clearConnections(void)
Definition: datalib.cpp:2428
void resetMeldWithNext(void)
Definition: datalib.h:2357
QString last_filter
Definition: datalib.h:1771
int hsqli_smalltext_varcharlength
Definition: datalib.h:599
virtual int setValue(QVariant v, bool sdisabled=false)
Definition: datalib.cpp:7416
QString sqlSelect(QString tail="", bool all=false, bool keypart=false)
Definition: datalib.cpp:2579
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="")
Definition: datalib.h:449
HBase(void)
Definition: datalib.cpp:764
QString tableTitle(void)
Definition: datalib.h:1127
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:7039
void impossible_unknown(void)
Definition: datalib.h:3186
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6460
void setHide(void)
Definition: datalib.h:2299
bool is_checkenabled(void)
Definition: datalib.h:3259
QString hsqli_datetypename
Definition: datalib.h:624
double currentElementValueDouble(void)
Definition: datalib.cpp:8038
static int trans
Definition: datalib.h:785
virtual QString sqlUpdate(void)
Definition: datalib.cpp:6005
virtual int setDefval(QVariant v)
Definition: datalib.cpp:7015
void setColumnPrintMaxWidth(int col, int m)
Definition: datalib.h:414
virtual QString sqlUpdate(void)
Definition: datalib.cpp:5798
void actionOnRecord(QString key)
int fieldCount(bool withconnect=false)
Definition: datalib.cpp:2706
bool hasSetvalMod(void)
Definition: datalib.cpp:5062
void resetFunction(void)
Definition: datalib.h:2398
void deepcopy_from(HSmallText *x)
Definition: datalib.cpp:5849
bool hsqli_hasdatetype
Definition: datalib.h:621
void addGuidisabledMod(void)
Definition: datalib.cpp:4989
void zeroall(QString limitTo="")
Definition: datalib.cpp:8078
virtual QString sqlInsertValue(void)
Definition: datalib.cpp:5428
virtual bool acceptSubselect(void)
Definition: datalib.h:2766
QByteArray recodeDataNoconvert(QString d)
Definition: datalib.cpp:392
QString hsqli_floattypename
Definition: datalib.h:612
void removeUndef(void)
Definition: datalib.cpp:4197
int insertRecord(bool insertkey=false, bool disable_tr=false, bool resetafterinsert=true)
Definition: datalib.cpp:3548
virtual QString sqlUpdate(void)
Definition: datalib.cpp:5687
virtual bool acceptSubselect(void)
Definition: datalib.h:2939
void deferredSqlRefresh(void)
Definition: datalib.h:3423
bool hsqli_usequerysize
Definition: datalib.h:568
virtual QString sqlCreateStringPart(QString switches="")
Definition: datalib.cpp:6138
virtual QString sqlInsertHead(void)
Definition: datalib.cpp:5897
virtual QStringList * getKeys(void)
Definition: datalib.h:1932
static bool isRunning(void)
Definition: datalib.cpp:478
bool isEditable(void)
Definition: datalib.h:2274
QString getKeyOfValue(QString s)
Definition: datalib.cpp:6191
bool isEnded(void)
Definition: datalib.cpp:7996
bool hasGuienabledMod(void)
Definition: datalib.cpp:5041
HDataField * asConstant(void)
Definition: datalib.h:2324
QList< QString > getHeader(void)
Definition: datalib.cpp:1500
bool queryNextRecord(void)
Definition: datalib.cpp:4718
void deepcopy_from(HTimestamp *x)
Definition: datalib.cpp:6987
QStringList notvalid
Definition: datalib.h:2089
int saveDBTable(bool tdisabled=false)
Definition: datalib.cpp:4313
void deepcopy_from(HKey *x)
Definition: datalib.cpp:5623