42 #include <QtCore/QList>
43 #include <QtCore/QLinkedList>
44 #include <QtCore/QMap>
45 #include <QtCore/QVariant>
46 #include <QtCore/QTime>
47 #include <QtCore/QTimer>
48 #include <QtCore/QObject>
49 #include <QtCore/QDebug>
84 void checkItemsExpired();
88 QTimer m_expirationTimer;
91 QSet<TreeItem *> m_itemsToHighlight;
92 QSet<TreeItem *> m_itemsWaiting;
93 QSet<TreeItem *> m_itemsToUnhighlight;
115 QVariant
data(
int column = 1)
const;
119 d = d.trimmed().toHtmlEscaped();
122 d.prepend(
"<span style='font-style: normal'>");
123 d.remove(
"@Ref", Qt::CaseInsensitive);
130 virtual void setData(QVariant value,
int column = 1);
136 virtual void apply();
169 foreach (
TreeItem *child, m_children) {
170 if (name == child->
data(0).toString()) {
183 ret &= item->isDefaultValue();
193 QString m_description;
199 static int m_highlightTimeMs;
223 m_objectTreeItemsPerObjectIds[objectId] = oti;
228 return m_objectTreeItemsPerObjectIds.contains(objectId)
229 ? m_objectTreeItemsPerObjectIds[objectId]
235 m_metaObjectTreeItemsPerObjectIds[objectId] = oti;
240 return m_metaObjectTreeItemsPerObjectIds.contains(objectId)
241 ? m_metaObjectTreeItemsPerObjectIds[objectId]
248 QMap<quint32, DataObjectTreeItem *> m_objectTreeItemsPerObjectIds;
249 QMap<quint32, MetaObjectTreeItem *> m_metaObjectTreeItemsPerObjectIds;
346 if (!dynamic_cast<DataObjectTreeItem *>(item))
virtual void doRefreshHiddenObjects(UAVDataObject *dobj)
MetaObjectTreeItem * findMetaObjectTreeItemByObjectId(quint32 objectId)
TreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
void updateHighlight(TreeItem *)
void insertChild(TreeItem *child)
DataObjectTreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
virtual void setIsPresentOnHardware(bool value)
bool add(TreeItem *itemToAdd)
TopTreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
InstanceTreeItem(UAVObject *obj, const QList< QVariant > &data, TreeItem *parent=nullptr)
QList< MetaObjectTreeItem * > getMetaObjectItems()
virtual void update() override
DataObjectTreeItem(const QVariant &data, TreeItem *parent=nullptr)
virtual bool isEditable()
virtual void setIsPresentOnHardware(bool value) override
virtual void removeChild(TreeItem *child)
virtual void setObject(UAVObject *obj) override
virtual void removeHighlight()
void setParentTree(TreeItem *parent)
ObjectTreeItem(const QVariant &data, TreeItem *parent=nullptr)
ObjectTreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
QList< TreeItem * > treeChildren() const
TreeItem * findChildByName(QString name)
void addObjectTreeItem(quint32 objectId, DataObjectTreeItem *oti)
virtual bool getIsPresentOnHardware() const
virtual bool isDefaultValue() const override
virtual void setObject(UAVObject *obj)
virtual void setHighlightManager(HighLightManager *mgr)
void setUpdatedOnlyParent()
bool getIsPresentOnHardware() const
QList< DataObjectTreeItem * > getDataObjectItems()
ArrayFieldTreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
virtual void appendChild(TreeItem *child)
MetaObjectTreeItem(UAVObject *obj, const QList< QVariant > &data, TreeItem *parent=nullptr)
InstanceTreeItem(UAVObject *obj, const QVariant &data, TreeItem *parent=nullptr)
bool childrenAreDefaultValue() const
ArrayFieldTreeItem(const QVariant &data, TreeItem *parent=nullptr)
virtual void setData(QVariant value, int column=1)
TreeItem * getChild(int index)
QVariant data(int column=1) const
DataObjectTreeItem * findDataObjectTreeItemByObjectId(quint32 objectId)
void setChanged(bool changed)
virtual void appendChild(TreeItem *child) override
void setDescription(QString d)
void addMetaObjectTreeItem(quint32 objectId, MetaObjectTreeItem *oti)
virtual bool isDefaultValue() const override
void setUpdatedOnly(bool updated)
virtual bool isDefaultValue() const
virtual void apply() override
int nameIndex(QString name)
virtual void doRefreshHiddenObjects(UAVDataObject *dobj)
MetaObjectTreeItem(UAVObject *obj, const QVariant &data, TreeItem *parent=nullptr)
TopTreeItem(const QVariant &data, TreeItem *parent=nullptr)
static const int dataColumn
void presentOnHardwareChanged(UAVDataObject *)
HighLightManager(long checkingInterval)