Added clock and UTC toggle.

This commit is contained in:
Elliott Liggett 2021-12-23 20:05:34 -08:00
parent eaf4dd7ef0
commit 034d22e994
3 changed files with 17 additions and 3 deletions

View file

@ -4566,8 +4566,15 @@ void wfmain::setRadioTimeDatePrep()
if(!waitingToSetTimeDate)
{
// 1: Find the current time and date
QDateTime now = QDateTime::currentDateTime();
now.setTime(QTime::currentTime());
QDateTime now;
if(ui->useUTCChk->isChecked())
{
now = QDateTime::currentDateTimeUtc();
now.setTime(QTime::currentTime());
} else {
now = QDateTime::currentDateTime();
now.setTime(QTime::currentTime());
}
int second = now.time().second();
@ -5505,6 +5512,11 @@ void wfmain::receiveStateInfo(rigstate* state)
rigState = state;
}
void wfmain::on_setClockBtn_clicked()
{
setRadioTimeDatePrep();
}
// --- DEBUG FUNCTION ---
void wfmain::on_debugBtn_clicked()
{

View file

@ -506,6 +506,8 @@ private slots:
void on_settingsList_currentRowChanged(int currentRow);
void on_setClockBtn_clicked();
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);

View file

@ -2066,7 +2066,7 @@
<item>
<widget class="QStackedWidget" name="settingsStack">
<property name="currentIndex">
<number>4</number>
<number>2</number>
</property>
<widget class="QWidget" name="radioAccess">
<layout class="QVBoxLayout" name="verticalLayout_21">