List of all members | Public Types | Public Member Functions
XSqlTableModel Class Reference

#include <xsqltablemodel.h>

Inheritance diagram for XSqlTableModel:
QSqlRelationalTableModel

Public Types

enum  FormatFlags {
  Money, Qty, Curr, Percent,
  Cost, QtyPer, SalesPrice, PurchPrice,
  UOMRatio, ExtPrice, Weight
}
 
enum  itemDataRole { FormatRole, EditorRole, MenuRole }
 

Public Member Functions

 XSqlTableModel (QObject *parent=0)
 
 ~XSqlTableModel ()
 
virtual Q_INVOKABLE XSqlTableNodeappendChild (const QString &tableName, ParameterList &relations)
 
virtual Q_INVOKABLE void appendChild (XSqlTableNode *child)
 
Q_INVOKABLE void applyColumnRole (int column, int role, QVariant value)
 
Q_INVOKABLE void applyColumnRoles ()
 
Q_INVOKABLE void applyColumnRoles (int row)
 
virtual Q_INVOKABLE QModelIndex buddy (const QModelIndex &index) const
 
static::QString buildFilter (ParameterList &params)
 
static::ParameterList buildParams (XSqlTableModel *parent, int row, ParameterList relations)
 
virtual Q_INVOKABLE bool canFetchMore (const QModelIndex &parent=QModelIndex()) const
 
virtual Q_INVOKABLE XSqlTableNodechild (const QString &tableName)
 
virtual Q_INVOKABLE XSqlTableNodechild (int index)
 
virtual Q_INVOKABLE QList< XSqlTableNode * > children ()
 
virtual Q_INVOKABLE void clear ()
 
virtual Q_INVOKABLE void clearChildren ()
 
virtual Q_INVOKABLE int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual Q_INVOKABLE QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual Q_INVOKABLE bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
 
virtual Q_INVOKABLE void fetchMore (const QModelIndex &parent=QModelIndex())
 
Q_INVOKABLE QVariant formatValue (const QVariant &dataValue, const QVariant &formatValue) const
 
virtual Q_INVOKABLE bool hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual Q_INVOKABLE QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual Q_INVOKABLE bool insertColumn (int column, const QModelIndex &parent=QModelIndex())
 
virtual Q_INVOKABLE bool insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
 
virtual Q_INVOKABLE bool insertRow (int row, const QModelIndex &parent=QModelIndex())
 
virtual Q_INVOKABLE bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
 
virtual Q_INVOKABLE QMap< int, QVariant > itemData (const QModelIndex &index) const
 
virtual Q_INVOKABLE QSqlError lastError () const
 
virtual Q_INVOKABLE void load (int row)
 
virtual Q_INVOKABLE void loadAll ()
 
virtual Q_INVOKABLE QModelIndexList match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
 
virtual Q_INVOKABLE QMimeData * mimeData (const QModelIndexList &indexes) const
 
virtual Q_INVOKABLE QStringList mimeTypes () const
 
virtual Q_INVOKABLE int nodeCount () const
 
virtual Q_INVOKABLE ParameterList parameters ()
 
virtual Q_INVOKABLE QSqlQuery query () const
 
virtual Q_INVOKABLE QSqlRelation relation (int column) const
 
virtual Q_INVOKABLE QSqlTableModel * relationModel (int column) const
 
virtual Q_INVOKABLE void removeChild (int index)
 
virtual Q_INVOKABLE bool removeColumn (int column, const QModelIndex &parent=QModelIndex())
 
virtual Q_INVOKABLE bool save ()
 
Q_INVOKABLE bool select ()
 
virtual Q_INVOKABLE QString selectStatement () const
 
virtual Q_INVOKABLE void set (ParameterList params)
 
Q_INVOKABLE void setColumnRole (int column, int role, QVariant value)
 
Q_INVOKABLE bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
virtual Q_INVOKABLE bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
 
virtual Q_INVOKABLE bool setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles)
 
Q_INVOKABLE void setKeys (int keyColumns)
 
virtual Q_INVOKABLE void setRelation (int column, const QSqlRelation &relation)
 
virtual Q_INVOKABLE void setTable (const QString &tableName, int keyColumns)
 
virtual Q_INVOKABLE QModelIndex sibling (int row, int column, const QModelIndex &index) const
 
virtual Q_INVOKABLE QSize span (const QModelIndex &index) const
 
virtual Q_INVOKABLE Qt::DropActions supportedDragActions () const
 
virtual Q_INVOKABLE Qt::DropActions supportedDropActions () const
 
virtual Q_INVOKABLE QString toString () const
 

Member Enumeration Documentation

◆ FormatFlags

Enumerator
Money 
Qty 
Curr 
Percent 
Cost 
QtyPer 
SalesPrice 
PurchPrice 
UOMRatio 
ExtPrice 
Weight 

◆ itemDataRole

Enumerator
FormatRole 
EditorRole 
MenuRole 

Constructor & Destructor Documentation

◆ XSqlTableModel()

XSqlTableModel::XSqlTableModel ( QObject parent = 0)

◆ ~XSqlTableModel()

XSqlTableModel::~XSqlTableModel ( )

Member Function Documentation

◆ appendChild() [1/2]

XSqlTableNode * XSqlTableModel::appendChild ( const QString &  tableName,
ParameterList &  relations 
)
virtual

◆ appendChild() [2/2]

void XSqlTableModel::appendChild ( XSqlTableNode child)
virtual

◆ applyColumnRole()

void XSqlTableModel::applyColumnRole ( int  column,
int  role,
QVariant  value 
)

◆ applyColumnRoles() [1/2]

void XSqlTableModel::applyColumnRoles ( )

◆ applyColumnRoles() [2/2]

void XSqlTableModel::applyColumnRoles ( int  row)

◆ buddy()

QModelIndex XSqlTableModel::buddy ( const QModelIndex &  index) const
virtual

◆ buildFilter()

QString XSqlTableModel::buildFilter ( ParameterList &  params)

◆ buildParams()

ParameterList XSqlTableModel::buildParams ( XSqlTableModel parent,
int  row,
ParameterList  relations 
)

◆ canFetchMore()

bool XSqlTableModel::canFetchMore ( const QModelIndex &  parent = QModelIndex()) const
virtual

◆ child() [1/2]

XSqlTableNode * XSqlTableModel::child ( const QString &  tableName)
virtual

◆ child() [2/2]

XSqlTableNode * XSqlTableModel::child ( int  index)
virtual

◆ children()

QList< XSqlTableNode * > XSqlTableModel::children ( )
virtual

◆ clear()

void XSqlTableModel::clear ( )
virtual

◆ clearChildren()

void XSqlTableModel::clearChildren ( )
virtual

◆ columnCount()

int XSqlTableModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

◆ data()

QVariant XSqlTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

◆ dropMimeData()

bool XSqlTableModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
)
virtual

◆ fetchMore()

void XSqlTableModel::fetchMore ( const QModelIndex &  parent = QModelIndex())
virtual

◆ formatValue()

QVariant XSqlTableModel::formatValue ( const QVariant &  dataValue,
const QVariant &  formatValue 
) const

◆ hasIndex()

bool XSqlTableModel::hasIndex ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

◆ index()

QModelIndex XSqlTableModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

◆ insertColumn()

bool XSqlTableModel::insertColumn ( int  column,
const QModelIndex &  parent = QModelIndex() 
)
virtual

◆ insertColumns()

bool XSqlTableModel::insertColumns ( int  column,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
virtual

◆ insertRow()

bool XSqlTableModel::insertRow ( int  row,
const QModelIndex &  parent = QModelIndex() 
)
virtual

◆ insertRows()

bool XSqlTableModel::insertRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
virtual

◆ itemData()

QMap< int, QVariant > XSqlTableModel::itemData ( const QModelIndex &  index) const
virtual

◆ lastError()

QSqlError XSqlTableModel::lastError ( ) const
virtual

◆ load()

void XSqlTableModel::load ( int  row)
virtual

◆ loadAll()

void XSqlTableModel::loadAll ( )
virtual

◆ match()

QModelIndexList XSqlTableModel::match ( const QModelIndex &  start,
int  role,
const QVariant &  value,
int  hits = 1,
Qt::MatchFlags  flags = Qt::MatchFlags(Qt::MatchStartsWith | Qt::MatchWrap) 
) const
virtual

◆ mimeData()

QMimeData * XSqlTableModel::mimeData ( const QModelIndexList &  indexes) const
virtual

◆ mimeTypes()

QStringList XSqlTableModel::mimeTypes ( ) const
virtual

◆ nodeCount()

int XSqlTableModel::nodeCount ( ) const
virtual

◆ parameters()

ParameterList XSqlTableModel::parameters ( )
virtual

◆ query()

QSqlQuery XSqlTableModel::query ( ) const
virtual

◆ relation()

QSqlRelation XSqlTableModel::relation ( int  column) const
virtual

◆ relationModel()

QSqlTableModel * XSqlTableModel::relationModel ( int  column) const
virtual

◆ removeChild()

void XSqlTableModel::removeChild ( int  index)
virtual

◆ removeColumn()

bool XSqlTableModel::removeColumn ( int  column,
const QModelIndex &  parent = QModelIndex() 
)
virtual

◆ save()

bool XSqlTableModel::save ( )
virtual

Saves the current model and all of it's child node models to the database where a\ transact wraps all submissions in a database transaction.

◆ select()

bool XSqlTableModel::select ( )

◆ selectStatement()

QString XSqlTableModel::selectStatement ( ) const
virtual

◆ set()

void XSqlTableModel::set ( ParameterList  params)
virtual

◆ setColumnRole()

void XSqlTableModel::setColumnRole ( int  column,
int  role,
QVariant  value 
)

◆ setData()

bool XSqlTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

◆ setHeaderData()

bool XSqlTableModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

◆ setItemData()

bool XSqlTableModel::setItemData ( const QModelIndex &  index,
const QMap< int, QVariant > &  roles 
)
virtual

◆ setKeys()

void XSqlTableModel::setKeys ( int  keyColumns)

◆ setRelation()

void XSqlTableModel::setRelation ( int  column,
const QSqlRelation &  relation 
)
virtual

◆ setTable()

void XSqlTableModel::setTable ( const QString &  tableName,
int  keyColumns 
)
virtual

◆ sibling()

QModelIndex XSqlTableModel::sibling ( int  row,
int  column,
const QModelIndex &  index 
) const
virtual

◆ span()

QSize XSqlTableModel::span ( const QModelIndex &  index) const
virtual

◆ supportedDragActions()

Qt::DropActions XSqlTableModel::supportedDragActions ( ) const
virtual

◆ supportedDropActions()

Qt::DropActions XSqlTableModel::supportedDropActions ( ) const
virtual

◆ toString()

QString XSqlTableModel::toString ( ) const
virtual

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

Generated on Mon May 3 2021 xTuple ERP Programmer Reference, Version 4.12.0 doxygen 1.8.17