|
LibDMRConf
0.5.0
A library to program DMR radios.
|
The base class of all channels (analog and digital) of a codeplug configuration. More...
#include <channel.hh>
Public Types | |
| enum | Power { MaxPower, HighPower, MidPower, LowPower, MinPower } |
| Possible power settings. More... | |
Signals | |
| void | modified () |
| Is emitted if the channel gets modified. | |
Public Member Functions | |
| template<class T > | |
| bool | is () const |
Returns true if the channel is of type T. More... | |
| template<class T > | |
| T * | as () |
| Dynamic cast of channels. More... | |
| template<class T > | |
| const T * | as () const |
| Dynamic cast of channels. More... | |
| const QString & | name () const |
| Returns the name of the channel. | |
| bool | setName (const QString &name) |
| (Re-)Sets the name of the channel. | |
| double | rxFrequency () const |
| Returns the RX frequency of the channel in MHz. | |
| bool | setRXFrequency (double freq) |
| (Re-)Sets the RX frequency of the channel in MHz. | |
| double | txFrequency () const |
| Returns the TX frequency of the channel in MHz. | |
| bool | setTXFrequency (double freq) |
| (Re-)Sets the TX frequency of the channel in MHz. | |
| Power | power () const |
| Returns the power setting of the channel. | |
| void | setPower (Power power) |
| (Re-)Sets the power setting of the channel. | |
| uint | txTimeout () const |
| Returns the TX timeout (TOT) in seconds. | |
| bool | setTimeout (uint dur) |
| (Re-)Sets the TX timeout (TOT) in seconds. | |
| bool | rxOnly () const |
Returns true, if the channel is RX only. | |
| bool | setRXOnly (bool enable) |
| Set, whether the channel is RX only. | |
| ScanList * | scanList () const |
| Returns the default scan list for the channel. | |
| bool | setScanList (ScanList *list) |
| (Re-) Sets the default scan list for the channel. | |
Protected Slots | |
| void | onScanListDeleted (QObject *obj) |
| Internal hander for deleted scan lists. | |
Protected Member Functions | |
| Channel (const QString &name, double rx, double tx, Power power, uint txTimeout, bool rxOnly, ScanList *scanlist, QObject *parent=nullptr) | |
| Hidden constructor. More... | |
Protected Attributes | |
| QString | _name |
| The channel name. | |
| double | _rxFreq |
| The RX frequency in MHz. | |
| double | _txFreq |
| The TX frequency in MHz. | |
| Power | _power |
| The transmit power setting. | |
| uint | _txTimeOut |
| Transmit timeout in seconds. | |
| bool | _rxOnly |
| RX only flag. | |
| ScanList * | _scanlist |
| Default scan list of the channel. | |
The base class of all channels (analog and digital) of a codeplug configuration.
This class holds the common configuration of AnalogChannel and DigitalChannel, that is the name, RX and TX frequencies, output power, TOT and default scanlist properties.
| enum Channel::Power |
|
protected |
Hidden constructor.
Constructs a new base channel.
| name | Specifies the name of the channel. |
| rx | Sepcifies the RX freqeuncy in MHz. |
| tx | Specifies the TX frequency in MHz. |
| power | Specifies the power setting for the channel. |
| txTimeout | Specifies the transmit timeout in seconds (TOT). |
| rxOnly | Specifies whether the channel is RX only. |
| scanlist | Specifies the default scanlist for the channel. |
| parent | Specified the QObject parent object. |
|
inline |
Dynamic cast of channels.
For example channel->as<AnalogChannel>().
|
inline |
Dynamic cast of channels.
For example channel->as<AnalogChannel>().
|
inline |
Returns true if the channel is of type T.
This can be used to text wheter this channel is actuially an analog or digital channel: channel->is<AnalogChannel>().
1.8.17