mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Minor change to make shift/ctrl double-click logic more consistent.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8138 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
07bb650818
commit
b502bd9a91
@ -63,9 +63,10 @@ void DisplayText::setContentFont(QFont const& font)
|
||||
|
||||
void DisplayText::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
{
|
||||
bool shift = (e->modifiers() & Qt::ShiftModifier);
|
||||
bool ctrl = (e->modifiers() & Qt::ControlModifier);
|
||||
bool alt = (e->modifiers() & Qt::AltModifier);
|
||||
emit(selectCallsign(alt,ctrl));
|
||||
emit(selectCallsign(shift,ctrl,alt));
|
||||
QTextEdit::mouseDoubleClickEvent(e);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
QColor color_TxMsg, bool bFastMode);
|
||||
void displayQSY(QString text);
|
||||
|
||||
Q_SIGNAL void selectCallsign (bool alt, bool ctrl);
|
||||
Q_SIGNAL void selectCallsign (bool shift, bool ctrl, bool alt);
|
||||
Q_SIGNAL void erased ();
|
||||
|
||||
Q_SLOT void appendText (QString const& text, QColor bg = Qt::white);
|
||||
|
@ -551,10 +551,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
txMsgButtonGroup->addButton(ui->txrb6,6);
|
||||
set_dateTimeQSO(-1);
|
||||
connect(txMsgButtonGroup,SIGNAL(buttonClicked(int)),SLOT(set_ntx(int)));
|
||||
connect(ui->decodedTextBrowser2,SIGNAL(selectCallsign(bool,bool)),this,
|
||||
SLOT(doubleClickOnCall(bool,bool)));
|
||||
connect(ui->decodedTextBrowser,SIGNAL(selectCallsign(bool,bool)),this,
|
||||
SLOT(doubleClickOnCall2(bool,bool)));
|
||||
connect(ui->decodedTextBrowser2,SIGNAL(selectCallsign(bool,bool,bool)),this,
|
||||
SLOT(doubleClickOnCall(bool,bool,bool)));
|
||||
connect(ui->decodedTextBrowser,SIGNAL(selectCallsign(bool,bool,bool)),this,
|
||||
SLOT(doubleClickOnCall2(bool,bool,bool)));
|
||||
connect (ui->decodedTextBrowser, &DisplayText::erased, this, &MainWindow::band_activity_cleared);
|
||||
connect (ui->decodedTextBrowser2, &DisplayText::erased, this, &MainWindow::rx_frequency_activity_cleared);
|
||||
|
||||
@ -3690,15 +3690,15 @@ void MainWindow::on_txb6_clicked()
|
||||
if (m_transmitting) m_restart=true;
|
||||
}
|
||||
|
||||
void MainWindow::doubleClickOnCall2(bool alt, bool ctrl)
|
||||
void MainWindow::doubleClickOnCall2(bool shift, bool ctrl, bool alt)
|
||||
{
|
||||
set_dateTimeQSO(-1); // reset our QSO start time
|
||||
m_decodedText2=true;
|
||||
doubleClickOnCall(alt,ctrl);
|
||||
doubleClickOnCall(shift,ctrl,alt);
|
||||
m_decodedText2=false;
|
||||
}
|
||||
|
||||
void MainWindow::doubleClickOnCall(bool alt, bool ctrl)
|
||||
void MainWindow::doubleClickOnCall(bool shift, bool ctrl, bool alt)
|
||||
{
|
||||
QTextCursor cursor;
|
||||
if(m_mode=="ISCAT") {
|
||||
@ -3715,11 +3715,12 @@ void MainWindow::doubleClickOnCall(bool alt, bool ctrl)
|
||||
DecodedText message {cursor.block ().text (), ("MSK144" == m_mode || "FT8" == m_mode) &&
|
||||
ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
|
||||
m_bDoubleClicked = true;
|
||||
processMessage (message, ctrl, alt);
|
||||
processMessage (message, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
void MainWindow::processMessage(DecodedText const& message, bool ctrl, bool alt)
|
||||
void MainWindow::processMessage(DecodedText const& message, bool shift, bool ctrl, bool alt)
|
||||
{
|
||||
qDebug() << "D 3726" << shift << ctrl << alt;
|
||||
// basic mode sanity checks
|
||||
auto const& parts = message.string ().split (' ', QString::SkipEmptyParts);
|
||||
if (parts.size () < 5) return;
|
||||
@ -3750,8 +3751,9 @@ void MainWindow::processMessage(DecodedText const& message, bool ctrl, bool alt)
|
||||
//Skip the rest if no decoded text extracted
|
||||
int frequency = message.frequencyOffset();
|
||||
if (message.isTX()) {
|
||||
if (!m_config.enable_VHF_features() && ctrl && ui->TxFreqSpinBox->isEnabled()) {
|
||||
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
|
||||
if (!m_config.enable_VHF_features() && ui->TxFreqSpinBox->isEnabled()) {
|
||||
if(ctrl or (!shift)) ui->RxFreqSpinBox->setValue(frequency); //Set Rx freq
|
||||
if(ctrl or shift) ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -3833,7 +3835,7 @@ void MainWindow::processMessage(DecodedText const& message, bool ctrl, bool alt)
|
||||
QString firstcall = message.call();
|
||||
if(!m_bFastMode and (!m_config.enable_VHF_features() or m_mode=="FT8")) {
|
||||
if (ui->TxFreqSpinBox->isEnabled()) {
|
||||
if(ctrl) ui->TxFreqSpinBox->setValue(frequency);
|
||||
if(ctrl or shift) ui->TxFreqSpinBox->setValue(frequency);
|
||||
} else if(m_mode != "JT4" && m_mode != "JT65" && !m_mode.startsWith ("JT9") &&
|
||||
m_mode != "QRA64" && m_mode!="FT8") {
|
||||
return;
|
||||
@ -4008,7 +4010,7 @@ void MainWindow::processMessage(DecodedText const& message, bool ctrl, bool alt)
|
||||
|
||||
// if we get here then we are reacting to the message
|
||||
if (m_bAutoReply) m_bCallingCQ = CALLING == m_QSOProgress;
|
||||
if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144") {
|
||||
if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144" and !shift) {
|
||||
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,8 @@ public slots:
|
||||
void diskDat();
|
||||
void freezeDecode(int n);
|
||||
void guiUpdate();
|
||||
void doubleClickOnCall(bool shift, bool ctrl);
|
||||
void doubleClickOnCall2(bool shift, bool ctrl);
|
||||
void doubleClickOnCall(bool shift, bool ctrl, bool alt);
|
||||
void doubleClickOnCall2(bool shift, bool ctrl, bool alt);
|
||||
void readFromStdout();
|
||||
void p1ReadFromStdout();
|
||||
void setXIT(int n, Frequency base = 0u);
|
||||
@ -600,7 +600,7 @@ private:
|
||||
void pskPost(DecodedText const& decodedtext);
|
||||
void displayDialFrequency ();
|
||||
void transmitDisplay (bool);
|
||||
void processMessage(DecodedText const&, bool ctrl = false, bool alt = false);
|
||||
void processMessage(DecodedText const&, bool shift=false, bool ctrl = false, bool alt = false);
|
||||
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text, bool low_confidence, quint8 modifiers);
|
||||
void replayDecodes ();
|
||||
void postDecode (bool is_new, QString const& message);
|
||||
|
Loading…
Reference in New Issue
Block a user