LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::ANFieldData Struct Reference

A single additional AdvancedNotifications field. More...

#include "ianemitter.h"

Public Member Functions

 ANFieldData ()
 Constructs an empty field info. More...
 
 ANFieldData (const QString &id, const QString &name, const QString &description, QVariant::Type type, const QStringList &events, const QVariantList &values={})
 Constructs field with the given info variables. More...
 

Public Attributes

QString ID_
 The field ID. More...
 
QString Name_
 The name of the field. More...
 
QString Description_
 The description of the field. More...
 
QVariant::Type Type_
 The type of this field. More...
 
QStringList EventTypes_
 The types of the event that contain this field. More...
 
QVariantList AllowedValues_
 The allowed values of this field. More...
 

Detailed Description

A single additional AdvancedNotifications field.

This data structure describes an additional field in the AdvancedNotifications notification entities. The field ID (the name of the corresponding key in LeechCraft::Entity::Additional_ map) is stored in the ID_ member.

This structure also carries information about field name, type, description and such.

Definition at line 49 of file ianemitter.h.

Constructor & Destructor Documentation

◆ ANFieldData() [1/2]

LeechCraft::ANFieldData::ANFieldData ( )
inline

Constructs an empty field info.

The corresponding type is invalid, and all other members are empty.

Definition at line 106 of file ianemitter.h.

◆ ANFieldData() [2/2]

LeechCraft::ANFieldData::ANFieldData ( const QString &  id,
const QString &  name,
const QString &  description,
QVariant::Type  type,
const QStringList &  events,
const QVariantList &  values = {} 
)
inline

Constructs field with the given info variables.

Parameters
[in]idThe ID of the field.
[in]nameThe name of the field.
[in]descriptionThe description of the field.
[in]typeThe type of the field.
[in]eventsThe list of events for this field.
[in]valuesThe allowed values of this field.

Definition at line 120 of file ianemitter.h.

Member Data Documentation

◆ AllowedValues_

QVariantList LeechCraft::ANFieldData::AllowedValues_

The allowed values of this field.

If this list is non-empty, only values from this list are allowed.

This currently only makes sense for QVariant::String and QVariant::StringList, in which case each QVariant in this list should be a QString.

Definition at line 99 of file ianemitter.h.

◆ Description_

QString LeechCraft::ANFieldData::Description_

The description of the field.

This member contains the human-readable description of this field.

Definition at line 69 of file ianemitter.h.

◆ EventTypes_

QStringList LeechCraft::ANFieldData::EventTypes_

The types of the event that contain this field.

This member contains the types of the events that contain this field. This field won't be checked in events of types not mentioned here.

Definition at line 88 of file ianemitter.h.

◆ ID_

QString LeechCraft::ANFieldData::ID_

The field ID.

The field ID is the value of the corresponding key in the LeechCraft::Entity::Additional_ map.

Definition at line 56 of file ianemitter.h.

◆ Name_

QString LeechCraft::ANFieldData::Name_

The name of the field.

This member contains the human-readable name of this field.

Definition at line 62 of file ianemitter.h.

◆ Type_

QVariant::Type LeechCraft::ANFieldData::Type_

The type of this field.

This member contains the type of the value of this field - the value for the corresponding key (equal to ID_) in the LeechCraft::Entity::Additional_ map.

For now only QVariant::Int, QVariant::String and QVariant::StringList are supported.

Definition at line 80 of file ianemitter.h.


The documentation for this struct was generated from the following file: