QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WeightScaleMessage Class Reference

The WeightScaleMessage class represents a FIT WeightScaleMessage data message. More...

Inheritance diagram for WeightScaleMessage:
[legend]
Collaboration diagram for WeightScaleMessage:
[legend]

Public Member Functions

 WeightScaleMessage ()
 Constructs a WeightScaleMessage object. More...
 
DateTime timestamp () const
 Returns the WeightScaleMessage data message's timestamp field's current value. More...
 
Weight weight () const
 Returns the WeightScaleMessage data message's weight field's current value. More...
 
quint16 percentFat () const
 Returns the WeightScaleMessage data message's percentFat field's current value. More...
 
quint16 percentHydration () const
 Returns the WeightScaleMessage data message's percentHydration field's current value. More...
 
quint16 visceralFatMass () const
 Returns the WeightScaleMessage data message's visceralFatMass field's current value. More...
 
quint16 boneMass () const
 Returns the WeightScaleMessage data message's boneMass field's current value. More...
 
quint16 muscleMass () const
 Returns the WeightScaleMessage data message's muscleMass field's current value. More...
 
quint16 basalMet () const
 Returns the WeightScaleMessage data message's basalMet field's current value. More...
 
quint8 physiqueRating () const
 Returns the WeightScaleMessage data message's physiqueRating field's current value. More...
 
quint16 activeMet () const
 Returns the WeightScaleMessage data message's activeMet field's current value. More...
 
quint8 metabolicAge () const
 Returns the WeightScaleMessage data message's metabolicAge field's current value. More...
 
quint8 visceralFatRating () const
 Returns the WeightScaleMessage data message's visceralFatRating field's current value. More...
 
MessageIndex userProfileIndex () const
 Returns the WeightScaleMessage data message's userProfileIndex field's current value. More...
 
void setTimestamp (const DateTime timestamp)
 Sets the timestamp field to timestamp. More...
 
void setWeight (const Weight weight)
 Sets the weight field to weight. More...
 
void setPercentFat (const quint16 percentFat)
 Sets the percentFat field to percentFat. More...
 
void setPercentHydration (const quint16 percentHydration)
 Sets the percentHydration field to percentHydration. More...
 
void setVisceralFatMass (const quint16 visceralFatMass)
 Sets the visceralFatMass field to visceralFatMass. More...
 
void setBoneMass (const quint16 boneMass)
 Sets the boneMass field to boneMass. More...
 
void setMuscleMass (const quint16 muscleMass)
 Sets the muscleMass field to muscleMass. More...
 
void setBasalMet (const quint16 basalMet)
 Sets the basalMet field to basalMet. More...
 
void setPhysiqueRating (const quint8 physiqueRating)
 Sets the physiqueRating field to physiqueRating. More...
 
void setActiveMet (const quint16 activeMet)
 Sets the activeMet field to activeMet. More...
 
void setMetabolicAge (const quint8 metabolicAge)
 Sets the metabolicAge field to metabolicAge. More...
 
void setVisceralFatRating (const quint8 visceralFatRating)
 Sets the visceralFatRating field to visceralFatRating. More...
 
void setUserProfileIndex (const MessageIndex userProfileIndex)
 Sets the userProfileIndex field to userProfileIndex. More...
 
- Public Member Functions inherited from AbstractDataMessage
 ~AbstractDataMessage ()
 Destroys the AbstractDataMessage object.
 
MesgNum globalMessageNumber () const
 Returns the data message's global message number. More...
 

Protected Member Functions

 WeightScaleMessage (WeightScaleMessagePrivate *const d)
 
- Protected Member Functions inherited from AbstractDataMessage
 AbstractDataMessage (AbstractDataMessagePrivate *const d)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractDataMessage
static AbstractDataMessagefromData (const DataDefinition *const defn, const QByteArray &record)
 Constructs the relevant AbstractDataMessage-derived class to parse record according to defn. More...
 
- Protected Attributes inherited from AbstractDataMessage
AbstractDataMessagePrivate *const d_ptr
 Internal d-pointer.
 

Detailed Description

The WeightScaleMessage class represents a FIT WeightScaleMessage data message.

See also
DataMessage

Definition at line 39 of file weightscalemessage.h.

Constructor & Destructor Documentation

◆ WeightScaleMessage() [1/2]

WeightScaleMessage::WeightScaleMessage ( )

Constructs a WeightScaleMessage object.

Typically, instances of this class will be returned by FitStreamReader::readNext, but this constructor may be used, along with the relevant setter methods, to create a valid message.

Definition at line 52 of file weightscalemessage.cpp.

53 {
54 
55 }
The AbstractDataMessage class is the polymorphic base class for all FIT Data Message classes.

◆ WeightScaleMessage() [2/2]

WeightScaleMessage::WeightScaleMessage ( WeightScaleMessagePrivate *const  d)
explicitprotected

Constructs a WeightScaleMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file weightscalemessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ activeMet()

quint16 WeightScaleMessage::activeMet ( ) const

Returns the WeightScaleMessage data message's activeMet field's current value.

~4kJ per kcal, 0.25 allows max 16384 kcal

Returns
the activeMet field value.

Definition at line 175 of file weightscalemessage.cpp.

176 {
177  Q_D(const WeightScaleMessage);
178  return d->activeMet;
179 }
The WeightScaleMessage class represents a FIT WeightScaleMessage data message.

Referenced by setActiveMet().

Here is the caller graph for this function:

◆ basalMet()

quint16 WeightScaleMessage::basalMet ( ) const

Returns the WeightScaleMessage data message's basalMet field's current value.

Returns
the basalMet field value.

Definition at line 151 of file weightscalemessage.cpp.

152 {
153  Q_D(const WeightScaleMessage);
154  return d->basalMet;
155 }

Referenced by setBasalMet().

Here is the caller graph for this function:

◆ boneMass()

quint16 WeightScaleMessage::boneMass ( ) const

Returns the WeightScaleMessage data message's boneMass field's current value.

Returns
the boneMass field value.

Definition at line 129 of file weightscalemessage.cpp.

130 {
131  Q_D(const WeightScaleMessage);
132  return d->boneMass;
133 }

Referenced by setBoneMass().

Here is the caller graph for this function:

◆ metabolicAge()

quint8 WeightScaleMessage::metabolicAge ( ) const

Returns the WeightScaleMessage data message's metabolicAge field's current value.

Returns
the metabolicAge field value.

Definition at line 186 of file weightscalemessage.cpp.

187 {
188  Q_D(const WeightScaleMessage);
189  return d->metabolicAge;
190 }

Referenced by setMetabolicAge().

Here is the caller graph for this function:

◆ muscleMass()

quint16 WeightScaleMessage::muscleMass ( ) const

Returns the WeightScaleMessage data message's muscleMass field's current value.

Returns
the muscleMass field value.

Definition at line 140 of file weightscalemessage.cpp.

141 {
142  Q_D(const WeightScaleMessage);
143  return d->muscleMass;
144 }

Referenced by setMuscleMass().

Here is the caller graph for this function:

◆ percentFat()

quint16 WeightScaleMessage::percentFat ( ) const

Returns the WeightScaleMessage data message's percentFat field's current value.

Returns
the percentFat field value.

Definition at line 96 of file weightscalemessage.cpp.

97 {
98  Q_D(const WeightScaleMessage);
99  return d->percentFat;
100 }

Referenced by setPercentFat().

Here is the caller graph for this function:

◆ percentHydration()

quint16 WeightScaleMessage::percentHydration ( ) const

Returns the WeightScaleMessage data message's percentHydration field's current value.

Returns
the percentHydration field value.

Definition at line 107 of file weightscalemessage.cpp.

108 {
109  Q_D(const WeightScaleMessage);
110  return d->percentHydration;
111 }

Referenced by setPercentHydration().

Here is the caller graph for this function:

◆ physiqueRating()

quint8 WeightScaleMessage::physiqueRating ( ) const

Returns the WeightScaleMessage data message's physiqueRating field's current value.

Returns
the physiqueRating field value.

Definition at line 162 of file weightscalemessage.cpp.

163 {
164  Q_D(const WeightScaleMessage);
165  return d->physiqueRating;
166 }

Referenced by setPhysiqueRating().

Here is the caller graph for this function:

◆ setActiveMet()

void WeightScaleMessage::setActiveMet ( const quint16  activeMet)

Sets the activeMet field to activeMet.

Parameters
activeMetThe field value to set.

Definition at line 312 of file weightscalemessage.cpp.

313 {
314  Q_D(WeightScaleMessage);
315  d->activeMet = activeMet;
316 }
quint16 activeMet() const
Returns the WeightScaleMessage data message's activeMet field's current value.

References activeMet().

Here is the call graph for this function:

◆ setBasalMet()

void WeightScaleMessage::setBasalMet ( const quint16  basalMet)

Sets the basalMet field to basalMet.

Parameters
basalMetThe field value to set.

Definition at line 292 of file weightscalemessage.cpp.

293 {
294  Q_D(WeightScaleMessage);
295  d->basalMet = basalMet;
296 }
quint16 basalMet() const
Returns the WeightScaleMessage data message's basalMet field's current value.

References basalMet().

Here is the call graph for this function:

◆ setBoneMass()

void WeightScaleMessage::setBoneMass ( const quint16  boneMass)

Sets the boneMass field to boneMass.

Parameters
boneMassThe field value to set.

Definition at line 272 of file weightscalemessage.cpp.

273 {
274  Q_D(WeightScaleMessage);
275  d->boneMass = boneMass;
276 }
quint16 boneMass() const
Returns the WeightScaleMessage data message's boneMass field's current value.

References boneMass().

Here is the call graph for this function:

◆ setMetabolicAge()

void WeightScaleMessage::setMetabolicAge ( const quint8  metabolicAge)

Sets the metabolicAge field to metabolicAge.

Parameters
metabolicAgeThe field value to set.

Definition at line 322 of file weightscalemessage.cpp.

323 {
324  Q_D(WeightScaleMessage);
325  d->metabolicAge = metabolicAge;
326 }
quint8 metabolicAge() const
Returns the WeightScaleMessage data message's metabolicAge field's current value.

References metabolicAge().

Here is the call graph for this function:

◆ setMuscleMass()

void WeightScaleMessage::setMuscleMass ( const quint16  muscleMass)

Sets the muscleMass field to muscleMass.

Parameters
muscleMassThe field value to set.

Definition at line 282 of file weightscalemessage.cpp.

283 {
284  Q_D(WeightScaleMessage);
285  d->muscleMass = muscleMass;
286 }
quint16 muscleMass() const
Returns the WeightScaleMessage data message's muscleMass field's current value.

References muscleMass().

Here is the call graph for this function:

◆ setPercentFat()

void WeightScaleMessage::setPercentFat ( const quint16  percentFat)

Sets the percentFat field to percentFat.

Parameters
percentFatThe field value to set.

Definition at line 242 of file weightscalemessage.cpp.

243 {
244  Q_D(WeightScaleMessage);
245  d->percentFat = percentFat;
246 }
quint16 percentFat() const
Returns the WeightScaleMessage data message's percentFat field's current value.

References percentFat().

Here is the call graph for this function:

◆ setPercentHydration()

void WeightScaleMessage::setPercentHydration ( const quint16  percentHydration)

Sets the percentHydration field to percentHydration.

Parameters
percentHydrationThe field value to set.

Definition at line 252 of file weightscalemessage.cpp.

253 {
254  Q_D(WeightScaleMessage);
255  d->percentHydration = percentHydration;
256 }
quint16 percentHydration() const
Returns the WeightScaleMessage data message's percentHydration field's current value.

References percentHydration().

Here is the call graph for this function:

◆ setPhysiqueRating()

void WeightScaleMessage::setPhysiqueRating ( const quint8  physiqueRating)

Sets the physiqueRating field to physiqueRating.

Parameters
physiqueRatingThe field value to set.

Definition at line 302 of file weightscalemessage.cpp.

303 {
304  Q_D(WeightScaleMessage);
305  d->physiqueRating = physiqueRating;
306 }
quint8 physiqueRating() const
Returns the WeightScaleMessage data message's physiqueRating field's current value.

References physiqueRating().

Here is the call graph for this function:

◆ setTimestamp()

void WeightScaleMessage::setTimestamp ( const DateTime  timestamp)

Sets the timestamp field to timestamp.

Parameters
timestampThe field value to set.

Definition at line 222 of file weightscalemessage.cpp.

223 {
224  Q_D(WeightScaleMessage);
225  d->timestamp = timestamp;
226 }
DateTime timestamp() const
Returns the WeightScaleMessage data message's timestamp field's current value.

References timestamp().

Here is the call graph for this function:

◆ setUserProfileIndex()

void WeightScaleMessage::setUserProfileIndex ( const MessageIndex  userProfileIndex)

Sets the userProfileIndex field to userProfileIndex.

Parameters
userProfileIndexThe field value to set.

Definition at line 342 of file weightscalemessage.cpp.

343 {
344  Q_D(WeightScaleMessage);
345  d->userProfileIndex = userProfileIndex;
346 }
MessageIndex userProfileIndex() const
Returns the WeightScaleMessage data message's userProfileIndex field's current value.

References userProfileIndex().

Here is the call graph for this function:

◆ setVisceralFatMass()

void WeightScaleMessage::setVisceralFatMass ( const quint16  visceralFatMass)

Sets the visceralFatMass field to visceralFatMass.

Parameters
visceralFatMassThe field value to set.

Definition at line 262 of file weightscalemessage.cpp.

263 {
264  Q_D(WeightScaleMessage);
265  d->visceralFatMass = visceralFatMass;
266 }
quint16 visceralFatMass() const
Returns the WeightScaleMessage data message's visceralFatMass field's current value.

References visceralFatMass().

Here is the call graph for this function:

◆ setVisceralFatRating()

void WeightScaleMessage::setVisceralFatRating ( const quint8  visceralFatRating)

Sets the visceralFatRating field to visceralFatRating.

Parameters
visceralFatRatingThe field value to set.

Definition at line 332 of file weightscalemessage.cpp.

333 {
334  Q_D(WeightScaleMessage);
335  d->visceralFatRating = visceralFatRating;
336 }
quint8 visceralFatRating() const
Returns the WeightScaleMessage data message's visceralFatRating field's current value.

References visceralFatRating().

Here is the call graph for this function:

◆ setWeight()

void WeightScaleMessage::setWeight ( const Weight  weight)

Sets the weight field to weight.

Parameters
weightThe field value to set.

Definition at line 232 of file weightscalemessage.cpp.

233 {
234  Q_D(WeightScaleMessage);
235  d->weight = weight;
236 }
Weight weight() const
Returns the WeightScaleMessage data message's weight field's current value.

References weight().

Here is the call graph for this function:

◆ timestamp()

DateTime WeightScaleMessage::timestamp ( ) const

Returns the WeightScaleMessage data message's timestamp field's current value.

Returns
the timestamp field value.

Definition at line 74 of file weightscalemessage.cpp.

75 {
76  Q_D(const WeightScaleMessage);
77  return d->timestamp;
78 }

Referenced by setTimestamp().

Here is the caller graph for this function:

◆ userProfileIndex()

MessageIndex WeightScaleMessage::userProfileIndex ( ) const

Returns the WeightScaleMessage data message's userProfileIndex field's current value.

Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.

Returns
the userProfileIndex field value.

Definition at line 211 of file weightscalemessage.cpp.

212 {
213  Q_D(const WeightScaleMessage);
214  return d->userProfileIndex;
215 }

Referenced by setUserProfileIndex().

Here is the caller graph for this function:

◆ visceralFatMass()

quint16 WeightScaleMessage::visceralFatMass ( ) const

Returns the WeightScaleMessage data message's visceralFatMass field's current value.

Returns
the visceralFatMass field value.

Definition at line 118 of file weightscalemessage.cpp.

119 {
120  Q_D(const WeightScaleMessage);
121  return d->visceralFatMass;
122 }

Referenced by setVisceralFatMass().

Here is the caller graph for this function:

◆ visceralFatRating()

quint8 WeightScaleMessage::visceralFatRating ( ) const

Returns the WeightScaleMessage data message's visceralFatRating field's current value.

Returns
the visceralFatRating field value.

Definition at line 197 of file weightscalemessage.cpp.

198 {
199  Q_D(const WeightScaleMessage);
200  return d->visceralFatRating;
201 }

Referenced by setVisceralFatRating().

Here is the caller graph for this function:

◆ weight()

Weight WeightScaleMessage::weight ( ) const

Returns the WeightScaleMessage data message's weight field's current value.

Returns
the weight field value.

Definition at line 85 of file weightscalemessage.cpp.

86 {
87  Q_D(const WeightScaleMessage);
88  return d->weight;
89 }

Referenced by setWeight().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: