GeotriggerListModel Class

  • GeotriggerListModel
  • class Esri::ArcGISRuntime::GeotriggerListModel

    A list of Geotrigger conditions. More...

    Header: #include <GeotriggerListModel.h>
    Since: Esri::ArcGISRuntime 100.14
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.14.

    Public Types

    enum GeotriggerRoles { GeotriggerNameRole, GeotriggerIdRole, GeotriggerTypeRole, GeotriggerRequestedActionsRole }

    Public Functions

    virtual ~GeotriggerListModel() override
    void append(Esri::ArcGISRuntime::Geotrigger *geotrigger)
    void clear()
    bool contains(Esri::ArcGISRuntime::Geotrigger *geotrigger) const
    Esri::ArcGISRuntime::Geotrigger *first() const
    int indexOf(Esri::ArcGISRuntime::Geotrigger *geotrigger) const
    void insert(int index, Esri::ArcGISRuntime::Geotrigger *geotrigger)
    bool isEmpty() const
    Esri::ArcGISRuntime::Geotrigger *last() const
    void move(int from, int to)
    void removeAt(int index)
    void removeOne(Esri::ArcGISRuntime::Geotrigger *geotrigger)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::Geotrigger *at(int index) const override
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
    virtual int size() const override

    Signals

    void errorOccurred(Esri::ArcGISRuntime::Error error)
    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    The model returns data for the following roles:

    RoleTypeDescriptionGeotriggerRoles
    geotriggerNamestringThe geotrigger's name.GeotriggerNameRole
    geotriggerIdstringThe geotrigger's ID.GeotriggerIdRole
    geotriggerTypeGeotriggerTypeThe type of geotrigger.GeotriggerTypeRole
    geotriggerRequestedActionslist<string>The list of requested actions for the geotrigger.GeotriggerRequestedActionsRole

    Member Type Documentation

    enum GeotriggerListModel::GeotriggerRoles

    This enum specifies the custom roles which can be used with GeotriggerListModel::data.

    ConstantValueDescription
    Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerNameRoleQt::UserRole + 1The geotriggers's name.
    Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerIdRoleQt::UserRole + 2The geotriggers's ID.
    Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerTypeRoleQt::UserRole + 3The type of the geotrigger.
    Esri::ArcGISRuntime::GeotriggerListModel::GeotriggerRequestedActionsRoleQt::UserRole + 4The list of requested actions for the geotrigger.

    Member Function Documentation

    [signal] void GeotriggerListModel::errorOccurred(Esri::ArcGISRuntime::Error error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    [signal] void GeotriggerListModel::itemAdded(int index)

    Signal emitted when an item is added to the list model.

    • index - The index of the added item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [signal] void GeotriggerListModel::itemRemoved(int index)

    Signal emitted when an item is removed from the list model.

    • index - The index of the removed item.

    This function was introduced in Esri::ArcGISRuntime 100.15.

    [override virtual] GeotriggerListModel::~GeotriggerListModel()

    Destructor.

    void GeotriggerListModel::append(Esri::ArcGISRuntime::Geotrigger *geotrigger)

    Appends a geotrigger to the geotrigger list model.

    [override virtual] Esri::ArcGISRuntime::Geotrigger *GeotriggerListModel::at(int index) const

    Returns the geotrigger at the specified index.

    void GeotriggerListModel::clear()

    Removes all geotriggers from the list model.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    bool GeotriggerListModel::contains(Esri::ArcGISRuntime::Geotrigger *geotrigger) const

    Returns true if the list model contains the specified geotrigger.

    [override virtual] QVariant GeotriggerListModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const

    Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

    Returns the data stored under the given role for the geotrigger referenced by the index.

    • index. The index in the model for which to return data.
    • role. The role for which to return data.

    Returns an empty value if the specified index is out-of-range.

    Esri::ArcGISRuntime::Geotrigger *GeotriggerListModel::first() const

    Returns the first geotrigger in the list model.

    int GeotriggerListModel::indexOf(Esri::ArcGISRuntime::Geotrigger *geotrigger) const

    Returns the index of the geotrigger specified.

    void GeotriggerListModel::insert(int index, Esri::ArcGISRuntime::Geotrigger *geotrigger)

    Inserts a geotrigger at a specified index in the list model.

    This method appends the geotrigger to the list if the index is greater than the current list model size.

    bool GeotriggerListModel::isEmpty() const

    Returns true if the list model contains no geotriggers.

    Esri::ArcGISRuntime::Geotrigger *GeotriggerListModel::last() const

    Returns the last geotrigger in the list model.

    void GeotriggerListModel::move(int from, int to)

    Moves one geotrigger from an index in the list model to a different index.

    void GeotriggerListModel::removeAt(int index)

    Removes a geotrigger at the specified index.

    No geotriggers are removed if the specified index is out-of-range.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    void GeotriggerListModel::removeOne(Esri::ArcGISRuntime::Geotrigger *geotrigger)

    Removes the specified geotrigger from the list model.

    List models do not take ownership of the objects they contain. Therefore, removing or clearing objects from the list model will not delete those objects. An RAII technique should be used to ensure that memory is properly deallocated.

    [override virtual] int GeotriggerListModel::size() const

    Returns the number of geotriggers contained in the list model.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.