The X Window System is a Windows/based (Client/Server)-based Windows system that is displayed on X-based terminals (servers). This system configuration can be freely copied and distributed in most UNIX systems, DEC's VAX/VMS operating system and Linux system, but the system is huge and takes up more kernel resources. MicroWindows is a completely open source, layered design classic GUI system that can replace the X Window System, but some key code uses assembly language. The MiniGUI system is suitable for the embedded GUI platform of small and medium-sized enterprises, adopts a layered structure, and adopts a hash table in the core layer. The Qt/Embedded adopted in this paper is also a layered architecture, and the C++ class is used in the function provision.
2 embedded GUI implementation platform
   GUI is a graphical user interface, generally used for the design of human-computer interaction interface on PC. For the embedded GUI, because the embedded device has strict requirements on resources, different embedded devices need to customize different embedded systems, then the requirements for the GUI are different, therefore, for different embedded systems. The GUI must also be customizable. For embedded hardware, custom embedded GUIs should be lightweight, use less resources, have high performance, high reliability, and configurability. Because the Linux operating system has the advantages of open source, portability, tailorability and flexibility, the development of embedded GUI is often carried out in the Linux environment.
Qt/Embedded is the Qt version of the well-known Qt library developer for embedded systems. It is a toolkit for designing graphical user interfaces for embedded systems, including a complete windowing system. It is characterized by better portability, designers can easily join a variety of display devices and hardware input devices, many Qt-based XWindow can be easily ported to the embedded version.
Qt/Embedded provides developers with a rich API call function and exposes the source code. Qt/Embedded provides a very rich set of widgets (Widgets), and also supports widget customization, so it can provide users with a beautiful graphical interface, but at the same time rich window objects also increase the size of the software, so Qt/Embedded is generally used in embedded devices that are less demanding in the operating environment.
This article refers to the address: http://
3 characteristics of embedded Qt system
   Qt/Embedded has ported a large number of original Qt-based XWindows programs and provides a very complete embedded GUI solution. It is a mature GUI platform with the following features:
(1) Qt follows the GPL protocol and opens the main source code. Users can freely add new features under the GPL.
(2) Compared with other embedded GUIs, embedded Qt is not only a complete window system, but also an application framework, which is more conducive to application development.
(3) Qt has a rich API, including more than 250 C++ classes, supporting many functions such as graphics, network, database, I / O operations, various controls and XMI, to meet most embedded applications The need for development.
(4) Qt is a GUI simulation toolkit that simulates MS Windows and Motif (a standard GUI library for commercial Llnix) using low-level drawing functions on their respective platforms, so the program runs fast.
(5) Qt's good packaging mechanism makes Qt modular, highly reliable, and easy to program development.
Based on these characteristics of Qt, in the development process of the embedded embedded entertainment system, this paper adopts the embedded Qt as the GUI support platform developed by the graphical user interface, which effectively improves the development speed of the application.
4 Design of car GUI based on embedded Qt
4.1 The overall design of the embedded GUI based on embedded Qt The operating environment of the Linux-based in-car entertainment system is shown in Table 1. The bottom layer consists of the Linux kernel and drivers. The kernel is a reduced embedded Linux 2.4, which includes a power management system; the driver provides support for various interface hardware; the middle layer is an embedded Qt library based on QT/Embedded. It streamlines and optimizes various graphics operations. The program runs without additional system support, which can effectively reduce memory consumption and CPU load. QT/Embedded itself is extensible and can be continuously upgraded. Developers can make appropriate cuts according to the actual needs of the embedded devices they face. The QT/Embedded obtained by the reduction can save about 800k to 3MB of memory space, which means that Qt development is better than Other toolkits develop the same application, and the code takes up less memory space after the executable is built. At the top is the entire in-car entertainment application system, which is a collection of applications that implement the specific functions of in-vehicle entertainment.
The embedded Qt-based embedded entertainment system software meets the requirements of car audio-visual entertainment to the utmost extent. Provide multimedia software such as video playback, audio playback, personal information management software, wireless network services, etc. Its system architecture is shown in Figure 1.
4.2 Embedded Qt-based window system structure design The upper-level GUI window system designed in this paper adopts the client/server system structure. The window system includes: a server process, one or more client processes. The server is responsible for assigning display areas to the client and itself, generating mouse, keyboard or touch screen events, which typically include the user interface that launches the client. The client communicates with the server to apply for a display area and accept mouse or touch screen events. Customers can directly access the assigned display area to provide GUI services to users. The server and the client pass the information on the allocated display area by sharing the memory. The window system architecture is shown in Figure 2.
The server (process) maintains a set of zones through which each client's application is changed when the window is created, moved, resized, and destroyed. This area is stored in shared memory, from which customers can read information when performing drawing operations; the server is connected to system devices such as a mouse, keyboard or touch screen, and the server is responsible for sending events generated by these devices to the appropriate client process. . The server can generate a device-independent mouse or keyboard event and send it to the appropriate client process. Stylus devices typically do not have a mouse cursor, but stylus operations can be translated into device-independent mouse events that are then processed by the customer with standard events.
Embedded Qt provides APIs for clients (processes). When customers use Qt API to draw lines, QT/Embedded libraries can directly access the memory and complete the line drawing work; in some cases, the embedded Qt client library needs to establish a connection with the server process. For example, when a client process starts, an operation that affects the global consequences occurs while communicating with the server. For example, when a client performs a drag-and-drop operation and changes the display area due to window overlay, such a connection needs to be established when receiving mouse and keyboard events from the user; the embedded Qt client library is responsible for processing all drawing operations. , including text display and font processing.
4.3 Embedded Qt-based event response design In the aforementioned client/server system structure, the pressing and releasing of each key is issued by the QWSKeyEvent event. A QWSKeyEvent event typically includes the following fields:
Unicode: Unicode value.
Keycode: Qt key code value, defined in qnamespace. h header file.
Modifier: Bitfield, including Qt::ShiftButton, Qt::ControlButton, and Qt::AltButton.
Is press: True when the button is pressed, and false when released.
Is auto repeat: True when the key is in auto repeat state.
The process of embedded Qt handling key events is: the keyboard driver is responsible for reading data from the device and sending key events to the server. When the server receives a key event from the keyboard driver, it first passes an event filter and then sends it to each client process. Finally, the client process handles the key event and sends it to the appropriate window. . The specific process is shown in Figure 3.
Here, the key events do not necessarily come from the keyboard device, including the touch screen, and the stylus can generate key events. The server can call the function QWSServer::sendKeyEvent() at any time to generate key events. According to this feature, combined with the characteristics of the event filter, the required input server platform can be constructed.
In Qt, an event is sent to an object inherited from QObject by calling QObject::event(). The event is sent as an event has been generated, justified by QEvent, and QObject needs to respond. Most events come from window system class QWidgets, such as QMouseEvent, QkeyEvent events. Some events come from other sources, such as QTimerEvent, and some from the application, Qt will treat them equally.
The event filter processes the event before the target object is processed. The filter is implemented by calling QObject::eventFilter(), which accepts or discards the filter, or allows or denies further processing of the event. If all event filters allow further processing of the event, the event itself is delivered to the target object. This article schedules event filters in the server process, receives key events, and, after processing, sends the results to the client process. In the client process, key events are processed and sent to the appropriate window.
5 Conclusion Embedded Linux is currently the popular embedded system solution, and embedded GUI is an indispensable part of embedded Linux. By analyzing and comparing several popular embedded GUIs, this paper selects embedded Qt as the research object and discusses it in depth. On this basis, the design and implementation of the embedded GUI based on embedded Qt is completed. High economic value and can provide reference value for other embedded entertainment systems.
Ceramic Tile Floor Heating System's mainly material is PET far infrared heating film.With the high heat conversion rate of heating flim,ceramic tile floor can be heat up in just a few minutes.The property of far infrared radiation,can makes people feel comfort which is good for people's health.Not only did we supply the good quality of manufactured goods but also offer service of custom-made floor heating system.We look forward to build business cooperation with customers worldwide.
Ceramic Tile Floor Heating System
Ceramic Tile Floor Heating System,Ceramic Heating Film, Ceramic Electric Heating System,Customized Ptc Heating System
ShenZhen XingHongChang Electric CO., LTD. , http://www.xhc-heater.com