A mutable collection of parts for creating a Multipart geometry from a MultipartBuilder. More...
Header: | #include <PartCollection.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Iterable |
Public Functions
PartCollection(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr) | |
virtual | ~PartCollection() override |
int | addPart(Esri::ArcGISRuntime::Part *part) |
void | addParts(const QList<Esri::ArcGISRuntime::Part *> &parts) |
int | indexOf(Esri::ArcGISRuntime::Part *part) const |
void | insertPart(int index, Esri::ArcGISRuntime::Part *part) |
bool | isEmpty() const |
Esri::ArcGISRuntime::Part * | part(int index) const |
void | removeAll() |
void | removePart(int index) |
void | setPart(int index, Esri::ArcGISRuntime::Part *part) |
Esri::ArcGISRuntime::SpatialReference | spatialReference() const |
Reimplemented Public Functions
virtual int | size() const override |
Detailed Description
Parts can be added to, inserted into, and removed from PartCollections in order to define or change the complete shape of a Multipart (for example a Polygon or Polyline).
Member Function Documentation
[explicit]
PartCollection::PartCollection (const Esri::ArcGISRuntime::SpatialReference &spatialReference , QObject *parent = nullptr)
Constructor that takes a SpatialReference spatialReference and an optional parent.
[override virtual]
PartCollection::~PartCollection ()
Destructor.
int PartCollection::addPart (Esri::ArcGISRuntime::Part *part)
Adds a new Part part to the collection.
Returns -1
on error.
[since Esri::ArcGISRuntime 100.1]
void PartCollection::addParts (const QList<Esri::ArcGISRuntime::Part *> &parts)
Adds new Parts parts to the collection.
This function was introduced in Esri::ArcGISRuntime 100.1.
int PartCollection::indexOf (Esri::ArcGISRuntime::Part *part) const
Gets the index of a part in the collection.
Returns -1
if the part is not found.
void PartCollection::insertPart (int index, Esri::ArcGISRuntime::Part *part)
Inserts part at index.
bool PartCollection::isEmpty () const
Gets whether this PartCollection is empty.
Returns true
if this PartCollection contains no parts.
Esri::ArcGISRuntime::Part *PartCollection::part(int index) const
Gets the part at index.
Returns an empty Part on error.
See also setPart().
void PartCollection::removeAll ()
Removes all the parts from this PartCollection.
void PartCollection::removePart (int index)
Removes the part at index.
void PartCollection::setPart (int index, Esri::ArcGISRuntime::Part *part)
Reassigns the part at index to part.
See also part().
[override virtual]
int PartCollection::size() const
Gets the number of parts in this PartCollection.
Returns the number of parts.
Esri::ArcGISRuntime::SpatialReference PartCollection::spatialReference () const
Gets the spatial reference.