LabelStackSeparator Class

  • LabelStackSeparator
  • class Esri::ArcGISRuntime::LabelStackSeparator

    A separator character in a label, where a line break may be inserted in long text. More...

    Header: #include <LabelStackSeparator.h>
    Since: Esri::ArcGISRuntime 100.11
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

    Public Functions

    LabelStackSeparator(QObject *parent = nullptr)
    virtual ~LabelStackSeparator() override
    Esri::ArcGISRuntime::LabelStackSeparatorBreakPosition breakPosition() const
    bool isForced() const
    bool isVisible() const
    QString separator() const
    void setBreakPosition(Esri::ArcGISRuntime::LabelStackSeparatorBreakPosition breakPosition)
    void setForced(bool forced)
    void setSeparator(const QString &separator)
    void setVisible(bool visible)

    Reimplemented Public Functions

    virtual QString toJson() const override
    virtual QJsonObject unknownJson() const override
    virtual QJsonObject unsupportedJson() const override

    Static Public Members

    Esri::ArcGISRuntime::LabelStackSeparator *fromJson(const QString &json, QObject *parent)

    Detailed Description

    A single separator consists of:

    • The separator character that should potentially be replaced by a line break
    • If the separator should always be used for line break
    • If the separator should remain visible
    • If the separator should appear at the end of one row, or the beginning of the next

    Member Function Documentation

    [explicit] LabelStackSeparator::LabelStackSeparator(QObject *parent = nullptr)

    Creates a label stack separator with default values.

    • parent - The optional parent QObject.

    The default separator has an empty separator and will be ignored.

    [override virtual] LabelStackSeparator::~LabelStackSeparator()

    Destructor.

    Esri::ArcGISRuntime::LabelStackSeparatorBreakPosition LabelStackSeparator::breakPosition() const

    Returns the position where the separator will be written, if used and remaining visible.

    Determines whether the separator code point should appear at the end of one row, or the beginning of the next, if chosen as a line break position. This does not matter if the separator is not to be visible when used. The default value is LabelStackSeparatorBreakPosition::Automatic, which will give the same behavior as LabelStackSeparatorBreakPosition::After.

    See also setBreakPosition().

    [static] Esri::ArcGISRuntime::LabelStackSeparator *LabelStackSeparator::fromJson(const QString &json, QObject *parent)

    Creates a new LabelStackSeparator from its JSON representation.

    Unknown JSON is a dictionary of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.

    • json - See
    • parent - The optional parent QObject.

    See also JsonSerializable.

    bool LabelStackSeparator::isForced() const

    Returns whether a line break must be inserted when the separator is encountered.

    The default value is false.

    bool LabelStackSeparator::isVisible() const

    Returns whether the separator should still be visible, if chosen as a line break position.

    For example, a user may wish to keep a hyphenation mark at the end of a row of text, but hide a comma.

    The default value is false.

    QString LabelStackSeparator::separator() const

    Returns a QString intended to describe one code point.

    Each LabelStackSeparator specifies a code point to be looked for in the text. A code point is often thought of as a single character in the text, but may need several chars in a QString to describe it.

    For example:

    • To use a comma as a separator, the separator string would be just ","
    • To use a Hebrew punctuation Paseq as a separator, the separator would need to encode the code point with utf16 value "\u05c0" if your SDK uses utf16 strings (e.g., Java, C#) or with the utf8 string "\x30\x35\x63\x30" if your SDK uses utf8 strings
    • To use higher range unicode code points such as Aegean Word Separator Dot which has utf32 hex value 10101, the separator would need to encode the code point with utf16 value "\ud800\udd01" if your SDK uses utf16 strings (e.g., Java, C#) or with the utf8 string "\xf0\x90\x84\x81" if your SDK uses utf8 strings

    The default value is an empty string, meaning that the LabelStackSeparator will be ignored.

    See also setSeparator().

    void LabelStackSeparator::setBreakPosition(Esri::ArcGISRuntime::LabelStackSeparatorBreakPosition breakPosition)

    Sets the breakPosition to breakPosition.

    See also breakPosition.

    void LabelStackSeparator::setForced(bool forced)

    Sets the forced to forced.

    See also isForced.

    void LabelStackSeparator::setSeparator(const QString &separator)

    Sets the separator to separator.

    See also separator.

    void LabelStackSeparator::setVisible(bool visible)

    Sets the visible to visible.

    See also isVisible.

    [override virtual] QString LabelStackSeparator::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Convert an object to JSON string.

    See

    See also JsonSerializable.

    [override virtual] QJsonObject LabelStackSeparator::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets the unknown JSON of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject LabelStackSeparator::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Returns the unsupported data from the source JSON.

    Unsupported JSON is a dictionary of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.

    See also JsonSerializable.

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