mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-11 17:19:48 -04:00
AISView constructors out of header.
This commit is contained in:
parent
f8a063312c
commit
94b73d7825
2 changed files with 15 additions and 12 deletions
|
@ -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,17 +84,8 @@ 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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue