From 94db4b80b293c264e80b3958edf4074402a06732 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 10 Nov 2015 18:11:06 +0000 Subject: [PATCH] Add mw/W/kW values to the WSPR control for setting Tx power. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6068 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 6 +++++- mainwindow.ui | 52 +++++++++++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 648c949ff..bd38b128e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -422,6 +422,9 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme m_nclearave=1; m_bEchoTxed=false; m_nWSPRdecodes=0; + QString t1[28]={"1 uW","2 uW","5 uW","10 uW","20 uW","50 uW","100 uW","200 uW","500 uW", + "1 mW","2 mW","5 mW","10 mW","20 mW","50 mW","100 mW","200 mW","500 mW", + "1 W","2 W","5 W","10 W","20 W","50 W","100 W","200 W","500 W","1 kW"}; for(int i=0; i<28; i++) { //Initialize dBm values float dbm=(10.0*i)/3.0 - 30.0; @@ -429,7 +432,8 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme if(dbm<0) ndbm=int(dbm-0.5); if(dbm>=0) ndbm=int(dbm+0.5); QString t; - t.sprintf("%d dBm",ndbm); + t.sprintf("%d dBm ",ndbm); + t+=t1[i]; ui->TxPowerComboBox->addItem(t); } diff --git a/mainwindow.ui b/mainwindow.ui index 49c92750a..d79971777 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1682,24 +1682,18 @@ list. The list can be maintained in Settings (F2). - - - - Percentage of 2-minute sequences devoted to transmitting. + + + + Qt::Horizontal - - Qt::AlignCenter + + + 40 + 20 + - - % - - - Tx Pct - - - 100 - - + @@ -1777,18 +1771,24 @@ list. The list can be maintained in Settings (F2). - - - - Qt::Horizontal + + + + Percentage of 2-minute sequences devoted to transmitting. - - - 40 - 20 - + + Qt::AlignCenter - + + % + + + Tx Pct + + + 100 + +