Improvement of embedded graphical user interface

xiaoxiao2021-03-06  38

Improvement of embedded graphical user interface

Summary: This section describes the customization and improvement of embedded graphical user interface (GUI).

Keywords: embedded system, graphical user interface, qtopia.

Abstract: The Customization and Improvement of The Embedded System's Gui Are Introduces.

Key Words: Embedded System, GUI, QTOPIA.

One. introduction

We often see the Windows graphical user interface on the PC, as well as KDE, GNOME on Linux, beautiful and easy to operate, and function. Embedded systems often have some special requirements, and these graphics window systems that require ordinary PCs cannot be met. For example, special appearance effects, control is provided to the user's function, improve loading speed, special low-layer graphics or input devices. Therefore, the embedded system must have its own graphical user interface. The embedded graphical user interface is a graphical user interface system designed for a particular hardware device or environment in an embedded system.

In today's world, embedded systems are deeply integrated into various levels of social applications with its characteristics of small size, specialty. In certain embedded applications, such as embedded systems such as PDA, Handheld PC, AutoPC, the performance of graphical user interfaces directly affects the performance of the entire system, and is a problem with product manufacturer and end users. How to customize and improve the graphical user interface with specific functions on the existing graphical user interface, which is a problem with a specific function. This paper is mainly for improvements and customization of secondary development of embedded system graphical user interfaces.

two. Classification of embedded graphical user interface

The embedded system is often a custom device that is different from the needs of the graphical user interface. Some systems require only some graphical functions, while some system requires a complete GUI support. Therefore, many embedded systems require their own specific embedded graphical user interface. Below is a variety of commonly used embedded graphical user interfaces and their characteristics:

1. Minigui

MiniGUI is a multi-window graphical user interface support system running on the Linux console, providing a simple and viable GUI support system on a Linux-based application platform. "Small" is miniGUI features, MiniGUI can be applied to a TV set-top box, real-time control system, handheld computer, etc. It is based on SVGA libraries and LinuxThread libraries. MiniGUI uses APIs similar to Win 32 to get simple graphical user interfaces with Win 98 style, and the interface is complete.

2. MicroWindows

MicroWindows is an open source project, currently developed by a company in the United States. The development of the project is very active, and some people have participated in the development and prepare support for character sets such as GB2312. Its main features provide a relatively complete graphics feature, including some advanced features, such as Alpha hybrid, 3D support, TrueType font support, etc. It enables window systems that can only be implemented on high-end Windows systems with considerable hard drives and RAM configurations, such as Microsoft Windows and X2Windows, can run on embedded such devices. MicroWindows can run without any operating system or other graphics system, which can perform direct operations for naked display devices. It has a Win32 programming interface that is easy to familiarize with users developed by Windows, but the interface is not perfect.

3. OpenGUI

OpenGUI has a long time on the Linux system. The initial name is FastGL, only supporting 256 linear memory mode. But there are currently other display modes. This library is written in C , only the C interface is provided. However, its interface is private, it is characterized by small resource consumption and does not support multi-process, and can only run in the X86 platform. 4. Qt / Embedded

Qt / Embedded is a complete self-contained GUI and Linux-based embedded platform development tools. Qt / Embedded, QT's embedded Linux port is a complete self-contained C GUI and Linux-based embedded platform development tools. A wide range of QT / Embedded APIs can be used in a variety of development projects. Qt / Embedded can develop a variety of products and equipment in the market, from consumer electrical appliances (mobile phones, netbooks, and set top boxes) to industrial control equipment (such as medical imaging equipment, mobile information systems, etc.).

three. Embedded graphical user interface improvements and general methods

In general, in the development of the embedded system, the graphical user interface is directly customized and improved by the secondary developer before the user, and the purpose is to meet the needs of end users, such as change an English operation interface. Chinese operation interface, or add certain specific control functions. Therefore, the purpose of improving the embedded graphical user interface is to make the embedded system more decentralized, and can meet the usage requirements of end users.

The embedded graphical user interface generally improves according to the user's specific needs, as shown below:

l Embedded Graphical User Interface (GUI) is generally based on the operating system, directly to the user.

l There are many modules in the embedded graphical user interface, such as display modules, security modules, etc., which are independently completed with each other, interact down with the operating system, and upwardly provides the appropriate interface to the application layer.

l The first method of improvement is to add a new functional module based on the needs of the user.

l The second method of improvement is to delete unnecessary modules based on the needs of the user.

l Improved third module, which is designed by the interface provided by the module to the application layer to design the corresponding application.

four. Improvement of QTopia graphical user interface based on QT

Qtopia is a comprehensive application platform for Trolltech facing embedded Linux. Qtopia contains a complete application layer, a flexible user interface, a window operating system, an application launcher, and a development framework. It is based on Qt / Embedded C class library, with unified application programming interfaces, support multi-tasking management, practicality. Here are improvements for several points with specific functions:

1, SD card control management interface

In general, the thermal plug of external devices is reflected in the user interface. Here we manage the plug and play management in the SD card, implement a user control interface that controls the SD card heat plug. In order to implement the SD card, you can add a system icon in the QTOPIA environment, which is used to display the status of the current card, and there is also a software interface to the user to pull the card. When the card is inserted into the system, the left corner of the QTOPIA environment will have a sign of SD card to remind the user, the current card exists. When the user wants to pull out the card, the user needs to click the icon, select "Eject SD". After the system icon disappears, the user can unplug the SD card and do not turn off the power. Realizing this feature requires two works:

1) Capture the hardware insertion or unplug the signal.

2) After receiving the signal, do the appropriate front desk and background processing.

For the capture of the signal, the software is equivalent to the polling and interruption of two ways, like the CPU processing of the external signal. For polling, the program cycle is judged to a variable, which requires waste of unnecessary CPU resources. For interrupts, the program performs DOWN operations on the corresponding semaphore. When the hardware signal occurs, this signal is operated by the interrupt service program. This method has been widely used in multi-channel operating systems. However, for QTOPIA, it is just a process in Linux, and the system icon runs in QTOPIA program space, and if the process space executes Down operation, the entire QTOPIA environment will hang. Therefore, in the system uses a mechanism similar to the polling, RROB_IN of the IOCTL method of the character file interface provided by the SD card is used to view the status of the SD card every two seconds. When the card exists, load the SD card's fast device driver to the kernel, use the Mount system to call the load file system, then send a drawing signal to the interface, display the SD card icon. When the user selects the EJECT SD of the SD card icon, first uninstall the file system, the block device driver unloads the kernel to release the resource of the system, and then send the HIDE message to the interface, erase the icon of the SD card.

This feature uses the programming interface of the existing module to prepare a Chinese pinyin input method for users to use, and improve the third method for embedded graphical user interface.

2, Chinese Pinyin input method

For QTOPIA, it provides Chinese internal code fonts that allow QTOPIA to support Chinese display. However, it does not provide a Chinese input method that is convenient from the internal code to the outer code. Therefore, it is necessary to add a Chinese input method for the user. QTOPIA provides the following interfaces in the input method:

Struct InputMethodinterface: Public QunknownInterface

{

Virtual Qwidget * InputMethod (QWIDGET * PARENT, QT :: WFLAGS F) = 0;

/ / Return to the canvas information of the input //

Virtual void resetstate () = 0;

Virtual qpixmap * icon () = 0; // Input method icon, when using the input method, appear in the system bar

Virtual qstring name () = 0; // input method name, appears on the option menu for selecting the input method

Virtual Void onkeyPress (QObject * Receiver, Const Char * Slot) = 0;

}

Just establish a class that inherits the interface, compile into a dynamic link library, put it in the system's inputMethod directory, Qtopia can automatically call this input method. The input method is started and does not mean that you can enter characters. Users must also do when the development input method is to associate the key (use "signal with the object with the focus, and then send this signal when an appropriate time. For example, if the user wants to delete a character in the text, you need to issue this signal in the program:

INT sent = 0x08;

INT keycode = qt :: key_backspace;

#if Defined (q_ws_qws) || defined (_ws_qws_)

Emit Key (Send, Keycode, 0, True, False);

#ENDIF

The Chinese characters in the input method are stored, using the Unicode standard code, the font library uses the CJK standard font. When the user enters the pinyin, the word library retrieves the user's words you want. If there is, it will be displayed to the user, otherwise, return an empty string.

In addition, it is necessary to join Chinese display and font support in the input method program. Because QTOPIA supports multi-language, the font is not needed to add another. This feature uses the programming interface of the existing module to prepare a Chinese Pinyin input method for users to use. The third method for improved embedded graphical user interface.

3, backlight control module

Whether in the use or development of embedded equipment, power consumption problems is very important, and the backlight of the LCD is a large part of the power consumption, so it is necessary to make the back pass in the SITSANG board. Save power consumption. Although qtopia provides management of backlights to save electricity, this feature is not made in Intel transplant versions. Therefore, it is necessary to re-write this part for QTOPIA.

This part of the program is not embedded in the QTOPIA environment, but a daemon written separately. The program is automatically started when the system is started, running in the background.

In order to detect the user's actions, a kernel module is first written to detect the user's input action. When the user has input, wake up the process that is waiting for the action, and then set the pen signal to be valid. The kernel module also has an interface to the application, allowing the application to turn off the interrupt detection. At this point, the backlight will not be closed. When the class is class, it will not be disturbed by the shutdown of the sudden backlight.

The daemon detects whether there is a pen break in a second. If not, it means that the user does not have actions in this second. If the user has never actions within 15 seconds, the program adjusts the backlight to 10% brightness to save power. If there is no action in the detection of 100 seconds, close the backlight to 2%, which is only barely distinct icon on the liquid crystal. When the user has actions, the system will open the backlight immediately to provide convenience for user operations.

The module provides a programming interface upwards to the application, and the first method of interacting with the operating system is the first method of improving the embedded graphical user interface.

Fives. summary

In the future, it is foreseeable that with the rapid development of electrons, computers and other industries, the embedded system will in depth in each area of ​​practical application with its dedicated and efficient characteristics. For users of embedded systems, a user-friendly graphical user interface is essential. Therefore, the development of the embedded graphical user interface must not lag behind the development of the embedded system, and should go out of its own characteristics while working hard to meet the requirements of the system.

转载请注明原文地址:https://www.9cbs.com/read-65015.html

New Post(0)