代码拉取完成,页面将自动刷新
同步操作将从 zhangheyang/LVGLBuilder 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef LVGLOBJECT_H
#define LVGLOBJECT_H
#include <QObject>
#include <QJsonObject>
#include <lvgl/lvgl.h>
#include "widgets/LVGLWidget.h"
class LVGLObject : public QObject
{
Q_OBJECT
public:
LVGLObject(const LVGLWidget *widgetClass, QString name, LVGLObject *parent);
LVGLObject(const LVGLWidget *widgetClass, QString name, lv_obj_t *parent);
LVGLObject(const LVGLWidget *widgetClass, LVGLObject *parent, lv_obj_t *parentObj);
LVGLObject(lv_obj_t *obj, const LVGLWidget *widgetClass, LVGLObject *parent, bool movable = true, int index = -1);
~LVGLObject();
lv_obj_t *obj() const;
QString name() const;
void setName(const QString &name);
QString codeName() const;
bool isLocked() const;
void setLocked(bool locked);
bool isMovable() const;
const LVGLWidget *widgetClass() const;
LVGLWidget::Type widgetType() const;
QPoint absolutePosition() const;
QPoint position() const;
int x() const;
int y() const;
void setPosition(const QPoint &pos);
void setX(int x);
void setY(int y);
QSize size() const;
QRect geometry() const;
void setGeometry(QRect geometry);
int width() const;
int height() const;
void setWidth(int width);
void setHeight(int height);
QJsonObject toJson();
QJsonArray jsonStyles() const;
QStringList codeStyle(QString styleVar, int type) const;
void parseStyles(const QJsonArray &styles);
LVGLObject *parent() const;
operator lv_obj_t *() noexcept;
operator const lv_obj_t *() const noexcept;
bool hasCustomStyle(int type) const;
lv_style_t *style(int type);
QString styleCodeName(int type) const;
QList<LVGLObject *> childs() const;
void removeChild(LVGLObject *child);
bool isAccessible() const;
void setAccessible(bool accessible);
bool doesNameExists() const;
static bool doesNameExists(const QString &name, LVGLObject *except = nullptr);
void generateName();
static LVGLObject *parse(QJsonObject object, LVGLObject *parent);
int index() const;
LVGLObject *findChildByIndex(int index) const;
signals:
void positionChanged();
private:
lv_obj_t *m_obj;
const LVGLWidget *m_widgetClass;
QString m_name;
bool m_locked;
bool m_accessible;
bool m_movable;
int m_index;
LVGLObject *m_parent;
QList<LVGLObject*> m_childs;
QHash<int,lv_style_t> m_styles;
};
#endif // LVGLOBJECT_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。