libdrmconf  0.11.3
A library to program DMR radios.
opengd77_extension.hh
1 
6 #ifndef OPENGD77EXTENSION_HH
7 #define OPENGD77EXTENSION_HH
8 
9 #include "configobject.hh"
10 
15 {
16  Q_OBJECT
17 
18  Q_CLASSINFO("description", "Channel settings for OpenGD77 radios.")
19  Q_CLASSINFO("longDescription", "This extension implements all channel settings specific to radios "
20  "running the OpenGD77 firmware. As the OpenGD77 codeplug is derived from the "
21  "Radioddity GD77 codeplug, all Radioddity extension also apply.")
22 
23 
24  Q_PROPERTY(Power power READ power WRITE setPower)
26  Q_PROPERTY(bool scanZoneSkip READ scanZoneSkip WRITE enableScanZoneSkip)
28  Q_PROPERTY(bool scanAllSkip READ scanAllSkip WRITE enableScanAllSkip)
29 
30 public:
32  enum class Power {
33  Global = 0,
34  P50mW = 1,
35  P250mW = 2,
36  P500mW = 3,
37  P750mW = 4,
38  P1W = 5,
39  P2W = 6,
40  P3W = 7,
41  P4W = 8,
42  P5W = 9,
43  Max = 10
44  };
45  Q_ENUM(Power)
46 
47 public:
49  Q_INVOKABLE explicit OpenGD77ChannelExtension(QObject *parent=nullptr);
50 
51  ConfigItem *clone() const;
52 
54  Power power() const;
56  void setPower(Power power);
57 
59  bool scanZoneSkip() const;
61  void enableScanZoneSkip(bool enable);
63  bool scanAllSkip() const;
65  void enableScanAllSkip(bool enable);
66 
67 protected:
69  Power _power;
71  bool _zoneSkip;
73  bool _allSkip;
74 };
75 
76 
81 {
82  Q_OBJECT
83 
84  Q_CLASSINFO("description", "DMR contact settings for OpenGD77 radios.")
85  Q_CLASSINFO("longDescription", "This extension implements all contact settings specific to radios "
86  "running the OpenGD77 firmware. As the OpenGD77 codeplug is derived from the "
87  "Radioddity GD77 codeplug, all Radioddity extension also apply.")
88 
89 
91  Q_CLASSINFO("timeSlotOverrideDescription", "If set, overrides the channels timeslot.")
92  Q_CLASSINFO("timeSlotOverrideLongDescription",
93  "The OpenGD77 firmware allows contacts to override the channel time slot if the "
94  "contact is selected as the current destination contact for that channel. This allows "
95  "to assign a specific time slot to a contact, rather than creating a particular "
96  "channel for that contact that only differs in the time slot.")
97 
98 public:
101  enum class TimeSlotOverride {
102  None = 0x01,
103  TS1 = 0x00,
104  TS2 = 0x02
105  };
106  Q_ENUM(TimeSlotOverride)
107 
108 public:
110  Q_INVOKABLE explicit OpenGD77ContactExtension(QObject *parent=nullptr);
111 
112  ConfigItem *clone() const;
113 
118 
119 protected:
122 };
123 
124 
125 #endif // OPENGD77EXTENSION_HH
Base class of all device/vendor specific confiuration extensions.
Definition: configobject.hh:246
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
Implements the channel extensions for the OpenGD77 radios.
Definition: opengd77_extension.hh:15
bool scanAllSkip() const
Returns true if the all-skip flag is set.
Definition: opengd77_extension.cc:42
void enableScanZoneSkip(bool enable)
Enables/disables zone skip.
Definition: opengd77_extension.cc:37
void setPower(Power power)
Sets the power setting.
Definition: opengd77_extension.cc:27
bool _zoneSkip
Holds the zone skip flag.
Definition: opengd77_extension.hh:71
Power power() const
Returns the power settings for the channel.
Definition: opengd77_extension.cc:23
Power _power
Holds the power setting.
Definition: opengd77_extension.hh:69
bool scanZoneSkip() const
Returns true if the zone skip flag is set.
Definition: opengd77_extension.cc:33
Q_INVOKABLE OpenGD77ChannelExtension(QObject *parent=nullptr)
The channel transmit power.
Definition: opengd77_extension.cc:6
void enableScanAllSkip(bool enable)
Enables/disables all skip.
Definition: opengd77_extension.cc:46
bool _allSkip
Holds the all skip flag.
Definition: opengd77_extension.hh:73
ConfigItem * clone() const
Clones this item.
Definition: opengd77_extension.cc:13
Implements the contact extensions for the OpenGD77 radios.
Definition: opengd77_extension.hh:81
TimeSlotOverride timeSlotOverride() const
Returns the time slot override.
Definition: opengd77_extension.cc:70
TimeSlotOverride _timeSlotOverride
Holds the time slot override.
Definition: opengd77_extension.hh:121
ConfigItem * clone() const
Clones this item.
Definition: opengd77_extension.cc:60
TimeSlotOverride
Possible values for the time-slot override option.
Definition: opengd77_extension.hh:101
@ None
Do not override time-slot of channel.
void setTimeSlotOverride(TimeSlotOverride ts)
Sets the time slot override.
Definition: opengd77_extension.cc:74
Q_INVOKABLE OpenGD77ContactExtension(QObject *parent=nullptr)
Constructor.
Definition: opengd77_extension.cc:53