Defines areas along the edges of a GeoView that may be obscured by some other UI elements. More...
Header: | #include <ViewInsets.h> |
Since: | Esri::ArcGISRuntime 100.1 |
Inherits: | Esri::ArcGISRuntime::Object |
Properties
Public Functions
ViewInsets(double left, double right, double top, double bottom, QObject *parent = nullptr) | |
virtual | ~ViewInsets() override |
double | bottom() const |
bool | isEmpty() const |
double | left() const |
double | right() const |
double | top() const |
Signals
void | viewInsetsChanged() |
Detailed Description
View insets reduce the size of the area where it is safe to display callouts, attribution text, location display, and other visual elements on the GeoView when some of the GeoView is obscured by overlaid UI elements such as slide-in panels. The anchoring of the GeoView's visual elements is adjusted to account for the overlaid UI elements.
Units for left, right, top, and bottom are specified in device-independent pixels (DIPs).
Ex: mapView->setViewInsets(new ViewInsets(sidePanel.width, 0, 0, 0, this));
If you just want to zoom to a geometry and leave a bit of padding around it, use the MapView::setViewpointGeometryAsync(const Esri::ArcGISRuntime::Geometry& boundingGeometry, double paddingInDIPS) method instead.
See also GeoView.
Property Documentation
bottom : const double
This property holds the inset from the bottom edge, in device independent pixels (DIPs).
Access functions:
double | bottom() const |
Notifier signal:
void | viewInsetsChanged() |
[read-only]
empty : const bool
This property holds whether the insets are set to default values (read-only).
The view insets are empty if the inset of all four edges are 0.
Access functions:
bool | isEmpty() const |
Notifier signal:
void | viewInsetsChanged() |
left : const double
This property holds the inset from the left edge, in device independent pixels (DIPs).
Access functions:
double | left() const |
Notifier signal:
void | viewInsetsChanged() |
right : const double
This property holds the inset from the right edge, in device independent pixels (DIPs).
Access functions:
double | right() const |
Notifier signal:
void | viewInsetsChanged() |
top : const double
This property holds the inset from the top edge, in device independent pixels (DIPs).
Access functions:
double | top() const |
Notifier signal:
void | viewInsetsChanged() |
Member Function Documentation
ViewInsets::ViewInsets (double left, double right, double top, double bottom, QObject *parent = nullptr)
Constructor specifying left, right, top, and bottom inset values with an optional parent.
[override virtual]
ViewInsets::~ViewInsets ()
Destructor.
double ViewInsets::bottom() const
Returns the inset from the bottom edge, in device independent pixels (DIPs).
Note: Getter function for property bottom.
bool ViewInsets::isEmpty () const
Returns whether the insets are set to default values.
The view insets are empty if the inset of all four edges are 0.
Note: Getter function for property empty.
double ViewInsets::left() const
Returns the inset from the left edge, in device independent pixels (DIPs).
Note: Getter function for property left.
double ViewInsets::right() const
Returns the inset from the right edge, in device independent pixels (DIPs).
Note: Getter function for property right.
double ViewInsets::top() const
Returns the inset from the top edge, in device independent pixels (DIPs).
Note: Getter function for property top.
[signal]
void ViewInsets::viewInsetsChanged ()
Signal emitted when any edge value of the insets changes.