10 #ifndef GUARD_DBMODEL_H_INCLUDE
11 #define GUARD_DBMODEL_H_INCLUDE
13 #include <dbmodel/dbmodel-config.h>
14 #include <dbmodel/dbmodelcol.h>
15 #include <dbmodel/dbmodeltbl.h>
19 #include <QSortFilterProxyModel>
20 #include <QSqlDatabase>
26 class DBMODEL_EXPORT
DbModel :
public QSortFilterProxyModel {
38 QObject * parent = NULL);
44 QObject * parent = NULL);
95 const QModelIndex &left,
96 const QModelIndex &right)
const;
121 int table_index)
const;
126 const QString & filter,
127 int table_index = 0);
132 const QString & filter,
133 const QString & table);
146 int table_index = 0);
153 const QString & table);
159 const QString & table)
const;
176 DbColumn::Callback value,
177 void * user_data = NULL);
183 DbColumn::Callback value,
184 void * user_data = NULL) {
185 return setColumnCallback (0, column_index, value, user_data);
196 columnCallbackData ();
214 getMarkerRow ()
const;
218 getMarkerCol ()
const;
222 hasMarkerCell ()
const;
229 #endif // GUARD_DBMODEL_H_INCLUDE
Internal model.
Definition: dbmodelprivate.h:75
A Qt model capable of representing sql tables.
Definition: dbmodel.h:26
Model representation of a column.
Definition: dbmodelcol.h:56
const QString & filter() const
Get the filter installed on main model.
Definition: dbmodel.h:137
file dbmodeltbl.h date November 2015 author Nicu Tofan
Definition: dbmodeltbl.h:46
bool setColumnCallback(int column_index, DbColumn::Callback value, void *user_data=NULL)
Set the callback for a column in main table.
Definition: dbmodel.h:181