QtPdCom  1.3.3
Public Types | Public Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
QtPdCom::BroadcastModel Class Reference

Model for capturing broadcast messages. More...

#include <BroadcastModel.h>

Inheritance diagram for QtPdCom::BroadcastModel:
Inheritance graph
[legend]
Collaboration diagram for QtPdCom::BroadcastModel:
Collaboration graph
[legend]

Public Types

enum  Roles { DateStringRole = Qt::UserRole + 1, MessageStringRole, UsernameRole }
 

Public Member Functions

 BroadcastModel (QObject *parent=nullptr)
 
 ~BroadcastModel ()
 
int rowCount (const QModelIndex &={}) const override
 
int columnCount (const QModelIndex &={}) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
void connectProcess (QtPdCom::Process *process)
 Connect to a Process. More...
 
QtPdCom::ProcessgetProcess () const
 
Q_INVOKABLE void clear ()
 Clear all stored broadcasts. More...
 
 Q_ENUM (Roles)
 
QHash< int, QByteArray > roleNames () const override
 

Properties

QtPdCom::Process process
 

Private Member Functions

 Q_DECLARE_PRIVATE (BroadcastModel)
 

Private Attributes

QScopedPointer< BroadcastModelPrivate > const d_ptr
 

Detailed Description

Model for capturing broadcast messages.

It contains three columns (date, message, username). Please note that broadcasts have to be enabled in pdserv.

Member Enumeration Documentation

◆ Roles

Enumerator
DateStringRole 
MessageStringRole 
UsernameRole 

Constructor & Destructor Documentation

◆ BroadcastModel()

BroadcastModel::BroadcastModel ( QObject *  parent = nullptr)
explicit

◆ ~BroadcastModel()

BroadcastModel::~BroadcastModel ( )
default

Member Function Documentation

◆ clear()

void BroadcastModel::clear ( )

Clear all stored broadcasts.

◆ columnCount()

int BroadcastModel::columnCount ( const QModelIndex &  = {}) const
override

◆ connectProcess()

void BroadcastModel::connectProcess ( QtPdCom::Process process)

Connect to a Process.

The old Process will be disconnected.

Parameters
processNew Process.

References QtPdCom::Process::broadcastReceived().

◆ data()

QVariant BroadcastModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

◆ getProcess()

QtPdCom::Process * BroadcastModel::getProcess ( ) const

◆ headerData()

QVariant BroadcastModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

◆ Q_DECLARE_PRIVATE()

QtPdCom::BroadcastModel::Q_DECLARE_PRIVATE ( BroadcastModel  )
private

◆ Q_ENUM()

QtPdCom::BroadcastModel::Q_ENUM ( Roles  )

◆ roleNames()

QHash< int, QByteArray > BroadcastModel::roleNames ( ) const
override

◆ rowCount()

int BroadcastModel::rowCount ( const QModelIndex &  = {}) const
override

Member Data Documentation

◆ d_ptr

QScopedPointer<BroadcastModelPrivate> const QtPdCom::BroadcastModel::d_ptr
private

Property Documentation

◆ process

QtPdCom::Process QtPdCom::BroadcastModel::process
readwrite

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