1 Star 0 Fork 15

sspemail/LVGLBuilder

forked from zhangheyang/LVGLBuilder 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
LVGLObjectModel.h 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
CURTLab 提交于 2020-10-04 14:27 . Fixed object inspector
#ifndef LVGLOBJECTMODEL_H
#define LVGLOBJECTMODEL_H
#include <QAbstractItemModel>
#include "LVGLCore.h"
#include "LVGLObject.h"
class LVGLObjectModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit LVGLObjectModel(QObject *parent = nullptr);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
// Basic functionality:
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
// Add object
void beginInsertObject(LVGLObject *obj);
void endInsertObject();
// Remove object
void beginRemoveObject(LVGLObject *obj);
void endRemoveObject();
LVGLObject *object(const QModelIndex &index) const;
public slots:
void setCurrentObject(LVGLObject *obj);
private:
QModelIndex objIndex(LVGLObject *obj, int col) const;
LVGLObject *m_current;
};
#endif // LVGLOBJECTMODEL_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sspemail/LVGLBuilder.git
git@gitee.com:sspemail/LVGLBuilder.git
sspemail
LVGLBuilder
LVGLBuilder
master

搜索帮助