LibDMRConf
0.5.0
A library to program DMR radios.
|
Represents an analog contact, that is a DTMF number. More...
#include <contact.hh>
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... | |
Represents an analog contact, that is a DTMF number.
DTMFContact::DTMFContact | ( | const QString & | name, |
const QString & | number, | ||
bool | rxTone = false , |
||
QObject * | parent = nullptr |
||
) |
Constructs a DTMF (analog) contact.
name | Specifies the contact name. |
number | Specifies the DTMF number (0-9,A,B,C,D,*,#). |
rxTone | Specifies whether the ring-tone is enabled for this contact. |
parent | Specifies the QObject parent. |
const QString & DTMFContact::number | ( | ) | const |
Returns the DTMF number of this contact.
The number must consist of 0-9, a-f, * or #.