mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 10:01:57 -05:00
Move selected calls to 'to be called'.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8207 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
300b40b55a
commit
b11a653480
28
foxcalls.cpp
28
foxcalls.cpp
@ -20,7 +20,8 @@ FoxCalls::FoxCalls(QSettings * settings, QWidget *parent) :
|
|||||||
restoreGeometry (m_settings->value("geometry").toByteArray());
|
restoreGeometry (m_settings->value("geometry").toByteArray());
|
||||||
ui->cbReverse->setVisible(false);
|
ui->cbReverse->setVisible(false);
|
||||||
ui->foxPlainTextEdit->setReadOnly (true);
|
ui->foxPlainTextEdit->setReadOnly (true);
|
||||||
// connect (ui->foxPlainTextEdit,SIGNAL(selectCallsign(bool)),this,SLOT(selectCall2(bool)));
|
ui->foxPlainTextEdit->viewport()->installEventFilter(this);
|
||||||
|
m_nToBeCalled=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FoxCalls::~FoxCalls()
|
FoxCalls::~FoxCalls()
|
||||||
@ -45,7 +46,7 @@ void FoxCalls::saveSettings()
|
|||||||
void FoxCalls::insertText(QString t)
|
void FoxCalls::insertText(QString t)
|
||||||
{
|
{
|
||||||
QMap<QString,QString> map;
|
QMap<QString,QString> map;
|
||||||
QStringList lines,lines2;
|
QStringList lines;
|
||||||
QString msg,c2,t1;
|
QString msg,c2,t1;
|
||||||
QString ABC{"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
|
QString ABC{"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
|
||||||
QList<int> list;
|
QList<int> list;
|
||||||
@ -59,6 +60,8 @@ void FoxCalls::insertText(QString t)
|
|||||||
doc->setDefaultFont(font);
|
doc->setDefaultFont(font);
|
||||||
ui->label_2->setFont(font);
|
ui->label_2->setFont(font);
|
||||||
ui->label_2->setText("Call Grid dB Freq Age");
|
ui->label_2->setText("Call Grid dB Freq Age");
|
||||||
|
ui->pteToBeCalled->setFont(font);
|
||||||
|
ui->pteCalled->setFont(font);
|
||||||
m_bFirst=false;
|
m_bFirst=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +98,7 @@ void FoxCalls::insertText(QString t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
list.insert(j,n);
|
list.insert(j,n);
|
||||||
lines2.insert(j,map[a]);
|
m_lines2.insert(j,map[a]);
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,7 +115,7 @@ void FoxCalls::insertText(QString t)
|
|||||||
for(i=0; i<j; i++) {
|
for(i=0; i<j; i++) {
|
||||||
k=list[i]%1000;
|
k=list[i]%1000;
|
||||||
n=list[i]/1000 - 100;
|
n=list[i]/1000 - 100;
|
||||||
t += lines2.at(k) + "\n";
|
t += m_lines2.at(k) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,3 +162,20 @@ void FoxCalls::on_sbMinDB_valueChanged(int n)
|
|||||||
{
|
{
|
||||||
insertText(m_t0);
|
insertText(m_t0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FoxCalls::eventFilter(QObject *obj, QEvent *e)
|
||||||
|
{
|
||||||
|
if(m_nToBeCalled<4) {
|
||||||
|
if ((obj == ui->foxPlainTextEdit || obj==ui->foxPlainTextEdit->viewport()) &&
|
||||||
|
e->type() == QEvent::MouseButtonPress) {
|
||||||
|
QMouseEvent *me= static_cast<QMouseEvent*>(e);
|
||||||
|
int i=int(0.05592*me->y()+0.5) - 1;
|
||||||
|
QString t3=m_lines2.at(i);
|
||||||
|
t3=t3.split(" ").at(0) + "\n";
|
||||||
|
ui->pteToBeCalled->insertPlainText(t3);
|
||||||
|
m_nToBeCalled++;
|
||||||
|
qDebug() << "a" << m_nToBeCalled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QWidget::eventFilter(obj, e);
|
||||||
|
}
|
||||||
|
@ -35,11 +35,14 @@ private slots:
|
|||||||
void on_cbReverse_toggled(bool b);
|
void on_cbReverse_toggled(bool b);
|
||||||
void on_sbMaxDB_valueChanged(int n);
|
void on_sbMaxDB_valueChanged(int n);
|
||||||
void on_sbMinDB_valueChanged(int n);
|
void on_sbMinDB_valueChanged(int n);
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_bFirst=true;
|
bool m_bFirst=true;
|
||||||
bool m_bReverse;
|
bool m_bReverse;
|
||||||
|
qint32 m_nToBeCalled;
|
||||||
QString m_t0;
|
QString m_t0;
|
||||||
|
QStringList m_lines2;
|
||||||
QSettings * m_settings;
|
QSettings * m_settings;
|
||||||
QScopedPointer<Ui::FoxCalls> ui;
|
QScopedPointer<Ui::FoxCalls> ui;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user