Definition at line 59 of file qsqltablemodel.h.
#include <qsqltablemodel.h>

Public Types |
|
| enum | EditStrategy { OnFieldChange, OnRowChange, OnManualSubmit } |
Public Slots |
|
| bool | submit () |
| void | revert () |
| bool | submitAll () |
| void | revertAll () |
Signals |
|
| void | primeInsert (int row, QSqlRecord &record) |
| void | beforeInsert (QSqlRecord &record) |
| void | beforeUpdate (int row, QSqlRecord &record) |
| void | beforeDelete (int row) |
Public Member Functions |
|
| QSqlTableModel (QObject *parent=0, QSqlDatabase db=QSqlDatabase()) | |
| virtual | ~QSqlTableModel () |
| virtual bool | select () |
| virtual void | setTable (const QString &tableName) |
| QString | tableName () const |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| QVariant | data (const QModelIndex &idx, int role=Qt::DisplayRole) const |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| bool | isDirty (const QModelIndex &index) const |
| void | clear () |
| virtual void | setEditStrategy (EditStrategy strategy) |
| EditStrategy | editStrategy () const |
| QSqlIndex | primaryKey () const |
| QSqlDatabase | database () const |
| int | fieldIndex (const QString &fieldName) const |
| void | sort (int column, Qt::SortOrder order) |
| virtual void | setSort (int column, Qt::SortOrder order) |
| QString | filter () const |
| virtual void | setFilter (const QString &filter) |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| bool | insertRecord (int row, const QSqlRecord &record) |
| bool | setRecord (int row, const QSqlRecord &record) |
| virtual void | revertRow (int row) |
Protected Member Functions |
|
| QSqlTableModel (QSqlTableModelPrivate &dd, QObject *parent=0, QSqlDatabase db=QSqlDatabase()) | |
| virtual bool | updateRowInTable (int row, const QSqlRecord &values) |
| virtual bool | insertRowIntoTable (const QSqlRecord &values) |
| virtual bool | deleteRowFromTable (int row) |
| virtual QString | orderByClause () const |
| virtual QString | selectStatement () const |
| void | setPrimaryKey (const QSqlIndex &key) |
| void | setQuery (const QSqlQuery &query) |
| QModelIndex | indexInQuery (const QModelIndex &item) const |
| enum EditStrategy |
Definition at line 65 of file qsqltablemodel.h.
| QSqlTableModel | ( | QObject * | parent = 0, |
| QSqlDatabase | db = QSqlDatabase() |
||
| ) | [explicit] |
| virtual ~QSqlTableModel | ( | ) | [virtual] |
| QSqlTableModel | ( | QSqlTableModelPrivate & | dd, |
| QObject * | parent = 0, |
||
| QSqlDatabase | db = QSqlDatabase() |
||
| ) | [protected] |
| virtual bool select | ( | ) | [virtual] |
Reimplemented in QSqlRelationalTableModel.
| virtual void setTable | ( | const QString & | tableName | ) | [virtual] |
Reimplemented in QSqlRelationalTableModel.
| QString tableName | ( | ) | const |
| Qt::ItemFlags flags | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented from QAbstractItemModel.
| QVariant data | ( | const QModelIndex & | idx, |
| int | role =
Qt::DisplayRole |
||
| ) | const [virtual] |
Reimplemented from QSqlQueryModel.
Reimplemented in QSqlRelationalTableModel.
| bool setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role =
Qt::EditRole |
||
| ) | [virtual] |
Reimplemented from QAbstractItemModel.
Reimplemented in QSqlRelationalTableModel.
| QVariant headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role =
Qt::DisplayRole |
||
| ) | const [virtual] |
Reimplemented from QSqlQueryModel.
| bool isDirty | ( | const QModelIndex & | index | ) | const |
| void clear | ( | ) | [virtual] |
Reimplemented from QSqlQueryModel.
Reimplemented in QSqlRelationalTableModel.
| virtual void setEditStrategy | ( | EditStrategy | strategy | ) | [virtual] |
| EditStrategy editStrategy | ( | ) | const |
| QSqlIndex primaryKey | ( | ) | const |
| QSqlDatabase database | ( | ) | const |
| int fieldIndex | ( | const QString & | fieldName | ) | const |
| void sort | ( | int | column, |
| Qt::SortOrder | order | ||
| ) | [virtual] |
Reimplemented from QAbstractItemModel.
| virtual void setSort | ( | int | column, |
| Qt::SortOrder | order | ||
| ) | [virtual] |
| QString filter | ( | ) | const |
| virtual void setFilter | ( | const QString & | filter | ) | [virtual] |
| int rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from QSqlQueryModel.
| bool removeColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented from QSqlQueryModel.
Reimplemented in QSqlRelationalTableModel.
| bool removeRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented from QAbstractItemModel.
| bool insertRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented from QAbstractItemModel.
| bool insertRecord | ( | int | row, |
| const QSqlRecord & | record | ||
| ) |
| bool setRecord | ( | int | row, |
| const QSqlRecord & | record | ||
| ) |
| virtual void revertRow | ( | int | row | ) | [virtual] |
Reimplemented in QSqlRelationalTableModel.
| bool submit | ( | ) | [virtual, slot] |
Reimplemented from QAbstractItemModel.
| void revert | ( | ) | [virtual, slot] |
Reimplemented from QAbstractItemModel.
| bool submitAll | ( | ) | [slot] |
| void revertAll | ( | ) | [slot] |
| void primeInsert | ( | int | row, |
| QSqlRecord & | record | ||
| ) | [signal] |
| void beforeInsert | ( | QSqlRecord & | record | ) | [signal] |
| void beforeUpdate | ( | int | row, |
| QSqlRecord & | record | ||
| ) | [signal] |
| void beforeDelete | ( | int | row | ) | [signal] |
| virtual bool updateRowInTable | ( | int | row, |
| const QSqlRecord & | values | ||
| ) | [protected, virtual] |
Reimplemented in QSqlRelationalTableModel.
| virtual bool insertRowIntoTable | ( | const QSqlRecord & | values | ) | [protected, virtual] |
Reimplemented in QSqlRelationalTableModel.
| virtual bool deleteRowFromTable | ( | int | row | ) | [protected, virtual] |
| virtual QString orderByClause | ( | ) | const [protected, virtual] |
Reimplemented in QSqlRelationalTableModel.
| virtual QString selectStatement | ( | ) | const [protected, virtual] |
Reimplemented in QSqlRelationalTableModel.
| void setPrimaryKey | ( | const QSqlIndex & | key | ) | [protected] |
| void setQuery | ( | const QSqlQuery & | query | ) | [protected] |
Reimplemented from QSqlQueryModel.
| QModelIndex indexInQuery | ( | const QModelIndex & | item | ) | const [protected] |
Reimplemented from QSqlQueryModel.