libdrmconf 0.14.1
A library to program DMR radios.
Loading...
Searching...
No Matches
dmrsettings.hh
1#ifndef DMRSETTINGS_HH
2#define DMRSETTINGS_HH
3
4#include "interval.hh"
5#include "configobject.hh"
6
10{
11 Q_OBJECT
12
13 Q_CLASSINFO("description", "Common DMR settings.")
14 Q_CLASSINFO("privateCallMatchDescription", "If enabled, private calls are only received, "
15 "if they are for you.")
16 Q_PROPERTY(bool privateCallMatch READ privateCallMatchEnabled WRITE enablePrivateCallMatch FINAL)
17 Q_CLASSINFO("groupCallMatchDescription", "If enabled, group calls are only received, "
18 "if they are on the group list.")
19 Q_PROPERTY(bool groupCallMatch READ groupCallMatchEnabled WRITE enableGroupCallMatch FINAL)
20 Q_CLASSINFO("privateCallHangTimeDescription", "Time span during which a direct answer for a "
21 "private call is possible.")
23 Q_CLASSINFO("groupCallHangTimeDescription", "Time span during which a direct answer for a "
24 "group call is possible.")
25 Q_PROPERTY(Interval groupCallHangTime READ groupCallHangTime WRITE setGroupCallHangTime FINAL)
26 Q_CLASSINFO("sendTalkerAliasDescription", "If enabled, the talker alias is send.")
27 Q_PROPERTY(bool sendTalkerAlias READ sendTalkerAliasEnabled WRITE enableSendTalkerAlias FINAL)
28 Q_CLASSINFO("talkerAliasEncodingDescription", "Specifies the encoding of the talker alias.")
29 Q_PROPERTY(TalkerAliasEncoding talkerAliasEncoding READ talkerAliasEncoding WRITE setTalkerAliasEncoding FINAL)
30 Q_CLASSINFO("preambleDescription", "Specifies preamble duration. Usually 100ms.")
31 Q_PROPERTY(Interval preamble READ preamble WRITE setPreamble FINAL)
32
33public:
36 Iso7, Iso8, Unicode
37 };
39
40public:
42 explicit DMRSettings(QObject *parent = nullptr);
43
44 void clear() override;
45 ConfigItem *clone() const override;
46
48 bool privateCallMatchEnabled() const;
50 void enablePrivateCallMatch(bool enable);
51
53 bool groupCallMatchEnabled() const;
55 void enableGroupCallMatch(bool enable);
56
60 void setPrivateCallHangTime(const Interval &dur);
61
65 void setGroupCallHangTime(const Interval &dur);
66
68 bool sendTalkerAliasEnabled() const;
70 void enableSendTalkerAlias(bool enable);
71
76
78 Interval preamble() const;
80 void setPreamble(const Interval &dur);
81
82protected:
97};
98
99#endif // DMRSETTINGS_HH
ConfigExtension(QObject *parent=nullptr)
Hidden constructor.
Definition configobject.cc:1234
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
TalkerAliasEncoding talkerAliasEncoding() const
Returns the talker alias encoding.
Definition dmrsettings.cc:108
DMRSettings(QObject *parent=nullptr)
Default constructor.
Definition dmrsettings.cc:4
void setTalkerAliasEncoding(TalkerAliasEncoding encoding)
Sets the talker alias encoding.
Definition dmrsettings.cc:113
void setPreamble(const Interval &dur)
Sets the preamble duration.
Definition dmrsettings.cc:127
void setPrivateCallHangTime(const Interval &dur)
Sets the private call hang time.
Definition dmrsettings.cc:71
Interval _privateCallHangTime
The private call hang time.
Definition dmrsettings.hh:88
void enableGroupCallMatch(bool enable)
Enables group call match.
Definition dmrsettings.cc:57
Interval privateCallHangTime() const
Returns the private call hang time.
Definition dmrsettings.cc:66
TalkerAliasEncoding
Possible talker alias encodings.
Definition dmrsettings.hh:35
bool _sendTalkerAlias
Enables sending the talker alias.
Definition dmrsettings.hh:92
bool groupCallMatchEnabled() const
Returns true if the group call must match.
Definition dmrsettings.cc:52
Interval preamble() const
Returns the preamble duration.
Definition dmrsettings.cc:122
void setGroupCallHangTime(const Interval &dur)
Sets the group call hang time.
Definition dmrsettings.cc:85
Interval _preamble
The preamble duration.
Definition dmrsettings.hh:96
void enableSendTalkerAlias(bool enable)
Enables sending talker alias.
Definition dmrsettings.cc:99
ConfigItem * clone() const override
Clones this item.
Definition dmrsettings.cc:28
void clear() override
Clears the config object.
Definition dmrsettings.cc:15
bool sendTalkerAliasEnabled() const
Retunrs true if the talker alias is send.
Definition dmrsettings.cc:94
bool _groupCallMatch
Enables group call match.
Definition dmrsettings.hh:86
bool privateCallMatchEnabled() const
Returns true if the private call must match.
Definition dmrsettings.cc:39
Interval groupCallHangTime() const
Returns the group call hang time.
Definition dmrsettings.cc:80
Interval _groupCallHangTime
The group call hang time.
Definition dmrsettings.hh:90
TalkerAliasEncoding _talkerAliasEncoding
The talker alias encoding.
Definition dmrsettings.hh:94
void enablePrivateCallMatch(bool enable)
Enables private call match.
Definition dmrsettings.cc:44
bool _privateCallMatch
Enables private call match.
Definition dmrsettings.hh:84
Represents a time interval.
Definition interval.hh:11