A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as its model. More...
#include <DataSetTableView.h>
Public Member Functions | |
| DataSetTableView (QWidget *parent=0) | |
| Constructor. | |
| bool | getAcceptDrop () |
| Gets accept drop flag. | |
| bool | getDragDrop () |
| Gets the drag drop flag. | |
| te::map::AbstractLayer * | getLayer () |
| Gets selected layer. | |
| bool | hasEditions () const |
| Returns true if there are unsaved editions e false if there is not. | |
| void | highlightOIds (const te::da::ObjectIdSet *oids) |
| Highlights the objects identified by oids. | |
| void | setAcceptDrop (bool b) |
| Sets the drop on the horizontal header. | |
| void | setDataSet (te::da::DataSet *dset, const bool &clearEditor=true) |
| Updates the data set being visualized. | |
| void | setDragDrop (bool b) |
| Sets the drag drop on the horizontal header. When the drag drop is enabled, you lose the ability to swap columns. | |
| void | setHighlightColor (const QColor &color) |
| Update the color to be used. | |
| void | setLayer (te::map::AbstractLayer *layer, const bool &clearEditor=true, const bool &editable=true) |
| Sets the layer to be presented. | |
| 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. | |
| virtual | ~DataSetTableView () |
| Virtual destructor. | |
Table slot methods. | |
Methods to handle user interaction with table. | |
| DataSetTableModel * | m_model |
| The model to be used. | |
| TablePopupFilter * | m_popupFilter |
| The menus popup filter. | |
| HighlightDelegate * | m_delegate |
| Delegate used for rendering selected rows. | |
| te::map::AbstractLayer * | m_layer |
| Pointer to the layer being presented. | |
| std::unique_ptr< te::da::DataSourceTransactor > | m_transactor |
| Pointer to the transactor, to keep data while table is open. | |
| bool | m_autoPanEnabled |
| Auto pan enabling. | |
| bool | m_autoScrollEnabled |
| Auto scroll enabling. | |
| bool | m_doScroll |
| Flag to force or not scrolling. | |
| bool | m_promotionEnabled |
| Promotion enabled. | |
| te::da::DataSet * | m_dset |
| Data set being used. | |
| std::vector< std::string > | m_orderby |
| Order by columns. | |
| bool | m_orderAsc |
| Flag that sinalizes if the it is sorted in ascending sorting. | |
| bool | m_resetOrder |
| Flag that sinalizes if there's is no sort. | |
| void | createHistogram (const int &column) |
| Creates a new histogram based on the data at position column. | |
| void | createNormalDistribution (const int &column) |
| Creates a new chart that displays the normal distribution based on the data at position column. | |
| void | hideColumn (const int &column) |
| Hides the column at position column. | |
| void | showColumn (const int &column) |
| Shows the hidden column. | |
| void | renameColumn (const int &column) |
| Rename a column of the table. | |
| void | retypeColumn (const int &column) |
| Changes teh type of a column in the table. | |
| void | changeColumnData (const int &column) |
| Shows the change column data dialog. | |
| void | showAllColumns () |
| Shows all hidden columns. | |
| void | resetColumnsOrder () |
| Shows columns in the original order. | |
| void | highlightRow (const int &row, const bool &add) |
| Used to highlight the data when the mouse is clicked over a row in the table. | |
| void | highlightRows (const int &initRow, const int &finalRow) |
| Select all rows from initRow to finalRow. | |
| void | promote (const bool &scroll=false) |
| Promotes the highlighted rows. | |
| void | sortByColumns (const bool &asc, const int &col) |
| Sort by the selected columns. | |
| void | setOIdsColumnsVisible (const bool &visible) |
| Shows or hides the icon sinalizing the columns that identify each row. | |
| void | addColumn () |
| Add column to the table. | |
| void | removeColumn (const int &column) |
| void | setAutoPanEnabled (const bool &enable) |
| void | setAutoScrollEnabled (const bool &enable) |
| Enable / disable auto-scroll. | |
| void | setPromotionEnabled (const bool &enable) |
| Enable / disable promotion. | |
| void | saveEditions () |
| Saves all editions to the dataset. | |
| void | selectOIds (te::da::ObjectIdSet *, const bool &, te::gm::Envelope *) |
| Emmite when objects was selected. | |
| void | deselectOIds (te::da::ObjectIdSet *) |
| void | createChartDisplay (te::qt::widgets::ChartDisplayWidget *) |
| void | enableAutoPan (const bool &) |
| void | removeSelection (const int &initRow, const int &finalRow) |
A customized table view for te::map::AbstractLayer objects. Uses a te::qt::widgets::DataSetModel as its model.
Definition at line 84 of file DataSetTableView.h.
| te::qt::widgets::DataSetTableView::DataSetTableView | ( | QWidget * | parent = 0 | ) |
Constructor.
| parent | Qt widget parent. |
|
virtual |
Virtual destructor.
|
slot |
Add column to the table.
|
slot |
Shows the change column data dialog.
| column | Index of the column to be updated. |
|
signal |
|
slot |
Creates a new histogram based on the data at position column.
| column | Column that provides the data for the histogram. |
|
slot |
Creates a new chart that displays the normal distribution based on the data at position column.
| column | Column that provides the data used to calculate the normal distribution. |
|
signal |
|
signal |
| bool te::qt::widgets::DataSetTableView::getAcceptDrop | ( | ) |
Gets accept drop flag.
| bool te::qt::widgets::DataSetTableView::getDragDrop | ( | ) |
Gets the drag drop flag.
| te::map::AbstractLayer * te::qt::widgets::DataSetTableView::getLayer | ( | ) |
Gets selected layer.
| bool te::qt::widgets::DataSetTableView::hasEditions | ( | ) | const |
Returns true if there are unsaved editions e false if there is not.
|
slot |
Hides the column at position column.
| column | Column to be hidden. |
| 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. |
|
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. |
|
slot |
Select all rows from initRow to finalRow.
| initRow | the begin row. |
| finalRow | the final row. |
|
slot |
Promotes the highlighted rows.
The rows highlighted are presented in the begining of the table.
| If | true, scrolls to the top of the table. |
|
slot |
|
protected |
|
slot |
Rename a column of the table.
| column | Index of the column to be renamed. |
|
slot |
Shows columns in the original order.
|
slot |
Changes teh type of a column in the table.
| column | Index of the column to be changed. |
|
slot |
Saves all editions to the dataset.
|
signal |
Emmite when objects was selected.
| void te::qt::widgets::DataSetTableView::setAcceptDrop | ( | bool | b | ) |
Sets the drop on the horizontal header.
| b | True: accept drop. False: do not accept drop. |
|
slot |
|
slot |
Enable / disable auto-scroll.
| enable | True for enable auto-scroll, false for disable it. |
| void te::qt::widgets::DataSetTableView::setDataSet | ( | te::da::DataSet * | dset, |
| const bool & | clearEditor = true |
||
| ) |
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. |
| clearEditor | True for reset editions, false to maintain it. |
| void te::qt::widgets::DataSetTableView::setDragDrop | ( | bool | b | ) |
Sets the drag drop on the horizontal header. When the drag drop is enabled, you lose the ability to swap columns.
| b | True: does the drag drop. False: do not drag drop. |
| void te::qt::widgets::DataSetTableView::setHighlightColor | ( | const QColor & | color | ) |
Update the color to be used.
| color | The new color; |
| void te::qt::widgets::DataSetTableView::setLayer | ( | te::map::AbstractLayer * | layer, |
| const bool & | clearEditor = true, |
||
| const bool & | editable = true |
||
| ) |
Sets the layer to be presented.
| layer | Pointer to the layer to be presented. |
| clearEditor | True for reset editions, false to maintain it. |
| editable | True to allow layer editions. |
|
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. |
|
slot |
Shows or hides the icon sinalizing the columns that identify each row.
| visible | True for icon visible, false otherwise. |
|
slot |
Enable / disable promotion.
If enabled all selected rows will be moved to te top of the table.
| enable | True to enable promotion, false to disable it |
|
slot |
Shows all hidden columns.
|
slot |
Shows the hidden column.
| column | Column to be presented. |
|
slot |
Sort by the selected columns.
| asc | True for ascendent order, false for descendent. |
| col | Index of the column to used by sorting. |
|
protected |
Auto pan enabling.
Definition at line 361 of file DataSetTableView.h.
|
protected |
Auto scroll enabling.
Definition at line 362 of file DataSetTableView.h.
|
protected |
Delegate used for rendering selected rows.
Definition at line 358 of file DataSetTableView.h.
|
protected |
Flag to force or not scrolling.
Definition at line 363 of file DataSetTableView.h.
|
protected |
Data set being used.
Definition at line 365 of file DataSetTableView.h.
|
protected |
Pointer to the layer being presented.
Definition at line 359 of file DataSetTableView.h.
|
protected |
The model to be used.
Definition at line 356 of file DataSetTableView.h.
|
protected |
Flag that sinalizes if the it is sorted in ascending sorting.
Definition at line 367 of file DataSetTableView.h.
|
protected |
Order by columns.
Definition at line 366 of file DataSetTableView.h.
|
protected |
The menus popup filter.
Definition at line 357 of file DataSetTableView.h.
|
protected |
Promotion enabled.
Definition at line 364 of file DataSetTableView.h.
|
protected |
Flag that sinalizes if there's is no sort.
Definition at line 368 of file DataSetTableView.h.
|
protected |
Pointer to the transactor, to keep data while table is open.
Definition at line 360 of file DataSetTableView.h.