A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-calloutdata.html below:

CalloutData Class | ArcGIS Maps SDK for Qt

Detailed Description

This class works in conjunction with the Callout view in the ArcGIS Maps SDK Toolkit, which is used to display information on a map. CalloutData provides the Callout with the content to display in the view and the screen coordinates detailing where to display the view. The content of the callout consists of a title and a detail string. It can also display an image to the left of the title and detail, and an accessory button to the right. The accessory button can be used to present a secondary view with more details, such as a pop up.

A Callout can be displayed for several different scenarios:

Obtain CalloutData from MapView::calloutData. You can change the content of the callout by setting properties on this class. To change the look and feel of the Callout view, set properties on the Callout in the toolkit.

In order to use the CalloutData with a QML UI, the CalloutData class must be registered as a QML Type. For example, the following line could be added to the main.cpp to register the class under the Esri.Samples namespace:

qmlRegisterUncreatableType<CalloutData>("Esri.Samples", 1, 0, "CalloutData", "CalloutData is an uncreatable type");

Note: The default Callout provided with the toolkit is built with Qt Quick for a QML UI. If using Qt Widgets, a custom Widgets UI could be created to consume the information provided by CalloutData.

Example:

Initialize the CalloutData so the QML property is updated:

m_mapView->calloutData()->setVisible(false);
m_mapView->calloutData()->setTitle("Location");
QImage image(":/Samples/DisplayInformation/ShowCallout/RedShinyPin.png");
m_mapView->calloutData()->setImage(image);

Finally, set the CalloutData to the Callout view component from the Toolkit:

Callout {
    id: callout
    calloutData: mapView.calloutData // bind to the property that is exposed
    accessoryButtonVisible: false
    leaderPosition: Callout.LeaderPosition.Automatic
}

Relevant samples:

Member Function Documentation [override virtual noexcept] CalloutData::~CalloutData()

Destructor.

[signal] void CalloutData::detailChanged()

Emitted when the detail property changes.

Note: Notifier signal for property detail.

[since Esri::ArcGISRuntime 200.4] QString CalloutData::detailExpression() const

Returns an Arcade expression used for evaluating the detail text based on attributes in the GeoElement.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also detail and setDetailExpression.

Esri::ArcGISRuntime::GeoElement *CalloutData::geoElement() const

Gets the GeoElement for which the callout should be displayed.

If you specify the optional tapLocation parameter, the callout displays at the point on the geometry nearest to tapLocation.

Note: Only supports Feature and Graphic GeoElements.

See also setGeoElement().

QImage CalloutData::image() const

The callout image returned as a QImage.

See also setImage().

[signal] void CalloutData::imageUrlChanged()

Emitted when the imageUrl property changes.

Note: Notifier signal for property imageUrl.

bool CalloutData::isShowCalloutForLocationDisplay() const

Gets whether the callout is being shown for the LocationDisplay on the map.

Returns true if the callout will display at the current location.

Esri::ArcGISRuntime::Point CalloutData::location() const

Gets the map location where the callout should be displayed.

See also setLocation().

[signal] void CalloutData::screenPointChanged()

Emitted when the screenPoint property changes.

Note: Notifier signal for property screenPoint.

void CalloutData::setDetail(const QString &detail)

Sets the detail text for the callout to detail.

Note: Setter function for property detail.

See also detail().

[since Esri::ArcGISRuntime 200.4] void CalloutData::setDetailExpression(const QString &detailExpression)

Sets the Arcade expression to evaluate and show the callout detail.

detailExpression is an Arcade expression used to evaluate the detail text based on attributes in the GeoElement. Set DynamicEntity to setGeoElement in order to evaluate the expression and update the attributes realtime in callout detail.

Use the attributes of the dynamic entity to form the detailExpression and pass to setDetailExpression(const QString&). For example, to show the callout detail based on the attribute values of dynamic entity, form the detailExpression as follows: concatenate(Round($feature.point_x,6), \",\", Round($feature.point_y,6),\" Heading: \",$feature.heading,\"°\"). Note: Dynamic entity is set to $feature in the profile variable. Then set setVisible to true to show the callout.

The result will be stored in detail after the detailExpression evaluation. The expression is re-evaluated every time the dynamic entity's DynamicEntity::dynamicEntityChanged signal is emitted, and the callout title is updated in real-time when it moves along with the dynamic entity. If both detail and detailExpression are provided, detail will be overwritten by the evaluated detailExpression result.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also detailExpression and detail.

void CalloutData::setGeoElement(Esri::ArcGISRuntime::GeoElement *geoElement)

Sets the GeoElement for the callout geoElement.

See also geoElement().

void CalloutData::setImage(const QImage &image)

Sets the image for the callout.

The image can be set by either specifying the QImage or by a URL using the setImageUrl method. It overwrites a previously set imageUrl.

See also image().

void CalloutData::setImageUrl(const QUrl &imageUrl)

Sets the imageUrl for the callout.

The URL can either be to a local file or an online resource.

Note: Setter function for property imageUrl.

See also imageUrl().

void CalloutData::setLocation(const Esri::ArcGISRuntime::Point &location)

Sets the location of the callout display to location.

See also location().

void CalloutData::setShowCalloutForLocationDisplay(bool calloutForLocationDisplay)

Sets whether the callout is being shown for the LocationDisplay on the map.

Set calloutForLocationDisplay to true if you want the callout to be displayed for your current location.

See also isShowCalloutForLocationDisplay().

void CalloutData::setTapLocation(const Esri::ArcGISRuntime::Point &tapLocation)

Sets the tap location for the callout to tapLocation.

If the callout is shown for a GeoElement, tapLocation specifies the optional location where the callout should be displayed.

See also tapLocation().

void CalloutData::setTitle(const QString &title)

Sets the title text for the callout to title.

Note: Setter function for property title.

See also title().

[since Esri::ArcGISRuntime 200.4] void CalloutData::setTitleExpression(const QString &titleExpression)

Sets an Arcade expression to evaluate and show the callout title.

titleExpression is an Arcade expression used to evaluate the title text based on attributes in the GeoElement. Set DynamicEntity to setGeoElement in order to evaluate the expression and update the title realtime in callout.

Use the attributes of dynamic entity to form the titleExpression and pass to setTitleExpression(const QString&). For example, to show the callout title based on the attributes of dynamic entity, form the titleExpression as follows: concatenate($feature.vehiclename, \": \", $feature.speed, \" mph\"). Note: Dynamic entity is set to $feature in the profile variable. Then set setVisible to true to show the callout.

The result will be stored in title after the titleExpression evaluation. The expression is re-evaluated every time the dynamic entity's DynamicEntity::dynamicEntityChanged signal is emitted, and the callout title is updated in real-time when it moves along with the dynamic entity. If both title and titleExpression are provided, title will be overwritten by the evaluated titleExpression result.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also titleExpression and title.

void CalloutData::setVisible(bool visible)

Sets the callout to be visible or invisible.

Note: Setter function for property visible.

See also isVisible().

Esri::ArcGISRuntime::Point CalloutData::tapLocation() const

Gets the tap location for the callout.

See also setTapLocation().

[signal] void CalloutData::titleChanged()

Emitted when the title property changes.

Note: Notifier signal for property title.

[since Esri::ArcGISRuntime 200.4] QString CalloutData::titleExpression() const

Returns an Arcade expression used for evaluating the title text based on the attributes in the GeoElement.

This function was introduced in Esri::ArcGISRuntime 200.4.

See also setTitleExpression(), title, and titleExpression.

[signal] void CalloutData::visibleChanged()

Emitted when the visible property changes.

Note: Notifier signal for property visible.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4