Giter VIP home page Giter VIP logo

lvglbuilder's Introduction

Future plan

Due to the lack of free time, the subsequent code will not be submitted immediately, and will only be submitted after the function is completed.

  • Improve the page management module of the tree structure
  • Support the latest version of LVGL8
  • The widget will be in the form of a plug-in, which is convenient for users to add custom widgets
  • Refactor the font conversion function, adopt the font conversion style of lvlg official website.
  • Refactoring the image conversion function, using the official lvgl image conversion style

1.0.4 PageTree [unfinish] 2022/02/02

  • A tree structure is adopted for the project, and each sub-item is a page.
  • The current optimal solution is to use LVGLSimulator as a member of the Page class, but the memory will increase and the slot function needs to be rewritten.
  • It's just that this refactoring involves a lot of functionality, so it takes a lot of time to test and refine. But my vacation is almost over, so it would be nice if someone could help. pagetree

1.0.4 Test Version

  1. Removed the color depth selection
  2. Fixed the program crash problem
  3. Support multi-language style
  4. Redesigned the new UI style
  5. With the addition of gogleBreakpad, if the program crashes, a dmp file will be generated under the program path, and with the pdb file under the program path, you can use vs for debug tracing.
  6. Because the use of msvc2019, so only support 64-bit system

I'm Back

  • First, I'll remove the code for unfinished functionality.
  • Second, I will solve the program crash problem, the problem lies in the model part, I need to rewrite.
  • Third, I would design a project as a whole object, rather than each page as a whole object.
  • Fourth, the new page will take a tree structure instead of a row of tab pages.

Plus

Now, I have ported the project to the Qt6 platform, which means that it is no longer compatible with the Qt5 platform. (Because people can't stand still and stay where they are)

1.0.4 preview

Version 1.0.4 is expected to be released in late July.

Support exporting all pages

savebehavior

Support a single file to save all pages

exportbehavior

Support different themes

  • Colorful style(LOL):You can quickly modify the style of the specified part according to these different colors

    badstyle

  • Dark theme

    newstyle

  • The theme is realized by loading the configuration file, so you can create your favorite style themes.

Complete testing process

  • Many test cases will be added under the test file, and the program will be released after all passed

Support multiple language

setlanguage

  • Now supports Chinese and English

  • Automatically save language settings, no need to set the next restart

  • Switch language first, then drag widgets

  • The name translation of the style needs to restart the client

  • Only projects of the same language can be loaded, so projects of versions before 1.0.4 are only applicable to English.

    Because the original design needs to be changed a lot, this will cause a lot of problems.

  • Support customization, you can add languages according to the following pictures

  • setlanguage

Google Breakpad

The next version 1.0.4 version starts to support google breakpad

  • Currently only used for window
  • If the program crashes, please check whether the dmp file is generated. If it exists, you can send it to me for debugging and tracking
  • If the release version is to generate a pdb file, please uncomment these two lines of code in the pro file QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_LFLAGS_RELEASE += $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO

New features

The pre-release of v1.0.3 has been released. Changelog.md under the dev-v7 branch records the changes of the previous version.

1.0.3

  • LABEL/TEXTAREA support LVGL's SYMBOL,just enter (LV_S_XXX) in the text box, such as (LV_S_WIFI) SupportSyb

  • Some widgets have new functions, such as animation switch and type selection

  • Fixed the issue of compiling errors caused by using a custom page name

  • New export method, hierarchical export will classify pictures, fonts and c codes, and then classify them into different page folders 【Experimental features

    epway

  • Improve the naming logic when creating a new page or event

  • Optimize the export logic, will not copy the same font file repeatedly

  • Fix that the image event function fails to compile when the image name contains uppercase letters

Fixed crash bugs

These bugs exist in release versions before 1.0.3

  • If the value_str attribute of the button is set or a configuration file containing this attribute is loaded, it will sometimes cause the program to crash.
  • If the current page contains a page switching event, and the target page of the page switching event is closed, exporting the code at this time will cause the program to crash.

Old Version

  • The changlog.md of the dev-v7 branch records all the new features

New Test Tool

[For Test]arm-none-linux-gnueabi-i686-mingw32-2014 on window https://github.com/mrQzs/CreateLvglLib/releases

Export LVGL Code Build

  • Need to select hierarchical export
  • The cc path of Makefile originally needed to be modified, but this time the path of armgcc was added to the environment variable

program: https://github.com/mrQzs/LCBuild

lbcode

Create LVGL LIB

  • Select the output device and input device file of the corresponding platform

  • lv_drv_conf.h should also enable the corresponding input device and output device

  • Both lvgl and drive are the latest official v7 version

    This project modified the source code of lvgl to achieve some functions (such as tabwidth adjustment), so the official lvgl can be replaced by the lvgl of this project.

    tabwidth

program: https://github.com/mrQzs/CreateLvglLib

createlib

LVGL Simulator

program: https://github.com/mrQzs/Lvgl_Simulator

  • support msvc 32/64 and mingw 32/64

  • Put the code file generated by lvglbuilder in the testcode folder

  • Just load the source code and modify the resolution in the lvconf.h

    lvglsim

LVGLBuilder

GUI Builder for littlevgl release 6.0+ written in C++ and using LVGL for preview of the created GUI and Qt for the higher-level user interface for drag and drop of widgets as well as editing of properties and styles.

Preview

Prerequisites

  • Qt 5.11+ - The Qt framework
  • C++11
  • LVGL 6.1 (included in source since a few adaptions are applied)

Tested:

  • Windows 10 + MSVC 2019 + Qt 5.15.1
  • Windows 10 + MinGW 8.1 + Qt 5.15.2
  • Ubuntu 18.04.4 + Qt 5.14.2
  • Ubuntu 20.04 + Qt 5.12.8

Build

Building with console:

  • Move to the cloned LVGLBuild directory
  • Run qmake LVGLBuilder.pro
  • For gcc (Mac/Linux): make
  • For mingw: mingw32-make
  • For windows: jom (make sure that jom.exe is in the environment path)

Building with QtCreator:

  • Download Qt from https://www.qt.io/download-open-source
  • Install Qt with QtCreator
  • Open the LVGLBuilder.pro file with QtCreator
  • Click build project
  • There are no special requironments, therefor it should build with QtCreator out of the box.

Usage

  • Create a new project and select the screen resolution
  • Simply drag and drop widgets from the list into the canvas
  • Widgets can be moved with the arrow keys or by dragging
  • Lock widgets to prevent editing (Unlock via right click context menu)
  • Drop a widget into another widget to set the parent
  • Save and load a project as json file using the menu or tool buttons
  • Mark widgets within the property editor as accessable via the c header
  • Export the project as c code using the menu (File -> Export -> C Project ...)

ToDo General

  • Saving GUI as JSON
  • Loading GUI as JSON
  • Export C-project
  • Change style of single widgets
  • Support different display formats
  • Fix object inspector (insertion and deletion of widgets)
  • Fix absolute and relative positions of widgets
  • Undo and redo
  • Default values for widgets
  • Support multiple screens
  • Dialog for changing keyboard layout
  • Preview for widgets
  • Icons for widgets
  • Support for lvgl 7.x

Wishlist

  • C code driver generator (Touch, Buttons, Displays for µC)

ToDo Widgets

  • Arc (lv_arc)
  • Bar (lv_bar)
  • Button (lv_btn)
  • Button matrix (lv_btnm)
  • Calendar (lv_calendar)
  • Canvas (lv_canvas)
  • Checkbox (lv_cb)
  • Chart (lv_chart)
  • Container (lv_cont)
  • Color picker (lv_cpicker)
  • Drop-down list (lv_ddlist)
  • Gauge (lv_gauge)
  • Image (lv_img)
  • Image button (lv_imgbtn)
  • Keyboard (lv_kb)
  • Label (lv_label)
  • LED (lv_led)
  • Line (lv_line)
  • List (lv_list)
  • Line meter (lv_lmeter)
  • Message box (lv_mbox)
  • Page (lv_page)
  • Preloader (lv_preload)
  • Roller (lv_roller)
  • Slider (lv_slider)
  • Spinbox (lv_spinbox)
  • Switch (lv_sw)
  • Table (lv_table)
  • Tabview (lv_tabview)
  • Text area (lv_ta)
  • Tile view (lv_tileview)
  • Window (lv_win)

lvglbuilder's People

Contributors

curtlab avatar mrqzs avatar pcotret avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lvglbuilder's Issues

arm64 linux not support

arm64 linux seem not supposed, the widget not view. And the tree widget not has, can you add it? Thank you.

Screenshot_20210622_080441_com realvnc viewer android

8 compile error

hello, I’m using qt5.15 try to compile the project,but I meet some error.
here is the error detail:
D:/QT/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'G:/build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
g++ -Wl,-subsystem,windows -mthreads -o debug\LVGLBuilder.exe @object_script.LVGLBuilder.Debug D:\QT\5.15.2\mingw81_64\lib\libQt5Widgets.a D:\QT\5.15.2\mingw81_64\lib\libQt5Gui.a D:\QT\5.15.2\mingw81_64\lib\libQt5Core.a build\obj\icon_res.o -lmingw32 D:\QT\5.15.2\mingw81_64\lib\libqtmain.a -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib -lshell32
build/obj/LVGLPropertyVal2.o: In function LVGLPropertyVal2<short>::LVGLPropertyVal2(short, short, QString, std::function<short (_lv_obj_t*)>, short, short, QString, std::function<short (_lv_obj_t*)>, QString, std::function<void (_lv_obj_t*, short, short)>, QString, LVGLProperty*)': G:\build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../LVGLBuilder-master/properties/LVGLPropertyVal2.cpp:23: undefined reference to LVGLPropertyValT::LVGLPropertyValT(short, short, QString, QString, std::function<void (_lv_obj_t*, short)>, std::function<short (_lv_obj_t*)>, LVGLProperty*)'
G:\build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../LVGLBuilder-master/properties/LVGLPropertyVal2.cpp:24: undefined reference to LVGLPropertyValT<short>::LVGLPropertyValT(short, short, QString, QString, std::function<void (_lv_obj_t*, short)>, std::function<short (_lv_obj_t*)>, LVGLProperty*)' build/obj/LVGLPropertyVal2.o: In function LVGLPropertyVal2::LVGLPropertyVal2(unsigned short, unsigned short, QString, std::function<unsigned short (_lv_obj_t*)>, unsigned short, unsigned short, QString, std::function<unsigned short (_lv_obj_t*)>, QString, std::function<void (_lv_obj_t*, unsigned short, unsigned short)>, QString, LVGLProperty*)':
G:\build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../LVGLBuilder-master/properties/LVGLPropertyVal2.cpp:23: undefined reference to LVGLPropertyValT<unsigned short>::LVGLPropertyValT(unsigned short, unsigned short, QString, QString, std::function<void (_lv_obj_t*, unsigned short)>, std::function<unsigned short (_lv_obj_t*)>, LVGLProperty*)' G:\build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../LVGLBuilder-master/properties/LVGLPropertyVal2.cpp:24: undefined reference to LVGLPropertyValT::LVGLPropertyValT(unsigned short, unsigned short, QString, QString, std::function<void (_lv_obj_t*, unsigned short)>, std::function<unsigned short (_lv_obj_t*)>, LVGLProperty*)'
build/obj/LVGLCalendar.o:LVGLCalendar.cpp:(.rdata$.refptr._ZN22LVGLPropertyMonthNames7DEFAULTE[.refptr._ZN22LVGLPropertyMonthNames7DEFAULTE]+0x0): undefined reference to LVGLPropertyMonthNames::DEFAULT' build/obj/LVGLCalendar.o:LVGLCalendar.cpp:(.rdata$.refptr._ZN20LVGLPropertyDayNames7DEFAULTE[.refptr._ZN20LVGLPropertyDayNames7DEFAULTE]+0x0): undefined reference to LVGLPropertyDayNames::DEFAULT'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile.Debug:777: debug/LVGLBuilder.exe] Error 1
mingw32-make[1]: Leaving directory 'G:/build-LVGLBuilder-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
mingw32-make: *** [Makefile:45: debug] Error 2
20:12:19: 进程"D:\QT\Tools\mingw810_64\bin\mingw32-make.exe"退出,退出代码 2 。
Error while building/deploying project LVGLBuilder (kit: Desktop Qt 5.15.2 MinGW 64-bit)
When executing step "Make"

image

not compile on Qt version 5.12.8

I Build on:
$ qmake -version
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu

And get error:

LVGLProperty.cpp: In member function ‘virtual void LVGLPropertyValT::set(LVGLObject*, T)’:
LVGLProperty.cpp:289:12: error: ambiguous overload for ‘operator<<’ (operand types are ‘QDebug’ and ‘const char [7]’)
289 | qDebug() << "Error:" << e.what();
| ^~ ~~~~~~~~
| |
| const char [7]
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QVariant:1,
from LVGLProperty.h:4,
from LVGLProperty.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvariant.h:885:22: note: candidate: ‘QDebug operator<<(QDebug, const QVariant&)’
885 | Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &);
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QJsonValue:1,
from LVGLProperty.h:5,
from LVGLProperty.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qjsonvalue.h:251:22: note: candidate: ‘QDebug operator<<(QDebug, const QJsonValue&)’
251 | Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &);
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qimage.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtGui/QImage:1,
from LVGLImageData.h:4,
from LVGLCore.h:6,
from LVGLProperty.cpp:3:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcolor.h:57:21: note: candidate: ‘QDebug operator<<(QDebug, const QColor&)’
57 | Q_GUI_EXPORT QDebug operator<<(QDebug, const QColor &);
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtransform.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtGui/qimage.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtGui/QImage:1,
from LVGLImageData.h:4,
from LVGLCore.h:6,
from LVGLProperty.cpp:3:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix.h:189:21: note: candidate: ‘QDebug operator<<(QDebug, const QMatrix&)’
189 | Q_GUI_EXPORT QDebug operator<<(QDebug, const QMatrix &);
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qimage.h:48,
from /usr/include/x86_64-linux-gnu/qt5/QtGui/QImage:1,
from LVGLImageData.h:4,
from LVGLCore.h:6,
from LVGLProperty.cpp:3:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qtransform.h:378:21: note: candidate: ‘QDebug operator<<(QDebug, const QTransform&)’
378 | Q_GUI_EXPORT QDebug operator<<(QDebug, const QTransform &);
| ^~~~~~~~
LVGLProperty.cpp: In instantiation of ‘void LVGLPropertyValT::set(LVGLObject*, T) [with T = short unsigned int]’:
LVGLProperty.h:158:15: required from here
LVGLProperty.cpp:288:4: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
288 | } catch (std::exception e) {
| ^~~~~
LVGLProperty.cpp: In instantiation of ‘void LVGLPropertyValT::set(LVGLObject*, T) [with T = short int]’:
LVGLProperty.h:158:15: required from here
LVGLProperty.cpp:288:4: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
make: *** [Makefile:9427: build/obj/LVGLProperty.o] Ошибка 1

Adding custom widgets

Looking at the core it looks like you are using hard coded lists for the available widgets, symbols, etc. but wouldn´t it be better to populate those lists with a loop from the widget directory for example so that people can add their own widgets later without having to touch the code. The Littlevgl library supports adding widgets so I think it would be good to add that now to save on work later on.

Also I was wondering what was missing to make the canvas widget work? That is the only thing missing until I can use the builder for my project. Not many comments in the code and I would have to do a deeper dive to get a grasp on it.

Fedora 33 Build Error

[ric@localhost LVGLBuilder]$ qmake-qt5 --version
QMake version 3.1
Using Qt version 5.15.1 in /usr/lib64
[ric@localhost LVGLBuilder]$ make
g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DFT_CONFIG_OPTION_ERROR_STRINGS -DFT2_BUILD_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ilvgl -Ifreetype/include -Ifreetype/builds/unix -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -Ibuild/moc -Ibuild/ui -I/../lib64/qt5/mkspecs/linux-g++ -o build/obj/LVGLPropertyRange.o properties/LVGLPropertyRange.cpp
In file included from properties/LVGLPropertyRange.cpp:1:
properties/LVGLPropertyRange.h:21:2: error: ‘LVGLPropertyMin’ does not name a type
   21 |  LVGLPropertyMin *m_min;
      |  ^~~~~~~~~~~~~~~
properties/LVGLPropertyRange.h:22:2: error: ‘LVGLPropertyMax’ does not name a type
   22 |  LVGLPropertyMax *m_max;
      |  ^~~~~~~~~~~~~~~
properties/LVGLPropertyRange.cpp: In constructor ‘LVGLPropertyRange::LVGLPropertyRange(LVGLProperty*)’:
properties/LVGLPropertyRange.cpp:41:4: error: class ‘LVGLPropertyRange’ does not have any field named ‘m_min’
   41 |  , m_min(new LVGLPropertyMin(this))
      |    ^~~~~
properties/LVGLPropertyRange.cpp:42:4: error: class ‘LVGLPropertyRange’ does not have any field named ‘m_max’
   42 |  , m_max(new LVGLPropertyMax(this))
      |    ^~~~~
properties/LVGLPropertyRange.cpp:44:14: error: ‘m_min’ was not declared in this scope
   44 |  m_childs << m_min << m_max;
      |              ^~~~~
properties/LVGLPropertyRange.cpp:44:23: error: ‘m_max’ was not declared in this scope
   44 |  m_childs << m_min << m_max;
      |                       ^~~~~
make: *** [Makefile:7263: build/obj/LVGLPropertyRange.o] Error 1
[ric@localhost LVGLBuilder]$ 

Building with Qt Creator fails

Hi,

I followed your instructions and downloaded the Qt framework. However when I try to build the project building fails with an error:

C:\Users\deuts\Desktop\LVGLBuilder-master\properties\LVGLPropertyVal2.cpp:51: Fehler: invalid use of non-static data member 'LVGLProperty::m_parent'
..\LVGLBuilder-master\properties\LVGLPropertyVal2.cpp:49:6: required from here
..\LVGLBuilder-master\properties\LVGLPropertyVal2.cpp:51:67: error: invalid use of non-static data member 'LVGLProperty::m_parent'
LVGLPropertyVal2 *d = reinterpret_cast<LVGLPropertyVal2 *>(m_parent);
^~~~~~~~

this is the code:

template
void LVGLPropertyVal2::LVGLPropertyVal::set(LVGLObject *obj, T value)
{
LVGLPropertyVal2 *d = reinterpret_cast<LVGLPropertyVal2 *>(m_parent);
if (m_idx == 0)
d->m_setter(obj->obj(), value, d->m_item2->get(obj));
else if (m_idx == 1)
d->m_setter(obj->obj(), d->m_item1->get(obj), value);
}

Function iteration

Hello, will you continue to improve this tool? If so, what are the specific plans?

Upload Precompiled Releases

Can you upload pre-compiled releases to GitHub? I want to give your builder a shot but I've spent the last several hours setting up QTCreator and compilers. Windows 7 in my case. Thanks for considering.

問題回報

我使用的版本是 v1.0.3 這個 branch
有幾個比較重要的問題想回報給你 使用環境: Win10 64 bit

  1. Style Editor 設定參數時 , 若 default state 預設是 0 的參數 (例如 button 的 outline opa) , 去設定其他 state 像是 focused pressed 的相同參數時, 會被覆蓋回 default state 的值 , trace code 後 , Builder get / set 不同 state 的 lvgl style property 的方式應該有點錯誤

  2. message box 模擬時 , 若有button存在 , 按下去會自動消失( 此時 lv_msgbox 會自動 del obj) , 所以會造成崩潰 , 按下 button 消失是 message box 內部預設的 event callback 行為 , create lv_msgbox 後 , 最好重新設定一個空的 event 避免自動關閉

  3. Widget Box 的 resize 方式有點不正常 , 當 ListItem 是關閉狀態時 , 輸入 filter 後 打開關閉tool button 就會顯示異常

  4. 加入一個 parent widget , 拉兩個 child widget 進去後 , 從新到舊的順序刪除 widget 會造成崩潰 , 這個問題是由於 object model LVGLObjectModel::parent 這個 fucntion 存取到已經被刪除的 object 所以崩潰 , 而且和 object inspector 的treeview 有沒有 set object model 有關 , 原因是甚麼還不曉得

  5. Keyboard的mode property enum 沒有對齊 lvgl 7.11

  6. Bar / Slider 等用到 max / min 的 widget 若 max = min 會崩潰 , min 應該要判斷 < max

  7. list widget 的 item 每次設定完 icon , 重新編輯都會只剩下 item name , icon被重置

  8. 加入font 若選擇的是 1 bpp , 字體會明顯不正確

Page change problem and colors

Hi, first of all congratulations for the software, it's beautiful.
I wanted to report some problems that I am finding, even if the software is still in beta and it is normal that there is a few bugs.

I tried to create two screens with some test widgets, setting a simple page change from 1 to 2 and 2 to 1, in the simulator the page change takes place correctly, but in the TFT this does not happen, and crashes to the gearbox page.
Event_1#Clicked#Change Screen#Page_2#None#150#0#

On some "Button Image" colors are reversed if converted via LVGLBUILDER (from .png to .c RGB565), others are seen correctly. I made a counter-finder to convert an image from the LVGL website, and the colors are respected.

MCU:ESP32;
Framework: Arduino;
IDE: PlatformIO VSCode;
OS: Windows 10 x64;
TFT: TouchScreen, SPI, ILI9341, 16bit;
Driver: TFT_eSPI;
LVGL 7.11.0;
Code from LVGL_ARDUINO used:

/* Display flushing */
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) {
    uint32_t w = (area->x2 - area->x1 + 1);
    uint32_t h = (area->y2 - area->y1 + 1);

    tft.startWrite();
    tft.setAddrWindow(area->x1, area->y1, w, h);
    tft.pushColors((uint16_t *)&color_p->full, w * h, true);
    tft.endWrite();

    lv_disp_flush_ready(disp);
}

ubuntu compile error.

hello,

I got the compile error when I run make:

LVGLProject.cpp:48:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [5]’)
  QJsonObject lvglObj = doc["lvgl"].toObject();
                           ^
LVGLProject.cpp:60:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [7]’)
  QJsonArray imageArr = doc["images"].toArray();
                           ^
LVGLProject.cpp:66:26: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [6]’)
  QJsonArray fontArr = doc["fonts"].toArray();
                          ^
Makefile:6161: recipe for target 'build/obj/LVGLProject.o' failed
make: *** [build/obj/LVGLProject.o] Error 1

Redundant Code Generation for every widget state.

I have found that when generating code, a lot settings are duplicated resulting in unneeded bloat and wasted flash/memory space.

LVGL widgets will always use the styles/settings for the DEFAULT state unless that specific property is overridden for the current state.

This builder seems to always explicitly generate definitions for every possible state no matter if it was modified or not.

For example: If you add a simple button widget, and give it a text string, and change is border color. The generated code will include unique definitions for every single possible Button State, most of which are redundant.

On a simple page with 10 Widgets and minor styling, the resultant code is around 183 lines. After going through the code manually, and deleting redundant declarations, it can be simplified to less then 70 lines.

Awesome Tool BTW!

Unable to edit Widget Names

I am unable to edit Widget Names.

Clicking into the UI in the top left for the name property turns it blue (selected) but my curser will never go inside of it to edit.

I have tried double clicking on the field, tabbing into it and pressing enter. Clicking on the field and pasting a name from the clipboard. Nothing seems to work, the field remains selectable but un-editable.

The only reliable way I have found to rename a widget from say button_1 to back_button is to save/export the project and manually edit the .lvgl (json) file and re-open it with the builder.

Ubuntu, Build failed.

Hello. Good job.
I do:

qmake
make

and i see:

gcc -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DFT_CONFIG_OPTION_ERROR_STRINGS -DFT2_BUILD_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ilvgl -Ifreetype/include -Ifreetype/builds/unix -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibuild/moc -isystem /usr/include/libdrm -Ibuild/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o build/obj/ftsystem.o freetype/builds/unix/ftsystem.c
freetype/builds/unix/ftsystem.c:21:10: fatal error: ftconfig.h: File not found
 #include <ftconfig.h>
          ^~~~~~~~~~~~
compilation terminated.
Makefile:5548: recipe for target 'build/obj/ftsystem.o' failed
make: *** [build/obj/ftsystem.o] Error 1

When i try:

denis@pc1:~/opt/LVGLBuilder$ locate ftconfig.h
/usr/include/freetype2/freetype/config/ftconfig.h

Fail to compile :(

build error

E:\github\LVGLBuilder\LVGLProject.cpp:49: error: C2676: 二进制“[”:“QJsonDocument”不定义该运算符或到预定义运算符可接收的类型的转换

E:\github\LVGLBuilder\LVGLProject.cpp:61: error: C2676: 二进制“[”:“QJsonDocument”不定义该运算符或到预定义运算符可接收的类型的转换

E:\github\LVGLBuilder\LVGLProject.cpp:72: error: C2676: 二进制“[”:“QJsonDocument”不定义该运算符或到预定义运算符可接收的类型的转换

E:\github\LVGLBuilder\LVGLProperty.cpp:289: error: C2027: 使用了未定义类型“QDebug”

E:\github\LVGLBuilder\LVGLProperty.cpp:289: error: C2678: 二进制“<<”: 没有找到接受“QDebug”类型的左操作数的运算符(或没有可接受的转换)

E:\github\LVGLBuilder\LVGLProperty.cpp:289: error: C2088: “<<”: 对于 class 非法

build error

Qt version: 5.9.9
OS: ubuntu 18.04

LVGLProject.cpp: In static member function ‘static LVGLProject* LVGLProject::load(const QString&)’:
LVGLProject.cpp:49:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [5]’)
QJsonObject lvglObj = doc["lvgl"].toObject();
^
LVGLProject.cpp:61:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [7]’)
QJsonArray imageArr = doc["images"].toArray();
^
LVGLProject.cpp:72:26: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [6]’)
QJsonArray fontArr = doc["fonts"].toArray();
^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.