24 #include "../../../dataaccess/dataset/ObjectIdSet.h"
25 #include "../../../dataaccess/dataset/ObjectId.h"
26 #include "../../../dataaccess/dataset/DataSet.h"
27 #include "../../../dataaccess/utils/Utils.h"
52 for(
size_t i=0; i<cols.size(); i++)
54 if(dset->
isNull(cols[i]) ==
false)
58 return (data.find(pkey) != data.end());
63 boost::ptr_vector<te::dt::AbstractData> data = oid->
getValue();
64 boost::ptr_vector<te::dt::AbstractData>::iterator it;
68 for(it=data.begin(); it!=data.end(); ++it)
69 pkey += it->toString() +
";";
76 std::set<std::string> res;
80 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::const_iterator it;
82 for(it=objs->
begin(); it!=objs->
end(); ++it)
90 QItemDelegate(parent),
107 QStyleOptionViewItem opt = option;
110 if(
ToHighlight(m_dset, m_objs->getPropertyPos(), m_oids, (int)m_promoter->getLogicalRow(index.row())))
112 opt.showDecorationSelected =
true;
113 opt.state |= QStyle::State_Selected;
114 opt.palette.setColor(QPalette::Highlight, m_color);
115 opt.palette.setColor(QPalette::HighlightedText, Qt::black);
118 QItemDelegate::paint(painter, opt, index);
148 m_objs = objs->
clone();
160 m_promoter = promoter;
TEDATAACCESSEXPORT ObjectId * GenerateOID(DataSet *dataset, const std::vector< std::string > &names)
std::set< std::string > GetOidsAsString(const te::da::ObjectIdSet *objs)
const boost::ptr_vector< te::dt::AbstractData > & getValue() const
It gets the properties values used to uniquely identify a data set element.
virtual bool move(std::size_t i)=0
It moves the dataset internal pointer to a given position.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
This class represents an unique id for a data set element.
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
bool ToHighlight(te::da::DataSet *dset, const te::da::ObjectIdSet *objs, const int &row)
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator end() const
Returns an iterator for the object ids in container.
bool contains(ObjectId *oid) const
It returns if the object id set contains the given oid.
A delegate for highlight the selected object ids.
const std::vector< std::string > & getPropertyNames() const
It returns the property names used to generated the oids.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator begin() const
Returns an iterator for the object ids in container.
ObjectIdSet * clone() const
std::string GetOidAsString(const te::da::ObjectId *oid)