More work on FoxCalls.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8206 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-11-01 18:58:40 +00:00
parent 52b079f870
commit 300b40b55a
4 changed files with 187 additions and 52 deletions

View File

@ -19,6 +19,8 @@ FoxCalls::FoxCalls(QSettings * settings, QWidget *parent) :
m_settings->beginGroup("FoxCalls"); m_settings->beginGroup("FoxCalls");
restoreGeometry (m_settings->value("geometry").toByteArray()); restoreGeometry (m_settings->value("geometry").toByteArray());
ui->cbReverse->setVisible(false); ui->cbReverse->setVisible(false);
ui->foxPlainTextEdit->setReadOnly (true);
// connect (ui->foxPlainTextEdit,SIGNAL(selectCallsign(bool)),this,SLOT(selectCall2(bool)));
} }
FoxCalls::~FoxCalls() FoxCalls::~FoxCalls()
@ -73,25 +75,29 @@ void FoxCalls::insertText(QString t)
j=0; j=0;
t=""; t="";
for(auto a: map.keys()) { for(auto a: map.keys()) {
if(ui->rbCall->isChecked()) t += map[a] + "\n"; t1=map[a].split(" ",QString::SkipEmptyParts).at(2);
if(ui->rbSNR->isChecked() or ui->rbAge->isChecked()) { int nsnr=t1.toInt();
i=2; if(nsnr>=ui->sbMinDB->value() and nsnr<=ui->sbMaxDB->value()) {
if(ui->rbAge->isChecked()) i=4; if(ui->rbCall->isChecked()) t += map[a] + "\n";
t1=map[a].split(" ",QString::SkipEmptyParts).at(i); if(ui->rbSNR->isChecked() or ui->rbAge->isChecked()) {
n=1000*(t1.toInt()+100) + j; i=2;
} if(ui->rbAge->isChecked()) i=4;
t1=map[a].split(" ",QString::SkipEmptyParts).at(i);
n=1000*(t1.toInt()+100) + j;
}
if(ui->rbGrid->isChecked()) { if(ui->rbGrid->isChecked()) {
t1=map[a].split(" ",QString::SkipEmptyParts).at(1); t1=map[a].split(" ",QString::SkipEmptyParts).at(1);
int i1=ABC.indexOf(t1.mid(0,1)); int i1=ABC.indexOf(t1.mid(0,1));
int i2=ABC.indexOf(t1.mid(1,1)); int i2=ABC.indexOf(t1.mid(1,1));
n=100*(26*i1+i2)+t1.mid(2,2).toInt(); n=100*(26*i1+i2)+t1.mid(2,2).toInt();
n=1000*n + j; n=1000*n + j;
} }
list.insert(j,n); list.insert(j,n);
lines2.insert(j,map[a]); lines2.insert(j,map[a]);
j++; j++;
}
} }
if(ui->rbSNR->isChecked() or ui->rbAge->isChecked() or ui->rbGrid->isChecked()) { if(ui->rbSNR->isChecked() or ui->rbAge->isChecked() or ui->rbGrid->isChecked()) {
@ -111,7 +117,9 @@ void FoxCalls::insertText(QString t)
} }
ui->foxPlainTextEdit->setPlainText(t); ui->foxPlainTextEdit->setPlainText(t);
ui->foxPlainTextEdit->setReadOnly (true); QString uniqueCalls;
uniqueCalls.sprintf(" Unique callers: %d",j);
ui->labCallers->setText(uniqueCalls);
} }
void FoxCalls::on_rbCall_toggled(bool b) void FoxCalls::on_rbCall_toggled(bool b)
@ -141,3 +149,13 @@ void FoxCalls::on_cbReverse_toggled(bool b)
m_bReverse=b; m_bReverse=b;
insertText(m_t0); insertText(m_t0);
} }
void FoxCalls::on_sbMaxDB_valueChanged(int n)
{
insertText(m_t0);
}
void FoxCalls::on_sbMinDB_valueChanged(int n)
{
insertText(m_t0);
}

View File

@ -33,6 +33,8 @@ private slots:
void on_rbSNR_toggled(bool b); void on_rbSNR_toggled(bool b);
void on_rbAge_toggled(bool b); void on_rbAge_toggled(bool b);
void on_cbReverse_toggled(bool b); void on_cbReverse_toggled(bool b);
void on_sbMaxDB_valueChanged(int n);
void on_sbMinDB_valueChanged(int n);
private: private:
bool m_bFirst=true; bool m_bFirst=true;

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>540</width> <width>546</width>
<height>300</height> <height>562</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
@ -19,7 +19,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout"/>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -112,32 +115,149 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="foxPlainTextEdit"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Fixed" vsizetype="Expanding"> <widget class="QPlainTextEdit" name="foxPlainTextEdit">
<horstretch>0</horstretch> <property name="sizePolicy">
<verstretch>0</verstretch> <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
</sizepolicy> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
<property name="minimumSize"> </sizepolicy>
<size> </property>
<width>375</width> <property name="minimumSize">
<height>0</height> <size>
</size> <width>375</width>
</property> <height>0</height>
<property name="maximumSize"> </size>
<size> </property>
<width>375</width> <property name="maximumSize">
<height>16777215</height> <size>
</size> <width>375</width>
</property> <height>16777215</height>
<property name="font"> </size>
<font> </property>
<family>Courier New</family> <property name="font">
<pointsize>12</pointsize> <font>
</font> <family>Courier New</family>
</property> <pointsize>12</pointsize>
</widget> </font>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="labCallers">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string> Unique callers: 0</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>To be called:</string>
</property>
<widget class="QPlainTextEdit" name="pteToBeCalled">
<property name="geometry">
<rect>
<x>8</x>
<y>17</y>
<width>100</width>
<height>90</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>0</x>
<y>130</y>
<width>128</width>
<height>126</height>
</rect>
</property>
<property name="title">
<string>Called:</string>
</property>
<widget class="QPlainTextEdit" name="pteCalled">
<property name="geometry">
<rect>
<x>9</x>
<y>16</y>
<width>100</width>
<height>90</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
</widget>
</widget>
<widget class="QSpinBox" name="sbMaxDB">
<property name="geometry">
<rect>
<x>13</x>
<y>270</y>
<width>90</width>
<height>22</height>
</rect>
</property>
<property name="prefix">
<string>Max dB: </string>
</property>
<property name="minimum">
<number>-50</number>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
<widget class="QSpinBox" name="sbMinDB">
<property name="geometry">
<rect>
<x>13</x>
<y>300</y>
<width>90</width>
<height>22</height>
</rect>
</property>
<property name="prefix">
<string>Min dB: </string>
</property>
<property name="minimum">
<number>-50</number>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="value">
<number>-30</number>
</property>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -1147,11 +1147,6 @@ void MainWindow::setDecodedTextFont (QFont const& font)
if (m_msgAvgWidget) { if (m_msgAvgWidget) {
m_msgAvgWidget->changeFont (font); m_msgAvgWidget->changeFont (font);
} }
/*
if (m_foxCalls->isVisible()) {
m_foxCalls->changeFont (font);
}
*/
updateGeometry (); updateGeometry ();
} }