43 m_expirationTimer.start(checkingInterval);
44 connect(&m_expirationTimer, &QTimer::timeout,
this, &HighLightManager::checkItemsExpired);
53 if (m_itemsToUnhighlight.remove(itemToAdd)) {
54 m_itemsWaiting.insert(itemToAdd);
57 if (m_itemsWaiting.contains(itemToAdd)) {
61 if (m_itemsToHighlight.contains(itemToAdd)) {
65 m_itemsToHighlight.insert(itemToAdd);
76 void HighLightManager::checkItemsExpired()
78 for (QSet<TreeItem *>::const_iterator
i = m_itemsToUnhighlight.begin();
79 i != m_itemsToUnhighlight.end(); ++
i) {
86 m_itemsToUnhighlight.clear();
87 m_itemsToUnhighlight.swap(m_itemsWaiting);
89 for (QSet<TreeItem *>::const_iterator
i = m_itemsToHighlight.begin();
90 i != m_itemsToHighlight.end(); ++
i) {
96 m_itemsWaiting.swap(m_itemsToHighlight);
101 , isPresentOnHardware(true)
112 , isPresentOnHardware(true)
124 qDeleteAll(m_children);
129 m_children.append(child);
135 m_children.removeAll(child);
141 m_children.insert(index, child);
147 return m_children.value(index);
152 return m_children.count();
158 return m_parent->m_children.indexOf(const_cast<TreeItem *>(
this));
165 return m_data.count();
170 return m_data.value(column);
175 m_data.replace(column, value);
199 m_highlightManager->
add(
this);
211 if (this->
changed() && updated) {
225 if (!field && !top) {
238 m_highlightManager = mgr;
243 return m_metaObjectTreeItemsPerObjectIds.values();
248 return m_objectTreeItemsPerObjectIds.values();
TreeItem(const QList< QVariant > &data, TreeItem *parent=nullptr)
void updateHighlight(TreeItem *)
void insertChild(TreeItem *child)
bool add(TreeItem *itemToAdd)
QList< MetaObjectTreeItem * > getMetaObjectItems()
virtual void removeChild(TreeItem *child)
virtual void removeHighlight()
void setParentTree(TreeItem *parent)
QList< TreeItem * > treeChildren() const
virtual void setHighlightManager(HighLightManager *mgr)
void setUpdatedOnlyParent()
QList< DataObjectTreeItem * > getDataObjectItems()
virtual void appendChild(TreeItem *child)
virtual void setData(QVariant value, int column=1)
TreeItem * getChild(int index)
QVariant data(int column=1) const
void setUpdatedOnly(bool updated)
int nameIndex(QString name)
HighLightManager(long checkingInterval)