gSAFE
1.3.8
|
#include <datalib.h>
Public Member Functions | |
HDate (QString sqlc, QString ex, QString tit, QString def, bool u_a=true, bool unk=true) | |
HDate (HDate *t) | |
~HDate (void) | |
virtual bool | acceptFunction (void) |
virtual bool | acceptSubselect (void) |
void | deepcopy_from (HDate *x) |
virtual HDataField * | get_clone (void) |
virtual QVariant | getKnownValue (void) |
virtual QString | getSQLValue (void) |
virtual QString | getSQLValueAsString (void) |
virtual QVariant | getValue (void) |
void | impossible_unknown (void) |
bool | is_unknown_alive (void) |
bool | is_value_unknown (void) |
void | possible_unknown (void) |
virtual int | setDefval (QVariant v) |
virtual int | setValue (QVariant v, bool sdisabled=false) |
virtual QString | sqlCreateStringPart (QString switches="") |
virtual QString | sqlInsertHead (void) |
virtual QString | sqlInsertValue (void) |
virtual QString | sqlSelectHead (void) |
virtual QString | sqlUpdate (void) |
void | value_is_known (void) |
void | value_is_unknown (void) |
Public Member Functions inherited from HDataField | |
HDataField (QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true) | |
HDataField (HDataField *t) | |
~HDataField (void) | |
void | addMark (QString mark) |
void | addMark (QStringList pmarkers) |
void | addNotValidValue (QString v) |
void | addRole (HDataFieldRole role) |
QStringList | allMarker (void) |
HDataField * | asColored (int r, int g, int b) |
HDataField * | asConstant (void) |
HDataField * | asHide (void) |
void | clearMarkers (void) |
void | clearNotValidValues (void) |
void | clearRoles (void) |
void | clearSqlSynced (void) |
virtual QVariant | dbValueToDispValue (QVariant v) |
void | deepcopy_from_hdatafield (HDataField *x) |
QVariant | defvalParser (QString s) |
void | delRole (QString name) |
void | doSet (void) |
int | editBoxMaxWidth (void) |
int | getBColor (void) |
QString | getDefaultValue (void) |
virtual QVariant | getDispValue () |
QString | getExplainText (void) |
QString | getFunction (void) |
int | getGColor (void) |
bool | getLastValidateStatus () |
bool | getPermanentValidateStatus () |
int | getPrintCellWidth (void) |
int | getRColor (void) |
QString | getSpecDisplaySortMode (void) |
QString | getSubselect (void) |
QString | getTailText (void) |
QString | getTitleText (void) |
bool | hasMark (QString mark) |
bool | isEditable (void) |
bool | isGuienabled (void) |
bool | isLogged (void) |
bool | isMeldedWithNext (void) |
bool | isNoMiddleStretch (void) |
bool | isPrintCellWrap (void) |
bool | isReallyChanged (void) |
bool | isSet (void) |
bool | isShow (void) |
bool | isSQLField (void) |
virtual QString | lowerValidate (void) |
void | meldWithNext (void) |
void | noMiddleStretch (void) |
void | notSet (void) |
void | resetFunction (void) |
void | resetLogging (void) |
void | resetMeldWithNext (void) |
void | resetNoMiddleStretch (void) |
void | resetSubselect (void) |
void | resetValidateStatus () |
int | returnToDefault (void) |
void | setColor (int r, int g, int b) |
void | setData (QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true) |
void | setEditable (void) |
void | setEditBoxMaxWidth (int max) |
void | setExplainText (QString expl) |
void | setFunction (QString func) |
void | setGuidisabled (void) |
void | setGuienabled (void) |
void | setHide (void) |
void | setLogging (void) |
void | setMaulallyValidateError (QString message) |
void | setNotValidValues (QStringList nvl) |
void | setPrintCellNoWrap (void) |
void | setPrintCellWidth (int w) |
void | setPrintCellWrap (void) |
void | setReadonly (void) |
void | setShow (void) |
void | setSpecDisplaySortMode (QString m) |
void | setSubselect (QString subs) |
void | setTailText (QString tail) |
void | setTitleText (QString titl) |
void | setValidator (QString v="") |
void | sqlSynced (HDataChangeLogger *dclog=NULL, bool forcechange=false, bool forcelog=false) |
void | useRole (QString name) |
QString | validate (void) |
virtual void | value_changed () |
Public Member Functions inherited from HSqlHandler | |
HSqlHandler (void) | |
~HSqlHandler (void) | |
QSqlQuery * | allocateQSqlQuery (void) |
void | cloneSqlSettingsFrom (HSqlHandler *other) |
void | commit (void) |
bool | errorStatus (void) |
void | rollback (void) |
bool | submit0ResultQuery (QString q, QString err, bool tdisabled=false) |
QVariant | submit1ResultQuery (QString q, QString err, bool tdisabled=false) |
HPlainDataMatrix * | submitNResultQuery (int N, QString q, QString err, bool tdisabled=false) |
void | transaction (void) |
QSqlDatabase | workDB (void) |
Public Member Functions inherited from HSqlInterface | |
HSqlInterface () | |
~HSqlInterface () | |
void | cloneSqlInterfaceSettingsFrom (HSqlInterface *other) |
HSqlSingleInterface * | myInterface (void) |
QString | sqlConcatenateToLocal (QString string) |
QString | sqlConcatenateToLocal (QStringList fields) |
Public Member Functions inherited from HBase | |
HBase (void) | |
~HBase (void) | |
QString | getWhoami (void) |
Protected Attributes | |
bool | u_alive |
bool | unknown |
QDate | value |
Protected Attributes inherited from HDataField | |
int | color_b |
int | color_g |
int | color_r |
QString | defval |
QString | derived |
bool | editable |
int | editboxmaxwidth |
QString | explain |
QString | function |
bool | guienabled |
bool | lastvalidate_result |
bool | logged |
QString | manual_validate_error |
QStringList | markers |
bool | meldwithnext |
bool | nomiddlestretch |
QStringList | notvalid |
bool | permanentvalidate_result |
QList< HDataFieldRole > | roles |
int | set |
bool | show |
QString | spec_disp_sort |
bool | sql |
QString | sqlColumn |
bool | sync_valueInSql |
QString | tailstr |
QString | title |
QString | valid |
QString | valueInSql |
bool | wcell_print |
int | wcellw_print |
Protected Attributes inherited from HSqlHandler | |
bool | query_error_occured |
Protected Attributes inherited from HBase | |
QString | whoami |
Additional Inherited Members | |
Public Slots inherited from HDataField | |
void | disableControlSlot (void) |
void | enableControlSlot (void) |
Signals inherited from HDataField | |
void | dataChanged (void) |
void | disableControl (void) |
void | enableControl (void) |
void | updateStaticDisplayElementsSignal (void) |
Signals inherited from HSqlHandler | |
void | errorSignal (QString err) |
Static Public Member Functions inherited from HSqlHandler | |
static void | setCustomSqlDatabase (QString databaseName, QString sqlinterfacename="") |
static void | setDefaultSqlDatabase (void) |
Static Public Member Functions inherited from HSqlInterface | |
static HSqlSingleInterface * | currentDefaultSqlInterface (void) |
static HSqlSingleInterface * | getSqlInterface (QString interfacename) |
static void | setSqlMode (QString modename) |
static void | setSqlModeBackToFirst (void) |
Public Attributes inherited from HDataField | |
QString | conn_sqlTable |
bool | connected |
Static Public Attributes inherited from HSqlHandler | |
static int | trans = 0 |
This is a field type class.
HDate holds a date value, which is a date type in the sql database too. (varchar in sqlite, but handled with functions) The HDate can hold a valid date or an unknown date. You can set the HDate to accept unknown date value or not. If you set the accesibility of unknown value with possible_unknown() the value can be unknow, (NULL in database). You can disable the accesibiliy of unknown value with impossible_unknown()
The default value can be:
Gui appearance: A date editor widget and a checkbox if the unknown value is accepted (QDateEdit & QCheck)
HDate::HDate | ( | QString | sqlc, |
QString | ex, | ||
QString | tit, | ||
QString | def, | ||
bool | u_a = true , |
||
bool | unk = true |
||
) |
Creates a HDate field.
sqlc | the sql name of the field |
ex | the explain text of the field |
tit | the title text of the field |
def | the default text of the field |
u_a | the true if the Unknown value is Allowed |
unk | true if the current value will be unknown |
Definition at line 6720 of file datalib.cpp.
HDate::~HDate | ( | void | ) |
Destructor
Definition at line 6756 of file datalib.cpp.
HDate::HDate | ( | HDate * | t | ) |
Deepcopy constructor
Definition at line 6761 of file datalib.cpp.
|
inlinevirtual |
If this functions returns true then the field accepts sql functions. Otherwise the setFunction() function is do nothing This function can be redefined in descendats!
Reimplemented from HDataField.
|
inlinevirtual |
If this functions returns true then the field accepts sql subselects instead of read a simple value. Otherwise setSubselect() function is do nothing This function can be redefined in descendats!
Reimplemented from HDataField.
void HDate::deepcopy_from | ( | HDate * | x | ) |
Deepcopy from the given parameter
Definition at line 6767 of file datalib.cpp.
|
virtual |
Returns a clone of this field
Reimplemented from HDataField.
Definition at line 6774 of file datalib.cpp.
|
virtual |
Query the known value. Returns the known value even if the current is unknown too
Definition at line 6877 of file datalib.cpp.
|
virtual |
Returns the value of the field in that format which accepted by the sql database.
Reimplemented from HDataField.
Definition at line 6889 of file datalib.cpp.
|
virtual |
Returns string format of the field's value. Very similar to getSQLValue() but the result is always acceptable in an sql varchar field. (Mostly used by the logger system, when every kind of values are stored in varchar. The gsafe try to keep the value as close to the original sql database value as possible)
Reimplemented from HDataField.
Definition at line 6904 of file datalib.cpp.
|
virtual |
Returns the value of the field.
Reimplemented from HDataField.
Definition at line 6861 of file datalib.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Sets the default value of the field.
Reimplemented from HDataField.
Definition at line 6831 of file datalib.cpp.
|
virtual |
Sets the value of the field.
sdisabled | if this parameter is true the dataChanged() signal is disabled |
Reimplemented from HDataField.
Definition at line 6802 of file datalib.cpp.
|
virtual |
Returns the part of the CREATE TABLE sql command which creates this field
Reimplemented from HDataField.
Definition at line 6932 of file datalib.cpp.
|
virtual |
Returns the sql name of the field (in insert) This function can be redefined in descendats!
Reimplemented from HDataField.
Definition at line 6910 of file datalib.cpp.
|
virtual |
Returns the sql value of the field (in insert) This function can be redefined in descendats!
Reimplemented from HDataField.
Definition at line 6915 of file datalib.cpp.
|
virtual |
Returns the sql name of the field (in select) This function can be redefined in descendats!
Reimplemented from HDataField.
Definition at line 6927 of file datalib.cpp.
|
virtual |
Returns the sql update part of the field ( name='VALUE' ) This function can be redefined in descendats!
Reimplemented from HDataField.
Definition at line 6920 of file datalib.cpp.
void HDate::value_is_known | ( | void | ) |
Sets the current value to known
Definition at line 6786 of file datalib.cpp.
void HDate::value_is_unknown | ( | void | ) |
Sets the current value to unknown
Definition at line 6779 of file datalib.cpp.
|
protected |
|
protected |