~hmatuschek/+junk/qdmr-package

« back to all changes in this revision

Viewing changes to src/digitalchanneldialog.cc

  • Committer: Hannes Matuschek
  • Date: 2020-07-07 14:34:22 UTC
  • mto: (17.1.1 qdmr-package)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: hmatuschek@gmail.com-20200707143422-1djcxrjkem3k5kb1
Tags: upstream-0.3.0
ImportĀ upstreamĀ versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#include <QCompleter>
4
4
#include "rxgrouplistdialog.hh"
5
5
#include "repeaterdatabase.hh"
 
6
#include "utils.hh"
6
7
 
7
8
 
8
9
/* ********************************************************************************************* *
54
55
  timeSlot->setItemData(1, uint(DigitalChannel::TimeSlot2));
55
56
  populateRXGroupListBox(rxGroupList, _config->rxGroupLists(),
56
57
                         (nullptr != _channel ? _channel->rxGroupList() : nullptr));
 
58
  txContact->addItem(tr("[None]"), QVariant::fromValue(nullptr));
 
59
  if (_channel && (nullptr == _channel->txContact()))
 
60
    txContact->setCurrentIndex(0);
57
61
  for (int i=0; i<_config->contacts()->count(); i++) {
58
62
    txContact->addItem(_config->contacts()->contact(i)->name(),
59
63
                       QVariant::fromValue(_config->contacts()->contact(i)));
60
64
    if (_channel && (_channel->txContact() == _config->contacts()->contact(i)) )
61
 
      txContact->setCurrentIndex(i);
 
65
      txContact->setCurrentIndex(i+1);
62
66
  }
63
67
  gpsSystem->addItem(tr("[None]"), QVariant::fromValue((GPSSystem *)nullptr));
64
68
  for (int i=0; i<_config->gpsSystems()->count(); i++) {
70
74
 
71
75
  if (_channel) {
72
76
    channelName->setText(_channel->name());
73
 
    rxFrequency->setText(QString::number(_channel->rxFrequency()));
74
 
    txFrequency->setText(QString::number(_channel->txFrequency()));
 
77
    rxFrequency->setText(format_frequency(_channel->rxFrequency()));
 
78
    txFrequency->setText(format_frequency(_channel->txFrequency()));
75
79
    if (Channel::HighPower==_channel->power())
76
80
      power->setCurrentIndex(0);
77
81
    else if (Channel::LowPower==_channel->power())