mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:40:05 +00:00
Allow selection of radar smoothing
This commit is contained in:
parent
d3ae404f7a
commit
a8132ef9f1
7 changed files with 66 additions and 6 deletions
|
|
@ -322,6 +322,8 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||
p->mapSettingsGroup_ = new ui::CollapsibleGroup(tr("Map Settings"), this);
|
||||
p->mapSettingsGroup_->GetContentsLayout()->addWidget(ui->mapStyleLabel);
|
||||
p->mapSettingsGroup_->GetContentsLayout()->addWidget(ui->mapStyleComboBox);
|
||||
p->mapSettingsGroup_->GetContentsLayout()->addWidget(
|
||||
ui->smoothRadarDataCheckBox);
|
||||
p->mapSettingsGroup_->GetContentsLayout()->addWidget(
|
||||
ui->trackLocationCheckBox);
|
||||
ui->radarToolboxScrollAreaContents->layout()->replaceWidget(
|
||||
|
|
@ -1085,6 +1087,16 @@ void MainWindowImpl::ConnectOtherSignals()
|
|||
}
|
||||
}
|
||||
});
|
||||
connect(mainWindow_->ui->smoothRadarDataCheckBox,
|
||||
&QCheckBox::checkStateChanged,
|
||||
mainWindow_,
|
||||
[this](Qt::CheckState state)
|
||||
{
|
||||
bool smoothingEnabled = (state == Qt::CheckState::Checked);
|
||||
|
||||
// Turn on smoothing
|
||||
activeMap_->SetSmoothingEnabled(smoothingEnabled);
|
||||
});
|
||||
connect(mainWindow_->ui->trackLocationCheckBox,
|
||||
&QCheckBox::checkStateChanged,
|
||||
mainWindow_,
|
||||
|
|
@ -1471,6 +1483,10 @@ void MainWindowImpl::UpdateRadarProductSettings()
|
|||
{
|
||||
level2SettingsGroup_->setVisible(false);
|
||||
}
|
||||
|
||||
mainWindow_->ui->smoothRadarDataCheckBox->setCheckState(
|
||||
activeMap_->GetSmoothingEnabled() ? Qt::CheckState::Checked :
|
||||
Qt::CheckState::Unchecked);
|
||||
}
|
||||
|
||||
void MainWindowImpl::UpdateRadarSite()
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>205</width>
|
||||
<height>701</height>
|
||||
<width>190</width>
|
||||
<height>680</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
|
|
@ -329,6 +329,13 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="mapStyleComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="smoothRadarDataCheckBox">
|
||||
<property name="text">
|
||||
<string>Smooth Radar Data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="trackLocationCheckBox">
|
||||
<property name="text">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue