26 #include <dbmodel/dbmodel-config.h>
27 #include <dbstruct/dbtaew.h>
28 #include <dbstruct/dbcolumn.h>
62 QList<DbColumn> columns_;
63 QSqlTableModel * model_;
80 QSqlTableModel * model_part);
88 return model_ != NULL;
111 const DbColumn &
column (
int colidx)
const {
112 assert((colidx >= 0) && (colidx < columns_.count()));
113 return columns_.at (colidx);
118 assert((colidx >= 0) && (colidx < columns_.count()));
119 return columns_.at (colidx).col_label_;
126 DbColumn::Callback value);
131 int column_index)
const;
135 if (meta_ == NULL)
return QString ();
136 return meta_->tableName();
148 int role = Qt::DisplayRole)
const;
179 #endif // DBMODELTBL_H
QSqlTableModel * sqlModel() const
The undelying model.
Definition: dbmodeltbl.h:102
const DbColumn & column(int colidx) const
Get the column for a particular index.
Definition: dbmodeltbl.h:111
QString tableName() const
Get the column for a particular index.
Definition: dbmodeltbl.h:134
DbModelTbl()
Constructor.
Definition: dbmodeltbl.h:75
void setMetadata(DbTaew *value)
Set metadata about main table or view.
Definition: dbmodeltbl.h:96
DbTaew * metadata() const
Metadata about main table or view.
Definition: dbmodeltbl.h:92
const QString & columnLabel(int colidx) const
Get the column for a particular index.
Definition: dbmodeltbl.h:117
file dbmodeltbl.h date November 2015 author Nicu Tofan
Definition: dbmodeltbl.h:46
~DbModelTbl()
destructor
Definition: dbmodeltbl.h:83
void setSqlModel(QSqlTableModel *value)
Set the undelying model.
Definition: dbmodeltbl.h:106
bool isValid() const
Tell if this instance is valid (found in database).
Definition: dbmodeltbl.h:87