mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-29 01:06:27 -05:00
Rename AISView to AISRecentEntriesView.
Coming soon, top-layer AISAppView.
This commit is contained in:
parent
bd07e4e7e5
commit
fc16bc7867
@ -163,7 +163,7 @@ void AISRecentEntries::truncate_entries() {
|
||||
|
||||
namespace ui {
|
||||
|
||||
AISView::AISView() {
|
||||
AISRecentEntriesView::AISRecentEntriesView() {
|
||||
flags.focusable = true;
|
||||
|
||||
EventDispatcher::message_map().register_handler(Message::ID::AISPacket,
|
||||
@ -185,27 +185,27 @@ AISView::AISView() {
|
||||
receiver_model.set_baseband_bandwidth(1750000);
|
||||
}
|
||||
|
||||
AISView::~AISView() {
|
||||
AISRecentEntriesView::~AISRecentEntriesView() {
|
||||
EventDispatcher::message_map().unregister_handler(Message::ID::AISPacket);
|
||||
}
|
||||
|
||||
void AISView::on_packet(const ais::Packet& packet) {
|
||||
void AISRecentEntriesView::on_packet(const ais::Packet& packet) {
|
||||
recent.on_packet(packet);
|
||||
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
void AISView::on_focus() {
|
||||
void AISRecentEntriesView::on_focus() {
|
||||
has_focus = true;
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
void AISView::on_blur() {
|
||||
void AISRecentEntriesView::on_blur() {
|
||||
has_focus = false;
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
bool AISView::on_encoder(const EncoderEvent event) {
|
||||
bool AISRecentEntriesView::on_encoder(const EncoderEvent event) {
|
||||
advance(event);
|
||||
return true;
|
||||
}
|
||||
@ -230,7 +230,7 @@ static void ais_list_item_draw(
|
||||
painter.draw_string(target_rect.pos, draw_style, line);
|
||||
}
|
||||
|
||||
void AISView::paint(Painter& painter) {
|
||||
void AISRecentEntriesView::paint(Painter& painter) {
|
||||
const auto r = screen_rect();
|
||||
const auto& s = style();
|
||||
|
||||
@ -266,7 +266,7 @@ void AISView::paint(Painter& painter) {
|
||||
}
|
||||
}
|
||||
|
||||
void AISView::advance(const int32_t amount) {
|
||||
void AISRecentEntriesView::advance(const int32_t amount) {
|
||||
auto selected = recent.find_by_mmsi(selected_key);
|
||||
if( selected == std::end(recent) ) {
|
||||
if( recent.empty() ) {
|
||||
|
@ -106,10 +106,10 @@ private:
|
||||
|
||||
namespace ui {
|
||||
|
||||
class AISView : public View {
|
||||
class AISRecentEntriesView : public View {
|
||||
public:
|
||||
AISView();
|
||||
~AISView();
|
||||
AISRecentEntriesView();
|
||||
~AISRecentEntriesView();
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
|
@ -517,7 +517,7 @@ void ReceiverView::on_modulation_changed(ReceiverModel::Mode mode) {
|
||||
break;
|
||||
|
||||
case ReceiverModel::Mode::AIS:
|
||||
widget_content = std::make_unique<AISView>();
|
||||
widget_content = std::make_unique<AISRecentEntriesView>();
|
||||
break;
|
||||
|
||||
case ReceiverModel::Mode::SpectrumAnalysis:
|
||||
|
Loading…
Reference in New Issue
Block a user