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

Implements the key settings extension of AnyTone devices. More...

#include <anytone_extension.hh>

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

Public Types

enum class  KeyFunction {
  Off , Voltage , Power , Repeater ,
  Reverse , Encryption , Call , VOX ,
  ToggleVFO , SubPTT , Scan , WFM ,
  Alarm , RecordSwitch , Record , SMS ,
  Dial , GPSInformation , Monitor , ToggleMainChannel ,
  HotKey1 , HotKey2 , HotKey3 , HotKey4 ,
  HotKey5 , HotKey6 , WorkAlone , SkipChannel ,
  DMRMonitor , SubChannel , PriorityZone , VFOScan ,
  MICSoundQuality , LastCallReply , ChannelType , Ranging ,
  Roaming , ChannelRanging , MaxVolume , Slot ,
  APRSTypeSwitch , Zone , ZoneUp , ZoneDown ,
  RoamingSet , APRSSet , Mute , MuteA ,
  MuteB , CtcssDcsSet , TBSTSend , Bluetooth ,
  GPS , ChannelName , CDTScan , APRSSend ,
  APRSInfo , Speaker , XBandRepeater , SimplexRepeater ,
  GPSRoaming , Squelch , NoiseReductionTX
}
 All possible key functions.
 

Public Member Functions

 AnytoneKeySettingsExtension (QObject *parent=nullptr)
 Empty constructor.
 
ConfigItemclone () const
 Clones this item.
 
KeyFunction funcKey1Short () const
 Returns the key function for a short press on the function key 1.
 
void setFuncKey1Short (KeyFunction func)
 Sets the key function for a short press on the function key 1.
 
KeyFunction funcKey1Long () const
 Returns the key function for a long press on the function key 1.
 
void setFuncKey1Long (KeyFunction func)
 Sets the key function for a long press on the function key 1.
 
KeyFunction funcKey2Short () const
 Returns the key function for a short press on the programmable function key 2.
 
void setFuncKey2Short (KeyFunction func)
 Sets the key function for a short press on the programmable function key 2.
 
KeyFunction funcKey2Long () const
 Returns the key function for a long press on the programmable function key 2.
 
void setFuncKey2Long (KeyFunction func)
 Sets the key function for a long press on the programmable function key 2.
 
KeyFunction funcKey3Short () const
 Returns the key function for a short press on the programmable function key 3.
 
void setFuncKey3Short (KeyFunction func)
 Sets the key function for a short press on the programmable function key 3.
 
KeyFunction funcKey3Long () const
 Returns the key function for a long press on the programmable function key 3.
 
void setFuncKey3Long (KeyFunction func)
 Sets the key function for a long press on the programmable function key 3.
 
KeyFunction funcKey4Short () const
 Returns the key function for a short press on the programmable function key 4.
 
void setFuncKey4Short (KeyFunction func)
 Sets the key function for a short press on the programmable function key 4.
 
KeyFunction funcKey4Long () const
 Returns the key function for a long press on the programmable function key 4.
 
void setFuncKey4Long (KeyFunction func)
 Sets the key function for a long press on the programmable function key 4.
 
KeyFunction funcKey5Short () const
 Returns the key function for a short press on the programmable function key 5.
 
void setFuncKey5Short (KeyFunction func)
 Sets the key function for a short press on the programmable function key 5.
 
KeyFunction funcKey5Long () const
 Returns the key function for a long press on the programmable function key 5.
 
void setFuncKey5Long (KeyFunction func)
 Sets the key function for a long press on the programmable function key 5.
 
KeyFunction funcKey6Short () const
 Returns the key function for a short press on the programmable function key 6.
 
void setFuncKey6Short (KeyFunction func)
 Sets the key function for a short press on the programmable function key 6.
 
KeyFunction funcKey6Long () const
 Returns the key function for a long press on the programmable function key 6.
 
void setFuncKey6Long (KeyFunction func)
 Sets the key function for a long press on the programmable function key 6.
 
KeyFunction funcKeyAShort () const
 Returns the key function for a short press on the function key A.
 
void setFuncKeyAShort (KeyFunction func)
 Sets the key function for a short press on the function key A.
 
KeyFunction funcKeyALong () const
 Returns the key function for a long press on the function key A.
 
void setFuncKeyALong (KeyFunction func)
 Sets the key function for a long press on the function key A.
 
KeyFunction funcKeyBShort () const
 Returns the key function for a short press on the function key B.
 
void setFuncKeyBShort (KeyFunction func)
 Sets the key function for a short press on the function key B.
 
KeyFunction funcKeyBLong () const
 Returns the key function for a long press on the function key B.
 
void setFuncKeyBLong (KeyFunction func)
 Sets the key function for a long press on the function key B.
 
KeyFunction funcKeyCShort () const
 Returns the key function for a short press on the function key C.
 
void setFuncKeyCShort (KeyFunction func)
 Sets the key function for a short press on the function key C.
 
KeyFunction funcKeyCLong () const
 Returns the key function for a long press on the function key C.
 
void setFuncKeyCLong (KeyFunction func)
 Sets the key function for a long press on the function key C.
 
KeyFunction funcKeyDShort () const
 Returns the key function for a short press on the function key D.
 
void setFuncKeyDShort (KeyFunction func)
 Sets the key function for a short press on the function key D.
 
KeyFunction funcKeyDLong () const
 Returns the key function for a long press on the function key D.
 
void setFuncKeyDLong (KeyFunction func)
 Sets the key function for a long press on the function key D.
 
Interval longPressDuration () const
 Returns the long-press duration in ms.
 
void setLongPressDuration (Interval ms)
 Sets the long-press duration in ms.
 
bool autoKeyLockEnabled () const
 Returns true, if the automatic key-lock feature is enabled.
 
void enableAutoKeyLock (bool enabled)
 Enables/disables auto key-lock.
 
bool knobLockEnabled () const
 Returns true if the knob gets locked too.
 
void enableKnobLock (bool enable)
 Enables/disables the knob lock.
 
bool keypadLockEnabled () const
 Returns true if the key-pad gets locked too.
 
void enableKeypadLock (bool enable)
 Enables/disables the key-pad lock.
 
bool sideKeysLockEnabled () const
 Returns true if the side-keys gets locked too.
 
void enableSideKeysLock (bool enable)
 Enables/disables the side-keys lock.
 
bool forcedKeyLockEnabled () const
 Returns true if the key-lock is forced.
 
void enableForcedKeyLock (bool enable)
 Enables/disables the forced key-lock.
 
- 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

KeyFunction _funcKey1Short
 Function of the function key 1, short press.
 
KeyFunction _funcKey1Long
 Function of the function key 1, long press.
 
KeyFunction _funcKey2Short
 Function of the function key 2, short press.
 
KeyFunction _funcKey2Long
 Function of the function key 2, long press.
 
KeyFunction _funcKey3Short
 Function of the function key 3, short press.
 
KeyFunction _funcKey3Long
 Function of the function key 3, long press.
 
KeyFunction _funcKey4Short
 Function of the function key 4, short press.
 
KeyFunction _funcKey4Long
 Function of the function key 4, long press.
 
KeyFunction _funcKey5Short
 Function of the function key 5, short press.
 
KeyFunction _funcKey5Long
 Function of the function key 5, long press.
 
KeyFunction _funcKey6Short
 Function of the function key 6, short press.
 
KeyFunction _funcKey6Long
 Function of the function key 6, long press.
 
KeyFunction _funcKeyAShort
 Function of the function key A, short press.
 
KeyFunction _funcKeyALong
 Function of the function key A, long press.
 
KeyFunction _funcKeyBShort
 Function of the function key B, short press.
 
KeyFunction _funcKeyBLong
 Function of the function key B, long press.
 
KeyFunction _funcKeyCShort
 Function of the function key C, short press.
 
KeyFunction _funcKeyCLong
 Function of the function key C, long press.
 
KeyFunction _funcKeyDShort
 Function of the function key D, short press.
 
KeyFunction _funcKeyDLong
 Function of the function key D, long press.
 
Interval _longPressDuration
 The long-press duration in ms.
 
bool _autoKeyLock
 Auto key-lock property.
 
bool _knobLock
 Knob locked too.
 
bool _keypadLock
 Key-pad is locked.
 
bool _sideKeysLock
 Side-keys are locked.
 
bool _forcedKeyLock
 Forced key-lock.
 

Properties

KeyFunction funcKey1Short
 Function key 1 (P1 below or next to screen), short press function.
 
KeyFunction funcKey1Long
 Function key 1 (P1 below or next to screen), long press function.
 
KeyFunction funcKey2Short
 Function key 2 (P2 below or next to screen), short press function.
 
KeyFunction funcKey2Long
 Function key 2 (P2 below or next to screen), long press function.
 
KeyFunction funcKey3Short
 Function key 3 (P3 next to screen, D578UV only), short press function.
 
KeyFunction funcKey3Long
 Function key 3 (P3 next to screen, D578UV only), long press function.
 
KeyFunction funcKey4Short
 Function key 4 (P4 next to screen, D578UV only), short press function.
 
KeyFunction funcKey4Long
 Function key 4 (P4 next to screen, D578UV only), long press function.
 
KeyFunction funcKey5Short
 Function key 5 (P5 next to screen, D578UV only), short press function.
 
KeyFunction funcKey5Long
 Function key 5 (P5 next to screen, D578UV only), long press function.
 
KeyFunction funcKey6Short
 Function key 6 (P6 next to screen, D578UV only), short press function.
 
KeyFunction funcKey6Long
 Function key 6 (P6 next to screen, D578UV only), long press function.
 
KeyFunction funcKeyAShort
 Function key A (PF1 below PTT or A on mic), short press function.
 
KeyFunction funcKeyALong
 Function key A (PF1 below PTT or A on mic), long press function.
 
KeyFunction funcKeyBShort
 Function key B (PF2 second below PTT or B on mic), short press function.
 
KeyFunction funcKeyBLong
 Function key B (PF2 second below PTT or B on mic), long press function.
 
KeyFunction funcKeyCShort
 Function key C (PF3 on top or C on mic), short press function.
 
KeyFunction funcKeyCLong
 Function key C (PF3 on top or B on mic), long press function.
 
KeyFunction funcKeyDShort
 Function key D (D on mic, D578UV only), short press function.
 
KeyFunction funcKeyDLong
 Function key D (D on mic, D578UV only), long press function.
 
Interval longPressDuration
 The long press duration in ms.
 
bool autoKeyLock
 The auto key-lock property.
 
bool knobLock
 If true, the knob gets locked too.
 
bool keypadLock
 If true, the key-pad gets locked too.
 
bool sideKeysLock
 If true, the side-keys get locked too.
 
bool forcedKeyLock
 If true, the key-lock is forced.
 

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 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

Implements the key settings extension of AnyTone devices.

This extension is part of the AnytoneSettingsExtension.


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