In MVC architecture, this is the controller for the corresponding NorthArrow view. More...
| Header | #include <North |
| Inherits | QObject |
Properties
Public Functions
| North | |
| virtual | ~ |
| QObject * | geo |
| double | heading() const |
| void | set |
Public Slots
| void | set |
Signals
| void | geo |
| void | heading |
Detailed Description
This controller calculates the current heading from a GeoView, and allows the NorthArrow to apply a given heading to the GeoView.
Property Documentation
geoView : QObject*
Access functions:
| QObject * | geo |
| void | set |
Notifier signal:
| void | geo |
heading : const double
Access functions:
| double | heading() const |
Notifier signal:
| void | heading |
Member Function Documentation
NorthArrowController::NorthArrowController (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 NorthArrowController::geoViewChanged ()
Emitted when the geoView changes.
Note: Notifier signal for property geoView.
[signal] void NorthArrowController::headingChanged ()
Emitted when the heading changes.
Note: Notifier signal for property heading.
[slot] void NorthArrowController::setHeading (double heading)
Set the heading by rotating the MapView or SceneView camera to the given heading (in degrees).
See also heading().
[virtual] NorthArrowController::~NorthArrowController ()
Destructor.
QObject *NorthArrowController::geoView () const
Returns the GeoView as a QObject.
Note: Getter function for property geoView.
See also setGeoView().
double NorthArrowController::heading() const
Returns the calculated heading of this controller in degrees.
Note: Getter function for property heading.
See also setHeading().
void NorthArrowController::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().