Represents the metadata for a public chat channel. More...
Header: | #include <ChannelPayload> |
ChannelPayload(const QJsonObject &json) | |
QString | description() const |
int | id() const |
QString | name() const |
void | setDescription(const QString &description) |
void | setId(int id) |
void | setName(const QString &name) |
void | setSortOrder(int order) |
int | sortOrder() const |
bool | operator<(const ChannelPayload &other) const |
bool | operator==(const ChannelPayload &other) const |
ChannelPayload is a simple value type used to represent individual public channels. It provides identifiers, descriptions, and sorting metadata. Instances can be constructed from JSON objects and are used to populate channel-related models.
See also ChannelModel.
Returns the description of the channel.
Access functions:
QString | description() const |
void | setDescription(const QString &description) |
Returns the channel ID.
Access functions:
int | id() const |
void | setId(int id) |
Returns the name of the channel.
Access functions:
QString | name() const |
void | setName(const QString &name) |
Returns the sort order used to organize channels.
Access functions:
int | sortOrder() const |
void | setSortOrder(int order) |
[explicit]
ChannelPayload::ChannelPayload(const QJsonObject &json)Constructs a ChannelPayload by parsing a json object.
Extracts values for id
, name
, description
, and sort_order
if present.
Sets the channel description to description.
Note: Setter function for property description.
See also description().
Sets the channel ID to id.
Note: Setter function for property id.
See also id().
Sets the name of the channel to name.
Note: Setter function for property name.
See also name().
Sets the channel's sort order to order.
Note: Setter function for property sortOrder.
See also sortOrder().
Returns true if this channel should be ordered before other based on sort order.
Returns true if this payload represents the same channel as other.