libdrmconf  0.11.0
A library to program DMR radios.
Public Member Functions | Protected Attributes | Properties | List of all members
TyTSettingsExtension Class Reference

Represents the TyT general settings extension. More...

#include <tyt_extensions.hh>

Inheritance diagram for TyTSettingsExtension:
Inheritance graph
[legend]
Collaboration diagram for TyTSettingsExtension:
Collaboration graph
[legend]

Public Member Functions

Q_INVOKABLE TyTSettingsExtension (QObject *parent=nullptr)
 Possible monitor types. More...
 
ConfigItemclone () const
 Clones this item.
 
MonitorType monitorType () const
 Returns the monitor type.
 
void setMonitorType (MonitorType type)
 Sets the monitor type.
 
bool allLEDsDisabled () const
 Returns true if all LEDs are disabled.
 
void disableAllLEDs (bool disable)
 Disables all LEDs.
 
bool talkPermitToneDigital () const
 Returns true if the talk permit tone is enabled for digital channels.
 
void enableTalkPermitToneDigital (bool enable)
 Enables the talk permit tone for digital channels.
 
bool talkPermitToneAnalog () const
 Returns true if the talk permit tone is enabled for analog channels.
 
void enableTalkPermitToneAnalog (bool enable)
 Enables the talk permit tone for analog channels.
 
bool passwordAndLock () const
 Returns true if the password and lock is enabled.
 
void enablePasswordAndLock (bool enable)
 Enables the password and lock.
 
bool channelFreeIndicationTone () const
 Returns true if channel-free indication tone is enabled.
 
void enableChannelFreeIndicationTone (bool enable)
 Enables channel-free indication tone.
 
bool allTonesDisabled () const
 Returns true if all tones are disabled.
 
void disableAllTones (bool disable)
 Disables all tones.
 
bool powerSaveMode () const
 Returns true if the power save mode is enabled.
 
void enablePowerSaveMode (bool enable)
 Enables the power save mode.
 
bool wakeupPreamble () const
 Returns true if the wake-up preamble is send.
 
void enableWakeupPreamble (bool enable)
 Enables transmission of wakeup preamble.
 
bool bootPicture () const
 Returns true if a picture is shown during boot.
 
void enableBootPicture (bool enable)
 Enables the boot picture.
 
bool channelMode () const
 Returns true if the radio is in channel mode. More...
 
void enableChannelMode (bool enable)
 Enables/disables channel mode for the radio.
 
bool channelModeA () const
 Returns true if VFO A is in channel mode. More...
 
void enableChannelModeA (bool enable)
 Enables/disables channel mode for the VFO A.
 
bool channelModeB () const
 Returns true if VFO B is in channel mode. More...
 
void enableChannelModeB (bool enable)
 Enables/disables channel mode for the VFO B.
 
unsigned txPreambleDuration () const
 Returns the TX preamble duration in ms.
 
void setTXPreambleDuration (unsigned ms)
 Sets the TX preamble duration in ms.
 
unsigned groupCallHangTime () const
 Returns the group call hang time in ms.
 
void setGroupCallHangTime (unsigned ms)
 Sets the group-call hang time in ms.
 
unsigned privateCallHangTime () const
 Returns the private call hang time in ms.
 
void setPrivateCallHangTime (unsigned ms)
 Sets the private-call hang time in ms.
 
unsigned lowBatteryWarnInterval () const
 Returns the low-battery warn interval in seconds.
 
void setLowBatteryWarnInterval (unsigned sec)
 Sets the low-battery warn interval in seconds.
 
bool callAlertToneContinuous () const
 Returns true if the call alert-tone is continuous.
 
void enableCallAlertToneContinuous (bool enable)
 Sets the call alert-tone continuous.
 
unsigned callAlertToneDuration () const
 Returns the call alert-tone duration in seconds.
 
void setCallAlertToneDuration (unsigned sec)
 Sets the call alert-tone duration in seconds.
 
unsigned loneWorkerResponseTime () const
 Returns the lone worker response time in minutes.
 
void setLoneWorkerResponseTime (unsigned min)
 Sets the lone-worker response time in minutes.
 
unsigned loneWorkerReminderTime () const
 Returns the lone-worker reminder time in seconds.
 
void setLoneWorkerReminderTime (unsigned sec)
 Sets the lone-worker reminder timer in seconds.
 
unsigned digitalScanHangTime () const
 Returns the hang time scanning for digital channels.
 
void setDigitalScanHangTime (unsigned ms)
 Sets the scan hang-time for digital channels.
 
unsigned analogScanHangTime () const
 Returns the hang time scanning for analog channels.
 
void setAnalogScanHangTime (unsigned ms)
 Sets the scan hang-time for analog channels.
 
bool backlightAlwaysOn () const
 Returns true if the backlight is always on.
 
void enableBacklightAlwaysOn (bool enable)
 Enables the backlight continuously.
 
unsigned backlightDuration () const
 Returns the backlight duration in seconds.
 
void setBacklightDuration (unsigned sec)
 Sets the backlight duration in seconds.
 
bool keypadLockManual () const
 Returns true if the keypad lock is manual.
 
void enableKeypadLockManual (bool enable)
 Sets the keypad lock to manual.
 
unsigned keypadLockTime () const
 Returns the keypad lock time in seconds.
 
void setKeypadLockTime (unsigned sec)
 Sets the keypad lock time in seconds.
 
bool powerOnPasswordEnabled () const
 Returns true if power-on password is enabled.
 
void enablePowerOnPassword (bool enable)
 Enables the power on password.
 
unsigned powerOnPassword () const
 Returns the power-on password.
 
void setPowerOnPassword (unsigned passwd)
 Sets the power-on password.
 
bool radioProgPasswordEnabled () const
 Returns true if radio programming password is enabled.
 
void enableRadioProgPassword (bool enable)
 Enables the radio programming password.
 
unsigned radioProgPassword () const
 Returns the radio programming password.
 
void setRadioProgPassword (unsigned passwd)
 Sets the radio programming password.
 
const QString & pcProgPassword () const
 Returns the PC programming password.
 
void setPCProgPassword (const QString &passwd)
 Sets PC programming password.
 
bool privateCallMatch () const
 Returns true if the private call IDs must match.
 
void enablePrivateCallMatch (bool enable)
 Enables/disables private call match.
 
bool groupCallMatch () const
 Returns true if the group call IDs must match.
 
void enableGroupCallMatch (bool enable)
 Enables/disables group call match.
 
unsigned channelHangTime () const
 Returns the channel hang time in ms.
 
void setChannelHangTime (unsigned ms)
 Sets the channel hang time in ms.
 
- Public Member Functions inherited from ConfigItem
virtual bool copy (const ConfigItem &other)
 Copies the given item into this one. More...
 
virtual int compare (const ConfigItem &other) const
 Compares the items. More...
 
virtual bool label (Context &context, const ErrorStack &err=ErrorStack())
 Recursively labels the config object. More...
 
virtual YAML::Node serialize (const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes. More...
 
virtual ConfigItemallocateChild (QMetaProperty &prop, const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
 Allocates an instance for the given property on the given YAML node. More...
 
virtual bool parse (const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack())
 Parses the given YAML node, updates the given object and updates the given context (IDs). More...
 
virtual bool link (const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
 Links the given object to the rest of the codeplug using the given context.
 
virtual void clear ()
 Clears the config object.
 
virtual const Configconfig () const
 Returns the config, the item belongs to or nullptr if not part of a config.
 
virtual void findItemsOfTypes (const QStringList &typeNames, QSet< ConfigItem * > &items) const
 Searches the config tree to find all instances of the given type names.
 
template<class Object >
bool is () const
 Returns true if this object is of class Object.
 
template<class Object >
const Object * as () const
 Casts this object to the given type.
 
template<class Object >
Object * as ()
 Casts this object to the given type.
 
bool hasDescription () const
 Returns true if there is a class info "description" for this instance.
 
bool hasLongDescription () const
 Returns true if there is a class info "longDescription" for this instance.
 
bool hasDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]Description" for the given property.
 
bool hasLongDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]LongDescription" for the given property.
 
QString description () const
 Returns the description of this instance if set by a class info.
 
QString longDescription () const
 Returns the long description of this instance if set by a class info.
 
QString description (const QMetaProperty &prop) const
 Returns the description of property if set by a class info.
 
QString longDescription (const QMetaProperty &prop) const
 Returns the long description of property if set by a class info.
 

Protected Attributes

MonitorType _monitorType
 Holds the monitor type.
 
bool _allLEDsDisabled
 If true all LEDs are disabled.
 
bool _talkPermitToneDigital
 If true the talk-permit tone is enabled for digital channels.
 
bool _talkPermitToneAnalog
 If true the talk-permit tone is enabled for analog channels.
 
bool _passwdAndLock
 If true the password and lock is enabled.
 
bool _channelFreeIndicationTone
 If true, the channel free indication tone is enabled.
 
bool _allTonesDisabled
 If true, all tones are disabled.
 
bool _powerSaveMode
 If true, the power save mode is enabled.
 
bool _wakeupPreamble
 If true, the wake-up preamble is send.
 
bool _bootPicture
 If true the boot picture is enabled.
 
bool _channelModeA
 If true or channelMode is true, the VFO A is in channel (memory) mode.
 
bool _channelModeB
 If true or channelMode is true, the VFO B is in channel (memory) mode.
 
bool _channelMode
 If true, the radio is in channel (memory) mode. More...
 
unsigned _txPreambleDuration
 Holds the TX preamble duration.
 
unsigned _groupCallHangTime
 Holds the group-call hang time.
 
unsigned _privateCallHangTime
 Holds the private-call hang time.
 
unsigned _lowBatteryWarnInterval
 Holds the low-battery warn interval.
 
bool _callAlertToneContinuous
 If true, the call alert-tone is continuous.
 
unsigned _callAlertToneDuration
 Holds the call alert-tone duration.
 
unsigned _loneWorkerResponseTime
 Holds the lone-worker response time.
 
unsigned _loneWorkerReminderTime
 Holds the lone-worker reminder time.
 
unsigned _digitalScanHangTime
 Holds the scan hang-time for digital channels.
 
unsigned _analogScanHangTime
 Holds the scan hang-time for analog channels.
 
bool _backlightAlwaysOn
 If true, the backlight is always on.
 
unsigned _backlightDuration
 Holds the backlight duration.
 
bool _keypadLockManual
 If true, the keypad lock is manual.
 
unsigned _keypadLockTime
 Holds the keypad lock time.
 
bool _powerOnPasswordEnabled
 If true, the power-on password is enabled.
 
unsigned _powerOnPassword
 Holds the power-on password.
 
bool _radioProgPasswordEnabled
 If true, the radio programming password is enabled.
 
unsigned _radioProgPassword
 Holds the radio programming password.
 
QString _pcProgPassword
 Holds the PC programming password.
 
bool _privateCallMatch
 If true, the private call IDs must match.
 
bool _groupCallMatch
 If true, the group call IDs must match.
 
unsigned _channelHangTime
 Holds the channel hang time in ms.
 

Properties

MonitorType monitorType
 The monitor type setting.
 
bool allLEDsDisabled
 If true, all LEDs are disabled.
 
bool talkPermitToneDigital
 If true, the talk permit tone for digital channels is enabled.
 
bool talkPermitToneAnalog
 If true, the talk permit tone for analog channels is enabled.
 
bool passwordAndLock
 If true, the password and lock is enabled.
 
bool channelFreeIndicationTone
 If true, the channel free tone is enabled.
 
bool allTonesDisabled
 If true, all tones are disabled.
 
bool powerSaveMode
 If true, the power save mode is enabled.
 
callbool bootPicture
 If true, a picture is shown during boot.
 
bool channelMode
 If true, the radio is in channel mode.
 
bool channelModeA
 If true or channelMode is true, the VFO A is in channel mode.
 
bool channelModeB
 If true or channelMode is true, the VFO B is in channel mode.
 
unsigned txPreambleDuration
 The transmit preamble duration in ms.
 
unsigned groupCallHangTime
 The group hang time in ms.
 
unsigned privateCallHangTime
 The private hang time in ms.
 
unsigned lowBatteryWarnInterval
 The low battery warn interval in seconds.
 
bool callAlertToneContinuous
 If true, the call alert-tone is continuous.
 
unsigned callAlertToneDuration
 The call alert duration in seconds.
 
unsigned loneWorkerResponseTime
 The lone-worker response time in minutes.
 
unsigned loneWorkerReminderTime
 The lone-worker reminder time in seconds.
 
unsigned digitalScanHangTime
 The digital channel scan hang time in ms.
 
unsigned analogScanHangTime
 The analog channel scan hang time in ms.
 
bool backlightAlwaysOn
 If true, the backlight is always on.
 
unsigned backlightDuration
 If backlightAlwaysOn is false, specifies the backlight duration in seconds.
 
bool keypadLockManual
 If true, the keypad is locked manually.
 
unsigned keypadLockTime
 If keypadLockManual is false, specifies the keypad lock time.
 
bool powerOnPasswordEnabled
 If true the power-on password is enabled.
 
unsigned powerOnPassword
 If powerOnPasswordEnabled is true, specifies the power-on password.
 
bool radioProgPasswordEnabled
 If true the radio programming password is enabled.
 
unsigned radioProgPassword
 If radioProgPasswordEnabled is true, specifies the radio programming password.
 
QString pcProgPassword
 Specifies the PC programming password.
 
bool privateCallMatch
 If true, the private call IDs must match.
 
bool groupCallMatch
 If true, the group call IDs must match.
 
unsigned channelHangTime
 Holds the channel hang time in ms.
 

Additional Inherited Members

- Signals inherited from ConfigItem
void modified (ConfigItem *obj)
 Gets emitted once the config object is modified. More...
 
void beginClear ()
 Gets emitted before clearing the item.
 
void endClear ()
 Gets emitted after clearing the item.
 
- Protected Member Functions inherited from ConfigExtension
 ConfigExtension (QObject *parent=nullptr)
 Hidden constructor.
 
- Protected Member Functions inherited from ConfigItem
 ConfigItem (QObject *parent=nullptr)
 Hidden constructor. More...
 
virtual bool populate (YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes. More...
 

Detailed Description

Represents the TyT general settings extension.

Constructor & Destructor Documentation

◆ TyTSettingsExtension()

TyTSettingsExtension::TyTSettingsExtension ( QObject *  parent = nullptr)
explicit

Possible monitor types.

Default constructor.

Member Function Documentation

◆ channelMode()

bool TyTSettingsExtension::channelMode ( ) const

Returns true if the radio is in channel mode.

Overrides channelModeA and channelModeB.

◆ channelModeA()

bool TyTSettingsExtension::channelModeA ( ) const

Returns true if VFO A is in channel mode.

Overridden by channelMode.

◆ channelModeB()

bool TyTSettingsExtension::channelModeB ( ) const

Returns true if VFO B is in channel mode.

Overridden by channelMode.

Member Data Documentation

◆ _channelMode

bool TyTSettingsExtension::_channelMode
protected

If true, the radio is in channel (memory) mode.

Overrides channelModeA and channelModeB.


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