A table model representing a te::da::DataSet. More...
#include <DataSetTableModel.h>
Public Member Functions | |
| DataSetTableModel (QObject *parent=0) | |
| Constructor. More... | |
| te::da::ObjectIdSet * | getObjectIdSet (const int &initRow, const int &finalRow) |
| Returns the ObjectIdSet begining with row initRow and ending in finalRow. More... | |
| Promoter * | getPromoter () |
| Returns the pointer to the promoter being used. More... | |
| void | promote (const te::da::ObjectIdSet *oids) |
| Promotes the rows identified by oids. More... | |
| void | setDataSet (te::da::DataSet *dset) |
| Updates the data being used. More... | |
| void | setEnabled (const bool &enabled) |
| Enable or disable the dataset presentation. More... | |
| void | setPkeysColumns (const std::vector< size_t > &pkeys) |
| Sets the columns used as pkeys, for presentation purposes. More... | |
| void | showOIdsVisible (const bool &visible) |
| Shows an icon for indentify the columns that are used for identify objects. More... | |
| virtual | ~DataSetTableModel () |
| Virtual destructor. More... | |
QAbstractTableModel re-implementation methods. | |
Re-implementation of QAbstractTableModel methods. | |
| int | rowCount (const QModelIndex &parent) const |
| int | columnCount (const QModelIndex &parent) const |
| QVariant | data (const QModelIndex &index, int role) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| bool | setData (const QModelIndex &index, 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()) |
Protected Attributes | |
| int | m_currentRow |
| An internal row pointer. More... | |
| te::da::DataSet * | m_dataset |
| The dataset being used. More... | |
| bool | m_enabled |
| bool | m_OIdsVisible |
| Oids icon visibility. More... | |
| std::vector< size_t > | m_pkeysColumns |
| Primary key columns. More... | |
| Promoter * | m_promoter |
| Promoter to be used. More... | |
A table model representing a te::da::DataSet.
Definition at line 62 of file DataSetTableModel.h.
| te::qt::widgets::DataSetTableModel::DataSetTableModel | ( | QObject * | parent = 0 | ) |
|
virtual |
Virtual destructor.
Definition at line 130 of file DataSetTableModel.cpp.
| int te::qt::widgets::DataSetTableModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 209 of file DataSetTableModel.cpp.
| QVariant te::qt::widgets::DataSetTableModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
Definition at line 214 of file DataSetTableModel.cpp.
| Qt::ItemFlags te::qt::widgets::DataSetTableModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 288 of file DataSetTableModel.cpp.
| te::da::ObjectIdSet * te::qt::widgets::DataSetTableModel::getObjectIdSet | ( | const int & | initRow, |
| const int & | finalRow | ||
| ) |
Returns the ObjectIdSet begining with row initRow and ending in finalRow.
| initRow | Initial row. |
| endRow | Final row. |
Definition at line 171 of file DataSetTableModel.cpp.
References te::da::ObjectIdSet::add(), te::da::ObjectIdSet::addProperty(), te::da::GenerateOID(), and te::da::ObjectIdSet::getPropertyNames().
| te::qt::widgets::Promoter * te::qt::widgets::DataSetTableModel::getPromoter | ( | ) |
Returns the pointer to the promoter being used.
Definition at line 161 of file DataSetTableModel.cpp.
Referenced by te::qt::widgets::DataSetTableView::DataSetTableView().
| QVariant te::qt::widgets::DataSetTableModel::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role | ||
| ) | const |
Definition at line 246 of file DataSetTableModel.cpp.
References columnType(), and IsPkey().
| bool te::qt::widgets::DataSetTableModel::insertColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
Definition at line 305 of file DataSetTableModel.cpp.
| void te::qt::widgets::DataSetTableModel::promote | ( | const te::da::ObjectIdSet * | oids | ) |
Promotes the rows identified by oids.
oids The identifiers of the rows to be promoted.
Definition at line 152 of file DataSetTableModel.cpp.
| bool te::qt::widgets::DataSetTableModel::removeColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
Definition at line 314 of file DataSetTableModel.cpp.
| int te::qt::widgets::DataSetTableModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 204 of file DataSetTableModel.cpp.
| bool te::qt::widgets::DataSetTableModel::setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role = Qt::EditRole |
||
| ) |
Definition at line 300 of file DataSetTableModel.cpp.
| void te::qt::widgets::DataSetTableModel::setDataSet | ( | te::da::DataSet * | dset | ) |
Updates the data being used.
| dset | The new data set to be used. |
Definition at line 136 of file DataSetTableModel.cpp.
| void te::qt::widgets::DataSetTableModel::setEnabled | ( | const bool & | enabled | ) |
Enable or disable the dataset presentation.
| enabled | True for show dataSet on table, false to hide it. |
Definition at line 195 of file DataSetTableModel.cpp.
| void te::qt::widgets::DataSetTableModel::setPkeysColumns | ( | const std::vector< size_t > & | pkeys | ) |
Sets the columns used as pkeys, for presentation purposes.
| pkeys | Positions of the columns that form the primary key. |
Definition at line 147 of file DataSetTableModel.cpp.
| void te::qt::widgets::DataSetTableModel::showOIdsVisible | ( | const bool & | visible | ) |
Shows an icon for indentify the columns that are used for identify objects.
Definition at line 166 of file DataSetTableModel.cpp.
|
mutableprotected |
An internal row pointer.
Definition at line 159 of file DataSetTableModel.h.
|
protected |
The dataset being used.
Definition at line 157 of file DataSetTableModel.h.
|
protected |
Definition at line 167 of file DataSetTableModel.h.
|
protected |
Oids icon visibility.
Definition at line 165 of file DataSetTableModel.h.
|
protected |
Primary key columns.
Definition at line 161 of file DataSetTableModel.h.
|
protected |
Promoter to be used.
Definition at line 163 of file DataSetTableModel.h.
Referenced by DataSetTableModel().