53 \preliminary |
53 \preliminary |
54 \brief The QProximityReading class represents one reading from the |
54 \brief The QProximityReading class represents one reading from the |
55 proximity sensor. |
55 proximity sensor. |
56 |
56 |
57 \target QProximityReading_Units |
57 \target QProximityReading_Units |
58 The proximity sensor returns an indication of how far the user is |
58 The proximity sensor can only indicate if an object is close or not. |
59 away from the device using the pre-defined values found in the |
59 |
60 QProximityReading::Proximity enum. |
60 The distance at which an object is considered close is device-specific. This |
|
61 distance may be available in the QSensor::outputRanges property. |
61 */ |
62 */ |
62 |
63 |
63 /*! |
64 /*! |
64 \enum QProximityReading::Proximity |
65 \property QProximityReading::close |
|
66 \brief a value indicating if something is close. |
65 |
67 |
66 This enum represents the proximity of the user. |
68 Set to true if something is close. |
|
69 Set to false is nothing is close. |
67 |
70 |
68 \value Undefined The proximity is unknown. |
|
69 \value Close The user is close to the device. |
|
70 \value NotClose The user is not close to the device. |
|
71 */ |
|
72 |
|
73 /*! |
|
74 \property QProximityReading::proximity |
|
75 \brief the proximity of the user. |
|
76 |
|
77 The value is an indication of if the user is close or not. |
|
78 \sa QProximityReading_Units |
71 \sa QProximityReading_Units |
79 */ |
72 */ |
80 |
73 |
81 QProximityReading::Proximity QProximityReading::proximity() const |
74 bool QProximityReading::close() const |
82 { |
75 { |
83 return static_cast<QProximityReading::Proximity>(d->proximity); |
76 return d->close; |
84 } |
77 } |
85 |
78 |
86 /*! |
79 /*! |
87 Sets the \a proximity of the user. |
80 Sets the close value to \a close. |
88 */ |
81 */ |
89 void QProximityReading::setProximity(QProximityReading::Proximity proximity) |
82 void QProximityReading::setClose(bool close) |
90 { |
83 { |
91 d->proximity = proximity; |
84 d->close = close; |
92 } |
85 } |
93 |
86 |
94 // ===================================================================== |
87 // ===================================================================== |
95 |
|
96 // begin generated code |
|
97 |
88 |
98 /*! |
89 /*! |
99 \class QProximityFilter |
90 \class QProximityFilter |
100 \ingroup sensors_filter |
91 \ingroup sensors_filter |
101 |
92 |