diff --git a/doc/manual/gui/fig/qdmr-settings-datasources.png b/doc/manual/gui/fig/qdmr-settings-datasources.png
new file mode 100644
index 00000000..63807687
Binary files /dev/null and b/doc/manual/gui/fig/qdmr-settings-datasources.png differ
diff --git a/doc/manual/gui/fig/qdmr-settings-extensions.png b/doc/manual/gui/fig/qdmr-settings-extensions.png
new file mode 100644
index 00000000..3341b2a3
Binary files /dev/null and b/doc/manual/gui/fig/qdmr-settings-extensions.png differ
diff --git a/doc/manual/gui/fig/qdmr-settings-programming.png b/doc/manual/gui/fig/qdmr-settings-programming.png
new file mode 100644
index 00000000..ffb2536c
Binary files /dev/null and b/doc/manual/gui/fig/qdmr-settings-programming.png differ
diff --git a/doc/manual/gui/settingsdialog.xml b/doc/manual/gui/settingsdialog.xml
index 006b761f..950bbe6b 100644
--- a/doc/manual/gui/settingsdialog.xml
+++ b/doc/manual/gui/settingsdialog.xml
@@ -10,25 +10,30 @@
- The application settings dialog controls some of the behavior of qdmr.
- The dialog is divided into 4 sections: Location, Radio
- Programming, Call-Sign DB and Extended Features.
+ The application settings dialog controls the behavior of qdmr.
+ The dialog is divided into 3 sections, accessible via the tabs on the top.
-
-
-
- Screen shot of the application settings dialog.
-
- The settings dialog
-
- Location settings
+ Data Sources
+
+ The Data Sources tab collects the settings for the location service and
+ repeater database.
+
+
+
+
+
+ Screen shot of the application settings dialog for the data sources.
+
+ The settings dialog: Data sources
+
+
The first section concerns the location of the user. You may enter your Maidenhead
Locator here or you may enable System location. The latter tries
@@ -36,13 +41,35 @@
channel editors (see ) to provide auto-completion for repeaters
nearby.
+
+
+ The second section allows to set the source for the repeater database. This enables
+ qdmr to automatically complete some information for a repeater if its
+ callsign is entered as the name, when creating a new channel. For some weird reason, the single
+ data source Repeater Book provides two identical
+ APIs for North America and the rest of the World. You must select your source accordingly.
+
+
- Radio interface settings
+ Radio programming settings
+
+ The second tab controls, how the radios are programmed. That is, how the codeplug is assembled and
+ also, how the callsign database gets curated.
+
+
+
+
+
+ Screen shot of the application settings dialog for programming the radios.
+
+ The settings dialog: Programming
+
+
The Radio Interfaces section contains settings, controlling, how the
radios are accessed. For now, there is only one setting, called
@@ -50,17 +77,11 @@
connected radios. You will then have to select an interface and choose a radio model, every time
you access it.
-
-
-
-
- Radio programming settings
-
- The third section controls the programming of the radio and how code plugs are assembled. The
- first option Update code plug specifies whether a code plug is generated from
- scratch or whether the code plug currently programmed on the radio gets updated.
+ The second section specifies how codeplugs are assembled. The first option
+ Update codeplug specifies whether a codeplug is generated from
+ scratch or whether the codeplug currently programmed on the radio gets updated.
qdmr does not implement all settings possible for all radios,
consequently Update code plug should be chooses to maintain all settings
of the radio that are not touched by qdmr.
@@ -90,13 +111,6 @@
manufacturer. But be aware, that transmitting outside the declared frequency range may destroy
the radio!
-
-
-
-
-
- Call-sign DB settings
-
The Call-Sign DB section collects options that control the automatic
@@ -137,12 +151,23 @@
-
- Extended feature settings
+ Extension settings
+
+ The last tab collects settings, controlling several extended settings for the devices.
+
+
+
+
+
+ Screen shot of the application settings dialog for extensions.
+
+ The settings dialog: Extensions
+
+
DMR originated as a standard for commercial radios. Consequently, there are many features that
are not relevant or even illegal for ham-radio use (e.g., encryption). However, some operators
@@ -160,4 +185,4 @@
-
\ No newline at end of file
+
diff --git a/src/repeaterbookcompleter.cc b/src/repeaterbookcompleter.cc
index 4c05c804..0df0f542 100644
--- a/src/repeaterbookcompleter.cc
+++ b/src/repeaterbookcompleter.cc
@@ -8,6 +8,7 @@
#include "logger.hh"
#include "utils.hh"
+#include "settings.hh"
/* ********************************************************************************************* *
@@ -418,7 +419,12 @@ RepeaterBookList::search(const QString &text) {
if ((_queries.contains(call)) && (_queries[call].daysTo(QDateTime::currentDateTime())<3))
return;
- QUrl url("https://www.repeaterbook.com/api/exportROW.php");
+ QUrl url;
+ if (Region::World == Settings().repeaterBookRegion())
+ url = QUrl("https://www.repeaterbook.com/api/exportROW.php");
+ else
+ url = QUrl("https://www.repeaterbook.com/api/export.php");
+
QUrlQuery query;
query.addQueryItem("callsign", QString("%1%").arg(call));
url.setQuery(query);
diff --git a/src/repeaterbookcompleter.hh b/src/repeaterbookcompleter.hh
index 28dab509..3fcfde23 100644
--- a/src/repeaterbookcompleter.hh
+++ b/src/repeaterbookcompleter.hh
@@ -60,6 +60,12 @@ class RepeaterBookList: public QAbstractListModel
{
Q_OBJECT
+public:
+ enum Region {
+ World, NorthAmerica
+ };
+ Q_ENUM(Region)
+
public:
explicit RepeaterBookList(QObject *parent=nullptr);
diff --git a/src/settings.cc b/src/settings.cc
index c2ffc7c7..9db6e847 100644
--- a/src/settings.cc
+++ b/src/settings.cc
@@ -62,6 +62,15 @@ Settings::position() const {
return loc2deg(locator());
}
+RepeaterBookList::Region
+Settings::repeaterBookRegion() const {
+ return value("repeaterBookRegion", RepeaterBookList::Region::World).value();
+}
+void
+Settings::setRepeaterBookRegion(RepeaterBookList::Region region) {
+ setValue("repeaterBookRegion", region);
+}
+
bool
Settings::disableAutoDetect() const {
return value("disableAutoDetect", false).toBool();
@@ -342,6 +351,11 @@ SettingsDialog::SettingsDialog(QWidget *parent)
if (queryLocation->isChecked())
locatorEntry->setEnabled(false);
+ switch (settings.repeaterBookRegion()) {
+ case RepeaterBookList::World: Ui::SettingsDialog::repeaterBookRegion->setCurrentIndex(0); break;
+ case RepeaterBookList::NorthAmerica: Ui::SettingsDialog::repeaterBookRegion->setCurrentIndex(1); break;
+ }
+
connect(Ui::SettingsDialog::ignoreFrequencyLimits, SIGNAL(toggled(bool)),
this, SLOT(onIgnoreFrequencyLimitsSet(bool)));
connect(queryLocation, SIGNAL(toggled(bool)), this, SLOT(onSystemLocationToggled(bool)));
@@ -427,6 +441,10 @@ SettingsDialog::accept() {
settings.setQueryPosition(queryLocation->isChecked());
settings.setLocator(locatorEntry->text().simplified());
settings.setDisableAutoDetect(disableAutoDetect->isChecked());
+ if (0 == Ui::SettingsDialog::repeaterBookRegion->currentIndex())
+ settings.setRepeaterBookRegion(RepeaterBookList::World);
+ else
+ settings.setRepeaterBookRegion(RepeaterBookList::NorthAmerica);
settings.setUpdateCodeplug(updateCodeplug->isChecked());
settings.setAutoEnableGPS(autoEnableGPS->isChecked());
settings.setAutoEnableRoaming(autoEnableRoaming->isChecked());
diff --git a/src/settings.hh b/src/settings.hh
index 026c0979..f9e1ab50 100644
--- a/src/settings.hh
+++ b/src/settings.hh
@@ -11,6 +11,7 @@
#include "codeplug.hh"
#include "configmergevisitor.hh"
+#include "repeaterbookcompleter.hh"
class Settings : public QSettings
@@ -34,6 +35,9 @@ public:
bool disableAutoDetect() const;
void setDisableAutoDetect(bool disable);
+ RepeaterBookList::Region repeaterBookRegion() const;
+ void setRepeaterBookRegion(RepeaterBookList::Region region);
+
bool updateCodeplug() const;
void setUpdateCodeplug(bool update);
diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui
index aca154cf..3e1dc4c4 100644
--- a/src/settingsdialog.ui
+++ b/src/settingsdialog.ui
@@ -7,7 +7,7 @@
0
0
400
- 610
+ 488
@@ -15,270 +15,334 @@
-
-
-
- Location
+
+
+ 0
-
-
-
-
-
- System location
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Locator
-
-
-
- -
-
-
-
-
-
- -
-
-
- Radio Interfaces
-
-
-
-
-
-
- disable auto-detect
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
- Radio Programming
-
-
-
- QFormLayout::AllNonFixedFieldsGrow
-
-
-
-
-
- Update codeplug
-
-
-
- -
-
-
- <html><head/><body><p>Update the codeplug on the radio. If not selected, the codeplug on the radio gets overridden with possibly incomplete default values.</p><p><br/></p><p>If selected, QDMR downloads the codeplug from the radio and updates only those settings specified. The remaining settings within the radio are not touched (recommended).</p></body></html>
-
-
-
-
-
-
- -
-
-
- Auto-enable GPS
-
-
-
- -
-
-
- When a GPS or APRS system is defined and used for any channel, the GPS module gets enabled automatically.
-
-
-
-
-
-
- -
-
-
- When a roaming zone is defined and used by any channel, the automatic roaming gets enabled.
-
-
-
-
-
-
- -
-
-
- Auto-enable roaming
-
-
-
- -
-
-
- Ignore verification warnings
-
-
-
- -
-
-
- <html><head/><body><p>As the communication interface to the radio is kept open after verification, time-outs may occur and the code-plug upload may fail when the verification dialog pops up. To prevent this, verification warnings can be ignored, eliminating the time-gap between verification and upload. Verification errors still prevent the upload.</p></body></html>
-
-
-
-
-
-
- -
-
-
- Ignore frequency limits
-
-
-
- -
-
-
- Do not set this option unless you know what you are doing.
-
-
-
-
-
-
-
-
-
- -
-
-
- Call-Sign DB
-
-
-
-
-
-
- Limit number of DB entries
-
-
-
- -
-
-
- When enabled, the number of DB entries will be limited. Otherwise the maximum number of entries are generated (device dependent).
-
-
-
-
-
-
- -
-
-
- Number of DB entries
-
-
-
- -
-
-
- Specifies the number of DB entries (if enabled above).
-
-
- 1
-
-
- 999999
-
-
-
- -
-
-
- Select using my DMR ID
-
-
-
- -
-
-
- If enabled, the entries are selected using the users DMR ID.
-
-
-
-
-
-
- -
-
-
- Select using prefixes
-
-
-
- -
-
-
- If enabled, these comma separated DMR ID prefixes are used to select the call-sign DB entries.
-
-
-
-
-
-
- -
-
-
- Extended Features
-
-
-
-
-
-
- Show commercial features
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Show device extensions
-
-
-
- -
-
-
-
-
-
-
-
+
+
+ Data Sources
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Location
+
+
+
-
+
+
+ System location
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Locator
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+ Repeater Book
+
+
+
-
+
+
+ Region
+
+
+
+ -
+
+
-
+
+ World
+
+
+ -
+
+ North America
+
+
+
+
+
+
+
+
+
+
+
+ Programming
+
+
+ -
+
+
+ Radio Interfaces
+
+
+
-
+
+
+ disable auto-detect
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Radio Programming
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+
-
+
+
+ Update codeplug
+
+
+
+ -
+
+
+ <html><head/><body><p>Update the codeplug on the radio. If not selected, the codeplug on the radio gets overridden with possibly incomplete default values.</p><p><br/></p><p>If selected, QDMR downloads the codeplug from the radio and updates only those settings specified. The remaining settings within the radio are not touched (recommended).</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Auto-enable GPS
+
+
+
+ -
+
+
+ When a GPS or APRS system is defined and used for any channel, the GPS module gets enabled automatically.
+
+
+
+
+
+
+ -
+
+
+ Auto-enable roaming
+
+
+
+ -
+
+
+ When a roaming zone is defined and used by any channel, the automatic roaming gets enabled.
+
+
+
+
+
+
+ -
+
+
+ Ignore verification warnings
+
+
+
+ -
+
+
+ <html><head/><body><p>As the communication interface to the radio is kept open after verification, time-outs may occur and the code-plug upload may fail when the verification dialog pops up. To prevent this, verification warnings can be ignored, eliminating the time-gap between verification and upload. Verification errors still prevent the upload.</p></body></html>
+
+
+
+
+
+
+ -
+
+
+ Ignore frequency limits
+
+
+
+ -
+
+
+ Do not set this option unless you know what you are doing.
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Call-Sign DB
+
+
+
-
+
+
+ Limit number of DB entries
+
+
+
+ -
+
+
+ When enabled, the number of DB entries will be limited. Otherwise the maximum number of entries are generated (device dependent).
+
+
+
+
+
+
+ -
+
+
+ Number of DB entries
+
+
+
+ -
+
+
+ Specifies the number of DB entries (if enabled above).
+
+
+ 1
+
+
+ 999999
+
+
+
+ -
+
+
+ Select using my DMR ID
+
+
+
+ -
+
+
+ If enabled, the entries are selected using the users DMR ID.
+
+
+
+
+
+
+ -
+
+
+ Select using prefixes
+
+
+
+ -
+
+
+ If enabled, these comma separated DMR ID prefixes are used to select the call-sign DB entries.
+
+
+
+
+
+
+
+
+
+
+ Extensions
+
+
+ -
+
+
+ Extended Features
+
+
+
-
+
+
+ Show commercial features
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Show device extensions
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
-