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

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<height>300</height>
<width>546</width>
<height>562</height>
</rect>
</property>
<property name="minimumSize">
@ -19,7 +19,10 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -112,32 +115,149 @@
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="foxPlainTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>375</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>375</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Courier New</family>
<pointsize>12</pointsize>
</font>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPlainTextEdit" name="foxPlainTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>375</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>375</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>Courier New</family>
<pointsize>12</pointsize>
</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>
</layout>
</widget>

View File

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