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

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

#include <anytone_extension.hh>

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

Public Types

enum class  LastCallerDisplayMode { Off = 0 , ID = 1 , Call = 2 , Both = 3 }
 What to show from the last caller.
 
enum class  Color {
  White = 0 , Black = 1 , Orange =2 , Red =3 ,
  Yellow =4 , Green =5 , Turquoise =6 , Blue =7
}
 Possible display colors.
 
enum class  Language { English = 0 , German = 1 }
 Possible UI languages. More...
 
enum class  DateFormat { YearFirst = 0 , DayFirst = 1 }
 Possible date formats. More...
 

Public Member Functions

 AnytoneDisplaySettingsExtension (QObject *parent=nullptr)
 Constructor.
 
ConfigItemclone () const
 Clones this item.
 
bool displayFrequencyEnabled () const
 Returns true, if the frequency is displayed instead of the channel name.
 
void enableDisplayFrequency (bool enable)
 Enables/disables display of frequency.
 
unsigned int brightness () const
 Returns the display brightness [1-10].
 
void setBrightness (unsigned int level)
 Sets the display brightness [1-10].
 
Interval backlightDuration () const
 Returns the backlight duration in seconds, 0 means permanent.
 
void setBacklightDuration (Interval sec)
 Sets the backlight duration in seconds, 0 means permanent.
 
bool volumeChangePromptEnabled () const
 Returns true if the volume-change prompt is shown.
 
void enableVolumeChangePrompt (bool enable)
 Enables/disables the volume-change prompt.
 
bool callEndPromptEnabled () const
 Returns true if the call-end prompt is shown.
 
void enableCallEndPrompt (bool enable)
 Enables/disables the call-end prompt.
 
LastCallerDisplayMode lastCallerDisplay () const
 Returns the last caller display mode.
 
void setLastCallerDisplay (LastCallerDisplayMode mode)
 Sets the last caller display mode.
 
bool showClockEnabled () const
 Returns true if the clock is shown.
 
void enableShowClock (bool enable)
 Enables/disables clock.
 
bool showCallEnabled () const
 Returns true if the call is shown.
 
void enableShowCall (bool enable)
 Enables/disables display of call.
 
Color callColor () const
 Returns the color of the call.
 
void setCallColor (Color color)
 Sets the color of the call.
 
Language language () const
 Returns the UI language.
 
void setLanguage (Language lang)
 Sets the UI language.
 
DateFormat dateFormat () const
 Returns the date format.
 
void setDateFormat (DateFormat format)
 Sets the date format.
 
bool showChannelNumberEnabled () const
 Returns true if the channel number is shown.
 
void enableShowChannelNumber (bool enable)
 Enables/disables the display of the channel number.
 
bool showColorCode () const
 Returns true if the color code is shown.
 
void enableShowColorCode (bool enable)
 Shows/hides color code.
 
bool showTimeSlot () const
 Returns true if the time slot is shown.
 
void enableShowTimeSlot (bool enable)
 Shows/hides time slot.
 
bool showChannelType () const
 Returns true if the channel type is shown.
 
void enableShowChannelType (bool enable)
 Shows/hides channel type.
 
bool showContact () const
 Returns true if the contact is shown.
 
void enableShowContact (bool enable)
 Enables/disables the display of calling contact.
 
Color standbyTextColor () const
 Returns the standby text color.
 
void setStandbyTextColor (Color color)
 Sets the standby text color.
 
Color standbyBackgroundColor () const
 Returns the standby background color.
 
void setStandbyBackgroundColor (Color color)
 Sets the standby background color.
 
bool showLastHeardEnabled () const
 Shows the last caller.
 
void enableShowLastHeard (bool enable)
 Enables/disables display of last caller.
 
Interval backlightDurationTX () const
 Returns backlight duration during TX.
 
void setBacklightDurationTX (Interval sec)
 Sets the backlight duration during TX in seconds.
 
Color channelNameColor () const
 Returns the color of the channel name.
 
void setChannelNameColor (Color color)
 Sets the color of the channel name.
 
Color channelBNameColor () const
 Returns the color of the channel name for VFO B.
 
void setChannelBNameColor (Color color)
 Sets the channel name color for VFO B.
 
Color zoneNameColor () const
 Returns the color of the zone name.
 
void setZoneNameColor (Color color)
 Sets the color of the zone name.
 
Color zoneBNameColor () const
 Returns the color of the zone name for VFO B.
 
void setZoneBNameColor (Color color)
 Sets the zone name color for VFO B.
 
Interval backlightDurationRX () const
 Returns backlight duration during RX.
 
void setBacklightDurationRX (Interval sec)
 Sets the backlight duration during RX in seconds.
 
bool customChannelBackground () const
 Returns true if the custom channel background is enabled.
 
void enableCustomChannelBackground (bool enable)
 Enables/disables the custom channel background.
 
- 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

bool _displayFrequency
 Display frequency property.
 
unsigned int _brightness
 The display brightness.
 
Interval _backlightDuration
 Backlight duration in seconds, 0=permanent.
 
bool _volumeChangePrompt
 Volume-change prompt enabled.
 
bool _callEndPrompt
 Call-end prompt enabled.
 
LastCallerDisplayMode _lastCallerDisplay
 Last-caller display mode.
 
bool _showClock
 Display clock.
 
bool _showCall
 Display call.
 
Color _callColor
 Color of call.
 
Language _language
 UI language.
 
DateFormat _dateFormat
 The date format.
 
bool _showChannelNumber
 Show channel number.
 
bool _showColorCode
 Show color code.
 
bool _showTimeSlot
 Show time slot.
 
bool _showChannelType
 Show channel type.
 
bool _showContact
 Enables showing the contact.
 
Color _standbyTextColor
 Standby text color.
 
Color _standbyBackgroundColor
 Standby background color.
 
bool _showLastHeard
 Shows the last caller.
 
Interval _backlightDurationTX
 Backlight duration in seconds during TX.
 
Interval _backlightDurationRX
 Backlight duration in seconds during RX.
 
bool _customChannelBackground
 Custom channel background enabled.
 
Color _channelNameColor
 Color of channel name.
 
Color _channelBNameColor
 Color of channel name for VFO B.
 
Color _zoneNameColor
 Color of zone name.
 
Color _zoneBNameColor
 Color of zone name for VFO B.
 

Properties

bool displayFrequency
 The display frequency setting.
 
unsigned int brightness
 The display brightness [1-10].
 
Interval backlightDuration
 The backlight duration in seconds.
 
offInterval backlightDurationRX
 RX backlight duration.
 
bool customChannelBackground
 Enables custom channel background.
 
bool volumeChangePrompt
 The volume-change prompt is shown.
 
bool callEndPrompt
 The call-end prompt is shown.
 
bool showClock
 If true, the clock is shown.
 
bool showCall
 If true, the call is shown.
 
bool showContact
 Shows the contact.
 
bool showChannelNumber
 Shows the channel number.
 
bool showColorCode
 Shows the color code.
 
bool showTimeSlot
 Shows the time slot.
 
bool showChannelType
 Shows the channel type.
 
bool showLastHeard
 Shows the last caller.
 
LastCallerDisplayMode lastCallerDisplay
 The last-caller display mode.
 
Color callColor
 The color of the call.
 
Color standbyTextColor
 The standby text color.
 
Color standbyBackgroundColor
 The standby background color.
 
Color channelNameColor
 The channel name color.
 
Color channelBNameColor
 The channel name color for VFO B.
 
Color zoneNameColor
 The zone name color.
 
Color zoneBNameColor
 The zone name color for VFO B.
 
Language language
 Specifies the UI language.
 
DateFormat dateFormat
 Specifies the date format.
 

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 display settings extension of AnyTone devices.

This extension is part of the AnytoneSettingsExtension.

Member Enumeration Documentation

◆ DateFormat

Possible date formats.

Enumerator
YearFirst 

yyyy/mm/dd

DayFirst 

dd/mm/yyyy

◆ Language

Possible UI languages.

Enumerator
English 

UI Language is english.

German 

UI Language is german.


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