FlightGear next
GettingStartedTipsController::ItemPositionObserver Class Reference

The GettingStartedTipsController::ItemPositionObserver class. More...

Inherits QObject.

Signals

void itemPositionChanged ()
 
void itemNotMoving ()
 

Public Member Functions

 ItemPositionObserver (QObject *pr)
 
void setObservedItem (QQuickItem *obs)
 
bool hasRecentlyMoved () const
 

Detailed Description

The GettingStartedTipsController::ItemPositionObserver class.

This is a helper to observe the full position (and in the future, transform if required) of a QQuickItem, so we can update a signal when the on-screen position changes. This is necessary to re-transform the tooltip location if the item it's 'attached' to moves, or some ancestor does.

At present this does not handle arbitrary scaling or rotation, but observing those signals would also be possible.

Definition at line 61 of file GettingStartedTipsController.cxx.

Constructor & Destructor Documentation

◆ ItemPositionObserver()

GettingStartedTipsController::ItemPositionObserver::ItemPositionObserver ( QObject * pr)
inline

Definition at line 65 of file GettingStartedTipsController.cxx.

Member Function Documentation

◆ hasRecentlyMoved()

bool GettingStartedTipsController::ItemPositionObserver::hasRecentlyMoved ( ) const
inline

Definition at line 96 of file GettingStartedTipsController.cxx.

◆ itemNotMoving

void GettingStartedTipsController::ItemPositionObserver::itemNotMoving ( )
signal

◆ itemPositionChanged

void GettingStartedTipsController::ItemPositionObserver::itemPositionChanged ( )
signal

◆ setObservedItem()

void GettingStartedTipsController::ItemPositionObserver::setObservedItem ( QQuickItem * obs)
inline

Definition at line 79 of file GettingStartedTipsController.cxx.


The documentation for this class was generated from the following file: