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

Represents the base-class for all contact types, Analog (DTMF) or Digital (DMR). More...

#include <contact.hh>

Inheritance diagram for Contact:
DigitalContact DTMFContact

Signals

void modified ()
 Gets emitted if the contact is modified.
 

Public Member Functions

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 Member Functions

 Contact (const QString &name, bool rxTone=true, QObject *parent=nullptr)
 Hidden constructor. More...
 

Protected Attributes

QString _name
 Contact name.
 
bool _rxTone
 Ringtone enabled?
 

Detailed Description

Represents the base-class for all contact types, Analog (DTMF) or Digital (DMR).

Constructor & Destructor Documentation

◆ Contact()

Contact::Contact ( const QString &  name,
bool  rxTone = true,
QObject *  parent = nullptr 
)
protected

Hidden constructor.

Parameters
nameSpecifies the name of the contact.
rxToneSpecifies whether a ring-tone for this contact is used.
parentSpecifies the QObject parent.

Member Function Documentation

◆ is()

template<class T >
bool Contact::is ( ) const
inline

Typecheck contact.

For example, contact->is<DigitalContact>() returns true if contact is a DigitalContact.


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