QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FactGroupListModel.h
Go to the documentation of this file.
1#pragma once
2
5#include "FactGroupWithId.h"
6
7#include <QList>
8
12{
13 Q_OBJECT
14 QML_ELEMENT
15 QML_UNCREATABLE("")
16
17public:
18 explicit FactGroupListModel(const char* factGroupNamePrefix, QObject* parent = nullptr);
19
21 void handleMessageForFactGroupCreation(Vehicle *vehicle, const mavlink_message_t &message);
22
23protected:
24 virtual bool _shouldHandleMessage(const mavlink_message_t &message, QList<uint32_t> &ids) const = 0;
25 virtual FactGroupWithId *_createFactGroupWithId(uint32_t id) = 0;
26
27 FactGroupWithId *_findOrAddFactGroupById(Vehicle *vehicle, uint32_t id);
28 QString _factGroupNameWithId(uint32_t id) const;
29
31};
struct __mavlink_message mavlink_message_t
FactGroupListModel(const char *factGroupNamePrefix, QObject *parent=nullptr)
virtual bool _shouldHandleMessage(const mavlink_message_t &message, QList< uint32_t > &ids) const =0
FactGroupWithId * _findOrAddFactGroupById(Vehicle *vehicle, uint32_t id)
virtual FactGroupWithId * _createFactGroupWithId(uint32_t id)=0
QString _factGroupNameWithId(uint32_t id) const
void handleMessageForFactGroupCreation(Vehicle *vehicle, const mavlink_message_t &message)
Allows for creation/updating of dynamic FactGroups based on incoming messages.
const char * _factGroupNamePrefix
FactGroupWithId is a FactGroup which has an id Fact which can be used to identify the group.
QModelIndex parent(const QModelIndex &child) const override
QmlObjectListModel(QObject *parent=nullptr)