TimeSliderController Class

TimeSlider."> TimeSliderController Class | ArcGISQtToolkit 200.0
  • TimeSliderController
  • class Esri::ArcGISRuntime::Toolkit::TimeSliderController

    In MVC architecture, this is the controller for the corresponding TimeSlider. More...

    Header: #include <TimeSliderController>
    Inherits: QObject

    Properties

    Public Functions

    TimeSliderController(QObject *parent = nullptr)
    virtual ~TimeSliderController() override
    int endStep() const
    Esri::ArcGISRuntime::TimeExtent fullTimeExtent() const
    QObject *geoView() const
    int numberOfSteps() const
    void setGeoView(QObject *geoView)
    void setSteps(std::pair<int, int> steps)
    void setSteps(int s, int e)
    int startStep() const
    QDateTime timeForStep(int step) const
    Esri::ArcGISRuntime::TimeValue timeInterval() const

    Signals

    Detailed Description

    This controller calculates interval steps and the range of the full extent for the TimeSlider. This is based on the combined extents of time-aware layers in the given GeoView.

    The time-extent of the GeoView itself can be manipulated using steps with calls to TimeSliderController::setSteps.

    Property Documentation

    [read-only] endStep : const int

    Access functions:

    int endStep() const

    Notifier signal:

    void stepsChanged()

    geoView : QObject*

    Access functions:

    QObject *geoView() const
    void setGeoView(QObject *geoView)

    Notifier signal:

    [read-only] numberOfSteps : const int

    Access functions:

    int numberOfSteps() const

    Notifier signal:

    [read-only] startStep : const int

    Access functions:

    int startStep() const

    Notifier signal:

    void stepsChanged()

    Member Function Documentation

    [explicit invokable] TimeSliderController::TimeSliderController(QObject *parent = nullptr)

    Constructor

    • parent Parent owning QObject.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    [override virtual] TimeSliderController::~TimeSliderController()

    Destructor.

    int TimeSliderController::endStep() const

    Returns the current end step.

    Note: Getter function for property endStep.

    [signal] void TimeSliderController::extentsChanged()

    Emitted when the extents of any TimeAware layer changes.

    Note: Notifier signal for property numberOfSteps.

    Esri::ArcGISRuntime::TimeExtent TimeSliderController::fullTimeExtent() const

    Calculates the union of all extents of all TimeAware layers in the current GeoView. Returns a TimeExtent covering the combined range of all extents.

    QObject *TimeSliderController::geoView() const

    Returns the GeoView as a QObject.

    Note: Getter function for property geoView.

    See also setGeoView().

    [signal] void TimeSliderController::geoViewChanged()

    Emitted when the geoView changes.

    Note: Notifier signal for property geoView.

    int TimeSliderController::numberOfSteps() const

    Calculates the number of steps the TimeSlider should display based on fullTimeExtent dividied by timeInterval. Returns number of steps for TimeSlider.

    Note: Getter function for property numberOfSteps.

    void TimeSliderController::setGeoView(QObject *geoView)

    Set the GeoView object this Controller uses.

    Internally this is cast to a MapView or SceneView using qobject_cast, which is why the paremeter is of form QObject and not GeoView.

    • geoView Object which must inherit from GeoView* and QObject*.

    Note: Setter function for property geoView.

    See also geoView().

    void TimeSliderController::setSteps(std::pair<int, int> steps)

    Sets the current steps.

    Setting steps changes the current time-extent of the GeoView to a TimeExtent range calculated by the current steps using timeForStep.

    • steps Pair of start end steps.

    [invokable] void TimeSliderController::setSteps(int s, int e)

    Sets the current steps.

    Setting steps changes the current time-extent of the GeoView to a TimeExtent range calculated by the current steps using timeForStep.

    • s start-step to set.
    • e end-step to set.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    int TimeSliderController::startStep() const

    Returns the current start step.

    Note: Getter function for property startStep.

    [signal] void TimeSliderController::stepsChanged()

    Emitted when either the start or end step changes.

    Note: Notifier signal for property endStep. Notifier signal for property startStep.

    [invokable] QDateTime TimeSliderController::timeForStep(int step) const

    Calculates a QDateTIme from a step.

    Given step and numberOfSteps we can calculate the date-time for an arbitrary step step interpolated between the start and end times of fullTimeExtent.

    • step Step to calculate a time for.

    Returns a QDateTime that is the time calculated for step.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    Esri::ArcGISRuntime::TimeValue TimeSliderController::timeInterval() const

    Calculates the time-interval as a TimeValue, which is the smallest possible interval of all TimeAware layers in the current GeoView.

    Returns a TimeValue which is the minimum time-interval of all intervals.

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