LibEngsas
|
Represents an field in an sql table.This class is used with ESqlInit to define database schemas. More...
#include <esqlfield.h>
Public Types | |
enum | Type { NoType, Integer, Text, Varchar, Boolean, Date, Time, Tinyint, Double, Timestamp, Blob, LongBlob } |
Public Member Functions | |
ESqlField (QObject *parent=0) | |
ESqlField (QString myName, ESqlField::Type myType=ESqlField::NoType, bool notNull=false, bool autoIncrement=false, QObject *parent=0) | |
bool | isValid () const |
QString | name () const |
void | setName (QString myName) |
bool | isPrimaryKey () const |
void | setIsPrimaryKey (bool status) |
bool | autoIncrement () const |
void | setAutoIncrement (bool status) |
bool | notNull () const |
void | setNotNull (bool status) |
QVariant | defaultValue () const |
void | setDefaultValue (QVariant value) |
ESqlField::Type | dataType () const |
void | setDataType (ESqlField::Type myType) |
unsigned int | length () const |
void | setLength (unsigned int len) |
bool | isUnsigned () const |
void | setIsUnsigned (bool status) |
bool | isBinary () const |
void | setIsBinary (bool status) |
bool | zeroFill () const |
void | setZeroFill (bool status) |
QString | sqlFieldType () const |
QString | createStatement (EngSaS::SQL::DatabaseType type) |
Creates the SQL statement to create the field. | |
ESqlField * | copy () const |
bool | operator== (const ESqlField &field) const |
bool | operator!= (const ESqlField &field) const |
![]() | |
EObject (QObject *parent=0) | |
virtual | ~EObject () |
void | connectByPass (QObject *object) |
Private Member Functions | |
void | init () |
Private Attributes | |
QString | fieldName |
bool | pk |
bool | ai |
bool | nn |
QVariant | fieldDefValue |
ESqlField::Type | fieldType |
unsigned int | fieldLength |
bool | binary |
bool | fieldUnsigned |
bool | zf |
QMultiHash< int, QString > | convFieldTypes |
Additional Inherited Members | |
![]() | |
virtual void | reloadSettings () |
Used to reload the settings. | |
![]() | |
void | error (const QString &message) |
void | warning (const QString &message) |
void | information (const QString &message) |
void | reloadEnableActions () |
Request reloading of enabled actions in EMainWindow. | |
void | addMenu (QMenu *newMenu, const QString &parent, QString before=QString()) |
void | addAction (QAction *newAction, const QString &parent, QString before=QString()) |
void | addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
void | addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area) |
void | setCentralWidget (QWidget *centralWidget) |
void | showSettings () |
void | showHelp (const QString &page) |
void | showStatusWidget (QWidget *widget) |
void | reloadSettingsRequest () |
Indicates, that a reload of the settings is needed. | |
void | doReloadSettings () |
Emitted to bring the reload request back to the farest child. | |
![]() | |
static void | connectByPass (QObject *parent, QObject *child) |
![]() | |
virtual void | errorByPass (const QString &message) |
virtual void | warningByPass (const QString &message) |
virtual void | informationByPass (const QString &message) |
virtual void | reloadEnableActionsByPass () |
virtual void | addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString()) |
virtual void | addActionByPass (QAction *newAction, const QString &parent, QString before=QString()) |
virtual void | addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
virtual void | addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area) |
virtual void | setCentralWidgetByPass (QWidget *centralWidget) |
virtual void | showSettingsByPass () |
virtual void | showHelpByPass (const QString &page) |
virtual void | showStatusWidgetByPass (QWidget *widget) |
virtual void | reloadSettingsRequestByPass () |
![]() | |
void | addManagedDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area, QString actionLabel=QString(), QString actionParent=QString()) |
Adds an dock widget via addNewDockWidget() and adds widget to the list of managed dock widgets. |
Represents an field in an sql table.
This class is used with ESqlInit to define database schemas.
enum ESqlField::Type |
ESqlField::ESqlField | ( | QObject * | parent = 0 | ) |
ESqlField::ESqlField | ( | QString | myName, |
ESqlField::Type | myType = ESqlField::NoType , |
||
bool | notNull = false , |
||
bool | autoIncrement = false , |
||
QObject * | parent = 0 |
||
) |
bool ESqlField::autoIncrement | ( | ) | const |
ESqlField * ESqlField::copy | ( | ) | const |
QString ESqlField::createStatement | ( | EngSaS::SQL::DatabaseType | type | ) |
Creates the SQL statement to create the field.
e.g. a field with name cell2 and varchar(20) not null will result in this statement: cell2 varchar(20) not null
ESqlField::Type ESqlField::dataType | ( | ) | const |
QVariant ESqlField::defaultValue | ( | ) | const |
|
private |
bool ESqlField::isBinary | ( | ) | const |
bool ESqlField::isPrimaryKey | ( | ) | const |
bool ESqlField::isUnsigned | ( | ) | const |
bool ESqlField::isValid | ( | ) | const |
unsigned int ESqlField::length | ( | ) | const |
QString ESqlField::name | ( | ) | const |
bool ESqlField::notNull | ( | ) | const |
bool ESqlField::operator!= | ( | const ESqlField & | field | ) | const |
bool ESqlField::operator== | ( | const ESqlField & | field | ) | const |
void ESqlField::setAutoIncrement | ( | bool | status | ) |
void ESqlField::setDataType | ( | ESqlField::Type | myType | ) |
void ESqlField::setDefaultValue | ( | QVariant | value | ) |
void ESqlField::setIsBinary | ( | bool | status | ) |
void ESqlField::setIsPrimaryKey | ( | bool | status | ) |
void ESqlField::setIsUnsigned | ( | bool | status | ) |
void ESqlField::setLength | ( | unsigned int | len | ) |
void ESqlField::setName | ( | QString | myName | ) |
void ESqlField::setNotNull | ( | bool | status | ) |
void ESqlField::setZeroFill | ( | bool | status | ) |
QString ESqlField::sqlFieldType | ( | ) | const |
bool ESqlField::zeroFill | ( | ) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |