mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-13 12:12:16 -04:00
Add capture mode waterfall.
This commit is contained in:
parent
2201a9e95f
commit
ec75c00da2
4 changed files with 81 additions and 4 deletions
|
@ -36,6 +36,7 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
|
|||
&field_frequency,
|
||||
&field_lna,
|
||||
&field_vga,
|
||||
&waterfall,
|
||||
} });
|
||||
|
||||
field_frequency.set_value(receiver_model.tuning_frequency());
|
||||
|
@ -79,6 +80,20 @@ CaptureAppView::~CaptureAppView() {
|
|||
receiver_model.disable();
|
||||
}
|
||||
|
||||
void CaptureAppView::on_hide() {
|
||||
// TODO: Terrible kludge because widget system doesn't notify Waterfall that
|
||||
// it's being shown or hidden.
|
||||
waterfall.on_hide();
|
||||
View::on_hide();
|
||||
}
|
||||
|
||||
void CaptureAppView::set_parent_rect(const Rect new_parent_rect) {
|
||||
View::set_parent_rect(new_parent_rect);
|
||||
|
||||
const ui::Rect waterfall_rect { 0, header_height, new_parent_rect.width(), static_cast<ui::Dim>(new_parent_rect.height() - header_height) };
|
||||
waterfall.set_parent_rect(waterfall_rect);
|
||||
}
|
||||
|
||||
void CaptureAppView::focus() {
|
||||
button_start_stop.focus();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue