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
This commit is contained in:
Joe Taylor 2015-11-10 18:11:06 +00:00
parent 0dabc8f791
commit 4a38e03020
2 changed files with 31 additions and 27 deletions

View File

@ -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);
}

View File

@ -1682,24 +1682,18 @@ list. The list can be maintained in Settings (F2).</string>
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbTxPercent">
<property name="toolTip">
<string>Percentage of 2-minute sequences devoted to transmitting.</string>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
<property name="suffix">
<string> %</string>
</property>
<property name="prefix">
<string>Tx Pct </string>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</spacer>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="cbUploadWSPR_Spots">
@ -1777,18 +1771,24 @@ list. The list can be maintained in Settings (F2).</string>
</property>
</spacer>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="1" column="1">
<widget class="QSpinBox" name="sbTxPercent">
<property name="toolTip">
<string>Percentage of 2-minute sequences devoted to transmitting.</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</spacer>
<property name="suffix">
<string> %</string>
</property>
<property name="prefix">
<string>Tx Pct </string>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>