In MVC architecture, this is the controller for the corresponding TimeSlider. More...
| Header | #include <Time |
| Inherits | QObject |
Properties
- endStep : const int
- geoView : QObject*
- numberOfSteps : const int
- startStep : const int
Public Functions
| Time | |
| virtual | ~ |
| int | end |
| Esri | full |
| QObject * | geo |
| int | number |
| void | set |
| void | set |
| void | set |
| int | start |
| QDate | time |
| Esri | time |
Signals
| void | extents |
| void | geo |
| void | steps |
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
endStep : const int
Access functions:
| int | end |
Notifier signal:
| void | steps |
geoView : QObject*
Access functions:
| QObject * | geo |
| void | set |
Notifier signal:
| void | geo |
numberOfSteps : const int
Access functions:
| int | number |
Notifier signal:
| void | extents |
startStep : const int
Access functions:
| int | start |
Notifier signal:
| void | steps |
Member Function Documentation
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.
[signal] void TimeSliderController::extentsChanged ()
Emitted when the extents of any TimeAware layer changes.
Note: Notifier signal for property numberOfSteps.
[signal] void TimeSliderController::geoViewChanged ()
Emitted when the geoView changes.
Note: Notifier signal for property geoView.
[signal] void TimeSliderController::stepsChanged ()
Emitted when either the start or end step changes.
Note: Notifier signal for property endStep. Notifier signal for property startStep.
[override virtual] TimeSliderController::~TimeSliderController ()
Destructor.
int TimeSliderController::endStep () const
Returns the current end step.
Note: Getter function for property endStep.
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().
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*andQObject*.
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.
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.
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.