The Start Menu is essentially a collection of application shortcuts installed on the physical device. In order to facilitate the use of users, it not only contains a simple real-time display of applications, but also adds additional functions such as software retrieval, software classification, fixed commonly used software, so as to achieve the purpose of convenience for users.

This article is a brief introduction of the main functions of the Start Menu of the Unicorn open source operating system.

Overall functional design

The overall functional design of ukui-menu is divided into three modules: module switch, window switch and search. After opening the start menu, the default display mode switch – all software module pages:

Introduction to functional modules

Switch module

Module switching includes three function modules, which are all software module, alphabetical sorting module and function classification module. External interface for switching of all software modules, alphabetical sorting modules and functional classification modules is provided. The parameter is the pointer variable of module switching button.

Void btnGroupClickedSlot(QAbstractButton * BTN);

The corresponding position on the page is as follows:

This time all the software modules are introduced:

All software modules are mainly used to display all software installed in the system and refresh in real time according to the adaptive frequency of the software. Meanwhile, the software can be fixed to the top of the list without being limited by the frequency of use. The processing flow chart of all software modules is as follows:

Description of main functions:

A. QVector<QString> getAllClassification(); // Retrieves all software categories and returns the application information storage container

B. void ViewOpenedSlot(QDbusMessage msg); // The process starts the monitor slot function with the D-BUS Bus message

C. void directoryChangedSlot(const QString &path); // Monitor software installation and uninstall with the Desktop file directory

D. void fixToAllActionTriggerSlot(); // Fix the software to all software modules

E. void unfixedFromAllActionTriggerSlot(); // Unfix from all software modules

F. void updateListView(); // Update the list of applications

Window Switching Window Switching realizes the switch of the Start Menu window size, which is displayed as the default window size in the default state, and maximizes and restores the default size by calling the switch interface;

Interface definition:

void showFullScreenWidget(); // Maximize the window

void showDefaultWidegt(); // Restore the default window size

The maximized window appears as follows:

Restore the default window size as shown below:

search

The function of search for the start menu is to help users quickly find applications and open applications, supporting real-time search in Chinese and English and initials. In the start menu interface of YouQilin, an external interface is provided to open the application. After finding the application through the search box, click the application icon to open the application.

Interface definition:

void onClicked(QModelIndex index); // The parameter is the application index

Above is some introduction to the start menu, mainly analyzes the function of the three function modules of the start menu and the main function of all the program modules in the module switch. Interested in the source code, you can click the link below if you want to know more:

https://github.com/ukui/ukui-…