30 #include "ui_mainwindow.h" 32 #include <boost/format.hpp> 35 #include "../common/Navigation.hxx" 40 connect(
ui->LogContact_btn, SIGNAL(clicked(
bool)),
43 connect(
ui->FromGrid_le, SIGNAL(textChanged(
const QString &)),
44 this, SLOT(
evalNav(
const QString &)));
45 connect(
ui->ToGrid_le, SIGNAL(textChanged(
const QString &)),
46 this, SLOT(
evalNav(
const QString &)));
48 connect(
listener, SIGNAL(repGPSTime(
int,
int,
int)),
50 connect(
listener, SIGNAL(repGPSLatLon(
double,
double)),
57 QString from_grid =
ui->FromGrid_le->text();
58 QString to_grid =
ui->ToGrid_le->text();
60 float bearing, rbearing, distance;
61 int stat = GetBearingDistance(from_grid.toStdString(), to_grid.toStdString(), bearing, rbearing, distance);
64 ui->Bearing_lab->setText(QString(
"%1").arg(bearing, 3,
'f', 0));
65 ui->RevBearing_lab->setText(QString(
"%1").arg(rbearing, 3,
'f', 0));
66 ui->Range_lab->setText(QString(
"%1").arg(distance, 4,
'f', 0));
76 ui->LogView->logContact(
ui->FromCall_le->text(),
77 ui->FromGrid_le->text(),
78 ui->ToCall_le->text(),
79 ui->ToGrid_le->text(),
80 ui->Mode_cb->currentText(),
81 ui->LogComment_txt->text(),
82 ui->RXFreq_lab->getFreq(),
83 ui->TXFreq_lab->getFreq());
89 ui->UTC_lab->setText(QString(
"%1:%2:%3").arg(h,2,10,fc).arg(m,2,10,fc).arg(s,2,10,fc));
94 QString grid = QString::fromStdString(GetGridSquare(lat, lon));
96 ui->GRID_lab->setText(grid);
98 ui->LAT_lab->setText(QString(
"%1").arg(lat, 5,
'f', 2));
99 ui->LON_lab->setText(QString(
"%1").arg(lon, 6,
'f', 2));
101 if(
ui->useGPS_ck->isChecked()) {
102 ui->FromGrid_lab->setText(grid);
103 ui->FromGrid_le->setText(grid);
GUISoDa::Listener * listener
void updateTime(int h, int m, int s)
void evalNav(const QString &dummy)
void updatePosition(double lat, double lon)
void logContact(bool)
log the current contact by storing the grid, call, date, time, frequency, mode, and other stuff into ...