Enable/disable auto update of radar data based on timeline selection

This commit is contained in:
Dan Paulat 2023-05-29 13:37:21 -05:00
parent 80f04be510
commit 4963add9cc
8 changed files with 129 additions and 39 deletions

View file

@ -198,6 +198,22 @@ void AnimationDockWidget::UpdateAnimationState(types::AnimationState state)
}
}
void AnimationDockWidget::UpdateLiveState(bool isLive)
{
static const QString prefix = tr("Auto Update");
static const QString disabled = tr("Disabled");
static const QString enabled = tr("Enabled");
if (isLive)
{
ui->autoUpdateLabel->setText(QString("%1: %2").arg(prefix).arg(enabled));
}
else
{
ui->autoUpdateLabel->setText(QString("%1: %2").arg(prefix).arg(disabled));
}
}
} // namespace ui
} // namespace qt
} // namespace scwx

View file

@ -30,6 +30,7 @@ public:
public slots:
void UpdateAnimationState(types::AnimationState state);
void UpdateLiveState(bool isLive);
signals:
void ViewTypeChanged(types::MapTime viewType);

View file

@ -21,6 +21,13 @@
<string>Timeline</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QLabel" name="autoUpdateLabel">
<property name="text">
<string>Auto Update: Enabled</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="liveViewRadioButton">
<property name="text">
@ -103,46 +110,76 @@
</widget>
</item>
<item>
<widget class="QLabel" name="loopTimeLabel">
<property name="text">
<string>Loop Time (Minutes)</string>
<widget class="QFrame" name="frame_3">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="loopTimeSpinBox">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1440</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="loopSpeedLabel">
<property name="text">
<string>Loop Speed</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="loopSpeedSpinBox">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="loopTimeLabel">
<property name="text">
<string>Loop Time</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="loopTimeSpinBox">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="suffix">
<string> min</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1440</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="loopSpeedLabel">
<property name="text">
<string>Loop Speed</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="loopSpeedSpinBox">
<property name="correctionMode">
<enum>QAbstractSpinBox::CorrectToNearestValue</enum>
</property>
<property name="suffix">
<string>x</string>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>