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

Represents the TyT button settings extension. More...

#include <tyt_extensions.hh>

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

Public Types

enum  ButtonAction {
  Disabled = 0 , ToggleAllAlertTones = 1 , EmergencyOn = 2 , EmergencyOff = 3 ,
  PowerSelect = 4 , MonitorToggle = 5 , NuisanceDelete = 6 , OneTouch1 = 7 ,
  OneTouch2 = 8 , OneTouch3 = 9 , OneTouch4 = 10 , OneTouch5 = 11 ,
  OneTouch6 = 12 , RepeaterTalkaroundToggle = 13 , ScanToggle = 14 , SquelchToggle = 21 ,
  PrivacyToggle = 22 , VoxToggle = 23 , ZoneIncrement = 24 , BatteryIndicator = 26 ,
  ManualDialForPrivate = 30 , LoneWorkerToggle = 31 , RecordToggle = 34 , RecordPlayback = 35 ,
  RecordDeleteAll = 36 , Tone1750Hz = 38 , SwitchUpDown = 47 , RightKey = 48 ,
  LeftKey = 49 , ZoneDecrement = 55
}
 Possible actions for the side-buttons. More...
 

Public Member Functions

Q_INVOKABLE TyTButtonSettings (QObject *parent=nullptr)
 Constructor.
 
ConfigItemclone () const
 Clones this item.
 
ButtonAction sideButton1Short () const
 Returns the action for the side button 1 short-press.
 
void setSideButton1Short (ButtonAction action)
 Sets the action for the side button 1 short-press.
 
ButtonAction sideButton1Long () const
 Returns the action for the side button 1 long-press.
 
void setSideButton1Long (ButtonAction action)
 Sets the action for the side button 1 long-press.
 
ButtonAction sideButton2Short () const
 Returns the action for the side button 2 short-press.
 
void setSideButton2Short (ButtonAction action)
 Sets the action for the side button 2 short-press.
 
ButtonAction sideButton2Long () const
 Returns the action for the side button 2 long-press.
 
void setSideButton2Long (ButtonAction action)
 Sets the action for the side button 2 long-press.
 
ButtonAction sideButton3Short () const
 Returns the action for the side button 3 short-press (Baofeng DM-1701).
 
void setSideButton3Short (ButtonAction action)
 Sets the action for the side button 3 short-press (Baofeng DM-1701).
 
ButtonAction sideButton3Long () const
 Returns the action for the side button 3 long-press (Baofeng DM-1701).
 
void setSideButton3Long (ButtonAction action)
 Sets the action for the side button 3 long-press (Baofeng DM-1701).
 
ButtonAction progButton1Short () const
 Returns the action for the programmable button 1 short-press (Baofeng DM-1701).
 
void setProgButton1Short (ButtonAction action)
 Sets the action for the programmable button 1 short-press (Baofeng DM-1701).
 
ButtonAction progButton1Long () const
 Returns the action for the programmable button 1 long-press (Baofeng DM-1701).
 
void setProgButton1Long (ButtonAction action)
 Sets the action for the programmable button 1 long-press (Baofeng DM-1701).
 
ButtonAction progButton2Short () const
 Returns the action for the programmable button 2 short-press (Baofeng DM-1701).
 
void setProgButton2Short (ButtonAction action)
 Sets the action for the programmable button 2 short-press (Baofeng DM-1701).
 
ButtonAction progButton2Long () const
 Returns the action for the programmable button 2 long-press (Baofeng DM-1701).
 
void setProgButton2Long (ButtonAction action)
 Sets the action for the programmable button 2 long-press (Baofeng DM-1701).
 
unsigned longPressDuration () const
 Returns the long-press duration in msec.
 
void setLongPressDuration (unsigned dur)
 Sets the long-press duration in msec.
 
- 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

ButtonAction _sideButton1Short
 Holds the side button 1 short-press action.
 
ButtonAction _sideButton1Long
 Holds the side button 1 long-press action.
 
ButtonAction _sideButton2Short
 Holds the side button 2 short-press action.
 
ButtonAction _sideButton2Long
 Holds the side button 2 long-press action.
 
ButtonAction _sideButton3Short
 Holds the side button 3 short-press action.
 
ButtonAction _sideButton3Long
 Holds the side button 3 long-press action.
 
ButtonAction _progButton1Short
 Holds the prog button 1 short-press action.
 
ButtonAction _progButton1Long
 Holds the prog button 1 long-press action.
 
ButtonAction _progButton2Short
 Holds the prog button 2 short-press action.
 
ButtonAction _progButton2Long
 Holds the prog button 2 long-press action.
 
unsigned _longPressDuration
 Holds the long-press duration in ms.
 

Properties

ButtonAction sideButton1Short
 The action to perform on a short press on side button 1.
 
ButtonAction sideButton1Long
 The action to perform on a long press on side button 1.
 
ButtonAction sideButton2Short
 The action to perform on a short press on side button 2.
 
ButtonAction sideButton2Long
 The action to perform on a long press on side button 2.
 
ButtonAction sideButton3Short
 The action to perform on a short press on side button 3.
 
ButtonAction sideButton3Long
 The action to perform on a long press on side button 3.
 
ButtonAction progButton1Short
 The action to perform on a short press on programmable button 1.
 
ButtonAction progButton1Long
 The action to perform on a long press on programmable button 1.
 
ButtonAction progButton2Short
 The action to perform on a short press on programmable button 2.
 
ButtonAction progButton2Long
 The action to perform on a long press on programmable button 2.
 
unsigned longPressDuration
 The duration of a long press in msec.
 

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 button settings extension.

Member Enumeration Documentation

◆ ButtonAction

Possible actions for the side-buttons.

Enumerator
Disabled 

Disabled side-button action.

ToggleAllAlertTones 

Toggle all alert tones.

EmergencyOn 

Enable emergency.

EmergencyOff 

Disable emergency.

PowerSelect 

Select TX power.

MonitorToggle 

Toggle monitor (promiscuous mode on digital channel, open squelch on analog channel).

NuisanceDelete 

Nuisance delete.

OneTouch1 

Perform one-touch action 1.

OneTouch2 

Perform one-touch action 2.

OneTouch3 

Perform one-touch action 3.

OneTouch4 

Perform one-touch action 4.

OneTouch5 

Perform one-touch action 5.

OneTouch6 

Perform one-touch action 6.

RepeaterTalkaroundToggle 

Toggle repater mode / talkaround.

ScanToggle 

Start/stop scan.

SquelchToggle 

Enable/disable squelch.

PrivacyToggle 

Enable/disable privacy system.

VoxToggle 

Enable/disable VOX.

ZoneIncrement 

Switch to next zone.

BatteryIndicator 

Show battery charge.

ManualDialForPrivate 

Manual dial for private.

LoneWorkerToggle 

Toggle lone-worker.

RecordToggle 

Enable/disable recording (dep. on firmware).

RecordPlayback 

Start/stop playback.

RecordDeleteAll 

Delete all recordings.

Tone1750Hz 

Send 1750Hz tone.

SwitchUpDown 

Switch Channel A/B.

RightKey 

Who knows?

LeftKey 

Who knows?

ZoneDecrement 

Switch to previous zone.


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