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

Represents an analog contact, that is a DTMF number. More...

#include <contact.hh>

Inheritance diagram for DTMFContact:
Contact

Public Member Functions

 DTMFContact (const QString &name, const QString &number, bool rxTone=false, QObject *parent=nullptr)
 Constructs a DTMF (analog) contact. More...
 
bool isValid () const
 Retruns true if the DTMF contact is valid (has a valid DTMF number).
 
const QString & number () const
 Returns the DTMF number of this contact. More...
 
bool setNumber (const QString &number)
 (Re-)Sets the DTMF number of this 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

QString _number
 The DTMF number.
 
- 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 an analog contact, that is a DTMF number.

Constructor & Destructor Documentation

◆ DTMFContact()

DTMFContact::DTMFContact ( const QString &  name,
const QString &  number,
bool  rxTone = false,
QObject *  parent = nullptr 
)

Constructs a DTMF (analog) contact.

Parameters
nameSpecifies the contact name.
numberSpecifies the DTMF number (0-9,A,B,C,D,*,#).
rxToneSpecifies whether the ring-tone is enabled for this contact.
parentSpecifies the QObject parent.

Member Function Documentation

◆ number()

const QString & DTMFContact::number ( ) const

Returns the DTMF number of this contact.

The number must consist of 0-9, a-f, * or #.


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