mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Optional key bindings for F1 through F5, especially for contest use.
This commit is contained in:
parent
cabd6bc869
commit
8379fa86eb
@ -607,6 +607,7 @@ private:
|
||||
bool miles_;
|
||||
bool quick_call_;
|
||||
bool disable_TX_on_73_;
|
||||
bool alternate_bindings_;
|
||||
int watchdog_;
|
||||
bool TX_messages_;
|
||||
bool enable_VHF_features_;
|
||||
@ -700,6 +701,7 @@ bool Configuration::clear_DX () const {return m_->clear_DX_;}
|
||||
bool Configuration::miles () const {return m_->miles_;}
|
||||
bool Configuration::quick_call () const {return m_->quick_call_;}
|
||||
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
||||
bool Configuration::alternate_bindings() const {return m_->alternate_bindings_;}
|
||||
int Configuration::watchdog () const {return m_->watchdog_;}
|
||||
bool Configuration::TX_messages () const {return m_->TX_messages_;}
|
||||
bool Configuration::enable_VHF_features () const {return m_->enable_VHF_features_;}
|
||||
@ -1232,6 +1234,7 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->miles_check_box->setChecked (miles_);
|
||||
ui_->quick_call_check_box->setChecked (quick_call_);
|
||||
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
||||
ui_->alternate_bindings_check_box->setChecked (alternate_bindings_);
|
||||
ui_->tx_watchdog_spin_box->setValue (watchdog_);
|
||||
ui_->TX_messages_check_box->setChecked (TX_messages_);
|
||||
ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_);
|
||||
@ -1481,6 +1484,7 @@ void Configuration::impl::read_settings ()
|
||||
miles_ = settings_->value ("Miles", false).toBool ();
|
||||
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||
alternate_bindings_ = settings_->value ("AlternateBindings", false).toBool ();
|
||||
watchdog_ = settings_->value ("TxWatchdog", 6).toInt ();
|
||||
TX_messages_ = settings_->value ("Tx2QSO", true).toBool ();
|
||||
enable_VHF_features_ = settings_->value("VHFUHF",false).toBool ();
|
||||
@ -1580,6 +1584,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("Miles", miles_);
|
||||
settings_->setValue ("QuickCall", quick_call_);
|
||||
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
||||
settings_->setValue ("AlternateBindings", alternate_bindings_);
|
||||
settings_->setValue ("TxWatchdog", watchdog_);
|
||||
settings_->setValue ("Tx2QSO", TX_messages_);
|
||||
settings_->setValue ("CATForceDTR", rig_params_.force_dtr);
|
||||
@ -2022,6 +2027,7 @@ void Configuration::impl::accept ()
|
||||
miles_ = ui_->miles_check_box->isChecked ();
|
||||
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
||||
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
||||
alternate_bindings_ = ui_->alternate_bindings_check_box->isChecked ();
|
||||
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
||||
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||
|
@ -126,6 +126,7 @@ public:
|
||||
bool miles () const;
|
||||
bool quick_call () const;
|
||||
bool disable_TX_on_73 () const;
|
||||
bool alternate_bindings() const;
|
||||
int watchdog () const;
|
||||
bool TX_messages () const;
|
||||
bool split_mode () const;
|
||||
|
@ -461,6 +461,13 @@ text message.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="alternate_bindings_check_box">
|
||||
<property name="text">
|
||||
<string>Alternate F1-F5 bindings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -3018,13 +3025,13 @@ Right click for insert and delete options.</string>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="special_op_activity_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="special_op_activity_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -1863,6 +1863,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
|
||||
}
|
||||
|
||||
int n;
|
||||
bool bAltF1F5=m_config.alternate_bindings();
|
||||
switch(e->key())
|
||||
{
|
||||
case Qt::Key_D:
|
||||
@ -1876,21 +1877,51 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
|
||||
}
|
||||
break;
|
||||
case Qt::Key_F1:
|
||||
on_actionOnline_User_Guide_triggered();
|
||||
return;
|
||||
if(bAltF1F5) {
|
||||
auto_tx_mode(true);
|
||||
on_txb6_clicked();
|
||||
return;
|
||||
} else {
|
||||
on_actionOnline_User_Guide_triggered();
|
||||
return;
|
||||
}
|
||||
case Qt::Key_F2:
|
||||
on_actionSettings_triggered();
|
||||
return;
|
||||
if(bAltF1F5) {
|
||||
auto_tx_mode(true);
|
||||
on_txb2_clicked();
|
||||
return;
|
||||
} else {
|
||||
on_actionSettings_triggered();
|
||||
return;
|
||||
}
|
||||
case Qt::Key_F3:
|
||||
on_actionKeyboard_shortcuts_triggered();
|
||||
return;
|
||||
if(bAltF1F5) {
|
||||
auto_tx_mode(true);
|
||||
on_txb3_clicked();
|
||||
return;
|
||||
} else {
|
||||
on_actionKeyboard_shortcuts_triggered();
|
||||
return;
|
||||
}
|
||||
case Qt::Key_F4:
|
||||
clearDX ();
|
||||
ui->dxCallEntry->setFocus();
|
||||
return;
|
||||
if(bAltF1F5) {
|
||||
auto_tx_mode(true);
|
||||
on_txb4_clicked();
|
||||
return;
|
||||
} else {
|
||||
clearDX ();
|
||||
ui->dxCallEntry->setFocus();
|
||||
return;
|
||||
}
|
||||
case Qt::Key_F5:
|
||||
on_actionSpecial_mouse_commands_triggered();
|
||||
return;
|
||||
if(bAltF1F5) {
|
||||
auto_tx_mode(true);
|
||||
on_txb5_clicked();
|
||||
return;
|
||||
} else {
|
||||
on_actionSpecial_mouse_commands_triggered();
|
||||
return;
|
||||
}
|
||||
case Qt::Key_F6:
|
||||
if(e->modifiers() & Qt::ShiftModifier) {
|
||||
on_actionDecode_remaining_files_in_directory_triggered();
|
||||
|
@ -1523,9 +1523,6 @@ QPushButton[state="ok"] {
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+2</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -1542,9 +1539,6 @@ QPushButton[state="ok"] {
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+1</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
@ -1602,9 +1596,6 @@ QPushButton[state="ok"] {
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
@ -1624,9 +1615,6 @@ QPushButton[state="ok"] {
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+5</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
@ -1643,9 +1631,6 @@ QPushButton[state="ok"] {
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+3</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
@ -1678,9 +1663,6 @@ QPushButton[state="ok"] {
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+4</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
@ -2862,25 +2844,16 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="text">
|
||||
<string>Online User Guide</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionKeyboard_shortcuts">
|
||||
<property name="text">
|
||||
<string>Keyboard shortcuts</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F3</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSpecial_mouse_commands">
|
||||
<property name="text">
|
||||
<string>Special mouse commands</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F5</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionJT9">
|
||||
<property name="checkable">
|
||||
@ -3092,9 +3065,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="text">
|
||||
<string>Settings...</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F2</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLocal_User_Guide">
|
||||
<property name="text">
|
||||
@ -3475,6 +3445,4 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user