13 #include "../charts/HistogramDataWidget.h"
14 #include "../charts/Utils.h"
15 #include "../utils/ScopedCursor.h"
16 #include "../Config.h"
17 #include "../Exception.h"
18 #include "../../../common/Exception.h"
19 #include "../../../dataaccess/dataset/DataSet.h"
20 #include "../../../dataaccess/dataset/ObjectId.h"
21 #include "../../../dataaccess/dataset/ObjectIdSet.h"
22 #include "../../../dataaccess/dataset/DataSetTypeCapabilities.h"
23 #include "../../../dataaccess/datasource/DataSourceManager.h"
24 #include "../../../dataaccess/datasource/DataSourceTransactor.h"
25 #include "../../../dataaccess/query/DataSetName.h"
26 #include "../../../dataaccess/query/Field.h"
27 #include "../../../dataaccess/query/From.h"
28 #include "../../../dataaccess/query/OrderBy.h"
29 #include "../../../dataaccess/query/OrderByItem.h"
30 #include "../../../dataaccess/query/Select.h"
31 #include "../../../dataaccess/utils/Utils.h"
32 #include "../../../geometry/Geometry.h"
33 #include "../../../maptools/DataSetLayer.h"
34 #include "../../../maptools/DataSetAdapterLayer.h"
35 #include "../../../maptools/QueryLayer.h"
36 #include "../../../statistics/qt/StatisticsDialog.h"
37 #include "../../../st/maptools/ObservationDataSetLayer.h"
38 #include "../../../st/maptools/TimeSeriesDataSetLayer.h"
39 #include "../../../st/maptools/TrajectoryDataSetLayer.h"
43 #include <QContextMenuEvent>
45 #include <QDialogButtonBox>
46 #include <QHeaderView>
49 #include <QMessageBox>
69 for(
size_t i=0; i<nProps; i++)
71 cols.push_back((
int)i);
82 for (
int i=0; i<sz; i++)
93 std::vector<int>::iterator it;
95 QMenu* mnu =
new QMenu(hMnu);
96 mnu->setTitle(QObject::tr(
"Show hidden column"));
99 mnu->setEnabled(
false);
101 for(it=hSecs.begin(); it!=hSecs.end(); ++it)
103 QString cName = hView->model()->headerData(*it, Qt::Horizontal, Qt::DisplayRole).toString();
104 QAction* act =
new QAction(mnu);
107 act->setData(QVariant(*it));
109 QString tt = QObject::tr(
"Turns column \"%1\" visible.").arg(cName);
121 QAction* act =
new QAction(hMnu);
122 act->setText(QObject::tr(
"Show all columns"));
133 if(layer->
getType() ==
"DATASETLAYER")
140 else if(layer->
getType() ==
"DATASETADAPTERLAYER")
147 else if(layer->
getType() ==
"QUERYLAYER")
154 else if(layer->
getType() ==
"OBSERVATIONDATASETLAYER")
161 else if(layer->
getType() ==
"TIMESERIESDATASETLAYER")
168 else if(layer->
getType() ==
"TRAJECTORYDATASETLAYER")
194 std::auto_ptr<te::da::Select>
GetSelectExpression(
const std::string& datasetName,
const std::vector<std::string>& colsNames,
const bool& asc)
198 fields.push_back(std::auto_ptr<te::da::Field>(
new te::da::Field(
"*")));
206 for(
size_t i=0; i<colsNames.size(); i++)
209 return std::auto_ptr<te::da::Select>(
new te::da::Select(fields, from, order_by));
214 std::vector<std::string> colsNames;
216 for(
size_t i = 0; i < cols.size(); ++i)
229 throw std::string(
"Fail to generate query.");
234 throw std::string(
"Fail to get data source.");
240 return std::auto_ptr<te::da::DataSet>();
246 std::auto_ptr<te::da::Select> query;
248 if(layer->
getType() ==
"DATASETLAYER")
255 else if(layer->
getType() ==
"DATASETADAPTERLAYER")
262 else if(layer->
getType() ==
"QUERYLAYER")
269 else if(layer->
getType() ==
"OBSERVATIONDATASETLAYER")
276 else if(layer->
getType() ==
"TIMESERIESDATASETLAYER")
283 else if(layer->
getType() ==
"TRAJECTORYDATASETLAYER")
294 throw std::string(
"Fail to generate query.");
299 throw std::string(
"Fail to get data source.");
305 return std::auto_ptr<te::da::DataSet>();
311 std::vector<QString> res;
317 for(
size_t i=0; i<n; i++)
328 std::vector<int> geoCols;
338 size_t pos = (size_t)geoCols[0];
340 std::auto_ptr<te::gm::Geometry> g = dset->
getGeometry(pos);
342 return std::auto_ptr<te::gm::Envelope> (
new te::gm::Envelope(*g->getMBR()));
345 return std::auto_ptr<te::gm::Envelope>();
361 std::vector<size_t>::iterator it;
363 for(it = cols.begin(); it != cols.end(); ++it)
364 if((
size_t)col == *it)
374 std::vector<int> geoCols;
375 std::vector<int>::iterator it;
378 for(it = geoCols.begin(); it != geoCols.end(); ++it)
389 for(std::size_t i = 0; i < nProps; ++i)
419 m_view->horizontalHeader()->installEventFilter(
this);
420 m_view->verticalHeader()->installEventFilter(
this);
421 m_view->viewport()->installEventFilter(
this);
429 m_view->connect(
this, SIGNAL(
sortData(
const bool&)), SLOT(sortByColumns(
const bool&)));
450 return QObject::eventFilter(watched, event);
452 QWidget* vport =
m_view->viewport();
453 QHeaderView* hHdr =
m_view->horizontalHeader();
454 QHeaderView* vHdr =
m_view->verticalHeader();
456 switch(event->type())
458 case QEvent::ContextMenu:
465 QContextMenuEvent* evt =
static_cast<QContextMenuEvent*
>(event);
466 QPoint pos = evt->globalPos();
468 m_columnPressed = hHdr->logicalIndex(hHdr->visualIndexAt(evt->pos().x()));
475 QAction* act =
new QAction(
m_hMenu);
476 act->setText(tr(
"Hide column"));
477 act->setToolTip(tr(
"Hides the selected column."));
484 act->setEnabled(
false);
486 m_hMenu->addAction(hMnu->menuAction());
491 QAction* act3 =
new QAction(
m_hMenu);
492 act3->setText(tr(
"Reset columns order"));
493 act3->setToolTip(tr(
"Put all columns in the original order."));
498 QAction* act5 =
new QAction(
m_hMenu);
499 act5->setText(tr(
"Sort data ASC"));
500 act5->setToolTip(tr(
"Sort data in ascendent order using selected columns."));
503 QAction* act9 =
new QAction(
m_hMenu);
504 act9->setText(tr(
"Sort data DESC"));
505 act9->setToolTip(tr(
"Sort data in descendent order using selected columns."));
510 QAction* act4 =
new QAction(
m_hMenu);
511 act4->setText(tr(
"Histogram"));
512 act4->setToolTip(tr(
"Creates a new histogram based on the data of the selected colunm."));
515 QAction* act10 =
new QAction(
m_hMenu);
516 act10->setText(tr(
"Normal Probability"));
517 act10->setToolTip(tr(
"Show a chart that displays the normal probability curve."));
520 QAction* act6 =
new QAction(
m_hMenu);
521 act6->setText(tr(
"Statistics"));
522 act6->setToolTip(tr(
"Show the statistics summary of the selected colunm."));
528 connect(act, SIGNAL(triggered()), SLOT(
hideColumn()));
529 connect(hMnu, SIGNAL(triggered(QAction*)), SLOT(
showColumn(QAction*)));
533 m_view->connect(act2, SIGNAL(triggered()), SLOT(showAllColumns()));
534 m_view->connect(act3, SIGNAL(triggered()), SLOT(resetColumnsOrder()));
538 connect(act5, SIGNAL(triggered()), SLOT(
sortDataAsc()));
539 connect(act9, SIGNAL(triggered()), SLOT(
sortDataDesc()));
544 QAction* act7 =
new QAction(
m_hMenu);
545 act7->setText(tr(
"Add column"));
546 act7->setToolTip(tr(
"Adds a column to the table."));
548 act7->setEnabled(
m_caps->supportsAddColumn());
550 QAction* act8 =
new QAction(
m_hMenu);
551 act8->setText(tr(
"Remove column"));
552 act8->setToolTip(tr(
"Removes a column from the table."));
554 act8->setEnabled(
m_caps->supportsRemoveColumn());
556 QAction* act10 =
new QAction(
m_hMenu);
557 act10->setText(tr(
"Rename column"));
558 act10->setToolTip(tr(
"Renames a column of the table."));
561 QAction* act11 =
new QAction(
m_hMenu);
562 act11->setText(tr(
"Change column type"));
563 act11->setToolTip(tr(
"Changes the type of a column of the table."));
566 QAction* act12 =
new QAction(
m_hMenu);
567 act12->setText(tr(
"Change column data"));
568 act12->setToolTip(tr(
"Changes the data of a column of the table."));
571 QAction* act13 =
new QAction(
m_hMenu);
572 act13->setText(tr(
"Save editions"));
573 act13->setToolTip(tr(
"Save pendent editions to layer."));
577 m_view->connect(act7, SIGNAL(triggered()), SLOT(addColumn()));
579 connect(act8, SIGNAL(triggered()), SLOT(
removeColumn()));
580 connect (act10, SIGNAL(triggered()), SLOT(
renameColumn()));
581 connect (act11, SIGNAL(triggered()), SLOT(
retypeColumn()));
583 connect (act13, SIGNAL(triggered()), SIGNAL(
saveEditions()));
589 else if(watched == vport)
592 else if(watched == vHdr)
596 QContextMenuEvent* evt =
static_cast<QContextMenuEvent*
>(event);
597 QPoint pos = evt->globalPos();
600 QAction* act =
new QAction(
m_vMenu);
601 act->setText(tr(
"Enable auto scroll"));
602 act->setToolTip(tr(
"Goes to the selected row."));
604 act->setCheckable(
true);
612 act->setText(tr(
"Enable promotion"));
613 act->setToolTip(tr(
"Enables promotion of selected rows."));
615 act->setCheckable(
true);
633 return QObject::eventFilter(watched, event);
680 int column = act->data().toInt();
690 statisticDialog.exec();
774 std::auto_ptr<te::da::DataSetTypeCapabilities>
m_caps;
785 m_autoScrollEnabled(false),
787 m_promotionEnabled(false),
798 #if QT_VERSION >= 0x050000
799 horizontalHeader()->setSectionsMovable(
true);
801 horizontalHeader()->setMovable(
true);
804 setSelectionMode(QAbstractItemView::MultiSelection);
805 setSelectionBehavior(QAbstractItemView::SelectColumns);
817 connect(verticalHeader(), SIGNAL(selectedRow(
const int&,
const bool&)), SLOT(
highlightRow(
const int&,
const bool&)));
818 connect(verticalHeader(), SIGNAL(selectedRows(
const int&,
const int&)), SLOT(
highlightRows(
const int&,
const int&)));
823 if (m_model->hasEditions())
825 QMessageBox msgBox(
this);
826 msgBox.setText(
"There are unsaved changes on table.");
827 msgBox.setInformativeText(
"Do you want to save your changes?");
831 int ret = msgBox.exec();
870 std::auto_ptr<te::map::LayerSchema> sch = m_layer->getSchema();
872 if (m_orderby.empty())
874 std::vector<te::dt::Property*> psps;
876 if(sch->getPrimaryKey())
877 psps = sch->getPrimaryKey()->getProperties();
879 psps = sch->getProperties();
881 std::vector<te::dt::Property*>::iterator it;
883 for(it = psps.begin(); it != psps.end(); ++it)
884 m_orderby.push_back((*it)->getName());
889 setDataSet(
GetDataSet(m_layer, m_orderby, m_orderAsc).release(), dsc->getEncoding(), clearEditor);
890 setLayerSchema(sch.get());
894 m_popupFilter->setDataSetTypeCapabilities(caps);
897 m_model->setEditable(caps->supportsDataEdition());
901 setSelectionMode((dsc->getType().compare(
"OGR") == 0) ? SingleSelection : MultiSelection);
902 setSelectionBehavior((dsc->getType().compare(
"OGR") == 0) ? QAbstractItemView::SelectColumns : QAbstractItemView::SelectItems);
905 highlightOIds(m_layer->getSelected());
914 m_model->setDataSet(dset, enc, clearEditor);
921 m_popupFilter->setDataSet(dset);
922 m_delegate->setDataSet(dset);
932 std::auto_ptr<te::da::ObjectIdSet> objs_ptr(objs);
934 m_delegate->setObjectIdSet(objs_ptr.get());
936 m_model->setPkeysColumns(objs_ptr->getPropertyPos());
938 m_model->getPromoter()->preProcessKeys(m_dset, objs_ptr->getPropertyPos());
946 m_delegate->setObjectIdSet(oids);
948 if(m_autoScrollEnabled && oids != 0 && oids->
size() > 0)
950 size_t row = m_model->getPromoter()->map2Row(*oids->
begin());
952 scrollTo(m_model->index((
int)row, 0));
955 if(m_promotionEnabled)
958 viewport()->repaint();
963 m_delegate->setColor(color);
970 return m_model->hasEditions();
975 QDialog* dialog =
new QDialog(
this);
976 dialog->setFixedSize(160, 75);
988 QGridLayout* layout =
new QGridLayout(dialog);
989 layout->addWidget(histogramWidget);
991 QDialogButtonBox* bbox =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, dialog);
992 connect(bbox, SIGNAL(accepted()), dialog, SLOT(accept()));
993 connect(bbox, SIGNAL(rejected()), dialog, SLOT(reject()));
995 layout->addWidget(bbox);
996 layout->setSizeConstraint(QLayout::SetFixedSize);
998 int res = dialog->exec();
999 if (res == QDialog::Accepted)
1007 int propType = m_layer->getData()->getPropertyDataType(column);
1014 QString msgErr(tr(
"This operation is not available for this type of data"));
1015 QString msgTitle(tr(
"TNormal Probability"));
1016 QMessageBox::warning(
this, msgTitle, msgErr);
1022 horizontalHeader()->hideSection(column);
1027 horizontalHeader()->showSection(column);
1034 dlg.
setOldColumnName(QString::fromStdString(m_dset->getPropertyName(column)));
1036 if(dlg.exec() == QDialog::Accepted)
1038 std::string oldName = dlg.
getOldName().toStdString();
1039 std::string newName = dlg.
getNewName().toStdString();
1043 throw Exception(tr(
"Fail to get data source.").toStdString());
1045 if(!dsrc->isPropertyNameValid(newName))
1047 QMessageBox::warning(
this, tr(
"TerraView"), tr(
"Invalid column name. Choose another."));
1053 dsrc->renameProperty(m_layer->getSchema()->getName(), oldName, newName);
1057 QMessageBox::information(
this, tr(
"Rename Column"), tr(
"The column could not be renamed: ") + e.
what());
1060 m_layer->setOutOfDate();
1070 std::auto_ptr<te::da::DataSetType> schema = m_layer->getSchema();
1072 std::string dsetName = schema->
getName();
1073 std::string columnName;
1075 prp = schema->getProperty(column);
1078 throw Exception(tr(
"Fail to get property of the dataset.").toStdString());
1086 if(dlg.exec() == QDialog::Accepted)
1091 throw Exception(tr(
"Fail to get data source.").toStdString());
1095 dsrc->changePropertyDefinition(dsetName, columnName, dlg.
getProperty().release());
1097 m_layer->setOutOfDate();
1105 if(m_dset == 0 || m_layer == 0)
1108 std::auto_ptr<te::da::DataSetType> schema = m_layer->getSchema();
1109 std::string dsetName = schema->getName();
1110 std::string columnName = schema->getProperty(column)->getName();
1117 if(dlg.exec() == QDialog::Accepted)
1122 throw Exception(tr(
"Fail to get data source.").toStdString());
1127 sql =
"UPDATE " + dsetName +
" SET " + columnName +
" = " + dlg.
getExpression().toStdString();
1133 m_layer->setOutOfDate();
1139 QMessageBox::information(
this, tr(
"Updating data failure"), e.
what());
1143 QMessageBox::information(
this, tr(
"Updating data failure"), tr(
"Data source operation fail for unknown reason."));
1150 std::vector<int> hCols = m_popupFilter->getHiddenColumns();
1151 std::vector<int>::iterator it;
1153 for (it=hCols.begin(); it!=hCols.end(); ++it)
1154 horizontalHeader()->showSection(*it);
1159 QHeaderView* hdr = horizontalHeader();
1161 int nCols = hdr->count();
1163 for(
int i=0; i<nCols; i++)
1165 int visCol = hdr->visualIndex(i);
1168 hdr->moveSection(visCol, i);
1180 if(m_delegate->getSelected()->contains(oid))
1182 emit deselectOIds(oids);
1186 m_delegate->setObjectIdSet(m_layer->getSelected());
1188 if(m_promotionEnabled)
1191 viewport()->repaint();
1199 emit selectOIds(oids, add,
GetExtent(m_dset, m_model->getPromoter(), row).
get());
1201 if(m_promotionEnabled)
1204 viewport()->repaint();
1214 if(initRow < finalRow)
1229 emit selectOIds(oids,
true,
GetExtent(m_dset, m_model->getPromoter(),
final).
get());
1231 if(m_promotionEnabled)
1234 viewport()->repaint();
1244 m_model->setEnabled(
false);
1245 m_popupFilter->setEnabled(
false);
1248 m_model->promote(oids);
1250 m_popupFilter->setEnabled(
true);
1251 m_model->setEnabled(
true);
1254 viewport()->repaint();
1269 std::vector<int> selCols;
1273 int nCols = model()->columnCount();
1275 for(
int i=0; i<nCols; i++)
1277 int logRow = horizontalHeader()->logicalIndex(i);
1278 if(selectionModel()->isColumnSelected(logRow, QModelIndex()))
1280 m_orderby.push_back(m_dset->getPropertyName((
size_t)logRow));
1281 selCols.push_back(logRow);
1288 std::auto_ptr<te::da::DataSet> dset =
GetDataSet(m_layer, m_orderby, asc);
1291 throw te::common::Exception(tr(
"Sort operation not supported by the source of data.").toStdString());
1293 setDataSet(dset.release(), m_encoding);
1295 viewport()->repaint();
1297 setUpdatesEnabled(
false);
1299 m_model->getPromoter()->preProcessKeys(m_dset, m_delegate->getSelected()->getPropertyPos());
1301 setUpdatesEnabled(
true);
1303 if(m_promotionEnabled)
1308 QMessageBox::information(
this, tr(
"Sorting columns failure"), tr(
"Could not sort data: ") + e.
what());
1314 m_model->showOIdsVisible(visible);
1316 horizontalHeader()->viewport()->repaint();
1328 std::auto_ptr<te::da::DataSetType> ds_t = m_layer->getSchema();
1330 std::string dsName = ds_t->getName();
1331 size_t n_prop = ds_t->getProperties().size();
1334 if(dlg.exec() == QDialog::Accepted)
1343 if(p->getName().empty())
1346 if(!ds->isPropertyNameValid(p->getName()))
1349 if(ds->propertyExists(dsName, p->getName()))
1352 ds->addProperty(dsName, p.get());
1354 if(ds->getType().compare(
"OGR") == 0)
1355 m_model->insertColumns(((
int)n_prop-1), 0);
1357 m_layer->setOutOfDate();
1359 setLayer(m_layer,
false);
1364 QMessageBox::information(
this, tr(
"Creating column failure"), tr(
"The column could not be created: ") + e.
what());
1372 if(QMessageBox::question(
this, tr(
"Remove column"), tr(
"Are you sure you want to remove this column?"), QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
1379 std::auto_ptr<te::da::DataSetType> ds_t = m_layer->getSchema();
1380 std::string dsName = ds_t->getName();
1382 std::string pName = ds_t->getProperty(column)->getName();
1384 ds->dropProperty(dsName, pName);
1386 m_model->removeColumns(column, 0);
1388 m_layer->setOutOfDate();
1390 setLayer(m_layer,
false);
1395 QMessageBox::information(
this, tr(
"Removing column failure"), tr(
"The column could not be removed: ") + e.
what());
1401 m_autoScrollEnabled = enable;
1406 m_promotionEnabled = enable;
1408 if(m_promotionEnabled)
1411 m_popupFilter->setPromotionEnabled(m_promotionEnabled);
1416 QItemSelection toRemove;
1418 for(
int i=initRow; i<=finalRow; i++)
1420 QModelIndexList idx = selectionModel()->selectedColumns(i);
1423 toRemove.select(idx.first(), idx.last());
1426 selectionModel()->select(toRemove, QItemSelectionModel::Deselect);
1435 std::vector< std::set<int> > ed;
1437 std::auto_ptr<te::map::LayerSchema> sch = m_layer->getSchema();
1439 std::auto_ptr<te::da::DataSet> md = m_model->getEditions(sch.get(), ed);
1450 std::auto_ptr<te::da::ObjectIdSet> objs1(objs);
1452 ds->update(sch->getName(), md.get(), ed, objs1->getPropertyPos());
1458 QMessageBox::warning(
this, tr(
"Save edition failure"), e.
what());
1462 #include "DataSetTableView.moc"
virtual const std::string & getType() const =0
It returns the layer type.
A Qt dialog for reset data of a column in the table.
bool IsGeometryColumn(te::da::DataSet *dset, const size_t &col)
std::vector< QString > GetColumnsNames(te::da::DataSet *dset)
const std::string & getDataSetName() const
const std::string & getDataSourceId() const
A class that informs what kind of constraint and index is supported by a given data source...
te::da::DataSetTypeCapabilities * GetCapabilities(const te::map::AbstractLayer *layer)
The Field class can be used to model an expression that takes part of the output items of a SELECT...
TEDATAACCESSEXPORT void GetEmptyOIDSet(const DataSetType *type, ObjectIdSet *&set)
Returns an empty ObjectIdSet, with the definitions of fields that compose it.
A layer with reference to a dataset that contains trajectories.
std::vector< int > GetHiddenSections(QHeaderView *hView, te::da::DataSet *dset)
A Qt dialog for renaming columns into a table.
A model based on te::da::DataSet.
CharEncoding
Supported charsets (character encoding).
A layer with reference to a dataset that contains observations.
This is the base class for layers.
A class that models the name of a dataset used in a From clause.
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
void setStatistics(te::da::DataSet *dataSet, const std::string prop)
virtual const char * what() const
It outputs the exception message.
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause.
A layer resulting from a query.
It models a property definition.
virtual bool move(std::size_t i)=0
It moves the dataset internal pointer to a given position.
void HideGeometryColumns(te::da::DataSet *dset, te::qt::widgets::DataSetTableView *view)
te::da::DataSourcePtr GetDataSource(const te::map::AbstractLayer *layer)
std::auto_ptr< te::da::DataSet > GetDataSet(const te::map::AbstractLayer *layer, const te::da::DataSet *set, const std::vector< int > &cols, const bool &asc)
A layer with reference to a DataSetTypeConverter.
A table view for a dataset.
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
An Envelope defines a 2D rectangular region.
const std::string & getDataSourceId() const
This class represents a set of unique ids created in the same context. i.e. from the same data set...
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
A Qt dialog for inserting columns into a table.
This class represents an unique id for a data set element.
std::size_t size() const
It returns the object id set size.
void GetGeometryColumnsPositions(te::da::DataSet *dset, std::vector< int > &cols)
const std::string & getDataSourceId() const
TEDATAACCESSEXPORT void Save(const std::string &fileName)
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
const std::string & getDataSourceId() const
bool IsPrimaryKey(const int &col, te::qt::widgets::DataSetTableView *view)
const std::string & getDataSourceId() const
te::da::Select * getQuery() const
QAction * GetShowAllMenu(QHeaderView *hView, te::da::DataSet *dset, QMenu *hMnu)
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
A Select models a query to be used when retrieving data from a DataSource.
virtual std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
const std::string & getDataSourceId() const
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
int getType() const
It returns the property data type.
A dataset is the unit of information manipulated by the data access module of TerraLib.
void HideTsVectorColumn(te::da::DataSet *dset, te::qt::widgets::DataSetTableView *view)
std::auto_ptr< te::gm::Envelope > GetExtent(te::da::DataSet *dset, te::qt::widgets::Promoter *p, const int &rowPosition)
A layer with reference to a dataset that contains trajectories.
std::auto_ptr< te::da::Select > GetSelectExpression(const std::string &datasetName, const std::vector< std::string > &colsNames, const bool &asc)
A delegate for highlight the selected object ids.
const std::vector< std::size_t > & getPropertyPos() const
It returns the property positions used to generated the oids.
A layer with reference to a dataset.
QMenu * GetHiddenColumnsMenu(QHeaderView *hView, te::da::DataSet *dset, QMenu *hMnu)
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator begin() const
Returns an iterator for the object ids in container.
virtual std::auto_ptr< LayerSchema > getSchema() const =0
It returns the layer schema.
const std::string & getName() const
It returns the property name.