mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
AISView constructors out of header.
This commit is contained in:
parent
f8a063312c
commit
94b73d7825
@ -129,6 +129,18 @@ bool AISModel::on_packet(const ais::Packet& packet) {
|
||||
|
||||
namespace ui {
|
||||
|
||||
AISView::AISView() {
|
||||
flags.focusable = true;
|
||||
|
||||
packet_signal_token = model.packet_signal += [this](const ais::Packet& packet) {
|
||||
this->on_packet(packet);
|
||||
};
|
||||
}
|
||||
|
||||
AISView::~AISView() {
|
||||
model.packet_signal -= packet_signal_token;
|
||||
}
|
||||
|
||||
void AISView::truncate_entries() {
|
||||
while(recent.size() > 64) {
|
||||
recent.pop_back();
|
||||
|
@ -84,18 +84,9 @@ namespace ui {
|
||||
|
||||
class AISView : public View {
|
||||
public:
|
||||
AISView() {
|
||||
flags.focusable = true;
|
||||
|
||||
packet_signal_token = model.packet_signal += [this](const ais::Packet& packet) {
|
||||
this->on_packet(packet);
|
||||
};
|
||||
}
|
||||
|
||||
~AISView() {
|
||||
model.packet_signal -= packet_signal_token;
|
||||
}
|
||||
|
||||
AISView();
|
||||
~AISView();
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
void on_focus() override;
|
||||
|
Loading…
Reference in New Issue
Block a user