Right-click on the Q65 mode button to toggle Q65 Pileup mode On/Off.

This commit is contained in:
Uwe Risse 2023-02-20 23:23:45 +01:00
parent 6be56a775e
commit 5ccf66e6b4
5 changed files with 25 additions and 1 deletions

View File

@ -997,6 +997,15 @@ void Configuration::set_location (QString const& grid_descriptor)
m_->dynamic_grid_ = grid_descriptor.trimmed ();
}
void Configuration::setSpecial_Q65_Pileup()
{
m_->bSpecialOp_=true;
m_->ui_->gbSpecialOpActivity->setChecked(m_->bSpecialOp_);
m_->ui_->rbQ65pileup->setChecked(true);
m_->SelectedActivity_ = static_cast<int> (SpecialOperatingActivity::Q65_PILEUP);
m_->write_settings();
}
void Configuration::setSpecial_Hound()
{
m_->bSpecialOp_=true;

View File

@ -183,6 +183,7 @@ public:
bool highlight_only_fields () const;
bool include_WAE_entities () const;
bool highlight_73 () const;
void setSpecial_Q65_Pileup();
void setSpecial_Hound();
void setSpecial_Fox();
void setSpecial_None();

View File

@ -6461,6 +6461,19 @@ void MainWindow::on_RoundRobin_currentTextChanged(QString text)
ui->sbTxPercent->setEnabled (text == tr ("Random"));
}
void MainWindow::mousePressEvent(QMouseEvent *event)
{
if(ui->q65Button->hasFocus() && (event->button() & Qt::RightButton)) {
m_specOp=m_config.special_op_id();
if (m_specOp==SpecOp::Q65_PILEUP) {
m_config.setSpecial_None();
} else {
m_config.setSpecial_Q65_Pileup();
}
m_specOp=m_config.special_op_id();
on_actionQ65_triggered();
}
}
void MainWindow::on_dxCallEntry_textChanged (QString const& call)
{

View File

@ -211,6 +211,7 @@ private slots:
void on_txb6_clicked();
void on_lookupButton_clicked();
void on_addButton_clicked();
void mousePressEvent(QMouseEvent *event) override;
void on_dxCallEntry_textChanged (QString const&);
void on_dxGridEntry_textChanged (QString const&);
void on_dxCallEntry_editingFinished();

View File

@ -2982,7 +2982,7 @@ QLabel[oob=&quot;true&quot;] {
</size>
</property>
<property name="toolTip">
<string>Switch to Q65 mode</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Switch to Q65 mode. Right-click to toggle Q65 Pileup mode On/Off.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Q65</string>