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

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

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

Public Member Functions

 SportMessage ()
 Constructs a SportMessage object. More...
 
Sport sport () const
 Returns the SportMessage data message's sport field's current value. More...
 
SubSport subSport () const
 Returns the SportMessage data message's subSport field's current value. More...
 
QString name () const
 Returns the SportMessage data message's name field's current value. More...
 
void setSport (const Sport sport)
 Sets the sport field to sport. More...
 
void setSubSport (const SubSport subSport)
 Sets the subSport field to subSport. More...
 
void setName (const QString name)
 Sets the name field to name. 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

 SportMessage (SportMessagePrivate *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 SportMessage class represents a FIT SportMessage data message.

See also
DataMessage

Definition at line 39 of file sportmessage.h.

Constructor & Destructor Documentation

◆ SportMessage() [1/2]

SportMessage::SportMessage ( )

Constructs a SportMessage 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 sportmessage.cpp.

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

◆ SportMessage() [2/2]

SportMessage::SportMessage ( SportMessagePrivate *const  d)
explicitprotected

Constructs a SportMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file sportmessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ name()

QString SportMessage::name ( ) const

Returns the SportMessage data message's name field's current value.

Returns
the name field value.

Definition at line 96 of file sportmessage.cpp.

97 {
98  Q_D(const SportMessage);
99  return d->name;
100 }
The SportMessage class represents a FIT SportMessage data message.
Definition: sportmessage.h:39

Referenced by setName().

Here is the caller graph for this function:

◆ setName()

void SportMessage::setName ( const QString  name)

Sets the name field to name.

Parameters
nameThe field value to set.

Definition at line 127 of file sportmessage.cpp.

128 {
129  Q_D(SportMessage);
130  d->name = name;
131 }
QString name() const
Returns the SportMessage data message's name field's current value.

References name().

Here is the call graph for this function:

◆ setSport()

void SportMessage::setSport ( const Sport  sport)

Sets the sport field to sport.

Parameters
sportThe field value to set.

Definition at line 107 of file sportmessage.cpp.

108 {
109  Q_D(SportMessage);
110  d->sport = sport;
111 }
Sport sport() const
Returns the SportMessage data message's sport field's current value.

References sport().

Here is the call graph for this function:

◆ setSubSport()

void SportMessage::setSubSport ( const SubSport  subSport)

Sets the subSport field to subSport.

Parameters
subSportThe field value to set.

Definition at line 117 of file sportmessage.cpp.

118 {
119  Q_D(SportMessage);
120  d->subSport = subSport;
121 }
SubSport subSport() const
Returns the SportMessage data message's subSport field's current value.

References subSport().

Here is the call graph for this function:

◆ sport()

Sport SportMessage::sport ( ) const

Returns the SportMessage data message's sport field's current value.

Returns
the sport field value.

Definition at line 74 of file sportmessage.cpp.

75 {
76  Q_D(const SportMessage);
77  return d->sport;
78 }

Referenced by setSport().

Here is the caller graph for this function:

◆ subSport()

SubSport SportMessage::subSport ( ) const

Returns the SportMessage data message's subSport field's current value.

Returns
the subSport field value.

Definition at line 85 of file sportmessage.cpp.

86 {
87  Q_D(const SportMessage);
88  return d->subSport;
89 }

Referenced by setSubSport().

Here is the caller graph for this function:

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