Added a toggle to disable word suggestions
This commit is contained in:
parent
28e542e414
commit
a4cc87d7b4
@ -645,6 +645,7 @@ private:
|
|||||||
bool clear_callsign_;
|
bool clear_callsign_;
|
||||||
bool miles_;
|
bool miles_;
|
||||||
bool avoid_allcall_;
|
bool avoid_allcall_;
|
||||||
|
bool spellcheck_;
|
||||||
bool quick_call_;
|
bool quick_call_;
|
||||||
bool disable_TX_on_73_;
|
bool disable_TX_on_73_;
|
||||||
int heartbeat_;
|
int heartbeat_;
|
||||||
@ -777,6 +778,7 @@ bool Configuration::ppfx() const {return m_->ppfx_;}
|
|||||||
bool Configuration::clear_callsign () const {return m_->clear_callsign_;}
|
bool Configuration::clear_callsign () const {return m_->clear_callsign_;}
|
||||||
bool Configuration::miles () const {return m_->miles_;}
|
bool Configuration::miles () const {return m_->miles_;}
|
||||||
bool Configuration::avoid_allcall () const {return m_->avoid_allcall_;}
|
bool Configuration::avoid_allcall () const {return m_->avoid_allcall_;}
|
||||||
|
bool Configuration::spellcheck () const {return m_->spellcheck_;}
|
||||||
bool Configuration::quick_call () const {return m_->quick_call_;}
|
bool Configuration::quick_call () const {return m_->quick_call_;}
|
||||||
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
||||||
int Configuration::heartbeat () const {return m_->heartbeat_;}
|
int Configuration::heartbeat () const {return m_->heartbeat_;}
|
||||||
@ -1388,6 +1390,7 @@ void Configuration::impl::initialize_models ()
|
|||||||
ui_->clear_callsign_check_box->setChecked (clear_callsign_);
|
ui_->clear_callsign_check_box->setChecked (clear_callsign_);
|
||||||
ui_->miles_check_box->setChecked (miles_);
|
ui_->miles_check_box->setChecked (miles_);
|
||||||
ui_->avoid_allcall_checkbox->setChecked(avoid_allcall_);
|
ui_->avoid_allcall_checkbox->setChecked(avoid_allcall_);
|
||||||
|
ui_->spellcheck_check_box->setChecked(spellcheck_);
|
||||||
ui_->quick_call_check_box->setChecked (quick_call_);
|
ui_->quick_call_check_box->setChecked (quick_call_);
|
||||||
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
||||||
ui_->heartbeat_spin_box->setValue (heartbeat_);
|
ui_->heartbeat_spin_box->setValue (heartbeat_);
|
||||||
@ -1699,6 +1702,7 @@ void Configuration::impl::read_settings ()
|
|||||||
clear_callsign_ = settings_->value ("ClearCallGrid", false).toBool ();
|
clear_callsign_ = settings_->value ("ClearCallGrid", false).toBool ();
|
||||||
miles_ = settings_->value ("Miles", false).toBool ();
|
miles_ = settings_->value ("Miles", false).toBool ();
|
||||||
avoid_allcall_ = settings_->value ("AvoidAllcall", false).toBool ();
|
avoid_allcall_ = settings_->value ("AvoidAllcall", false).toBool ();
|
||||||
|
spellcheck_ = settings_->value ("Spellcheck", true).toBool();
|
||||||
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
||||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||||
heartbeat_ = settings_->value ("TxBeacon", 30).toInt ();
|
heartbeat_ = settings_->value ("TxBeacon", 30).toInt ();
|
||||||
@ -1835,6 +1839,7 @@ void Configuration::impl::write_settings ()
|
|||||||
settings_->setValue ("ClearCallGrid", clear_callsign_);
|
settings_->setValue ("ClearCallGrid", clear_callsign_);
|
||||||
settings_->setValue ("Miles", miles_);
|
settings_->setValue ("Miles", miles_);
|
||||||
settings_->setValue ("AvoidAllcall", avoid_allcall_);
|
settings_->setValue ("AvoidAllcall", avoid_allcall_);
|
||||||
|
settings_->setValue ("Spellcheck", spellcheck_);
|
||||||
settings_->setValue ("QuickCall", quick_call_);
|
settings_->setValue ("QuickCall", quick_call_);
|
||||||
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
||||||
settings_->setValue ("TxBeacon", heartbeat_);
|
settings_->setValue ("TxBeacon", heartbeat_);
|
||||||
@ -2325,6 +2330,7 @@ void Configuration::impl::accept ()
|
|||||||
clear_callsign_ = ui_->clear_callsign_check_box->isChecked ();
|
clear_callsign_ = ui_->clear_callsign_check_box->isChecked ();
|
||||||
miles_ = ui_->miles_check_box->isChecked ();
|
miles_ = ui_->miles_check_box->isChecked ();
|
||||||
avoid_allcall_ = ui_->avoid_allcall_checkbox->isChecked();
|
avoid_allcall_ = ui_->avoid_allcall_checkbox->isChecked();
|
||||||
|
spellcheck_ = ui_->spellcheck_check_box->isChecked();
|
||||||
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
||||||
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
||||||
heartbeat_ = ui_->heartbeat_spin_box->value ();
|
heartbeat_ = ui_->heartbeat_spin_box->value ();
|
||||||
|
@ -136,6 +136,7 @@ public:
|
|||||||
bool clear_callsign () const;
|
bool clear_callsign () const;
|
||||||
bool miles () const;
|
bool miles () const;
|
||||||
bool avoid_allcall () const;
|
bool avoid_allcall () const;
|
||||||
|
bool spellcheck() const;
|
||||||
bool quick_call () const;
|
bool quick_call () const;
|
||||||
bool disable_TX_on_73 () const;
|
bool disable_TX_on_73 () const;
|
||||||
int heartbeat () const;
|
int heartbeat () const;
|
||||||
|
@ -295,8 +295,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>654</width>
|
<width>724</width>
|
||||||
<height>482</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_26">
|
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||||
@ -411,6 +411,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="spellcheck_check_box">
|
||||||
|
<property name="text">
|
||||||
|
<string>Suggest alternative word choices for more efficient message transmission</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
<item>
|
<item>
|
||||||
@ -892,7 +899,7 @@ text message.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>264</width>
|
<width>718</width>
|
||||||
<height>435</height>
|
<height>435</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -1731,8 +1738,8 @@ radio interface behave as expected.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>266</width>
|
<width>760</width>
|
||||||
<height>329</height>
|
<height>502</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||||
@ -2044,7 +2051,7 @@ both here.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>508</width>
|
<width>746</width>
|
||||||
<height>525</height>
|
<height>525</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -2098,7 +2105,7 @@ both here.</string>
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Check this option to force deselect callsign after logging.</string>
|
<string>Check this option to force deselect callsign after logging.</string>
|
||||||
@ -2501,8 +2508,8 @@ for assessing propagation and system performance.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>487</width>
|
<width>760</width>
|
||||||
<height>341</height>
|
<height>502</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_31">
|
<layout class="QVBoxLayout" name="verticalLayout_31">
|
||||||
@ -3079,8 +3086,8 @@ QListView::item:hover {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>271</width>
|
<width>738</width>
|
||||||
<height>195</height>
|
<height>378</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_15">
|
<layout class="QGridLayout" name="gridLayout_15">
|
||||||
|
@ -7438,6 +7438,10 @@ QString MainWindow::replaceMacros(QString const &text, QMap<QString, QString> va
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::buildSuggestionsMenu(QMenu *menu, QTextEdit *edit, const QPoint &point){
|
void MainWindow::buildSuggestionsMenu(QMenu *menu, QTextEdit *edit, const QPoint &point){
|
||||||
|
if(!m_config.spellcheck()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
auto c = edit->cursorForPosition(point);
|
auto c = edit->cursorForPosition(point);
|
||||||
@ -7448,7 +7452,7 @@ void MainWindow::buildSuggestionsMenu(QMenu *menu, QTextEdit *edit, const QPoint
|
|||||||
c.movePosition(QTextCursor::StartOfWord);
|
c.movePosition(QTextCursor::StartOfWord);
|
||||||
c.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
|
c.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
|
||||||
|
|
||||||
auto word = c.selectedText();
|
auto word = c.selectedText().trimmed();
|
||||||
if(word.isEmpty()){
|
if(word.isEmpty()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -8723,6 +8727,10 @@ void MainWindow::refreshTextDisplay(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateTextWordCheckerDisplay(){
|
void MainWindow::updateTextWordCheckerDisplay(){
|
||||||
|
if(!m_config.spellcheck()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
JSCChecker::checkRange(ui->extFreeTextMsgEdit, 0, -1);
|
JSCChecker::checkRange(ui->extFreeTextMsgEdit, 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user