VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Slots | Signals | Public Member Functions | Properties | List of all members
UiInternal Class Reference

Internal backing C++ class for the Ui QML item. More...

Inheritance diagram for UiInternal:
QQuickItem QObject QQmlParserStatus Ui

Public Slots

void onLevelChanged (const QString &levelName, int completionThreshold, int activationThreshold)
 Passes information about the current level to the UI. More...
 
void onLevelCompleted (bool gameCompleted, int oneStarThreshold, int twoStarThreshold, int threeStarThreshold, int fourStarThreshold, int playerScore)
 Notifies the UI when the level is completed. More...
 
void onPlayerActivationChanged (int player, bool active)
 Notifies the UI when a player's activation changes. More...
 
void onPlayerScoreChanged (int player, int score)
 Notifies the Ui when a player's score changes. More...
 
void onPlayerDataChanged ()
 Notifies the Ui when the player data profile has been updated with new data. More...
 

Signals

void signedIntoCloudChanged ()
 Emitted when signedIntoCloud changes. More...
 
void bgmMutedChanged ()
 Emitted when bgmMuted changes. More...
 
void levelProgressionsChanged ()
 Emitted when levelProgressions changes. More...
 
void currentProgressionChanged ()
 Emitted when currentProgression changes. More...
 
void previousProgressionChanged ()
 Emitted when previousProgression changes. More...
 
void menuBGMTrackChanged ()
 Emitted when menuBGMTrack changes. More...
 
void openingCinematicCompleted ()
 Emitted when the opening cinematic movie is done showing. More...
 
void pauseRequested ()
 Emitted when the UI requests the Game to be paused. More...
 
void resumeRequested ()
 Emitted when the UI requests the Game to be resumed. More...
 
void quitRequested ()
 Emitted when the player uses the UI to quit the game. More...
 
void playLevelRequested (LevelProgression *levelProgression, const QString &levelName)
 Emitted when the player uses the UI to select a level to play. More...
 
void changeLevelProgressionRequested ()
 Emitted when the player uses the UI to change the current LevelProgression. More...
 
void changeLevelRequested ()
 Emitted when the player uses the UI to change the current level but while staying in the same LevelProgression. More...
 
void showAchievementsRequested ()
 Emitted when the player uses the UI to show their Google Play Games Services achievements. More...
 
void activeChanged (bool isActive)
 Emitted when UI changes its foregrounded state. More...
 
void playNextLevelRequested ()
 Emitted when the player uses the UI to play the next level in the LevelProgression. More...
 
void signIntoCloudRequested ()
 Emitted when the player uses the UI to try to sign into Google Play Games Services. More...
 
void muteBGMRequested ()
 Emitted when the player uses the UI to try to mute the background music. More...
 
void unmuteBGMRequested ()
 Emitted when the player uses the UI to try to unmute the background music. More...
 

Public Member Functions

bool isSignedIntoCloud () const
 Returns signedIntoCloud. More...
 
void setSignedIntoCloud (bool value)
 Sets signedIntoCloud. More...
 
bool isBGMMuted () const
 Returns bgmMuted. More...
 
void setBGMMuted (bool value)
 Sets bgmMuted. More...
 
LevelProgressionListgetLevelProgressionList () const
 Returns levelProgressions. More...
 
void setLevelProgressionList (LevelProgressionList *value)
 Sets levelProgressions. More...
 
LevelProgressiongetCurrentProgression () const
 Returns currentProgression. More...
 
void setCurrentProgression (LevelProgression *value)
 Sets currentProgression. More...
 
LevelProgressiongetPreviousProgression () const
 Returns previousProgression. More...
 
const QStringgetMenuBGMTrack () const
 Returns menuBGMTrack. More...
 
void setMenuBGMTrack (const QString &value)
 Sets menuBGMTrack. More...
 
void tryStart ()
 Called by Game when attempting to start the UI. More...
 
- Public Member Functions inherited from QQuickItem
 QQuickItem (QQuickItem *parent)
 
QQuickWindowwindow () const
 
QQuickItemparentItem () const
 
void setParentItem (QQuickItem *parent)
 
void stackBefore (const QQuickItem *sibling)
 
void stackAfter (const QQuickItem *sibling)
 
QRectF childrenRect ()
 
QList< QQuickItem * > childItems () const
 
bool clip () const
 
void setClip (bool)
 
QString state () const
 
void setState (const QString &)
 
qreal baselineOffset () const
 
void setBaselineOffset (qreal)
 
qreal x () const
 
qreal y () const
 
void setX (qreal)
 
void setY (qreal)
 
qreal width () const
 
void setWidth (qreal)
 
void resetWidth ()
 
void setImplicitWidth (qreal)
 
qreal implicitWidth () const
 
qreal height () const
 
void setHeight (qreal)
 
void resetHeight ()
 
void setImplicitHeight (qreal)
 
qreal implicitHeight () const
 
TransformOrigin transformOrigin () const
 
void setTransformOrigin (TransformOrigin)
 
qreal z () const
 
void setZ (qreal)
 
qreal rotation () const
 
void setRotation (qreal)
 
qreal scale () const
 
void setScale (qreal)
 
qreal opacity () const
 
void setOpacity (qreal)
 
bool isVisible () const
 
void setVisible (bool)
 
bool isEnabled () const
 
void setEnabled (bool)
 
bool smooth () const
 
void setSmooth (bool)
 
bool activeFocusOnTab () const
 
void setActiveFocusOnTab (bool)
 
bool antialiasing () const
 
void setAntialiasing (bool)
 
void resetAntialiasing ()
 
Flags flags () const
 
void setFlag (Flag flag, bool enabled)
 
void setFlags (QFlags< QQuickItem::Flag > flags)
 
bool hasActiveFocus () const
 
bool hasFocus () const
 
void setFocus (bool)
 
void setFocus (bool focus, Qt::FocusReason reason)
 
bool isFocusScope () const
 
QQuickItemscopedFocusItem () const
 
Qt::MouseButtons acceptedMouseButtons () const
 
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
 
bool acceptHoverEvents () const
 
void setAcceptHoverEvents (bool enabled)
 
QCursor cursor () const
 
void setCursor (const QCursor &cursor)
 
void unsetCursor ()
 
void grabMouse ()
 
void ungrabMouse ()
 
bool keepMouseGrab () const
 
void setKeepMouseGrab (bool keep)
 
bool filtersChildMouseEvents () const
 
void setFiltersChildMouseEvents (bool filter)
 
void grabTouchPoints (const QVector< int > &ids)
 
void ungrabTouchPoints ()
 
bool keepTouchGrab () const
 
void setKeepTouchGrab (bool keep)
 
virtual bool contains (const QPointF &point) const
 
QPointF mapToItem (const QQuickItem *item, const QPointF &point) const
 
QPointF mapToScene (const QPointF &point) const
 
QRectF mapRectToItem (const QQuickItem *item, const QRectF &rect) const
 
QRectF mapRectToScene (const QRectF &rect) const
 
QPointF mapFromItem (const QQuickItem *item, const QPointF &point) const
 
QPointF mapFromScene (const QPointF &point) const
 
QRectF mapRectFromItem (const QQuickItem *item, const QRectF &rect) const
 
QRectF mapRectFromScene (const QRectF &rect) const
 
void polish ()
 
void forceActiveFocus ()
 
void forceActiveFocus (Qt::FocusReason reason)
 
QQuickItemnextItemInFocusChain (bool forward)
 
QQuickItemchildAt (qreal x, qreal y) const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
virtual bool isTextureProvider () const
 
virtual QSGTextureProvidertextureProvider () const
 
void update ()
 
void windowChanged (QQuickWindow *window)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegExp &regExp, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegularExpression &re, QFlags< Qt::FindChildOption > options) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 
- Public Member Functions inherited from QQmlParserStatus
virtual void classBegin ()=0
 
virtual void componentComplete ()=0
 

Properties

bool signedIntoCloud
 Whether or not the player is currently signed into Google Play Games Services. More...
 
bool bgmMuted
 Whether or not the background music is currently muted. More...
 
LevelProgressionList levelProgressions
 Unique LevelProgressionList for the game. More...
 
LevelProgression currentProgression
 LevelProgression currently being played. More...
 
LevelProgression previousProgression
 LevelProgression previously played. More...
 
QString menuBGMTrack
 Name of sound asset file to be played in a loop as background music while the menu is showing. More...
 
- Properties inherited from QQuickItem
 parent
 
 x
 
 y
 
 z
 
 width
 
 height
 
 opacity
 
 enabled
 
 visible
 
 state
 
 childrenRect
 
 baselineOffset
 
 clip
 
 focus
 
 activeFocus
 
 activeFocusOnTab
 
 rotation
 
 scale
 
 transformOrigin
 
 smooth
 
 antialiasing
 
 implicitWidth
 
 implicitHeight
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Public Attributes inherited from QQuickItem
typedef Flags
 
- Protected Member Functions inherited from QQuickItem
virtual bool event (QEvent *ev)
 
bool isComponentComplete () const
 
virtual void itemChange (ItemChange change, const ItemChangeData &value)
 
void updateInputMethod (Qt::InputMethodQueries queries)
 
bool widthValid () const
 
bool heightValid () const
 
virtual void classBegin ()
 
virtual void componentComplete ()
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseUngrabEvent ()
 
virtual void touchUngrabEvent ()
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void touchEvent (QTouchEvent *event)
 
virtual void hoverEnterEvent (QHoverEvent *event)
 
virtual void hoverMoveEvent (QHoverEvent *event)
 
virtual void hoverLeaveEvent (QHoverEvent *event)
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual bool childMouseEventFilter (QQuickItem *item, QEvent *event)
 
virtual void geometryChanged (const QRectF &newGeometry, const QRectF &oldGeometry)
 
virtual QSGNodeupdatePaintNode (QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
 
virtual void releaseResources ()
 
virtual void updatePolish ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 

Detailed Description

Internal backing C++ class for the Ui QML item.

This class is necessary so Game can connect signals and slots to the Ui for communication. Specifically, in C++ there does not exist a way of connecting a signal to a QML / JavaScript-based slot, nor does there exist a way to connect a signal dynamically defined in QML to a C++ slot in C++ – both of which are required for Game to communicate with Ui.

Member Function Documentation

void UiInternal::activeChanged ( bool  isActive)
signal

Emitted when UI changes its foregrounded state.

If isActive, a UI menu is showing and the game is paused, else the UI is subdued into a simple HUD overlay while the game is running.

Parameters
isActiveWhether or not the UI is currently active
void UiInternal::bgmMutedChanged ( )
signal

Emitted when bgmMuted changes.

void UiInternal::changeLevelProgressionRequested ( )
signal

Emitted when the player uses the UI to change the current LevelProgression.

void UiInternal::changeLevelRequested ( )
signal

Emitted when the player uses the UI to change the current level but while staying in the same LevelProgression.

void UiInternal::currentProgressionChanged ( )
signal

Emitted when currentProgression changes.

LevelProgression* UiInternal::getCurrentProgression ( ) const
inline
LevelProgressionList* UiInternal::getLevelProgressionList ( ) const
inline
const QString& UiInternal::getMenuBGMTrack ( ) const
inline

Returns menuBGMTrack.

LevelProgression* UiInternal::getPreviousProgression ( ) const
inline
bool UiInternal::isBGMMuted ( ) const
inline

Returns bgmMuted.

bool UiInternal::isSignedIntoCloud ( ) const
inline

Returns signedIntoCloud.

void UiInternal::levelProgressionsChanged ( )
signal

Emitted when levelProgressions changes.

void UiInternal::menuBGMTrackChanged ( )
signal

Emitted when menuBGMTrack changes.

void UiInternal::muteBGMRequested ( )
signal

Emitted when the player uses the UI to try to mute the background music.

void UiInternal::onLevelChanged ( const QString levelName,
int  completionThreshold,
int  activationThreshold 
)
slot

Passes information about the current level to the UI.

Note
This function merely forwards the call to an equivalent JavaScript method in this.
Parameters
levelNameName of the level
completionThresholdHow many points are needed to complete the level
activationThresholdHow many points are needed to pass the level
void UiInternal::onLevelCompleted ( bool  gameCompleted,
int  oneStarThreshold,
int  twoStarThreshold,
int  threeStarThreshold,
int  fourStarThreshold,
int  playerScore 
)
slot

Notifies the UI when the level is completed.

Note
This function merely forwards the call to an equivalent JavaScript method in this.
Parameters
gameCompletedWhether or not the game was completed
oneStarThresholdHow many points are needed to win one star
twoStarThresholdHow many points are needed to win two stars
threeStarThresholdHow many points are needed to win three stars
fourStarThresholdHow many points are needed to win four stars
playerScoreScore achieved by the player
void UiInternal::onPlayerActivationChanged ( int  player,
bool  active 
)
slot

Notifies the UI when a player's activation changes.

Note
This function merely forwards the call to an equivalent JavaScript method in this.
Parameters
playerPlayer that had their activation change
activeActive state to set the player to
void UiInternal::onPlayerDataChanged ( )
slot

Notifies the Ui when the player data profile has been updated with new data.

Note
This function merely forwards the call to an equivalent JavaScript method in this.
void UiInternal::onPlayerScoreChanged ( int  player,
int  score 
)
slot

Notifies the Ui when a player's score changes.

Note
This function merely forwards the call to an equivalent JavaScript method in this.
Parameters
playerPlayer whose score changed
scoreUpdated player score
void UiInternal::openingCinematicCompleted ( )
signal

Emitted when the opening cinematic movie is done showing.

void UiInternal::pauseRequested ( )
signal

Emitted when the UI requests the Game to be paused.

void UiInternal::playLevelRequested ( LevelProgression levelProgression,
const QString levelName 
)
signal

Emitted when the player uses the UI to select a level to play.

Parameters
levelProgressionLevelProgression in which levelName resides
levelNameName of level to play
void UiInternal::playNextLevelRequested ( )
signal

Emitted when the player uses the UI to play the next level in the LevelProgression.

void UiInternal::previousProgressionChanged ( )
signal

Emitted when previousProgression changes.

void UiInternal::quitRequested ( )
signal

Emitted when the player uses the UI to quit the game.

void UiInternal::resumeRequested ( )
signal

Emitted when the UI requests the Game to be resumed.

void UiInternal::setBGMMuted ( bool  value)

Sets bgmMuted.

Parameters
valueBoolean to set bgmMuted to
void UiInternal::setCurrentProgression ( LevelProgression value)

Sets currentProgression.

Parameters
valueLevelProgression to set currentProgression to
void UiInternal::setLevelProgressionList ( LevelProgressionList value)

Sets levelProgressions.

Parameters
valueLevelProgressionList to set levelProgressions to
void UiInternal::setMenuBGMTrack ( const QString value)

Sets menuBGMTrack.

Parameters
valueString to set menuBGMTrack to
void UiInternal::setSignedIntoCloud ( bool  value)

Sets signedIntoCloud.

Parameters
valueBoolean to set signedIntoCloud to
void UiInternal::showAchievementsRequested ( )
signal

Emitted when the player uses the UI to show their Google Play Games Services achievements.

void UiInternal::signedIntoCloudChanged ( )
signal

Emitted when signedIntoCloud changes.

void UiInternal::signIntoCloudRequested ( )
signal

Emitted when the player uses the UI to try to sign into Google Play Games Services.

void UiInternal::tryStart ( )

Called by Game when attempting to start the UI.

Note
This function merely forwards the call to a JavaScript method of the same name in this.
void UiInternal::unmuteBGMRequested ( )
signal

Emitted when the player uses the UI to try to unmute the background music.

Property Documentation

bool UiInternal::bgmMuted
readwrite

Whether or not the background music is currently muted.

LevelProgression UiInternal::currentProgression
readwrite

LevelProgression currently being played.

LevelProgressionList UiInternal::levelProgressions
readwrite

Unique LevelProgressionList for the game.

QString UiInternal::menuBGMTrack
readwrite

Name of sound asset file to be played in a loop as background music while the menu is showing.

LevelProgression UiInternal::previousProgression
read

LevelProgression previously played.

bool UiInternal::signedIntoCloud
readwrite

Whether or not the player is currently signed into Google Play Games Services.