mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Some cleanup of new Fox GUI.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8211 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
a72de82a39
commit
4df5d99441
@ -866,6 +866,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
m_bCheckedContest=false;
|
m_bCheckedContest=false;
|
||||||
m_bDisplayedOnce=false;
|
m_bDisplayedOnce=false;
|
||||||
m_wait=0;
|
m_wait=0;
|
||||||
|
m_isort=-3;
|
||||||
|
m_max_N=10;
|
||||||
|
m_min_dB=-30;
|
||||||
|
m_max_dB=30;
|
||||||
m_CQtype="CQ";
|
m_CQtype="CQ";
|
||||||
|
|
||||||
if(m_mode.startsWith ("WSPR") and m_pctx>0) {
|
if(m_mode.startsWith ("WSPR") and m_pctx>0) {
|
||||||
@ -1701,6 +1705,18 @@ void MainWindow::auto_tx_mode (bool state)
|
|||||||
|
|
||||||
void MainWindow::keyPressEvent (QKeyEvent * e)
|
void MainWindow::keyPressEvent (QKeyEvent * e)
|
||||||
{
|
{
|
||||||
|
if(m_config.bFox()) {
|
||||||
|
switch (e->key()) {
|
||||||
|
case Qt::Key_7:
|
||||||
|
if(m_isort>-4) m_isort--;
|
||||||
|
return;
|
||||||
|
case Qt::Key_8:
|
||||||
|
if(m_isort<4) m_isort++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QMainWindow::keyPressEvent (e);
|
||||||
|
|
||||||
|
}
|
||||||
int n;
|
int n;
|
||||||
switch(e->key())
|
switch(e->key())
|
||||||
{
|
{
|
||||||
@ -2712,7 +2728,7 @@ void MainWindow::decodeDone ()
|
|||||||
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
QTextStream s(&f);
|
QTextStream s(&f);
|
||||||
QString t=s.readAll();
|
QString t=s.readAll();
|
||||||
QString t1=sortFoxCalls(t,1,10,-30,30);
|
QString t1=sortFoxCalls(t,m_isort,m_max_N,m_min_dB,m_max_dB);
|
||||||
ui->decodedTextBrowser->setText(t1);
|
ui->decodedTextBrowser->setText(t1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3399,6 +3415,12 @@ void MainWindow::guiUpdate()
|
|||||||
on_actionOpen_next_in_directory_triggered();
|
on_actionOpen_next_in_directory_triggered();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(m_config.bFox()) {
|
||||||
|
QString t;
|
||||||
|
t.sprintf("DXpedition: Fox %d %d %d %d",m_isort,m_max_N,
|
||||||
|
m_min_dB,m_max_dB);
|
||||||
|
ui->labDXped->setText(t);
|
||||||
|
}
|
||||||
|
|
||||||
//Once per second:
|
//Once per second:
|
||||||
if(nsec != m_sec0) {
|
if(nsec != m_sec0) {
|
||||||
@ -3762,8 +3784,18 @@ void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
|
|||||||
} else {
|
} else {
|
||||||
cursor=ui->decodedTextBrowser2->textCursor();
|
cursor=ui->decodedTextBrowser2->textCursor();
|
||||||
}
|
}
|
||||||
cursor.setPosition (cursor.selectionStart ());
|
cursor.setPosition (cursor.selectionStart());
|
||||||
DecodedText message {cursor.block ().text (), ("MSK144" == m_mode || "FT8" == m_mode) &&
|
if(m_config.bFox() and m_decodedText2) {
|
||||||
|
QString t=cursor.block().text();
|
||||||
|
QString c2=t.split(" ",QString::SkipEmptyParts).at(0);
|
||||||
|
QString g2=t.split(" ",QString::SkipEmptyParts).at(1);
|
||||||
|
QString rpt=t.split(" ",QString::SkipEmptyParts).at(2);
|
||||||
|
ui->dxCallEntry->setText(c2);
|
||||||
|
ui->dxGridEntry->setText(g2);
|
||||||
|
genStdMsgs(rpt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DecodedText message {cursor.block().text(), ("MSK144" == m_mode || "FT8" == m_mode) &&
|
||||||
ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
|
ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
|
||||||
m_bDoubleClicked = true;
|
m_bDoubleClicked = true;
|
||||||
processMessage (message, modifiers);
|
processMessage (message, modifiers);
|
||||||
|
@ -96,7 +96,6 @@ public:
|
|||||||
QSharedMemory *shdmem, unsigned downSampleFactor,
|
QSharedMemory *shdmem, unsigned downSampleFactor,
|
||||||
QSplashScreen *,
|
QSplashScreen *,
|
||||||
QWidget *parent = nullptr);
|
QWidget *parent = nullptr);
|
||||||
qint32 m_isort;
|
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@ -408,6 +407,10 @@ private:
|
|||||||
qint32 m_UTCdisk;
|
qint32 m_UTCdisk;
|
||||||
qint32 m_wait;
|
qint32 m_wait;
|
||||||
qint32 m_i3bit;
|
qint32 m_i3bit;
|
||||||
|
qint32 m_isort;
|
||||||
|
qint32 m_max_N;
|
||||||
|
qint32 m_max_dB;
|
||||||
|
qint32 m_min_dB;
|
||||||
|
|
||||||
bool m_btxok; //True if OK to transmit
|
bool m_btxok; //True if OK to transmit
|
||||||
bool m_diskData;
|
bool m_diskData;
|
||||||
@ -628,7 +631,7 @@ private:
|
|||||||
, Frequency frequency
|
, Frequency frequency
|
||||||
, QString const& his_call
|
, QString const& his_call
|
||||||
, QString const& his_grid) const;
|
, QString const& his_grid) const;
|
||||||
QString sortFoxCalls(QString t, int m_isort, int max_N, int min_dB, int max_dB);
|
QString sortFoxCalls(QString t, int isort, int max_N, int min_dB, int max_dB);
|
||||||
void read_wav_file (QString const& fname);
|
void read_wav_file (QString const& fname);
|
||||||
void decodeDone ();
|
void decodeDone ();
|
||||||
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
||||||
|
Loading…
Reference in New Issue
Block a user