LibDMRConf  0.5.0
A library to program DMR radios.
Public Types | Public Member Functions | Protected Attributes | List of all members
DigitalContact Class Reference

Represents a digital contact, that is a DMR number. More...

#include <contact.hh>

Inheritance diagram for DigitalContact:
Contact

Public Types

enum  Type { PrivateCall, GroupCall, AllCall }
 Possible call types for a contact. More...
 

Public Member Functions

 DigitalContact (Type type, const QString &name, uint number, bool rxTone=false, QObject *parent=nullptr)
 Constructs a DMR (digital) contact. More...
 
Type type () const
 Returns the call-type.
 
void setType (Type type)
 (Re-)Sets the call-type.
 
uint number () const
 Returns the DMR number.
 
bool setNumber (uint number)
 (Re-)Sets the DMR number of the contact.
 
- Public Member Functions inherited from Contact
const QString & name () const
 Returns the name of the contact.
 
bool setName (const QString &name)
 (Re)Sets the name of the contact.
 
bool rxTone () const
 Returns true if the ring-tone is enabled for this contact.
 
void setRXTone (bool enable)
 Enables/disables the ring-tone for this contact.
 
template<class T >
bool is () const
 Typecheck contact. More...
 
template<class T >
T * as ()
 Typecast contact.
 
template<class T >
const T * as () const
 Typecast contact.
 

Protected Attributes

Type _type
 The call type.
 
uint _number
 The DMR number of the contact.
 
- Protected Attributes inherited from Contact
QString _name
 Contact name.
 
bool _rxTone
 Ringtone enabled?
 

Additional Inherited Members

- Signals inherited from Contact
void modified ()
 Gets emitted if the contact is modified.
 
- Protected Member Functions inherited from Contact
 Contact (const QString &name, bool rxTone=true, QObject *parent=nullptr)
 Hidden constructor. More...
 

Detailed Description

Represents a digital contact, that is a DMR number.

Member Enumeration Documentation

◆ Type

Possible call types for a contact.

Enumerator
PrivateCall 

A private call.

GroupCall 

A group call.

AllCall 

An all-call.

Constructor & Destructor Documentation

◆ DigitalContact()

DigitalContact::DigitalContact ( Type  type,
const QString &  name,
uint  number,
bool  rxTone = false,
QObject *  parent = nullptr 
)

Constructs a DMR (digital) contact.

Parameters
typeSpecifies the call type (private, group, all-call).
nameSpecifies the contact name.
numberSpecifies the DMR number for this contact.
rxToneSpecifies whether the ring-tone is enabled for this contact.
parentSpecifies the QObject parent.

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