Trial code for assigning F1 - F5 to contesting use.

This commit is contained in:
Joe Taylor 2018-11-30 11:50:44 -05:00
parent f0feefcfc4
commit c8aee58fe0

View File

@ -1829,6 +1829,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
} }
int n; int n;
bool bContest = m_config.my_callsign()=="K1JT" and SpecOp::RTTY==m_config.special_op_id();
switch(e->key()) switch(e->key())
{ {
case Qt::Key_D: case Qt::Key_D:
@ -1842,21 +1843,51 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
} }
break; break;
case Qt::Key_F1: case Qt::Key_F1:
if(bContest) {
auto_tx_mode(true);
on_txb6_clicked();
return;
} else {
on_actionOnline_User_Guide_triggered(); on_actionOnline_User_Guide_triggered();
return; return;
}
case Qt::Key_F2: case Qt::Key_F2:
if(bContest) {
auto_tx_mode(true);
on_txb2_clicked();
return;
} else {
on_actionSettings_triggered(); on_actionSettings_triggered();
return; return;
}
case Qt::Key_F3: case Qt::Key_F3:
if(bContest) {
auto_tx_mode(true);
on_txb3_clicked();
return;
} else {
on_actionKeyboard_shortcuts_triggered(); on_actionKeyboard_shortcuts_triggered();
return; return;
}
case Qt::Key_F4: case Qt::Key_F4:
if(bContest) {
auto_tx_mode(true);
on_txb4_clicked();
return;
} else {
clearDX (); clearDX ();
ui->dxCallEntry->setFocus(); ui->dxCallEntry->setFocus();
return; return;
}
case Qt::Key_F5: case Qt::Key_F5:
if(bContest) {
auto_tx_mode(true);
on_txb5_clicked();
return;
} else {
on_actionSpecial_mouse_commands_triggered(); on_actionSpecial_mouse_commands_triggered();
return; return;
}
case Qt::Key_F6: case Qt::Key_F6:
if(e->modifiers() & Qt::ShiftModifier) { if(e->modifiers() & Qt::ShiftModifier) {
on_actionDecode_remaining_files_in_directory_triggered(); on_actionDecode_remaining_files_in_directory_triggered();