Serial Studio 1.1.6
A dashboard software for your embedded projects
JSON::Group Class Reference

The Group class. More...

#include <Group.h>

Collaboration diagram for JSON::Group:
Collaboration graph

Public Member Functions

 ~Group ()
 
QString title () const
 
QString widget () const
 
int datasetCount () const
 
QVector< Dataset > & datasets ()
 
bool read (const QJsonObject &object)
 
Q_INVOKABLE const JSON::DatasetgetDataset (const int index) const
 

Private Attributes

QString m_title
 
QString m_widget
 
QVector< Datasetm_datasets
 

Friends

class Editor
 
class UI::Dashboard
 

Detailed Description

The Group class.

The group class represents a set of datasets that are related together (e.g. they correspond to the same category).

Some special widgets, such as the accelerometer, the map or the gyroscope are generated using groups instead of datasets. For example, an accelerometer widget is constructed with a group with the following datasets:

  • X-axis readings
  • Y-axis readings
  • Z-axis readings

A group contains the following properties:

  • Title
  • Widget
  • A vector of datasets

Constructor & Destructor Documentation

◆ ~Group()

JSON::Group::~Group ( )

Destructor function

Member Function Documentation

◆ datasetCount()

int JSON::Group::datasetCount ( ) const
Returns
The number of datasets inside this group

◆ datasets()

QVector< JSON::Dataset > & JSON::Group::datasets ( )
Returns
A list with all the dataset objects contained in this group

◆ getDataset()

const JSON::Dataset & JSON::Group::getDataset ( const int  index) const
Returns
The dataset at the given index,vreturns Q_NULLPTR on invalid index

◆ read()

bool JSON::Group::read ( const QJsonObject &  object)

Reads the group information and all its asociated datasets from the given JSON object.

Returns
true on success, false on failure

◆ title()

QString JSON::Group::title ( ) const
Returns
The title/description of this group

◆ widget()

QString JSON::Group::widget ( ) const
Returns
The widget type of this group (if any)

Friends And Related Function Documentation

◆ Editor

friend class Editor
friend

◆ UI::Dashboard

friend class UI::Dashboard
friend

Member Data Documentation

◆ m_datasets

QVector<Dataset> JSON::Group::m_datasets
private

◆ m_title

QString JSON::Group::m_title
private

◆ m_widget

QString JSON::Group::m_widget
private

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