summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ogilvie <colin.ogilvie@kdab.com>2016-01-21 16:19:11 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-02-08 10:43:41 +0000
commit2a4ad42efb9d7eb541b908fb5a723aee942970da (patch)
tree23b6a06330009e65c9c4a292b0630c904f70efb0
parentd0ede82467f9cc04adf22e8d93ffd1c703772311 (diff)
Doc: Added doc for action inputs
Change-Id: I97269ff6171f3f6928c0538e8216bcd172233c0f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/input/frontend/qabstractactioninput.cpp25
-rw-r--r--src/input/frontend/qabstractaggregateactioninput.cpp51
-rw-r--r--src/input/frontend/qaction.cpp64
-rw-r--r--src/input/frontend/qactioninput.cpp63
-rw-r--r--src/input/frontend/qinputchord.cpp45
-rw-r--r--src/input/frontend/qinputsequence.cpp70
6 files changed, 289 insertions, 29 deletions
diff --git a/src/input/frontend/qabstractactioninput.cpp b/src/input/frontend/qabstractactioninput.cpp
index 7d291d8e6..2e7a4cb51 100644
--- a/src/input/frontend/qabstractactioninput.cpp
+++ b/src/input/frontend/qabstractactioninput.cpp
@@ -42,12 +42,37 @@
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
+/*!
+ \class Qt3DInput::QAbstractActionInput
+ \inherits QNode
+ \inmodule Qt3DInput
+ \since 5.7
+
+ \brief QAbstractActionInput is the base class for the Action Input and all Aggregate Action Inputs.
+*/
+
+/*!
+ \qmltype QAbstractActionInput
+ \inqmlmodule Qt3D.Input
+ \instantiates Qt3DInput::QAbstractActionInput
+ \brief QML frontend for the abstract Qt3DInput::QAbstractActionInput C++ class.
+
+ The base class for the Action Input and all Aggregate Action Inputs.
+ \since 5.7
+*/
+
+/*!
+ \internal
+*/
QAbstractActionInput::QAbstractActionInput(Qt3DCore::QNodePrivate &dd, Qt3DCore::QNode *parent)
: Qt3DCore::QNode(dd, parent)
{
}
+/*!
+ \internal
+*/
QAbstractActionInput::~QAbstractActionInput()
{
}
diff --git a/src/input/frontend/qabstractaggregateactioninput.cpp b/src/input/frontend/qabstractaggregateactioninput.cpp
index cb7897411..8fb8a6b90 100644
--- a/src/input/frontend/qabstractaggregateactioninput.cpp
+++ b/src/input/frontend/qabstractaggregateactioninput.cpp
@@ -45,20 +45,63 @@ QT_BEGIN_NAMESPACE
namespace Qt3DInput {
+/*!
+ \internal
+*/
QAbstractAggregateActionInputPrivate::QAbstractAggregateActionInputPrivate()
: m_inputs()
{
}
+/*!
+ \class Qt3DInput::QAbstractAggregateActionInput
+ \inherits QAbstractActionInput
+
+ \inmodule Qt3DInput
+ \since 5.7
+
+ \brief QAbstractAggregateActionInput is the base class for the all Aggregate Action Inputs.
+
+ The QAbstractAggregateActionInput class provides the storage for all the aggregate actions child actions.
+*/
+
+/*!
+ \qmltype QAbstractAggregateActionInput
+ \inqmlmodule Qt3D.Input
+ \inherits QAbstractActionInput
+ \instantiates Qt3DInput::QAbstractAggregateActionInput
+ \brief QML frontend for the abstract Qt3DInput::QAbstractAggregateActionInput C++ class.
+
+ The base class for all Aggregate Action Inputs.
+ \since 5.7
+*/
+
+/*!
+ \internal
+*/
QAbstractAggregateActionInput::QAbstractAggregateActionInput(Qt3DInput::QAbstractAggregateActionInputPrivate &dd, Qt3DCore::QNode *parent)
: Qt3DInput::QAbstractActionInput(dd, parent)
{
}
+/*!
+ \internal
+*/
QAbstractAggregateActionInput::~QAbstractAggregateActionInput()
{
}
+/*!
+ \qmlproperty QQmlListProperty<Qt3DInput::QAbstractActionInput> Qt3D.Input::QAbstractAggregateActionInput::inputs
+
+ The list of QAbstractActionInput that must be triggered to trigger this aggregate input.
+*/
+
+/*!
+ Append the QAbstractActionInput \a input to the end of this Agggregate Actions input vector.
+
+ \sa removeInput
+ */
void QAbstractAggregateActionInput::addInput(QAbstractActionInput *input)
{
Q_D(QAbstractAggregateActionInput);
@@ -77,6 +120,11 @@ void QAbstractAggregateActionInput::addInput(QAbstractActionInput *input)
}
}
+/*!
+ Remove the QAbstractActionInput \a input from this Agggregate Actions input vector.
+
+ \sa addInput
+ */
void QAbstractAggregateActionInput::removeInput(QAbstractActionInput *input)
{
Q_D(QAbstractAggregateActionInput);
@@ -93,6 +141,9 @@ void QAbstractAggregateActionInput::removeInput(QAbstractActionInput *input)
}
}
+/*!
+ Return vector of QAbstractActionInput's in this Agggregate Actions input vector.
+ */
QVector<QAbstractActionInput *> QAbstractAggregateActionInput::inputs() const
{
Q_D(const QAbstractAggregateActionInput);
diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp
index 32aed0225..4d5395ae3 100644
--- a/src/input/frontend/qaction.cpp
+++ b/src/input/frontend/qaction.cpp
@@ -45,7 +45,10 @@
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-
+/*!
+ \class Qt3DInput::QActionPrivate
+ \internal
+*/
class QActionPrivate : public Qt3DCore::QNodePrivate
{
public:
@@ -58,31 +61,48 @@ public:
};
/*!
- * \qmltype Action
- * \inqmlmodule Qt3D.Input
- * \since 5.6
- * \TODO
- *
- */
+ \class Qt3DInput::QActionInput
+ \inmodule Qt3DInput
+ \inherits QAbstractActionInput
+ \brief QActionInput stores Device and Keys used to trigger an input event.
+ \since 5.7
+*/
/*!
- * \class Qt3DInput::QAction
- * \inmodule Qt3DInput
- * \since 5.6
- * \TODO
- *
- */
+ \qmltype Action
+ \inqmlmodule Qt3D.Input
+ \instantiates Qt3DInput::QAction
+ \brief QML frontend for the Qt3DInput::QAction C++ class.
+ Links a set of QAbstractActionInputs that trigger the same event.
+ \since 5.7
+*/
+
+/*!
+ Constructs a new QAction instance with parent \a parent.
+ */
QAction::QAction(Qt3DCore::QNode *parent)
: Qt3DCore::QNode(*new QActionPrivate(), parent)
{
}
+/*!
+ Deletes the QAction instance.
+ */
QAction::~QAction()
{
QNode::cleanup();
}
+/*!
+ \qmlproperty QString Qt3D.Input::Action::name
+
+ the name used to identify this action
+*/
+
+/*!
+ Set the name used to identify this action.
+ */
void QAction::setName(const QString &name)
{
Q_D(QAction);
@@ -92,12 +112,24 @@ void QAction::setName(const QString &name)
}
}
+/*!
+ Returns the name used to identify this action.
+ */
QString QAction::name() const
{
Q_D(const QAction);
return d->m_name;
}
+/*!
+ \qmlproperty QQmlListProperty<Qt3DInput::QAbstractActionInput> Qt3D.Input::Action::inputs
+
+ the list of QAbstractActionInput that must be triggered to trigger this Action.
+*/
+
+/*!
+ Append QAbstractActionInput \a input to the list of inputs that can trigger this action.
+ */
void QAction::addInput(QAbstractActionInput *input)
{
Q_D(QAction);
@@ -116,6 +148,9 @@ void QAction::addInput(QAbstractActionInput *input)
}
}
+/*!
+ Remove QAbstractActionInput \a input to the list of inputs that can trigger this action.
+ */
void QAction::removeInput(QAbstractActionInput *input)
{
Q_D(QAction);
@@ -132,6 +167,9 @@ void QAction::removeInput(QAbstractActionInput *input)
}
}
+/*!
+ Returns the list of inputs that can trigger this action.
+ */
QVector<QAbstractActionInput *> QAction::inputs() const
{
Q_D(const QAction);
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 6fd520669..ac7806f67 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -44,7 +44,10 @@
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-
+/*!
+ \class Qt3DInput::QActionInputPrivate
+ \internal
+*/
class QActionInputPrivate : public Qt3DCore::QNodePrivate
{
public:
@@ -58,39 +61,59 @@ public:
};
/*!
- * \qmltype ActionInput
- * \instantiates Qt3DInput::QActionInput
- * \inqmlmodule Qt3D.Input
- * \since 5.5
- * \TODO
- *
- */
+ \class Qt3DInput::QActionInput
+ \inmodule Qt3DInput
+ \inherits QAbstractActionInput
+ \brief QActionInput stores Device and Keys used to trigger an input event.
+ \since 5.7
+*/
/*!
- * \class Qt3DInput::QActionInput
- * \inmodule Qt3DInput
- * \since 5.5
- * \TODO
- *
- */
+ \qmltype ActionInput
+ \inqmlmodule Qt3D.Input
+ \inherits QAbstractActionInput
+ \instantiates Qt3DInput::QActionInput
+ \brief QML frontend for the Qt3DInput::QActionInput C++ class.
+
+ Links a physical device and selected keys on it which can trigger this action.
+ \since 5.7
+*/
+/*!
+ Constructs a new QActionInput instance with parent \a parent.
+ */
QActionInput::QActionInput(Qt3DCore::QNode *parent)
: Qt3DInput::QAbstractActionInput(*new QActionInputPrivate(), parent)
{
}
+/*!
+ Deletes the QActionInput instance.
+ */
QActionInput::~QActionInput()
{
QNode::cleanup();
}
+/*!
+ Return the Keys to trigger the QActionInput instance.
+ */
QVariantList QActionInput::keys() const
{
Q_D(const QActionInput);
return d->m_keys;
}
+/*!
+ \qmlproperty QAbstractPhysicalDevice Qt3D.Input::ActionInput::sourceDevice
+
+ the current source device of the ActionInput
+*/
+
+/*!
+ Set the current source device of the QActionInput instance.
+ */
void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QActionInput);
@@ -106,12 +129,24 @@ void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
}
}
+/*!
+ Returns the current source device of the QActionInput instance.
+ */
QAbstractPhysicalDevice *QActionInput::sourceDevice() const
{
Q_D(const QActionInput);
return d->m_sourceDevice;
}
+/*!
+ \qmlproperty QVariantList Qt3D.Input::ActionInput::keys
+
+ The Keys that can trigger this Action
+*/
+
+/*!
+ Set the keys to trigger the QActionInput instance.
+ */
void QActionInput::setKeys(const QVariantList &keys)
{
Q_D(QActionInput);
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index 303bf2ff1..bb9af6c7b 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -44,7 +44,10 @@
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-
+/*!
+ \class Qt3DInput::QInputChordPrivate
+ \internal
+*/
class QInputChordPrivate : public Qt3DInput::QAbstractAggregateActionInputPrivate
{
public:
@@ -56,23 +59,63 @@ public:
int m_tolerance;
};
+/*!
+ \class Qt3DInput::QInputChord
+ \inmodule Qt3DInput
+ \inherits QAbstractAggregateActionInput
+ \brief QInputChord represents a set of QAbstractActionInput's that must be triggerd at once.
+
+ \since 5.7
+*/
+
+/*!
+ \qmltype InputChord
+ \inqmlmodule Qt3D.Input
+ \inherits QAbstractAggregateActionInput
+ \instantiates Qt3DInput::QInputChord
+ \brief QML frontend for the Qt3DInput::QInputChord C++ class.
+
+ Represents a set of QAbstractActionInput's that must be triggerd at once.
+ \since 5.7
+*/
+
+/*!
+ Constructs a new QInputChord with parent \a parent.
+ */
QInputChord::QInputChord(Qt3DCore::QNode *parent)
: Qt3DInput::QAbstractAggregateActionInput(*new QInputChordPrivate(), parent)
{
}
+/*!
+ Deletes the QInputChord instance.
+ */
QInputChord::~QInputChord()
{
QNode::cleanup();
}
+/*!
+ \qmlproperty int Qt3D.Input::InputChord::tollerance
+
+ the time in milliseconds in which all QAbstractActionInput's in the input chord must triggered within.
+*/
+
+/*!
+ Returns the time in which all QAbstractActionInput's in the input chord must triggered within.
+ The time is in milliseconds
+ */
int QInputChord::tolerance() const
{
Q_D(const QInputChord);
return d->m_tolerance;
}
+/*!
+ Sets the time in which all QAbstractActionInput's in the input chord must triggered within.
+ The time is in milliseconds
+ */
void QInputChord::setTolerance(int tolerance)
{
Q_D(QInputChord);
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index 2bd193fc7..0a8ef281c 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -45,7 +45,10 @@
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
-
+/*!
+ \class Qt3DInput::QInputChordSequence
+ \internal
+*/
class QInputSequencePrivate : public Qt3DInput::QAbstractAggregateActionInputPrivate
{
public:
@@ -61,35 +64,93 @@ public:
bool m_sequential;
};
+/*!
+ \class Qt3DInput::QInputSequence
+ \inmodule Qt3DInput
+ \inherits QAbstractAggregateActionInput
+ \brief QInputSequence represents a set of QAbstractActionInput's that must be triggerd one after the other.
+ \since 5.7
+*/
+
+/*!
+ \qmltype InputSequence
+ \inqmlmodule Qt3D.Input
+ \inherits QAbstractAggregateActionInput
+ \instantiates Qt3DInput::QInputSequence
+ \brief QML frontend for the Qt3DInput::QInputSequence C++ class.
+
+ Represents a set of QAbstractActionInput's that must be triggerd one after the other.
+ \since 5.7
+*/
+
+/*!
+ Constructs a new QInputSequence with parent \a parent.
+ */
QInputSequence::QInputSequence(Qt3DCore::QNode *parent)
: Qt3DInput::QAbstractAggregateActionInput(*new QInputSequencePrivate(), parent)
{
}
+/*!
+ Deletes the QInputSequence instance.
+ */
QInputSequence::~QInputSequence()
{
QNode::cleanup();
}
+/*!
+ \qmlproperty int Qt3D.Input::InputSequence::timeout
+
+ the time in milliseconds in which all QAbstractActionInput's in the input sequence must triggered within.
+*/
+
+/*!
+ Returns the time in which all QAbstractActionInput's in the input sequence must triggered within.
+ The time is in milliseconds
+ */
int QInputSequence::timeout() const
{
Q_D(const QInputSequence);
return d->m_timeout;
}
+/*!
+ \qmlproperty int Qt3D.Input::InputSequence::interval
+
+ the maximum time in milliseconds in between consecutive QAbstractActionInput's in the input sequence.
+*/
+
+/*!
+ Returns the maximum time in between consecutive QAbstractActionInput's in the input sequence.
+ The time is in milliseconds
+ */
int QInputSequence::interval() const
{
Q_D(const QInputSequence);
return d->m_interval;
}
+/*!
+ \qmlproperty bool Qt3D.Input::InputSequence::sequential
+
+ if the QAbstractActionInput's in the input sequence must triggered in order.
+*/
+
+/*!
+ Returns true if the QAbstractActionInput's in the input sequence must triggered in order.
+ */
bool QInputSequence::sequential() const
{
Q_D(const QInputSequence);
return d->m_sequential;
}
+/*!
+ Set the time in which all QAbstractActionInput's in the input sequence must triggered within.
+ The time is in milliseconds
+ */
void QInputSequence::setTimeout(int timeout)
{
Q_D(QInputSequence);
@@ -99,6 +160,10 @@ void QInputSequence::setTimeout(int timeout)
}
}
+/*!
+ Set the maximum time in between consecutive QAbstractActionInput's in the input sequence.
+ The time is in milliseconds
+ */
void QInputSequence::setInterval(int interval)
{
Q_D(QInputSequence);
@@ -108,6 +173,9 @@ void QInputSequence::setInterval(int interval)
}
}
+/*!
+ Set if the QAbstractActionInput's in the input sequence must triggered in order.
+ */
void QInputSequence::setSequential(bool sequential)
{
Q_D(QInputSequence);