A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as its model. More...
#include <DataSetTableView.h>
Public Slots | |
| void | addColumn () |
| Add column to the table. More... | |
| void | removeColumn (const int &column) |
| void | setAutoScrollEnabled (const bool &enable) |
| Enable / disable auto-scroll. More... | |
| void | setOIdsColumnsVisible (const bool &visible) |
| Shows or hides the icon sinalizing the columns that identify each row. More... | |
Table slot methods. | |
Methods to handle user interaction with table. | |
| void | hideColumn (const int &column) |
| Hides the column at position column. More... | |
| void | showColumn (const int &column) |
| Shows the hidden column. More... | |
| void | showAllColumns () |
| Shows all hidden columns. More... | |
| void | resetColumnsOrder () |
| Shows columns in the original order. More... | |
| void | highlightRow (const int &row, const bool &add) |
| Used to highlight the data when the mouse is clicked over a row in the table. More... | |
| void | highlightRows (const int &initRow, const int &finalRow) |
| Select all rows from initRow to finalRow. More... | |
| void | promote () |
| Promotes the highlighted rows. More... | |
| void | sortByColumns (const bool &asc) |
| Sort by the selected columns. More... | |
Signals | |
| void | deselectOIds (te::da::ObjectIdSet *) |
| void | selectOIds (te::da::ObjectIdSet *, const bool &) |
| Emmite when objects was selected. More... | |
Public Member Functions | |
| DataSetTableView (QWidget *parent=0) | |
| Constructor. More... | |
| void | highlightOIds (const te::da::ObjectIdSet *oids) |
| Highlights the objects identified by oids. More... | |
| void | setDataSet (te::da::DataSet *dset) |
| Updates the data set being visualized. More... | |
| void | setLayer (const te::map::AbstractLayer *layer) |
| Sets the layer to be presented. More... | |
| virtual void | setLayerSchema (const te::da::DataSetType *schema) |
| Sets the schema of the data set. It is used to define the primary keys and create the ObjectIdSet. More... | |
| virtual | ~DataSetTableView () |
| Virtual destructor. More... | |
Protected Member Functions | |
| void | removeSelection (const int &initRow, const int &finalRow) |
Protected Attributes | |
| bool | m_autoScrollEnabled |
| HighlightDelegate * | m_delegate |
| Delegate used for rendering selected rows. More... | |
| te::da::DataSet * | m_dset |
| Previously promoted. More... | |
| bool | m_isPromoted |
| Previously sorted. More... | |
| bool | m_isSorted |
| Auto scroll enabling. More... | |
| const te::map::AbstractLayer * | m_layer |
| Pointer to the layer being presented. More... | |
| DataSetTableModel * | m_model |
| The model to be used. More... | |
| TablePopupFilter * | m_popupFilter |
| The menus popup filter. More... | |
A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as its model.
Definition at line 71 of file DataSetTableView.h.
| te::qt::widgets::DataSetTableView::DataSetTableView | ( | QWidget * | parent = 0 | ) |
Constructor.
| parent | Qt widget parent. |
Definition at line 454 of file DataSetTableView.cpp.
References te::qt::widgets::DataSetTableModel::getPromoter(), highlightRow(), highlightRows(), m_delegate, m_model, m_popupFilter, te::qt::widgets::HighlightDelegate::setColor(), and te::qt::widgets::HighlightDelegate::setPromoter().
|
virtual |
Virtual destructor.
Definition at line 485 of file DataSetTableView.cpp.
|
slot |
Add column to the table.
Definition at line 712 of file DataSetTableView.cpp.
References GetDataSource(), te::qt::widgets::AddColumnDialog::getNewProperty(), te::qt::widgets::AddColumnDialog::setTableName(), and te::common::Exception::what().
|
signal |
|
slot |
Hides the column at position column.
| column | Column to be hidden. |
Definition at line 551 of file DataSetTableView.cpp.
| void te::qt::widgets::DataSetTableView::highlightOIds | ( | const te::da::ObjectIdSet * | oids | ) |
Highlights the objects identified by oids.
| oids | The identifiers of rows to be highlighted. |
Definition at line 537 of file DataSetTableView.cpp.
References te::da::ObjectIdSet::begin(), and te::da::ObjectIdSet::size().
|
slot |
Used to highlight the data when the mouse is clicked over a row in the table.
| row | Row to be highlighted. |
| add | True to add to selection, false to new selection. |
Definition at line 585 of file DataSetTableView.cpp.
References te::da::ObjectIdSet::begin().
Referenced by DataSetTableView().
|
slot |
Select all rows from initRow to finalRow.
| initRow | the begin row. |
| finalRow | the final row. |
Definition at line 612 of file DataSetTableView.cpp.
Referenced by DataSetTableView().
|
slot |
Promotes the highlighted rows.
The rows highlighted are presented in the begining of the table.
Definition at line 637 of file DataSetTableView.cpp.
|
slot |
Definition at line 758 of file DataSetTableView.cpp.
References GetDataSource(), and te::common::Exception::what().
|
protected |
Definition at line 793 of file DataSetTableView.cpp.
|
slot |
Shows columns in the original order.
Definition at line 570 of file DataSetTableView.cpp.
|
signal |
Emmite when objects was selected.
|
slot |
Enable / disable auto-scroll.
| enable | True for enable auto-scroll, false for disable it. |
Definition at line 787 of file DataSetTableView.cpp.
| void te::qt::widgets::DataSetTableView::setDataSet | ( | te::da::DataSet * | dset | ) |
Updates the data set being visualized.
Note that this DataSet MUST HAVE random access. The view DOES TAKE the ownership of the pointer.
| dset | The new data set to be visualized. |
Definition at line 508 of file DataSetTableView.cpp.
References GetGeometryColumnsPositions().
| void te::qt::widgets::DataSetTableView::setLayer | ( | const te::map::AbstractLayer * | layer | ) |
Sets the layer to be presented.
| layer | Pointer to the layer to be presented. |
Definition at line 489 of file DataSetTableView.cpp.
References GetCapabilities(), GetDataSource(), and te::common::RANDOM.
|
virtual |
Sets the schema of the data set. It is used to define the primary keys and create the ObjectIdSet.
| schema | The DataSetType to extract keys. |
Definition at line 524 of file DataSetTableView.cpp.
References te::da::GetEmptyOIDSet(), and te::da::ObjectIdSet::getPropertyPos().
|
slot |
Shows or hides the icon sinalizing the columns that identify each row.
| visible | True for icon visible, false otherwise. |
Definition at line 705 of file DataSetTableView.cpp.
|
slot |
Shows all hidden columns.
Definition at line 561 of file DataSetTableView.cpp.
|
slot |
Shows the hidden column.
| column | Column to be presented. |
Definition at line 556 of file DataSetTableView.cpp.
|
slot |
Sort by the selected columns.
Sort by the selected columns.
| asc | True for ascendent order, false for descendent. |
Definition at line 660 of file DataSetTableView.cpp.
References GetDataSet(), and te::common::Exception::what().
|
protected |
Definition at line 236 of file DataSetTableView.h.
|
protected |
Delegate used for rendering selected rows.
Definition at line 234 of file DataSetTableView.h.
Referenced by DataSetTableView().
|
protected |
Previously promoted.
Definition at line 239 of file DataSetTableView.h.
|
protected |
Previously sorted.
Definition at line 238 of file DataSetTableView.h.
|
protected |
Auto scroll enabling.
Definition at line 237 of file DataSetTableView.h.
|
protected |
Pointer to the layer being presented.
Definition at line 235 of file DataSetTableView.h.
|
protected |
The model to be used.
Definition at line 232 of file DataSetTableView.h.
Referenced by DataSetTableView().
|
protected |
The menus popup filter.
Definition at line 233 of file DataSetTableView.h.
Referenced by DataSetTableView().