Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

GameNetworkUser

Represents a single user instance on Felgo Game Network. More...

Import Statement: import Felgo 3.0
Since: Felgo 2.8.5
Inherits:

QtObject

Inherited By:

MultiplayerUser

Properties

Signals

Methods

Detailed Description

This model item is used for working with Felgo Game Network users.

Property Documentation

blocked : bool

A boolean flag indicating if the user is currently blocked from Felgo Game Network leaderboards, multiplayer games and messaging.

A blocked user is not able to report a new score anymore and is hidden from all leaderboards.

To show a dialog at every app start if the user is blocked, write an onBlockedChanged handler. To show a dialog the first time a user gets blocked, use the userBlocked signal.

This property was introduced in Felgo 2.10.0.

See also userBlocked.


customData : string

A custom data string set for a specific user.

As an example, you can use this one to attach information that you want to display in a leaderboard, like the user's home country or other data you ask for in your game.

See also FelgoGameNetwork::updateUserCustomData().


[read-only] displayName : string

The displayName is used e.g. in leaderboards. It is the same as name, but wraps the name into "Me (name)" for the local user.

See also nickName, name, and shortDisplayName.


facebookId : string

The user's Facebook App ID if connect with Facebook Plugin.


gender : string

The gender of the user, if provided or set.


isFriend : bool

A boolean property representing if the currently logged in user is befriended with the current Felgo Game Network user.

You can also use the isFriend property if you don't want to use a property binding.


[read-only] isLocalUser : bool

A boolean property representing if the current Felgo Game Network user is the currently logged in, local user of your game.

You can also use the isLocalUser() method if you don't want to use a property binding.

See also isLocalUser().


locale : string

The locale in an ISO country code of the user, if provided or set. Example value is "AT".


[read-only] name : string

The name of the Felgo Game Network user. This is either the custom nickName if set or a localized string in the format "Player " + userId. You can also customize the "Player " to something else with the FelgoGameNetwork::defaultUserName property.

See also nickName, displayName, and shortDisplayName.


nickName : string

A custom nickname of a Felgo Game Network user, only set if a user provided one, otherwise an empty string.

A user can change his or her nickname in the Felgo Game Network profile view.

See also name, displayName, and shortDisplayName.


platform : string

The platform on which a user was playing the game the last time (e.g. "Android").


profileImageUrl : string

The URL to a profile image, if uploaded by the user or connected with Facebook Plugin.

You can use the profile image in your game like this to display an image if available:

 Image {
   src: user.profileImageUrl
   visible: user.profileImageUrl.length > 0
 }

See also hasCustomNickName().


ranking : int

A number representing a ranking in your game, most often used for multiplayer match-making. Users are by default matched with similar ranking values. By default, players can choose their own skill level in the ProfileView.

See also FelgoGameNetwork::updateUserRanking(), SimpleRanking, and NoRanking.


[read-only] shortDisplayName : string

A short displayName used in the match-making view. It is "Me" for the local player, otherwise the name.


userId : int

The user id of a Felgo Game Network user.


Signal Documentation

userBlocked()

This handler is called if a user got blocked from Felgo Game Network. The handler is called at app start only for the first time a user got blocked, at subsequent starts the handler is not called anymore.

Note: The corresponding handler is onUserBlocked.

This signal was introduced in Felgo 2.10.0.

See also blocked.


Method Documentation

hasCustomNickName()

Returns true if the user entered a custom nickName, otherwise false.

See also nickName.


isLocalUser()

Returns true if the current Felgo Game Network user is the currently logged in, local user, otherwise false.

You can also use the isLocalUser property if you want to use a property binding.

See also isLocalUser.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded