35 #ifndef UAVOBJECTTREEMODEL_H
36 #define UAVOBJECTTREEMODEL_H
39 #include <QAbstractItemModel>
40 #include <QtCore/QMap>
41 #include <QtCore/QList>
63 QVariant
data(
const QModelIndex &
index,
int role)
const;
64 bool setData(
const QModelIndex &index,
const QVariant &value,
int role);
65 Qt::ItemFlags
flags(
const QModelIndex &index)
const;
66 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
67 QModelIndex
index(
int row,
int column,
const QModelIndex &
parent = QModelIndex())
const;
68 QModelIndex
parent(
const QModelIndex &index)
const;
69 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
70 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
85 return createIndex(indexRow, indexCol, topTreeItem);
95 void highlightUpdatedObject(
UAVObject *obj);
101 bool useScientificFloatNotation =
true);
109 QString updateMode(quint8 updateMode);
117 QColor m_recentlyUpdatedColor;
118 QColor m_manuallyChangedColor;
119 QColor m_updatedOnlyColor;
120 QColor m_isPresentOnHwColor;
121 QColor m_notPresentOnHwColor;
122 QFont m_nonDefaultValueFont;
123 QFont m_defaultValueFont;
124 bool m_onlyHighlightChangedValues;
125 bool m_useScientificFloatNotation;
126 bool m_hideNotPresent;
133 #endif // UAVOBJECTTREEMODEL_H
UAVObjectTreeModel(QObject *parent=nullptr, bool useScientificNotation=false)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void setRecentlyUpdatedColor(QColor color)
int columnCount(const QModelIndex &parent=QModelIndex()) const
void newObject(UAVObject *obj)
QVariant data(const QModelIndex &index, int role) const
QModelIndex parent(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
QList< QModelIndex > getMetaDataIndexes()
QList< QModelIndex > getDataObjectIndexes()
QModelIndex getIndex(int indexRow, int indexCol, TopTreeItem *topTreeItem)
void setOnlyHighlightChangedValues(bool highlight)
void instanceRemove(UAVObject *)
Qt::ItemFlags flags(const QModelIndex &index) const
bool setData(const QModelIndex &index, const QVariant &value, int role)
void setNotPresentOnHwColor(QColor color)
TopTreeItem * getSettingsTree()
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
void initializeModel(bool useScientificFloatNotation=true)
void setManuallyChangedColor(QColor color)
void presentOnHardwareChanged()
TopTreeItem * getNonSettingsTree()