libdrmconf 0.14.0
A library to program DMR radios.
Loading...
Searching...
No Matches
opengd77_extension.hh
1
6#ifndef OPENGD77EXTENSION_HH
7#define OPENGD77EXTENSION_HH
8
9#include <QGeoCoordinate>
10#include "configobject.hh"
11
12
17{
19
20 Q_CLASSINFO("description", "Channel settings for OpenGD77 radios.")
21 Q_CLASSINFO("longDescription", "This extension implements all channel settings specific to radios "
22 "running the OpenGD77 firmware.")
23
24
38
39
40public:
41 enum class TalkerAlias {
42 None, APRS, Text, Both
43 };
44 Q_ENUM(TalkerAlias)
45
46
47public:
49 Q_INVOKABLE explicit OpenGD77ChannelExtension(QObject *parent=nullptr);
50
51 ConfigItem *clone() const;
52
54 bool scanZoneSkip() const;
56 void enableScanZoneSkip(bool enable);
57
59 bool scanAllSkip() const;
61 void enableScanAllSkip(bool enable);
62
64 bool beep() const;
66 void enableBeep(bool enable);
67
69 bool powerSave() const;
71 void enablePowerSave(bool enable);
72
74 bool locationEnabled() const;
76 void enableLocation(bool enable);
78 const QGeoCoordinate &location() const;
80 QString locator() const;
82 void setLocation(const QGeoCoordinate &loc);
84 void setLocator(const QString &locator);
85
90
95
96protected:
102 bool _beep;
113};
114
115
120{
122
123 Q_CLASSINFO("description", "DMR contact settings for OpenGD77 radios.")
124 Q_CLASSINFO("longDescription", "This extension implements all contact settings specific to radios "
125 "running the OpenGD77 firmware. As the OpenGD77 codeplug is derived from the "
126 "Radioddity GD77 codeplug, all Radioddity extension also apply.")
127
128
130 Q_CLASSINFO("timeSlotOverrideDescription", "If set, overrides the channels timeslot.")
131 Q_CLASSINFO("timeSlotOverrideLongDescription",
132 "The OpenGD77 firmware allows contacts to override the channel time slot if the "
133 "contact is selected as the current destination contact for that channel. This allows "
134 "to assign a specific time slot to a contact, rather than creating a particular "
135 "channel for that contact that only differs in the time slot.")
136
137public:
139 enum class TimeSlotOverride {
140 None,
141 TS1,
142 TS2
143 };
144 Q_ENUM(TimeSlotOverride)
145
146public:
148 Q_INVOKABLE explicit OpenGD77ContactExtension(QObject *parent=nullptr);
149
150 ConfigItem *clone() const;
151
156
157protected:
160};
161
162
163#endif // OPENGD77EXTENSION_HH
Base class of all device/vendor specific configuration extensions.
Definition configobject.hh:239
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
const Object * as() const
Casts this object to the given type.
Definition configobject.hh:146
Implements the channel extensions for the OpenGD77 radios.
Definition opengd77_extension.hh:17
bool powerSave() const
Returns true, if power save is enabled for this channel (default: true).
Definition opengd77_extension.cc:59
bool scanAllSkip() const
Returns true if the all-skip flag is set.
Definition opengd77_extension.cc:37
bool _beep
Holds the beep enable flag.
Definition opengd77_extension.hh:102
void enableScanZoneSkip(bool enable)
Enables/disables zone skip.
Definition opengd77_extension.cc:31
void enablePowerSave(bool enable)
Enables power save for this channel.
Definition opengd77_extension.cc:64
bool locationEnabled() const
Returns true if the fixed location is enabled.
Definition opengd77_extension.cc:70
bool _zoneSkip
Holds the zone skip flag.
Definition opengd77_extension.hh:98
QString locator() const
Returns the fixed location for this channel.
Definition opengd77_extension.cc:94
TalkerAlias _txTalkerAliasTS2
Holds the talker alias setting for timeslot 2.
Definition opengd77_extension.hh:112
bool beep() const
Returns true if the beep tone is enabled for this channel.
Definition opengd77_extension.cc:48
bool _locationEnabled
If true, fixed location is used.
Definition opengd77_extension.hh:106
void setTalkerAliasTS1(TalkerAlias ta)
Sets the talker alias setting for timeslot 1.
Definition opengd77_extension.cc:110
const QGeoCoordinate & location() const
Returns the fixed location for this channel.
Definition opengd77_extension.cc:84
bool scanZoneSkip() const
Returns true if the zone skip flag is set.
Definition opengd77_extension.cc:26
void setTalkerAliasTS2(TalkerAlias ta)
Sets the talker alias setting for timeslot 2.
Definition opengd77_extension.cc:121
void enableBeep(bool enable)
Enable beep tone for this channel.
Definition opengd77_extension.cc:53
void enableScanAllSkip(bool enable)
Enables/disables all skip.
Definition opengd77_extension.cc:42
TalkerAlias _txTalkerAliasTS1
Holds the talker alias setting for timeslot 1.
Definition opengd77_extension.hh:110
bool _allSkip
Holds the all skip flag.
Definition opengd77_extension.hh:100
QGeoCoordinate _location
Holds the fixed location.
Definition opengd77_extension.hh:108
TalkerAlias talkerAliasTS2() const
Returns the talker alias setting for timeslot 2.
Definition opengd77_extension.cc:116
void setLocator(const QString &locator)
Sets the fixed location for this channel.
Definition opengd77_extension.cc:99
ConfigItem * clone() const
Clones this item.
Definition opengd77_extension.cc:15
void setLocation(const QGeoCoordinate &loc)
Sets the fixed location for this channel.
Definition opengd77_extension.cc:89
TalkerAlias talkerAliasTS1() const
Returns the talker alias setting for timeslot 1.
Definition opengd77_extension.cc:105
void enableLocation(bool enable)
Enables the fixed location.
Definition opengd77_extension.cc:75
bool _powerSave
Holds the power-save flag.
Definition opengd77_extension.hh:104
Implements the contact extensions for the OpenGD77 radios.
Definition opengd77_extension.hh:120
TimeSlotOverride timeSlotOverride() const
Returns the time slot override.
Definition opengd77_extension.cc:147
TimeSlotOverride _timeSlotOverride
Holds the time slot override.
Definition opengd77_extension.hh:159
ConfigItem * clone() const
Clones this item.
Definition opengd77_extension.cc:137
TimeSlotOverride
Possible modes of time slot override.
Definition opengd77_extension.hh:139
@ None
Do not override time slot.
void setTimeSlotOverride(TimeSlotOverride ts)
Sets the time slot override.
Definition opengd77_extension.cc:151