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

#include <xsqltablemodel.h>

Public Types

enum  FormatFlags {
  Money, Qty, Curr, Percent,
  Cost, QtyPer, SalesPrice, PurchPrice,
  UOMRatio, ExtPrice, Weight
}
 
enum  itemDataRole { FormatRole = (Qt::UserRole + 1), EditorRole, MenuRole }
 

Public Member Functions

 XSqlTableModel (QObject *parent=0)
 
 ~XSqlTableModel ()
 
void appendChild (XSqlTableNode *child)
 
XSqlTableNodeappendChild (const QString &tableName, ParameterList &relations)
 
void applyColumnRole (int column, int role, QVariant value)
 
void applyColumnRoles ()
 
void applyColumnRoles (int row)
 
static::QString buildFilter (ParameterList &params)
 
static::ParameterList buildParams (XSqlTableModel *parent, int row, ParameterList relations)
 
XSqlTableNodechild (int index)
 
XSqlTableNodechild (const QString &tableName)
 
QList< XSqlTableNode * > children ()
 
void clear ()
 
void clearChildren ()
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
QVariant formatValue (const QVariant &dataValue, const QVariant &formatValue) const
 
void load (int row)
 
void loadAll ()
 
int nodeCount () const
 
ParameterList parameters ()
 
void removeChild (int index)
 
bool save ()
 
bool select ()
 
virtual QString selectStatement () const
 
void set (ParameterList params)
 
void setColumnRole (int column, int role, QVariant value)
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
void setKeys (int keyColumns)
 
void setTable (const QString &tableName, int keyColumns=0)
 

Member Enumeration Documentation

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

Constructor & Destructor Documentation

XSqlTableModel::XSqlTableModel ( QObject parent = 0)
XSqlTableModel::~XSqlTableModel ( )

Member Function Documentation

void XSqlTableModel::appendChild ( XSqlTableNode child)
inline
XSqlTableNode * XSqlTableModel::appendChild ( const QString &  tableName,
ParameterList &  relations 
)
void XSqlTableModel::applyColumnRole ( int  column,
int  role,
QVariant  value 
)
void XSqlTableModel::applyColumnRoles ( )
void XSqlTableModel::applyColumnRoles ( int  row)
QString XSqlTableModel::buildFilter ( ParameterList &  params)
ParameterList XSqlTableModel::buildParams ( XSqlTableModel parent,
int  row,
ParameterList  relations 
)
XSqlTableNode* XSqlTableModel::child ( int  index)
inline
XSqlTableNode * XSqlTableModel::child ( const QString &  tableName)
QList<XSqlTableNode *> XSqlTableModel::children ( )
inline
void XSqlTableModel::clear ( )
void XSqlTableModel::clearChildren ( )
QVariant XSqlTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
QVariant XSqlTableModel::formatValue ( const QVariant &  dataValue,
const QVariant &  formatValue 
) const
void XSqlTableModel::load ( int  row)
void XSqlTableModel::loadAll ( )
int XSqlTableModel::nodeCount ( ) const
inline
ParameterList XSqlTableModel::parameters ( )
inline
void XSqlTableModel::removeChild ( int  index)
inline
bool XSqlTableModel::save ( )

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.

bool XSqlTableModel::select ( )
QString XSqlTableModel::selectStatement ( ) const
virtual
void XSqlTableModel::set ( ParameterList  params)
inline
void XSqlTableModel::setColumnRole ( int  column,
int  role,
QVariant  value 
)
bool XSqlTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
void XSqlTableModel::setKeys ( int  keyColumns)
void XSqlTableModel::setTable ( const QString &  tableName,
int  keyColumns = 0 
)

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

Generated on Fri Oct 7 2016 14:23:35 xTuple ERP Programmer Reference, Version 4.2.0 doxygen 1.8.10