IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

LogicalDevice QML Type

QML frontend for the Qt3DInput::QLogicalDevice C++ class.

This type was introduced in Qt 5.6.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

LogicalDevice QML Type

  • Import Statement: import Qt3D.Input 2.4

  • Since:: Qt 5.6

  • Instantiates:: QLogicalDevice

Detailed Description

Allows the user to define a set of actions that they wish to use within an application.

 
Sélectionnez
LogicalDevice {
    id: keyboardLogicalDevice

    actions: [
        Action {
            name: "fire"
            inputs: [
                ActionInput {
                    sourceDevice: keyboardSourceDevice
                    keys: [Qt.Key_Space]
                },
                InputChord {
                    tolerance: 10
                    inputs: [
                        ActionInput {
                            sourceDevice: keyboardSourceDevice
                            keys: [Qt.Key_A]
                        },
                        ActionInput {
                            sourceDevice: keyboardSourceDevice
                            keys: [Qt.Key_S]
                        }
                    ]
                }
            ]
        },
        Action {
            name: "reload"
            inputs: [
                ActionInput {
                    sourceDevice: keyboardSourceDevice
                    keys: [Qt.Key_Alt]
                }
            ]
        },
        Action {
            name: "combo"
            inputs: [
                InputSequence {
                    interval: 1000
                    timeout: 10000
                    inputs: [
                        ActionInput {
                            sourceDevice: keyboardSourceDevice
                            keys: [Qt.Key_G]
                        },
                        ActionInput {
                            sourceDevice: keyboardSourceDevice
                            keys: [Qt.Key_D]
                        },
                        ActionInput {
                            sourceDevice: keyboardSourceDevice
                            keys: [Qt.Key_J]
                        }
                    ]
                }
            ]
        }
    ]
}

Property Documentation

 

actions : list<Action>

The actions used by this Logical Device

axis : list<Axis>

The axis used by this Logical Device

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+