LabelStackSeparatorListModel Class

  • LabelStackSeparatorListModel
  • class Esri::ArcGISRuntime::LabelStackSeparatorListModel

    A list model storing a list of stack separator options available in a label. More...

    Header: #include <LabelStackSeparatorListModel.h>
    Since: Esri::ArcGISRuntime 100.11
    Inherits: QAbstractListModel and Esri::ArcGISRuntime::Iterable

    Public Types

    enum LabelStackSeparatorRoles { LabelStackSeparatorBreakPositionRole, LabelStackSeparatorForcedRole, LabelStackSeparatorSeparatorRole, LabelStackSeparatorVisibleRole }

    Public Functions

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

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::LabelStackSeparator *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(const Esri::ArcGISRuntime::Error &error)
    void itemAdded(int index)
    void itemRemoved(int index)

    Detailed Description

    The model returns data for the following roles:

    RoleTypeDescriptionLabelStackSeparatorRoles
    LabelStackSeparatorBreakPositionRoleLabelStackSeparatorBreakPositionThe position where the separator will be written, if used and remaining visible.LabelStackSeparatorBreakPositionRole
    LabelStackSeparatorForcedRoleboolWhether a line break must be inserted when the separator is encountered.LabelStackSeparatorForcedRole
    LabelStackSeparatorSeparatorRoleStringA QString intended to describe one code point.LabelStackSeparatorSeparatorRole
    LabelStackSeparatorVisibleRoleboolWhether the separator should still be visible, if chosen as a line break position.LabelStackSeparatorVisibleRole

    Member Type Documentation

    enum LabelStackSeparatorListModel::LabelStackSeparatorRoles

    This enum specifies the custom roles that can be used with LabelStackSeparatorListModel::data.

    ConstantValueDescription
    Esri::ArcGISRuntime::LabelStackSeparatorListModel::LabelStackSeparatorBreakPositionRoleQt::UserRole +1The position where the separator will be written, if used and remaining visible.
    Esri::ArcGISRuntime::LabelStackSeparatorListModel::LabelStackSeparatorForcedRoleQt::UserRole +2Whether a line break must be inserted when the separator is encountered.
    Esri::ArcGISRuntime::LabelStackSeparatorListModel::LabelStackSeparatorSeparatorRoleQt::UserRole +3A QString intended to describe one code point.
    Esri::ArcGISRuntime::LabelStackSeparatorListModel::LabelStackSeparatorVisibleRoleQt::UserRole + 4Whether the separator should still be visible, if chosen as a line break position.

    Member Function Documentation

    [override virtual] LabelStackSeparatorListModel::~LabelStackSeparatorListModel()

    Destructor.

    void LabelStackSeparatorListModel::append(Esri::ArcGISRuntime::LabelStackSeparator *labelStackSeparator)

    Appends an labelStackSeparator to the label stack separator list model.

    [override virtual] Esri::ArcGISRuntime::LabelStackSeparator *LabelStackSeparatorListModel::at(int index) const

    Returns the label stack separator at the specified index.

    void LabelStackSeparatorListModel::clear()

    Removes all label stack separators 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 LabelStackSeparatorListModel::contains(Esri::ArcGISRuntime::LabelStackSeparator *labelStackSeparator) const

    Returns true if the list model contains the specified labelStackSeparator.

    [override virtual] QVariant LabelStackSeparatorListModel::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 label stack separator referred to by the index.

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

    An empty value is returned if the specified index is out of range.

    [signal] void LabelStackSeparatorListModel::errorOccurred(const Esri::ArcGISRuntime::Error &error)

    Signal emitted when an error occurs.

    • error - Details about the error.

    Esri::ArcGISRuntime::LabelStackSeparator *LabelStackSeparatorListModel::first() const

    Returns the first label stack separator in the list model.

    int LabelStackSeparatorListModel::indexOf(Esri::ArcGISRuntime::LabelStackSeparator *labelStackSeparator) const

    Returns the index of the labelStackSeparator specified.

    void LabelStackSeparatorListModel::insert(int index, Esri::ArcGISRuntime::LabelStackSeparator *labelStackSeparator)

    Inserts an labelStackSeparator at a specified index in the list model.

    This method will append to the list if the index is greater than the current size of the list model.

    bool LabelStackSeparatorListModel::isEmpty() const

    Returns true if the list model contains no label stack separators.

    [signal, since Esri::ArcGISRuntime 100.15] void LabelStackSeparatorListModel::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, since Esri::ArcGISRuntime 100.15] void LabelStackSeparatorListModel::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.

    Esri::ArcGISRuntime::LabelStackSeparator *LabelStackSeparatorListModel::last() const

    Returns the last label stack separator in the list model.

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

    Moves one label stack separator from an index in the list model to a different index.

    void LabelStackSeparatorListModel::removeAt(int index)

    Removes an label stack separator at the specified index.

    No label stack separator will be 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 LabelStackSeparatorListModel::removeOne(Esri::ArcGISRuntime::LabelStackSeparator *labelStackSeparator)

    Removes the specified labelStackSeparator 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 LabelStackSeparatorListModel::size() const

    Returns the number of label stack separators 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.