FlightGear next
GettingStartedTipsController Class Reference

Manage presentation of getting started tips on a screen/page. More...

#include <GettingStartedTipsController.hxx>

Inherits QObject.

Classes

class  ItemPositionObserver
 The GettingStartedTipsController::ItemPositionObserver class. More...
 

Public Slots

void close ()
 
void setIndex (int index)
 
void setScopeId (QString scopeId)
 
void setVisualArea (QQuickItem *visualArea)
 
void setActiveTipHeight (int activeTipHeight)
 
void showOneShotTip (GettingStartedTip *tip)
 showOneShotTip - show a single tip on its own, if it has not previously been shown before.
 
void tipsWereReset ()
 

Signals

void countChanged (int count)
 
void indexChanged (int index)
 
void tipChanged ()
 
void scopeChanged (QObject *scope)
 
void scopeIdChanged (QString scopeId)
 
void activeChanged ()
 
void tipGeometryChanged ()
 
void tipPositionInVisualAreaChanged ()
 
void visualAreaChanged (QQuickItem *visualArea)
 
void activeTipHeightChanged (int activeTipHeight)
 

Public Member Functions

 GettingStartedTipsController (QObject *parent=nullptr)
 
 ~GettingStartedTipsController ()
 
int count () const
 
int index () const
 
GettingStartedTiptip () const
 
QString scopeId () const
 
bool isActive () const
 
QPointF tipPositionInVisualArea () const
 
QQuickItem * visualArea () const
 
QRectF tipGeometry () const
 
bool tipPositionValid () const
 
int activeTipHeight () const
 
QRectF contentGeometry () const
 contentGeometry - based on the active tip, return the box (relative to the total tipGeometry) which content should occupy.
 

Properties

QString scopeId
 
GettingStartedTiptip
 
int count
 
int index
 
bool active
 
QPointF tipPositionInVisualArea
 
bool tipPositionValid
 
QRectF tipGeometry
 
int activeTipHeight
 
QRectF contentGeometry
 
QQuickItem * visualArea
 

Friends

class GettingStartedTip
 

Detailed Description

Manage presentation of getting started tips on a screen/page.

Definition at line 15 of file GettingStartedTipsController.hxx.

Constructor & Destructor Documentation

◆ GettingStartedTipsController()

GettingStartedTipsController::GettingStartedTipsController ( QObject * parent = nullptr)
explicit

Definition at line 126 of file GettingStartedTipsController.cxx.

◆ ~GettingStartedTipsController()

GettingStartedTipsController::~GettingStartedTipsController ( )

Definition at line 149 of file GettingStartedTipsController.cxx.

Member Function Documentation

◆ activeChanged

void GettingStartedTipsController::activeChanged ( )
signal

◆ activeTipHeight()

int GettingStartedTipsController::activeTipHeight ( ) const

Definition at line 385 of file GettingStartedTipsController.cxx.

◆ activeTipHeightChanged

void GettingStartedTipsController::activeTipHeightChanged ( int activeTipHeight)
signal

◆ close

void GettingStartedTipsController::close ( )
slot

Definition at line 418 of file GettingStartedTipsController.cxx.

◆ contentGeometry()

QRectF GettingStartedTipsController::contentGeometry ( ) const

contentGeometry - based on the active tip, return the box (relative to the total tipGeometry) which content should occupy.

This allows for offseting due to the arrow position, and also specifies the width for computing wrapped text height

The actual height is the maximum height; the computed value should be set by activeTipHeight

Definition at line 390 of file GettingStartedTipsController.cxx.

◆ count()

int GettingStartedTipsController::count ( ) const

Definition at line 153 of file GettingStartedTipsController.cxx.

◆ countChanged

void GettingStartedTipsController::countChanged ( int count)
signal

◆ index()

int GettingStartedTipsController::index ( ) const

Definition at line 162 of file GettingStartedTipsController.cxx.

◆ indexChanged

void GettingStartedTipsController::indexChanged ( int index)
signal

◆ isActive()

bool GettingStartedTipsController::isActive ( ) const

Definition at line 305 of file GettingStartedTipsController.cxx.

◆ scopeChanged

void GettingStartedTipsController::scopeChanged ( QObject * scope)
signal

◆ scopeId()

QString GettingStartedTipsController::scopeId ( ) const
inline

Definition at line 47 of file GettingStartedTipsController.hxx.

◆ scopeIdChanged

void GettingStartedTipsController::scopeIdChanged ( QString scopeId)
signal

◆ setActiveTipHeight

void GettingStartedTipsController::setActiveTipHeight ( int activeTipHeight)
slot

Definition at line 198 of file GettingStartedTipsController.cxx.

◆ setIndex

void GettingStartedTipsController::setIndex ( int index)
slot

Definition at line 441 of file GettingStartedTipsController.cxx.

◆ setScopeId

void GettingStartedTipsController::setScopeId ( QString scopeId)
slot

Definition at line 457 of file GettingStartedTipsController.cxx.

◆ setVisualArea

void GettingStartedTipsController::setVisualArea ( QQuickItem * visualArea)
slot

Definition at line 186 of file GettingStartedTipsController.cxx.

◆ showOneShotTip

void GettingStartedTipsController::showOneShotTip ( GettingStartedTip * tip)
slot

showOneShotTip - show a single tip on its own, if it has not previously been shown before.

This is used for pieces of UI which are not always present; the first time the UI is displayed to the user, we can show a tip describing it. Once the user closes the tip, it will not reappear.

The tip will be activated if the controller is currently inactive. If the controller was alreayd active, the tip will be shown, and when closed, the other tips will be shown. If the one-shot tip is part of the currently active list, this actually does nothing, to avoid showing the same tip twice

Definition at line 208 of file GettingStartedTipsController.cxx.

◆ tip()

GettingStartedTip * GettingStartedTipsController::tip ( ) const

Definition at line 171 of file GettingStartedTipsController.cxx.

◆ tipChanged

void GettingStartedTipsController::tipChanged ( )
signal

◆ tipGeometry()

QRectF GettingStartedTipsController::tipGeometry ( ) const

Definition at line 323 of file GettingStartedTipsController.cxx.

◆ tipGeometryChanged

void GettingStartedTipsController::tipGeometryChanged ( )
signal

◆ tipPositionInVisualArea()

QPointF GettingStartedTipsController::tipPositionInVisualArea ( ) const

Definition at line 313 of file GettingStartedTipsController.cxx.

◆ tipPositionInVisualAreaChanged

void GettingStartedTipsController::tipPositionInVisualAreaChanged ( )
signal

◆ tipPositionValid()

bool GettingStartedTipsController::tipPositionValid ( ) const

Definition at line 369 of file GettingStartedTipsController.cxx.

◆ tipsWereReset

void GettingStartedTipsController::tipsWereReset ( )
slot

Definition at line 235 of file GettingStartedTipsController.cxx.

◆ visualArea()

QQuickItem * GettingStartedTipsController::visualArea ( ) const
inline

Definition at line 56 of file GettingStartedTipsController.hxx.

◆ visualAreaChanged

void GettingStartedTipsController::visualAreaChanged ( QQuickItem * visualArea)
signal

Friends And Related Symbol Documentation

◆ GettingStartedTip

friend class GettingStartedTip
friend

Definition at line 124 of file GettingStartedTipsController.hxx.

Property Documentation

◆ active

bool GettingStartedTipsController::active
read

Definition at line 26 of file GettingStartedTipsController.hxx.

◆ activeTipHeight

int GettingStartedTipsController::activeTipHeight
readwrite

Definition at line 32 of file GettingStartedTipsController.hxx.

◆ contentGeometry

QRectF GettingStartedTipsController::contentGeometry
read

Definition at line 33 of file GettingStartedTipsController.hxx.

◆ count

int GettingStartedTipsController::count
read

Definition at line 23 of file GettingStartedTipsController.hxx.

◆ index

int GettingStartedTipsController::index
readwrite

Definition at line 24 of file GettingStartedTipsController.hxx.

◆ scopeId

QString GettingStartedTipsController::scopeId
readwrite

Definition at line 19 of file GettingStartedTipsController.hxx.

◆ tip

GettingStartedTip* GettingStartedTipsController::tip
read

Definition at line 21 of file GettingStartedTipsController.hxx.

◆ tipGeometry

QRectF GettingStartedTipsController::tipGeometry
read

Definition at line 31 of file GettingStartedTipsController.hxx.

◆ tipPositionInVisualArea

QPointF GettingStartedTipsController::tipPositionInVisualArea
read

Definition at line 28 of file GettingStartedTipsController.hxx.

◆ tipPositionValid

bool GettingStartedTipsController::tipPositionValid
read

Definition at line 29 of file GettingStartedTipsController.hxx.

◆ visualArea

QQuickItem* GettingStartedTipsController::visualArea
readwrite

Definition at line 35 of file GettingStartedTipsController.hxx.


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