Methods, apparatus, electronic devices, and storage media for generating LVGL interface source code.
Patent Information
- Application Number
- CN202211404766.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-11-10
AI Technical Summary
因此,目前在相关技术中,并没有提供能够生成LVGL界面源码的方法,而用SquareLine Studio来生成LVGL界面源码存在运行错误、响应速度慢,且自主性不高的问题
[0018] In this embodiment, QtCreator is first used to layout and beautify the interface configuration file according to user instructions. Then, the laid-out interface configuration file is imported into a pre-designed LVGL interface source code converter to obtain the LVGL interface source code. Compared to related technologies, this embodiment proposes a method for generating LVGL interface source code based on QtCreator by obtaining the LVGL interface source code through the open-source third-party software QtCreator.
Smart Images

Figure CN115794087B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, such as a method and apparatus for generating LVGL interface source code, electronic devices, and storage media. Background Technology
[0002] LVGL (Light and Versatile Graphics Library) is an open-source embedded graphics library that provides the functionality needed to create embedded GUIs (Graphical User Interfaces). It boasts advantages such as easy-to-use graphical elements, beautiful visual effects, and low memory footprint. LVGL has a complete graphics framework, including various widgets used in GUI creation, and also supports more advanced features such as animation and anti-aliasing. Developing LVGL interfaces typically uses GUI design software, which can greatly improve development efficiency and reduce the time spent on repetitive coding. The most commonly used software for developing LVGL design interfaces is SquareLine Studio (an official PC development tool for LVGL). However, this software usually does not support custom settings, has a less flexible interface, and frequently suffers from runtime errors and slow response times.
[0003] Among the related technologies, a method for creating an LVGL development environment using QtCreator is disclosed. Specifically, a project is first created in QtCreator, then LVGL source code is added to the project, and finally an application is created to establish the development environment.
[0004] However, the methods described above merely use Qt Creator as the development platform, directly importing pre-prepared LVGL source code, rather than generating the source code for the LVGL interface. Therefore, current technologies do not provide a method for generating LVGL interface source code. Using SquareLine Studio to generate LVGL interface source code suffers from runtime errors, slow response times, and a lack of autonomy. Overall, there is currently no method that allows generating LVGL interfaces using other software.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.
[0007] This disclosure provides a method, apparatus, electronic device, and storage medium for generating LVGL interface source code, and proposes a method for generating LVGL interface source code based on the QtCreator environment.
[0008] In some embodiments, the method for generating LVGL interface source code includes: laying out an interface configuration file in response to a user instruction to obtain a laid-out interface configuration file; and importing the laid-out interface configuration file into an LVGL interface source code converter to obtain LVGL interface source code.
[0009] Optionally, the step of laying out the interface configuration file in response to a user instruction includes: creating a new Qt project in QtCreator in response to a user instruction, and laying out the interface configuration file; wherein the Qt project includes the interface configuration file.
[0010] Optionally, the step of creating the LVGL interface source code converter includes: compiling an LVGL interface source code generator according to a preset conversion relationship; wherein the conversion relationship is a conversion relationship from QtCreator interface controls to LVGL interface controls.
[0011] Optionally, the step of compiling the LVGL interface source code generator according to the preset conversion relationship includes: generating a conversion configuration table according to the preset conversion relationship; wherein the conversion configuration table includes conversion rules for converting QtCreator interface controls into corresponding LVGL controls; and compiling the conversion rules to obtain the LVGL interface source code generator.
[0012] Optionally, the step of compiling the LVGL interface source code generator according to the preset conversion relationship further includes: if there is a QtCreator interface control without a preset conversion relationship, parsing the functional characteristics of the QtCreator interface control without a preset conversion relationship; and establishing conversion rules between the QtCreator interface control without a preset conversion relationship and the LVGL interface control according to the functional characteristics.
[0013] Optionally, after obtaining the layout-out interface configuration file, the method further includes: validating the layout-out interface configuration file and displaying the validation results.
[0014] Optionally, after displaying the verification result, a confirmation message indicating whether the configuration is complete is sent; if the message indicates that the configuration is not complete, the interface configuration file is rearranged based on user input.
[0015] In some embodiments, an apparatus for generating LVGL interface source code includes a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform a method for generating LVGL interface source code as described in any of the above embodiments.
[0016] In some embodiments, the electronic device includes a body, which further includes means for generating LVGL interface source code as described in the above embodiments.
[0017] The method, apparatus, electronic device, and storage medium for generating LVGL interface source code provided in this disclosure can achieve the following technical effects:
[0018] In this embodiment, QtCreator is first used to layout and beautify the interface configuration file according to user instructions. Then, the laid-out interface configuration file is imported into a pre-designed LVGL interface source code converter to obtain the LVGL interface source code. Compared to related technologies, this embodiment proposes a method for generating LVGL interface source code based on QtCreator by obtaining the LVGL interface source code through the open-source third-party software QtCreator.
[0019] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description
[0020] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:
[0021] Figure 1 This is a schematic diagram of a method for generating LVGL interface source code provided in an embodiment of this disclosure;
[0022] Figure 2 This is a schematic diagram of another method for generating LVGL interface source code provided in this embodiment of the disclosure;
[0023] Figure 3 This is a schematic diagram of another method for generating LVGL interface source code provided in this embodiment of the disclosure;
[0024] Figure 4 This is a schematic diagram of another method for generating LVGL interface source code provided in this embodiment of the disclosure;
[0025] Figure 5 This is a schematic diagram of another method for generating LVGL interface source code provided in this embodiment of the disclosure;
[0026] Figure 6 This is a schematic diagram of the structure of an apparatus for generating LVGL interface source code provided in an embodiment of this disclosure. Detailed Implementation
[0027] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.
[0028] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0029] Unless otherwise stated, the term "multiple" means two or more.
[0030] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0031] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0032] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.
[0033] Currently, SquareLine Studio is commonly used for developing LVGL design interfaces. It's a PC-based development tool officially released by LVGL. This software allows for the design of various LVGL interfaces and the generation of their source code. However, it suffers from limitations such as inflexible interfaces, frequent runtime errors, and slow response times. Therefore, there is currently no method in the relevant technology field that can design and generate LVGL interface source code based on other software.
[0034] Based on this, embodiments of this application provide an electronic device capable of generating LVGL interface source code based on QtCreator, thereby improving design autonomy. The electronic device includes a device body, which in turn includes a device 600 for generating LVGL interface source code. This device further includes a processor and a memory storing program instructions. When executed, the processor can implement a method for generating LVGL interface source code.
[0035] In conjunction with the aforementioned electronic device, this application provides a method for generating LVGL interface source code. For example... Figure 1 As shown, the method for generating LVGL interface source code includes:
[0036] S101, the processor responds to user instructions to lay out the interface configuration file and obtains the laid-out interface configuration file.
[0037] S102, the processor imports the laid-out interface configuration file into the LVGL interface source code converter to obtain the LVGL interface source code.
[0038] In this embodiment, QtCreator is first used to layout and beautify the interface configuration file according to user instructions. Then, the laid-out interface configuration file is imported into a pre-designed LVGL interface source code converter to obtain the LVGL interface source code. Compared to related technologies, this disclosure embodiment only uses the open-source third-party software QtCreator to obtain the LVGL interface source code, proposing a method for generating LVGL interface source code based on QtCreator.
[0039] It's worth noting that LVGL is an open-source embedded graphics library with advantages such as easy-to-use graphics elements, beautiful visual effects, and low memory consumption. It also supports more advanced features, such as animation and anti-aliasing. Developing LVGL interfaces typically uses graphical user interface (GUI) design software, which greatly improves development efficiency and reduces the time spent repetitive coding. Qt Creator is a new lightweight integrated development environment (IDE) that integrates tools including a project generation wizard, a C++ code editor, a file viewer, and Qt Designer, Qt Assistant, and Qt Linguist. The aforementioned interface configuration file actually refers to the ui file in the project files after project creation, i.e., an XML file with the ".ui" extension, which records information such as the control's category, attributes, position, and size. This application's concept is based on the conversion relationship between Qt Creator and LVGL controls, compiling the conversion rules into an LVGL source code generator. The interface configuration file generated using Qt Creator can then be converted into the corresponding LVGL interface source code using this LVGL source code generator. Users can design the interface themselves first and then convert it to an LVGL interface using this converter, increasing design autonomy.
[0040] Specifically, users can configure Qt projects using Qt Creator's C++ code editor and utilize all the features of the integrated tools. They can also create a new UI file and use Qt Designer to layout and beautify the graphical interface controls.
[0041] Optionally, the step of laying out the interface configuration file in response to user instructions includes: the processor responding to user instructions, creating a new QT project in QtCreator, and laying out the interface configuration file according to user instructions; wherein, the QT project includes the interface configuration file.
[0042] like Figure 2 As shown, another method for generating LVGL interface source code is described in this application embodiment. This method for generating LVGL interface source code includes:
[0043] S201, the processor receives a user instruction and opens QtCreator.
[0044] S202, the processor creates a new QT project in QtCreator according to the user's instructions.
[0045] S203, the processor responds to user instructions and lays out the interface configuration file in the QT project.
[0046] In this embodiment, Qt Creator is first opened, and a new Qt project is created. This automatically generates an .h header file, a mainwindow.ui file, a .cpp source file, and a main program entry point, along with some default implementations (the usage of member variables). Then, integrated tools within Qt Creator, such as Qt Designer, are used to layout and enhance the interface configuration file, allowing for customized layouts based on user needs. This enhances design autonomy.
[0047] Optionally, after obtaining the layout configuration file, the layout configuration file can be validated and the validation results can be displayed.
[0048] Optionally, after displaying the verification result, a confirmation message indicating whether the configuration is complete can be sent.
[0049] Optionally, if an incomplete configuration is received, the interface configuration file can be rearranged based on user input.
[0050] In this embodiment, after obtaining the layout-completed interface configuration file, the configuration file can be validated and the validation results displayed. Validation involves checking for design irregularities or exceeding boundaries, and then presenting the validation results and the designed interface to the user, along with a confirmation message indicating whether the configuration is complete. If the user is not satisfied with the design results and selects "Configuration Not Completed," the process will return to the design phase, allowing the user to continue laying out the interface according to their needs.
[0051] Combination Figure 3 This application provides another method for generating LVGL interface source code. The method includes:
[0052] S301: The processor creates a new QT project in QtCreator according to user instructions.
[0053] S302, the processor responds to user instructions and lays out the interface configuration file in the QT project.
[0054] S303, the processor verifies the layout of the interface configuration file and displays the verification result.
[0055] S304 After displaying the verification result, the processor sends a confirmation message indicating whether the configuration is complete.
[0056] S305: When the processor receives an incomplete configuration, it rearranges the interface configuration file based on user input.
[0057] In this embodiment, after obtaining the layout-completed interface configuration file, the configuration file can be validated, and the validation results can be displayed. Validation involves checking for design irregularities or exceeding boundaries, and then presenting the validation results and the designed interface to the user, along with a confirmation message indicating whether the configuration is complete. If the user is not satisfied with the design result and selects "Configuration Not Completed," the process will return to the design phase, allowing the user to continue laying out the interface according to their needs.
[0058] Optionally, the steps of creating an LVGL interface source code converter include: compiling an LVGL interface source code generator according to a preset conversion relationship; wherein the conversion relationship is a conversion relationship from QtCreator interface controls to LVGL interface controls.
[0059] Optionally, an LVGL interface source code generator is compiled according to a preset conversion relationship, including: generating a conversion configuration table according to the preset conversion relationship; wherein the conversion configuration table includes conversion rules for converting QtCreator interface controls into corresponding LVGL controls; and compiling the conversion rules to obtain the LVGL interface source code generator.
[0060] Optionally, if there are QtCreator UI controls without a preset conversion relationship, the functional characteristics of the QtCreator UI controls without a preset conversion relationship are parsed to obtain the functional characteristics; based on the functional characteristics, conversion rules between the QtCreator UI controls without a preset conversion relationship and LVGL UI controls are established.
[0061] This embodiment describes the process of creating an interface source code generator. This generator is compiled from the conversion relationships between QtCreator interface controls and LVGL interface controls. Specifically, if there are QtCreator interface controls without preset conversion relationships, and cannot be converted to LVGL interface controls based on these relationships (e.g., page switching buttons, which should allow for one-click switching), then corresponding conversion rules need to be established based on their functionality to ensure the reliability of the conversion.
[0062] like Figure 4 As shown in the embodiments of this disclosure, another method for generating LVGL interface source code includes:
[0063] S401, the processor generates a conversion configuration table based on preset conversion relationships.
[0064] S402, the processor compiles the conversion rules in the conversion configuration table to obtain the LVGL interface source code generator.
[0065] The conversion configuration table includes conversion rules for converting QtCreator UI controls into corresponding LVGL controls.
[0066] In this embodiment, a conversion configuration table is first generated based on the conversion relationship between QtCreator UI controls and LVGL UI controls. This configuration table contains conversion rules for converting QtCreator UI controls to their corresponding LVGL controls. Further, each conversion rule is compiled to create an LVGL UI source code generator.
[0067] like Figure 5 As shown in the embodiments of this disclosure, another method for generating LVGL interface source code includes:
[0068] In step S501, the processor determines whether the QtCreator UI control to be converted has a preset conversion relationship. If yes, proceed to step S5021; otherwise, proceed to step S5022.
[0069] S5021, the processor generates a conversion configuration table based on preset conversion relationships, which includes conversion rules for converting QtCreator interface controls into corresponding LVGL controls.
[0070] S5022, the processor parses QtCreator UI controls that do not have a preset conversion relationship and obtains the functional characteristics of QtCreator UI controls that do not have a preset conversion relationship.
[0071] S503: The processor establishes conversion rules between QtCreator UI controls and LVGL UI controls that do not have a preset conversion relationship based on functional characteristics.
[0072] The S504 processor compiles the conversion rules to obtain the LVGL interface source code generator.
[0073] In this embodiment, if there are QtCreator UI controls without a preset conversion relationship that cannot be converted to LVGL UI controls based on the preset relationship (e.g., page switching buttons, which enable one-click switching), then it is necessary to establish corresponding conversion rules based on their functions to ensure the reliability of the conversion.
[0074] The following examples illustrate the transformation process of Qt Creator UI controls with and without preset transformation relationships. For instance, the contents of the Qt Creator-designed UI configuration file are as follows:
[0075]
[0076]
[0077] QLabel is a control in the Qt Creator interface configuration file, corresponding to the LVGL label control. "geometry" sets the position and size, "color" sets the color according to "styleSheet", and "font-size" sets the font size.
[0078] Then, after conversion according to the preset rules, it becomes lv_obj_t*label_8=lv_label_create(parent);
[0079] lv_obj_set_x(label_8,30);
[0080] lv_obj_set_y(label_8,10);
[0081] lv_obj_set_width(label_8,101);
[0082] lv_obj_set_height(label_8,31);
[0083] lv_style_set_text_color(&label_8,lv_color_hex(0xFFFFFF))
[0084] lv_obj_set_style_text_font(label_8,&lv_font_simsun_20_cjk,0);
[0085] lv_label_set_text(label_8,"Wireless Network");
[0086] The relationship before and after the conversion is shown in Table 1. It can be seen that the QtCreator UI control properties such as position, size, color, and font are all converted into the corresponding LVGL UI control properties.
[0087]
[0088] Table 1
[0089] For QtCreator controls without pre-defined conversion relationships, conversion can be achieved by defining custom types and establishing conversion rules based on their implemented functionalities, through a combination of multiple functional functions. These conversion rules are then compiled into an LVGL source code converter to complete the aforementioned conversion process.
[0090] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
[0091] Combination Figure 6 As shown, this disclosure provides an apparatus 600 for generating LVGL interface source code, including a processor 601 and a memory 602. Optionally, the apparatus may further include a bus 603 and a communication interface 604. The processor 601, communication interface 604, and memory 602 can communicate with each other via the bus 603. The communication interface 604 can be used for information transmission. The processor 601 can call logical instructions in the memory 602 to execute the method for generating LVGL interface source code described in the above embodiment.
[0092] Furthermore, the logic instructions in the aforementioned memory 602 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0093] The memory 602, as a storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 601 executes functional applications and data processing by running the program instructions / modules stored in the memory 602, that is, it implements the method for generating LVGL interface source code in the above embodiments.
[0094] The memory 602 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 602 may include high-speed random access memory and may also include non-volatile memory.
[0095] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the method described above for generating LVGL interface source code.
[0096] The aforementioned storage medium can be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0097] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.
[0098] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0099] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0100] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A method for generating LVGL interface source code, characterized in that, include: In response to user commands, a new Qt project is created in QtCreator, and the UI configuration file is laid out to obtain the laid-out UI configuration file; the UI configuration file is the ui file in the project files after the Qt project is created. Import the layout-completed interface configuration file into the LVGL interface source code converter to obtain the LVGL interface source code. The steps to create an LVGL interface source code converter include: A conversion configuration table is generated based on the preset conversion relationship; wherein, the conversion configuration table includes conversion rules for converting QtCreator interface controls into corresponding LVGL controls; Compile the conversion rules to obtain the LVGL interface source code generator; If there are QtCreator UI controls without a preset conversion relationship, the functional characteristics of the QtCreator UI controls without a preset conversion relationship are parsed. Based on the aforementioned functional characteristics, establish conversion rules between the QtCreator interface controls and LVGL interface controls that do not have a preset conversion relationship; The conversion relationship refers to the conversion relationship between QtCreator interface controls and LVGL interface controls.
2. The method of claim 1, wherein, The UI file records the category, attributes, position, and size information of the controls.
3. The method according to claim 1, characterized in that, The layout of the interface configuration file includes: using the integrated tool Qt Designer in Qt Creator to lay out the interface configuration file.
4. The method according to claim 1, characterized in that, Establish conversion rules between QtCreator UI controls and LVGL UI controls that do not have a preset conversion relationship, including: By defining custom types, conversion rules are established from the perspective of the implemented functions through a combination of multiple functional functions.
5. The method according to any one of claims 1 to 4, characterized in that, After obtaining the layout-based interface configuration file, it also includes: The layout configuration file is validated and the validation results are displayed.
6. The method according to claim 5, characterized in that, Also includes: After displaying the verification result, send a confirmation message indicating whether the configuration is complete; If an incomplete configuration is received, the interface configuration file is rearranged based on user input.
7. An apparatus for generating LVGL interface source code, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to, when running the program instructions, execute the method for generating LVGL interface source code as described in any one of claims 1 to 6.
8. An electronic device, comprising a body, characterized in that, Also includes: The apparatus for generating LVGL interface source code as described in claim 7 is disposed on the main body.
9. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for generating LVGL interface source code as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for generating display interface
CN107992304A