QSqlQueryModel Class Reference

QSqlQueryModel Class Reference

#include <qsqlquerymodel.h>

Class Description

Definition at line 59 of file qsqlquerymodel.h.

+ Inheritance diagram for QSqlQueryModel:

Public Member Functions

 QSqlQueryModel (QObject *parent=0)
 
virtual ~QSqlQueryModel ()
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QSqlRecord record (int row) const
 
QSqlRecord record () const
 
QVariant data (const QModelIndex &item, int role=Qt::DisplayRole) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
 
bool insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
 
bool removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
 
void setQuery (const QSqlQuery &query)
 
void setQuery (const QString &query, const QSqlDatabase &db=QSqlDatabase())
 
QSqlQuery query () const
 
virtual void clear ()
 
QSqlError lastError () const
 
void fetchMore (const QModelIndex &parent=QModelIndex())
 
bool canFetchMore (const QModelIndex &parent=QModelIndex()) const
 
- Public Member Functions inherited from QAbstractTableModel
 QAbstractTableModel (QObject *parent=0)
 
 ~QAbstractTableModel ()
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
 
- Public Member Functions inherited from QAbstractItemModel
 QAbstractItemModel (QObject *parent=0)
 
virtual ~QAbstractItemModel ()
 
bool hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
QModelIndex sibling (int row, int column, const QModelIndex &idx) const
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
virtual QMap< int, QVariantitemData (const QModelIndex &index) const
 
virtual bool setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles)
 
virtual QStringList mimeTypes () const
 
virtual QMimeDatamimeData (const QModelIndexList &indexes) const
 
virtual Qt::DropActions supportedDropActions () const
 
Qt::DropActions supportedDragActions () const
 
void setSupportedDragActions (Qt::DropActions)
 
virtual bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
 
virtual bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
 
bool insertRow (int row, const QModelIndex &parent=QModelIndex())
 
bool insertColumn (int column, const QModelIndex &parent=QModelIndex())
 
bool removeRow (int row, const QModelIndex &parent=QModelIndex())
 
bool removeColumn (int column, const QModelIndex &parent=QModelIndex())
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
 
virtual QModelIndex buddy (const QModelIndex &index) const
 
virtual QModelIndexList match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
 
virtual QSize span (const QModelIndex &index) const
 
const QHash< int, QByteArray > & roleNames () const
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=0)
 
virtual ~QObject ()
 
virtual bool event (QEvent *)
 
virtual bool eventFilter (QObject *, QEvent *)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool b)
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
template<typename T >
findChild (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
const QObjectListchildren () const
 
void setParent (QObject *)
 
void installEventFilter (QObject *)
 
void removeEventFilter (QObject *)
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void setUserData (uint id, QObjectUserData *data)
 
QObjectUserDatauserData (uint id) const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 

Protected Member Functions

virtual void queryChange ()
 
QModelIndex indexInQuery (const QModelIndex &item) const
 
void setLastError (const QSqlError &error)
 
 QSqlQueryModel (QSqlQueryModelPrivate &dd, QObject *parent=0)
 
- Protected Member Functions inherited from QAbstractTableModel
 QAbstractTableModel (QAbstractItemModelPrivate &dd, QObject *parent)
 
- Protected Member Functions inherited from QAbstractItemModel
 QAbstractItemModel (QAbstractItemModelPrivate &dd, QObject *parent=0)
 
QModelIndex createIndex (int row, int column, void *data=0) const
 
QModelIndex createIndex (int row, int column, int id) const
 
QModelIndex createIndex (int row, int column, quint32 id) const
 
void encodeData (const QModelIndexList &indexes, QDataStream &stream) const
 
bool decodeData (int row, int column, const QModelIndex &parent, QDataStream &stream)
 
void beginInsertRows (const QModelIndex &parent, int first, int last)
 
void endInsertRows ()
 
void beginRemoveRows (const QModelIndex &parent, int first, int last)
 
void endRemoveRows ()
 
bool beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow)
 
void endMoveRows ()
 
void beginInsertColumns (const QModelIndex &parent, int first, int last)
 
void endInsertColumns ()
 
void beginRemoveColumns (const QModelIndex &parent, int first, int last)
 
void endRemoveColumns ()
 
bool beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn)
 
void endMoveColumns ()
 
void reset ()
 
void beginResetModel ()
 
void endResetModel ()
 
void changePersistentIndex (const QModelIndex &from, const QModelIndex &to)
 
void changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to)
 
QModelIndexList persistentIndexList () const
 
void setRoleNames (const QHash< int, QByteArray > &roleNames)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *)
 
virtual void childEvent (QChildEvent *)
 
virtual void customEvent (QEvent *)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 

Additional Inherited Members

- Public Slots inherited from QAbstractItemModel
virtual bool submit ()
 
virtual void revert ()
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Signals inherited from QAbstractItemModel
void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void headerDataChanged (Qt::Orientation orientation, int first, int last)
 
void layoutChanged ()
 
void layoutAboutToBeChanged ()
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 
- Static Public Member Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
- Protected Slots inherited from QAbstractItemModel
void resetInternalData ()
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Attributes inherited from QObject
static const QMetaObject staticQtMetaObject
 
- Properties inherited from QObject
QString objectName
 

Constructor & Destructor Documentation

QSqlQueryModel ( QObject parent = 0)
explicit
virtual ~QSqlQueryModel ( )
virtual
QSqlQueryModel ( QSqlQueryModelPrivate &  dd,
QObject parent = 0 
)
protected

Member Function Documentation

int rowCount ( const QModelIndex parent = QModelIndex()) const
virtual

Implements QAbstractItemModel.

Reimplemented in QSqlTableModel.

int columnCount ( const QModelIndex parent = QModelIndex()) const
virtual

Implements QAbstractItemModel.

QSqlRecord record ( int  row) const
QSqlRecord record ( ) const
QVariant data ( const QModelIndex item,
int  role = Qt::DisplayRole 
) const
virtual

Implements QAbstractItemModel.

Reimplemented in QSqlRelationalTableModel, and QSqlTableModel.

QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual

Reimplemented from QAbstractItemModel.

Reimplemented in QSqlTableModel.

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

Reimplemented from QAbstractItemModel.

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

Reimplemented from QAbstractItemModel.

bool removeColumns ( int  column,
int  count,
const QModelIndex parent = QModelIndex() 
)
virtual

Reimplemented from QAbstractItemModel.

Reimplemented in QSqlTableModel, and QSqlRelationalTableModel.

void setQuery ( const QSqlQuery query)
void setQuery ( const QString query,
const QSqlDatabase db = QSqlDatabase() 
)
QSqlQuery query ( ) const
virtual void clear ( )
virtual

Reimplemented in QSqlRelationalTableModel, and QSqlTableModel.

QSqlError lastError ( ) const
void fetchMore ( const QModelIndex parent = QModelIndex())
virtual

Reimplemented from QAbstractItemModel.

bool canFetchMore ( const QModelIndex parent = QModelIndex()) const
virtual

Reimplemented from QAbstractItemModel.

virtual void queryChange ( )
protectedvirtual
QModelIndex indexInQuery ( const QModelIndex item) const
protected
void setLastError ( const QSqlError error)
protected

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