A method for data interaction between TD GUIE graphics system and QT graphics rendering library
By installing the QT graphics rendering library in the TD GUIE graphics system and using the shared memory mechanism for data interaction, the compatibility problem between QT and TD GUIE is solved, reducing development costs and maintaining the resource advantages of TD GUIE.
Patent Information
- Application Number
- CN202011271220.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-13
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-11-13
AI Technical Summary
In the prior art, the compatibility problem between QT applications and TD GUIE graphics systems leads to high development costs, and the QT development program resources consume a lot and learning costs are high, so enterprises are looking for their alternatives.
Install the QT graphics rendering library in the TD GUIE graphics system and interact with data through the shared memory mechanism. The TD GUIE graphics system obtains user events through the Linux kernel and passes them to the QT graphics rendering library. QT responds and re-draws image data, and writes image data Shared memory, TD GUIE reads and displays to the screen.
It realizes the convenient use of QT graphics rendering library in the TD GUIE graphics system, reducing development costs, and maintains the advantages of TD GUIE's low resource consumption, fast system startup, multi-process, and multi-windows.
Smart Images

Figure CN112379875B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer image data, and in particular to a method for data interaction between a TD GUIE graphics system and a QT graphics rendering library. Background Art
[0002] In the early days of developing embedded GUI programs, QT (application development framework) was favored by many companies because it was open source early and had rich functions. However, programs developed using QT consume a lot of resources and have high learning costs, so more and more companies are looking for alternatives.
[0003] TD GUIE graphics system is an embedded graphics system based on Linux system and C / S architecture. Linux system is safe and fast, and C / S architecture has the characteristics of low resource consumption, because resources are uniformly allocated and managed by the system on the server side, which can effectively avoid the problem of repeated application of different programs when using the same resources. TD GUIE graphics system has the advantages of low resource consumption, fast system startup, multi-process, multi-window and low learning cost, and has been widely used in many fields such as automobiles and smart homes.
[0004] In order to reduce customers' cost consumption during the development process and allow companies to continue to retain previous QT applications while using the TD GUIE graphics system, it is necessary to solve the compatibility issue between the QT application and the TD GUIE graphics system. Summary of the invention
[0005] In view of the technical problems existing in the prior art, the present invention provides a method for data interaction between a TD GUIE graphics system and a QT graphics rendering library. The method installs the QT graphics rendering library in the TD GUIE graphics system. When developing graphics software, the QT graphics rendering library can be used very conveniently and the development cost can be reduced.
[0006] The technical solution of the present invention to solve the above technical problems is as follows:
[0007] A graphics software development method based on TD GUIE graphics system comprises the following steps:
[0008] Install the QT graphics rendering library in the form of a software package into the Linux operating system running the TD GUIE graphics system;
[0009] Set up a shared memory, wherein the write port of the shared memory is connected to the QT graphics rendering library, and the read port of the shared memory is connected to the TDGUIE graphics system;
[0010] The TD GUIE graphics system obtains system events triggered by users through external devices through the Linux kernel, and passes the system events to the QT graphics rendering library through relevant interfaces;
[0011] The QT graphics rendering library responds to system events to refresh the interface and redraw image data; then writes the image data into shared memory;
[0012] The TD GUIE graphic system reads the image data from the shared memory and displays the image data on the screen through the Linux kernel.
[0013] Furthermore, when setting the shared memory, the TD GUIE graphics system allocates the shared memory, and the TD GUIE graphics system sends the shared memory address to the QT graphics rendering library.
[0014] Furthermore, the shared memory size is pre-specified by the TD GUIE graphics system or allocated according to system events.
[0015] Furthermore, the TD GUIE graphics system includes a TD GUIE graphics system window manager, a TD GUIE graphics system display module, and a TD GUIE graphics system event module;
[0016] The TD GUIE graphics system obtains system events triggered by users through external devices through the Linux kernel, and transmits the system events to the QT graphics rendering library through relevant interfaces. Specifically, the TD GUIE graphics system event module obtains system events triggered by users through external devices through the Linux kernel, and forwards the system events to the QT graphics rendering library;
[0017] The TD GUIE graphics system reads the image data from the shared memory and displays the image data on the screen through the Linux kernel. Specifically, the TD GUIE graphics system window manager reads the image data from the shared memory and forwards the image data to the TD GUIE graphics system display module, which then forwards the image data to the display driver in the Linux kernel for screen display.
[0018] Furthermore, the QT graphics rendering library includes a QT event module, an interface refresh module, and a QT display module;
[0019] The QT graphics rendering library responds to system events to refresh the interface and redraw the image data; then the image data is written into the shared memory, specifically: the QT event module receives the system event forwarded by the TD GUIE graphics system event module and responds, the interface refresh module refreshes the interface and redraws the image data, and then the QT display module writes the reproduced image data into the shared memory.
[0020] The beneficial effects of the present invention are as follows: the method installs the QT graphics rendering library in the TD GUIE graphics system, and the QT graphics rendering library can be used very conveniently when developing graphics software. The method is compatible with the advantages of the TD GUIE graphics system and the QT graphics rendering library with a simple structure, and has the advantages of the TD GUIE graphics system such as low resource consumption, fast system startup, multiple processes, multiple windows and low cost, and also supports the QT graphics library and reduces development costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the system structure and method flow of the present invention. DETAILED DESCRIPTION
[0022] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0023] like Figure 1 As shown, the embodiment of the present invention provides a new graphics software development architecture. The QT graphics rendering library is installed in the form of a software package into the Linux operating system running the TD GUIE graphics system, and the shared memory is set. When setting the shared memory, the TD GUIE graphics system allocates the shared memory, and the TD GUIE graphics system sends the shared memory address to the QT graphics rendering library. The shared memory size is pre-specified by the TD GUIE graphics system or allocated according to system events.
[0024] The TD GUIE graphics system includes a TD GUIE graphics system window manager, a TD GUIE graphics system display module, and a TD GUIE graphics system event module; the QT graphics rendering library includes a QT event module, an interface refresh module, and a QT display module.
[0025] When developing graphics software,
[0026] First, the TD GUIE graphics system obtains system events triggered by users through external devices through the Linux kernel, and passes the system events to the QT graphics rendering library through relevant interfaces. Specifically, the TD GUIE graphics system event module obtains system events triggered by users through external devices (such as mouse, keyboard, etc., or other input devices) through the Linux kernel, and forwards the system events to the QT graphics rendering library.
[0027] Secondly, the QT graphics rendering library responds to system events to refresh the interface and redraw the image data; then the image data is written into the shared memory. Specifically, the QT event module receives and responds to the system events forwarded by the TD GUIE graphics system event module, the interface refresh module performs interface refresh and redraws the image data, and then the QT display module writes the remade image data into the shared memory.
[0028] Then, the TD GUIE graphics system reads the image data from the shared memory and displays the image data on the screen through the Linux kernel. Specifically, the TD GUIE graphics system window manager reads the image data from the shared memory and forwards the image data to the TD GUIE graphics system display module, which then forwards the image data to the display driver in the Linux kernel for screen display.
[0029] This method installs the QT graphics rendering library in the TD GUIE graphics system, and can be used very conveniently when developing graphics software. It is compatible with the advantages of the TD GUIE graphics system and the QT graphics rendering library with a simple structure, and has the advantages of the TD GUIE graphics system such as low resource consumption, fast system startup, multi-process, multi-window and low cost, while also supporting the QT graphics library and reducing development costs.
[0030] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for data interaction between a TD GUIE graphics system and a QT graphics rendering library, characterized in that: The following steps are involved: Install the QT graphics rendering library in the form of a software package into the Linux operating system running the TD GUIE graphics system; Setting up a shared memory, wherein the write port of the shared memory is connected to the QT graphics rendering library, and the read port of the shared memory is connected to the TD GUIE graphics system; The TD GUIE graphics system obtains system events triggered by users through external devices through the Linux kernel, and passes the system events to the QT graphics rendering library through relevant interfaces; The QT graphics rendering library responds to system events to refresh the interface and redraw image data; Then writing the image data into the shared memory; The TD GUIE graphic system reads the image data from the shared memory and displays the image data on the screen through the Linux kernel.
2. The method according to claim 1, characterized in that When setting the shared memory, the TD GUIE graphics system allocates the shared memory, and the TD GUIE graphics system sends the shared memory address to the QT graphics rendering library.
3. The method according to claim 2, characterized in that The shared memory size is pre-specified by the TD GUIE graphics system or allocated according to system events.
4. The method according to claim 1, characterized in that: The TD GUIE graphics system includes a TD GUIE graphics system window manager, a TD GUIE graphics system display module, and a TD GUIE graphics system event module; The TD GUIE graphics system obtains system events triggered by users through external devices through the Linux kernel, and transmits the system events to the QT graphics rendering library through relevant interfaces. Specifically, the TD GUIE event module obtains system events triggered by users through external devices through the Linux kernel, and forwards the system events to the QT graphics rendering library; The TD GUIE graphics system reads the image data from the shared memory and displays the image data on the screen through the Linux kernel. Specifically, the TD GUIE graphics system window manager reads the image data from the shared memory and forwards the image data to the TD GUIE graphics system display module, which then forwards the image data to the display driver in the Linux kernel for screen display.
5. The method according to claim 4, characterized in that The QT graphics rendering library includes a QT event module, an interface refresh module, and a QT display module; The QT graphics rendering library responds to system events to refresh the interface and redraw the image data; then the image data is written into the shared memory, specifically: the QT event module receives the system event forwarded by the TD GUIE graphics system event module and responds, the interface refresh module refreshes the interface and redraws the image data, and then the QT display module writes the reproduced image data into the shared memory.
