Skip to content

LVGLWidget

CURTLab edited this page Nov 26, 2019 · 3 revisions

LVGLWidget class is a interface for a lvgl widget (e.g. button) and has to be inherited by the desired widget (e.g. LVGLButton). It contains a vector of pointers to the properties of the widget as well as the available styles and which part of the style can be changed.

Required inheritance:

virtual QString name() const = 0;
virtual QString className() const = 0;
virtual Type type() const = 0;
virtual QPixmap preview() const = 0;
virtual QIcon icon() const = 0;
virtual QSize minimumSize() const = 0;
virtual lv_obj_t *newObject(lv_obj_t *parent) const = 0;
virtual QStringList styles() const = 0;
virtual lv_style_t *style(lv_obj_t *obj, int type) const = 0;
virtual void setStyle(lv_obj_t *obj, int type, lv_style_t *style) const = 0;
virtual lv_style_t *defaultStyle(int type) const = 0;
Clone this wiki locally