libdrmconf 0.15.1
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#include "melody.hh"
12
13
18{
19 Q_OBJECT
20
21 Q_CLASSINFO("description", "Channel settings for OpenGD77 radios.")
22 Q_CLASSINFO("longDescription", "This extension implements all channel settings specific to radios "
23 "running the OpenGD77 firmware.")
24
25
26 Q_PROPERTY(bool scanZoneSkip READ scanZoneSkip WRITE enableScanZoneSkip)
28 Q_PROPERTY(bool scanAllSkip READ scanAllSkip WRITE enableScanAllSkip)
30 Q_PROPERTY(bool beep READ beep WRITE enableBeep)
32 Q_PROPERTY(bool powerSave READ powerSave WRITE enablePowerSave)
34 Q_PROPERTY(QString location READ locator WRITE setLocator)
36 Q_PROPERTY(TalkerAlias talkerAliasTS1 READ talkerAliasTS1 WRITE setTalkerAliasTS1)
38 Q_PROPERTY(TalkerAlias talkerAliasTS2 READ talkerAliasTS2 WRITE setTalkerAliasTS2)
39
40
41public:
42 enum class TalkerAlias {
43 None, APRS, Text, Both
44 };
45 Q_ENUM(TalkerAlias)
46
47
48public:
50 Q_INVOKABLE explicit OpenGD77ChannelExtension(QObject *parent=nullptr);
51
52 ConfigItem *clone() const;
53
55 bool scanZoneSkip() const;
57 void enableScanZoneSkip(bool enable);
58
60 bool scanAllSkip() const;
62 void enableScanAllSkip(bool enable);
63
65 bool beep() const;
67 void enableBeep(bool enable);
68
70 bool powerSave() const;
72 void enablePowerSave(bool enable);
73
75 const QGeoCoordinate &location() const;
77 QString locator() const;
79 void setLocation(const QGeoCoordinate &loc);
81 void setLocator(const QString &locator);
82
84 TalkerAlias talkerAliasTS1() const;
86 void setTalkerAliasTS1(TalkerAlias ta);
87
89 TalkerAlias talkerAliasTS2() const;
91 void setTalkerAliasTS2(TalkerAlias ta);
92
93protected:
99 bool _beep;
103 QGeoCoordinate _location;
105 TalkerAlias _txTalkerAliasTS1;
107 TalkerAlias _txTalkerAliasTS2;
108};
109
110
115{
116 Q_OBJECT
117
118 Q_CLASSINFO("description", "DMR contact settings for OpenGD77 radios.")
119 Q_CLASSINFO("longDescription", "This extension implements all contact settings specific to radios "
120 "running the OpenGD77 firmware. As the OpenGD77 codeplug is derived from the "
121 "Radioddity GD77 codeplug, all Radioddity extension also apply.")
122
123
125 Q_CLASSINFO("timeSlotOverrideDescription", "If set, overrides the channels timeslot.")
126 Q_CLASSINFO("timeSlotOverrideLongDescription",
127 "The OpenGD77 firmware allows contacts to override the channel time slot if the "
128 "contact is selected as the current destination contact for that channel. This allows "
129 "to assign a specific time slot to a contact, rather than creating a particular "
130 "channel for that contact that only differs in the time slot.")
131
132public:
139 Q_ENUM(TimeSlotOverride)
140
141public:
143 Q_INVOKABLE explicit OpenGD77ContactExtension(QObject *parent=nullptr);
144
145 ConfigItem *clone() const;
146
151
152protected:
155};
156
157
162{
163 Q_OBJECT
164
165 Q_CLASSINFO("description", "FM APRS settings for OpenGD77 radios.")
166 Q_CLASSINFO("longDescription", "This extension implements all FM APRS settings specific to radios "
167 "running the OpenGD77 firmware.")
168
169 Q_CLASSINFO("transmitQSYDescription", "Adds the channel frequency to APRS message.")
170 Q_CLASSINFO("transmitQSYLongDescription", "If enabled, the current frequency gets added to the APRS message.")
172 Q_PROPERTY(bool transmitQSY READ transmitQSY WRITE enableTransmitQSY)
173
174 Q_CLASSINFO("baudDescription", "Specifies the baud rate.")
176 Q_PROPERTY(unsigned int baud READ baudRate WRITE setBaudRate)
177
178public:
180 Q_INVOKABLE explicit OpenGD77FMAPRSSystemExtension(QObject *parent=nullptr);
181
182 ConfigItem *clone() const override;
183
185 bool transmitQSY() const;
187 void enableTransmitQSY(bool enable);
188
190 unsigned int baudRate() const;
192 void setBaudRate(unsigned int baudRate);
193
194protected:
198 unsigned int _baudRate;
199};
200
201
202#endif // OPENGD77EXTENSION_HH
ConfigExtension(QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:1244
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
virtual ConfigItem * clone() const =0
Clones this item.
ConfigItem(QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:158
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:99
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 _zoneSkip
Holds the zone skip flag.
Definition opengd77_extension.hh:95
QString locator() const
Returns the fixed location for this channel.
Definition opengd77_extension.cc:80
TalkerAlias _txTalkerAliasTS2
Holds the talker alias setting for timeslot 2.
Definition opengd77_extension.hh:107
bool beep() const
Returns true if the beep tone is enabled for this channel.
Definition opengd77_extension.cc:48
void setTalkerAliasTS1(TalkerAlias ta)
Sets the talker alias setting for timeslot 1.
Definition opengd77_extension.cc:96
const QGeoCoordinate & location() const
Returns the fixed location for this channel.
Definition opengd77_extension.cc:70
bool scanZoneSkip() const
Returns true if the zone skip flag is set.
Definition opengd77_extension.cc:26
Q_INVOKABLE OpenGD77ChannelExtension(QObject *parent=nullptr)
The zone skip flag.
Definition opengd77_extension.cc:7
void setTalkerAliasTS2(TalkerAlias ta)
Sets the talker alias setting for timeslot 2.
Definition opengd77_extension.cc:107
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:105
bool _allSkip
Holds the all skip flag.
Definition opengd77_extension.hh:97
QGeoCoordinate _location
Holds the fixed location.
Definition opengd77_extension.hh:103
TalkerAlias talkerAliasTS2() const
Returns the talker alias setting for timeslot 2.
Definition opengd77_extension.cc:102
void setLocator(const QString &locator)
Sets the fixed location for this channel.
Definition opengd77_extension.cc:85
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:75
TalkerAlias talkerAliasTS1() const
Returns the talker alias setting for timeslot 1.
Definition opengd77_extension.cc:91
bool _powerSave
Holds the power-save flag.
Definition opengd77_extension.hh:101
TimeSlotOverride timeSlotOverride() const
Returns the time slot override.
Definition opengd77_extension.cc:133
TimeSlotOverride _timeSlotOverride
Holds the time slot override.
Definition opengd77_extension.hh:154
ConfigItem * clone() const
Clones this item.
Definition opengd77_extension.cc:123
TimeSlotOverride
Possible modes of time slot override.
Definition opengd77_extension.hh:134
@ TS2
Override with time slot 2.
Definition opengd77_extension.hh:137
@ None
Do not override time slot.
Definition opengd77_extension.hh:135
@ TS1
Override with time slot 1.
Definition opengd77_extension.hh:136
void setTimeSlotOverride(TimeSlotOverride ts)
Sets the time slot override.
Definition opengd77_extension.cc:137
Q_INVOKABLE OpenGD77ContactExtension(QObject *parent=nullptr)
Constructor.
Definition opengd77_extension.cc:116
Implements the FM-APRS extensions for the OpenGD77 radios.
Definition opengd77_extension.hh:162
unsigned int _baudRate
Holds the baud rate.
Definition opengd77_extension.hh:198
bool _transmitQSY
Hold the transmit QSY flag.
Definition opengd77_extension.hh:196