Picture browsing sequence management method and device for Kylin system

By obtaining and utilizing the sorting method and image information of the file manager in the Galaxy Kirin operating system, the lack of order in the browsing of pictures is solved, and user experience and efficiency are improved.

CN119782568APending Publication Date: 2025-04-08KYLIN CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411954507.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In Galaxy Kirin operating system, the lack of sequence of pictures when browsing, resulting in reduced user experience and inefficient browsing, which cannot be consistent with what is displayed in the file manager.

Method used

By obtaining the sorting method of the directories you need to browse in the file manager and the picture information for each picture, sorting the browsing order of the picture according to this information, so that it is consistent with the order displayed in the file manager.

Benefits of technology

It realizes the consistent order of image browsing and displays in the file manager, improving user experience and browsing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782568A_ABST
    Figure CN119782568A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for managing a picture browsing sequence of a Kylin system. The method comprises the following steps of: acquiring a sorting mode of a catalogue required to be browsed in a file manager; obtaining picture information of each picture in a catalog needing to be browsed in a file manager, wherein the picture information comprises a picture name, a file size and modification time; and according to the obtained sorting mode and the picture information of each picture, sorting a picture browsing sequence in a catalog needing to be browsed, so that the sorted picture browsing sequence is consistent with a picture sequence displayed in the file manager, and generating a picture list according to the sorted picture browsing sequence. According to the method, the picture browsing sequence on the Kylin operating system and the picture display in the file manager can be kept consistent, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Kylin operating system, and in particular to a method and device for managing image browsing sequence of Kylin system. Background Art

[0002] Currently, the Kylin operating system is gradually improving its own ecosystem, including software adaptation, hardware compatibility, and user interface optimization, so that the user experience is gradually improved and user operations are becoming smoother and smoother. Image browsing control management is a function that urgently needs to be optimized and improved.

[0003] In Kylin OS, the file manager controls the display order of pictures in the directory and can sort them in different orders. For example, pictures can be sorted by name, modification date, file type, and file size in the file manager. However, pictures are often not sorted when browsing in Kylin OS. In fact, when browsing pictures, users prefer to browse in the same order as displayed in the file manager, rather than out of order. Browsing pictures out of order will not only reduce the efficiency of picture browsing, but also affect the user experience.

[0004] Chinese patent CN103024145B discloses a system, method and mobile terminal for browsing pictures on a mobile terminal, the system comprising: an input module for receiving picture browsing order instructions and picture deletion instructions input by a user; a picture browsing module for setting the browsing order according to the picture browsing order instructions, and when receiving the picture deletion instruction obtained by the input module, sending the next picture of the deleted picture to the display module for display according to the browsing order set before receiving the picture deletion instruction; a picture deletion module for deleting the corresponding picture stored in the mobile terminal according to the picture deletion instruction; and a display module for displaying the picture sent by the picture browsing module. However, the above method only records the browsing order of the pictures in advance, and still displays the next picture according to the browsing order after deleting the picture, so that when the user views the pictures from back to front, he will not browse the pictures that have been browsed before again due to interruption operations such as deletion, and still cannot make the browsing order consistent with that displayed in the file manager, thereby affecting the picture browsing efficiency and user experience. Summary of the invention

[0005] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a method and device for managing the browsing order of pictures in the Kylin system, which can ensure that the browsing order of pictures is consistent with the picture display in the file manager, facilitate users to browse pictures efficiently, and improve user experience.

[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:

[0007] A method for managing the order of browsing pictures in a Galaxy Kylin system, comprising the following steps:

[0008] Get the sorting mode of the directory to be browsed in the file manager;

[0009] Obtain the picture information of each picture in the directory to be browsed in the file manager, wherein the picture information includes the picture name, file size and modification time;

[0010] The browsing order of the pictures in the required browsing directory is sorted according to the acquired sorting method and the picture information of each picture, so that the sorted browsing order of the pictures is consistent with the order of the pictures displayed in the file manager, and a picture list is generated according to the sorted browsing order of the pictures.

[0011] Furthermore, the directory is sorted by file name, modification date, file type, and file size.

[0012] Furthermore, the method of obtaining the sorting method of the directories to be browsed in the file manager includes:

[0013] Determine whether the directory to be browsed uses a global sorting method, where the global sorting method uses a unified sorting method;

[0014] If it is determined that the global sorting method is used, the sorting method in the directory properties is obtained through gsettings;

[0015] If it is determined that the global sorting method is not used, the sorting method in the directory attributes is obtained through the gio interface;

[0016] The sorting methods in the directory attributes include file size, modification time in ascending order, and modification time in descending order.

[0017] Furthermore, the step of obtaining the picture information of each picture in the directory to be browsed in the file manager includes:

[0018] Traverse the image list of the directory to be browsed, obtain the GFileInfo type information of each image to form a GFileInfo information list;

[0019] Get the picture information of each picture according to the GFileInfo information list.

[0020] Further, the step of sorting the browsing order of the pictures in the directory to be browsed according to the acquired sorting mode and the picture information of each picture so that the sorted browsing order of the pictures is consistent with the order of the pictures displayed in the file manager includes:

[0021] Determine the type of sorting method obtained;

[0022] If the acquired sorting method is sorting by file name, enter the sorting by file name step, in which the picture names of two adjacent pictures are obtained in turn according to the GFileInfo type information and sorted according to the ascending or descending rule in the file manager;

[0023] If the acquired sorting method is sorting by modification time, enter the sorting by modification time step. In the sorting by modification time step, obtain the modification time of two adjacent pictures according to the GFileInfo type information and make a judgment. If the modification time of the two adjacent pictures is not equal, sort the two pictures according to the ascending or descending rule in the file manager, otherwise enter the sorting by picture name step;

[0024] If the obtained sorting method is to sort by picture size, enter the step of sorting by picture size. In the step of sorting by picture size, obtain the picture sizes of two adjacent pictures in turn according to the GFileInfo type information and make judgments. If the picture sizes of the two adjacent pictures are not equal, sort the two pictures according to the ascending or descending rules in the file manager, otherwise enter the step of sorting by picture name.

[0025] Furthermore, the step of sorting by file name also includes determining whether to set the specified language priority and whether the picture names of two adjacent pictures start with the specified language. If the specified language priority is set and there is a picture whose picture name starts with the specified language, the picture whose name starts with the specified language in the two adjacent file names is given priority.

[0026] Furthermore, the browsing order of pictures in the required directory is sorted by using the function std::sort(fileInfos.begin(), fileInfos.end(), Core::compareFileNames), wherein compareFileNames is a sorting function and the function is defined as bool compareFileNames(GFileInfo*left, GFileInfo*right), GFileInfo*left and GFileInfo*right respectively represent obtaining corresponding attribute values ​​according to the GFileInfo types of two adjacent pictures, and the attribute values ​​include file name, file size and modification time, and the return value of the function is determined according to the ascending or descending rules in the file manager.

[0027] A device for managing the order of browsing pictures in a Galaxy Kylin system, comprising:

[0028] The sorting mode acquisition module is used to obtain the sorting mode of the directory to be browsed in the file manager;

[0029] A picture information acquisition module, used to acquire the picture information of each picture in the directory to be browsed in the file manager, the picture information including the picture name, file size and modification time;

[0030] The browsing order sorting module is used to sort the browsing order of pictures in the required browsing directory according to the acquired sorting method and the picture information of each picture, so that the sorted picture browsing order is consistent with the picture order displayed in the file manager, and generate a picture list according to the sorted picture browsing order.

[0031] A computer device includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to execute the Kylin system and control and manage the image browsing order according to the above method.

[0032] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor.

[0033] Compared with the prior art, the advantage of the present invention is that when it is necessary to browse pictures in a certain directory, the present invention first obtains the sorting method of the target directory to be browsed in the file manager and the picture information of each picture in the target directory, and then sorts the picture browsing order according to the sorting method of the directory and the picture information of each picture, so that the sorted picture browsing order is consistent with the picture order displayed in the file manager, which can facilitate users to view pictures that are consistent with the order in the file manager in a timely manner, and makes the browsing order meet user expectations instead of being out of order, so that users can browse the pictures they want to see conveniently and efficiently, effectively solving user needs and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the implementation process of the method for managing the image browsing order of the Kylin system in this embodiment.

[0035] Figure 2 It is a schematic diagram of the implementation flow of obtaining the directory sorting method in a specific application embodiment of the present invention.

[0036] Figure 3 It is a schematic diagram of the implementation process of image information acquisition in a specific application embodiment of the present invention.

[0037] Figure 4 It is a schematic diagram of the implementation flow of executing the picture browsing sequence in a specific application embodiment of the present invention. DETAILED DESCRIPTION

[0038] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0039] The file manager is a program used to browse files and directories, and can also add, delete, modify, and query files, such as caja / nemo. The file manager in Kylin OS V10 is peony. Taking the image viewing software of Kylin OS V10 as an example, it usually only traverses all the images in the directory through QDir's entryList, puts them into the list images, and uses the default order as the browsing order. Therefore, the actual browsing order of images is inconsistent with the order displayed in the file manager. If the browsing order can be consistent with that displayed in the file manager, users can browse the images they want to see more conveniently and efficiently, thereby improving the user experience.

[0040] In order to make the image browsing order consistent with that displayed in the file manager, it is necessary to determine the rules for displaying images in the file manager. The present invention obtains the sorting mode of the target directory to be browsed in the file manager and the image information of each image in the target directory when it is necessary to browse images in a certain directory, and then sorts the image browsing order according to the sorting mode of the directory and the image information of each image, so that the sorted image browsing order is consistent with the image order displayed in the file manager, which can facilitate users to view images that are consistent with the order in the file manager in a timely manner, so that the browsing order meets user expectations instead of being out of order, so that users can browse the images they want to see conveniently and efficiently, effectively solving user needs and enhancing user experience.

[0041] The present invention is further described below by taking the application in Kylin system v10 as an example.

[0042] like Figure 1 As shown, the steps of the picture browsing order management method of the Kylin system in this embodiment include:

[0043] Step S01: Obtain the sorting method of the directory to be browsed in the file manager.

[0044] When you need to browse pictures in a directory, first obtain and record the sorting method of the directory. The sorting method of the directory includes sorting by file name, modification date, file type, file size, etc.

[0045] When global sorting is set in the file manager, each directory uses a unified sorting method, otherwise each directory has its own sorting method. Specifically, you can get the directory sorting method through gsettings and gio. gsettings is an API for processing configuration information in Qt applications, which provides a convenient way to read and write application configuration options. gio handles I / O operations by providing a simple, consistent and easy-to-use interface while hiding the specific details of the underlying file system.

[0046] As an optional implementation, the following steps may be used to obtain the sorting mode of the target directory to be browsed in the file manager:

[0047] Step S101. Determine whether the target directory uses a global sorting method, where a global sorting method uses a unified sorting method;

[0048] Step S102: If it is determined that the global sorting method is used, the sorting method in the directory attributes is obtained through gsettings;

[0049] Step S103: If it is determined that the global sorting method is not used, the sorting method in the directory attribute is obtained through the gio interface.

[0050] The sorting methods in the above directory attributes specifically include file size, modification time in ascending order, and modification time in descending order.

[0051] For example, the useGlobalDefaultSorting value obtained through gsettings represents whether global sorting is used, that is, whether each directory uses a unified sorting method. The g_file_info_get_attribute_string function of gio can be used to obtain the sorting method in the directory attributes, such as file size, modification time in ascending or descending order, etc.

[0052] The above method is further described below by taking the method of implementing the sorting of the directory in a specific application embodiment as an example. Figure 2 As shown, the detailed steps include:

[0053] The useGlobalDefaultSorting value obtained through gsettings indicates whether global sorting is used;

[0054] If global sorting is used, use gsettings to get the values ​​of sort-order and sort-column. A sort-order value of 0 represents descending order, and a value of 1 represents ascending order. A sort-column value of 0 represents sorting by name, a value of 1 represents sorting by modification date, a value of 2 represents sorting by type, and a value of 3 represents sorting by size.

[0055] If global sorting is not enabled, then use the gio interfaces g_file_query_info and g_file_info_get_attribute_string to get the values ​​of the directory metadata::sort-order, metadata::sort-column, and metadata::chinese-first attributes. The values ​​obtained above correspond to order, column, and use_default_name_sort_order, respectively. The default value of use_default_name_sort_order is true.

[0056] Step S02: Obtain the picture information of each picture in the target directory to be browsed in the file manager, the picture information including the picture name, file size, modification time, etc.

[0057] Since pictures may be sorted in different ways, such as by safe picture name, picture size, or modification time, etc., it is necessary to obtain the picture information of each picture so that the picture browsing order can be sorted in the required sorting mode in combination with the information of each picture.

[0058] As an optional method, you can first record the information of the GFileInfo type (GFileInfo* type) of each picture, and then use this type to cooperate with the gio interface to obtain the specific picture information of each picture. Specifically, the picture information of each picture in the directory to be browsed in the file manager can be obtained by the following steps:

[0059] Step S201. Traverse the image list of the directory to be browsed, obtain the GFileInfo type information of each image to form a GFileInfo information list;

[0060] Step S202. Obtain the picture information of each picture according to the GFileInfo information list.

[0061] For example, Figure 3As shown, you can use gio's g_file_query_info function to obtain GFileInfo type information to form a GFileInfo type information list, and then use the gio interface to obtain image information based on the GFileInfo type information list. Specifically, you can use QDir's entryListre to traverse all images in the directory and put them into the list images; then traverse each image in the directory, use gio's g_file_new_for_path and g_file_query_info functions to obtain GFileInfo* type information and put it into the list.

[0062] Step S03. Sort the image browsing order in the target directory according to the acquired sorting method and GFileInfo type information, so that the sorted image browsing order is consistent with the image order displayed in the file manager, and after traversing and acquiring the image name of each image in the target directory, display each image in the sorted image browsing order.

[0063] After obtaining the sorting method of the directory in the file manager (file name, modification time, file type, file size, etc.) and the specific image information of each image, you can sort the images according to different information of the images according to the rules of promotion and demotion to achieve the order of image browsing.

[0064] As an optional implementation, the following steps can be used to sort the browsing order of the pictures in the directory to be browsed according to the acquired sorting mode and picture information so that the sorted browsing order of the pictures is consistent with the order of the pictures displayed in the file manager:

[0065] Step S301. Determine the type of the acquired sorting method;

[0066] Step S302. If the acquired sorting method is sorting by file name, enter the sorting by file name step, in which the picture names of two adjacent pictures are obtained in turn according to the GFileInfo type information and sorted according to the ascending or descending rule in the file manager;

[0067] Step S303. If the acquired sorting method is sorting by modification time, enter the sorting by modification time step. In the sorting by modification time step, obtain the modification time of two adjacent pictures according to the GFileInfo type information and make a judgment. If the modification time of the two adjacent pictures is not equal, sort the two pictures according to the ascending or descending rule in the file manager, otherwise enter the sorting by picture name step;

[0068] Step S304. If the acquired sorting method is to sort by picture size, enter the step of sorting by picture size. In the step of sorting by picture size, obtain the picture sizes of two adjacent pictures in turn according to the GFileInfo type information and make judgments. If the picture sizes of the two adjacent pictures are not equal, sort the two pictures according to the ascending or descending rules in the file manager, otherwise enter the step of sorting by picture name.

[0069] Optionally, the step of sorting by file name also includes determining whether the specified language is given priority and whether the names of two adjacent pictures start with the specified language. If the specified language is given priority and there is a picture whose name starts with the specified language, the picture whose name starts with the specified language is given priority. For example, when sorting, it can be considered whether Chinese is given priority. If Chinese is given priority, for files of the same size, the sorting results can be returned according to leftStartWitchChinese&&! rightStartWitchChinese and leftStartWitchChinese&&! rightStartWitchChinese, respectively, so that the Chinese name will be ranked in the front.

[0070] In a specific application embodiment, the function std::sort(fileInfos.begin(), fileInfos.end(), Core::compareFileNames) can be used to sort the browsing order of pictures in the target directory, where compareFileNames is a custom sorting function and the function is defined as bool compareFileNames(GFileInfo*left, GFileInfo*right), GFileInfo*left and GFileInfo*right respectively represent obtaining the corresponding picture information (file name, file size, modification time, etc.) according to the GFileInfo type of two adjacent pictures, and determining the return value of the function according to the ascending or descending rules in the file manager.

[0071] The method of the present invention is further described below by taking the picture browsing sequence implemented in a specific application embodiment as an example. Figure 4 As shown, the detailed steps are:

[0072] (1) After obtaining the directory sorting column and the GFileInfo* type file information list, sort them through std::sort(fileInfos.begin(), fileInfos.end(), Core::compareFileNames). compareFileNames is a custom sorting function defined as bool compareFileNames(GFileInfo*left, GFileInfo*right). Left and right represent two adjacent file information pointers. For convenience, left and right in the flowchart represent a certain attribute value of two adjacent files (modification time, file type or file size, etc.).

[0073] (2) If column is 0, directly enter the step of sorting by name. The image name is obtained using g_file_info_get_display_name. If Chinese priority is not set or leftDisplayName and rightDisplayName do not start with Chinese, sort according to the default compare rule in QCollator. If order == 0, return comparer.compare(leftDisplayName,rightDisplayName)>0, otherwise return comparer.compare(leftDisplayName,rightDisplayName)<0. If Chinese priority is set and one of them is Chinese, true and false are returned according to leftStartWitchChinese&&! rightStartWitchChinese and leftStartWitchChinese&&! rightStartWitchChinese respectively.

[0074] (3) If column is 1, then enter the step of sorting by modification time. The modification times of left and right, leftModifiedTime and rightModifiedTime respectively, are obtained by g_file_info_get_attribute_uint64(left, "time::modified") and g_file_info_get_attribute_uint64(right, "time::modified"). When the modification times are not equal, if order == 0, then return leftModifiedTime > rightModifiedTime, otherwise return leftModifiedTime < rightModifiedTime. If the modification times are equal, then enter the step of sorting by picture name.

[0075] (4) If column is 2, then sort by picture type. If the types are the same, then enter the name sorting step. If the types are different, then return the comparison value of the two according to whether order is equal to 0. Among them, the picture type is obtained by g_file_info_get_content_type and g_content_type_get_description.

[0076] (5) If column is 3, then sort by picture size. If the sizes are the same, then enter the name sorting step. If the sizes are different, then return the comparison value of the two according to whether order is equal to 0. Among them, the picture size is obtained by getting the attribute value of "standard::size" using g_file_info_get_attribute_uint64.

[0077] Through the above sorting rules, then traverse and obtain the picture names from the sorted fileInfos, and the same picture browsing order as that displayed in the file manager can be obtained on the Galaxy Kylin operating system, achieving the effect that the picture browsing order is consistent with the display of the file manager, which can greatly improve the usage experience, and further more picture browsers suitable for user usage habits can be implemented.

[0078] This embodiment also provides a device for managing the picture browsing order of the Galaxy Kylin system, including:

[0079] A sorting method acquisition module, used to obtain the sorting method of the directory to be browsed in the file manager;

[0080] A picture information acquisition module, used to obtain the picture information of each picture in the directory to be browsed in the file manager, and the picture information includes the picture name, file size, and modification time;

[0081] The browsing order sorting module is used to sort the browsing order of pictures in the required browsing directory according to the acquired sorting method and the picture information of each picture, so that the sorted picture browsing order is consistent with the picture order displayed in the file manager, and generate a picture list according to the sorted picture browsing order.

[0082] The picture browsing order management device of the Kylin system in this embodiment corresponds one to one with the above-mentioned picture browsing order management method of the Kylin system, and will not be described one by one here.

[0083] The present invention can further realize a personalized picture viewing tool on the Kylin operating system according to actual needs, and in addition to being suitable for managing and controlling the order of picture browsing, it can also be suitable for sorting management of other types of files.

[0084] The present invention further provides a computer device, including a processor and a memory, the memory is used to store a computer program, and the processor is used to execute the computer program to execute the Kylin system and control and manage the image browsing order according to the above method.

[0085] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.

[0086] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0087] Those skilled in the art will appreciate that the above-mentioned embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0088] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for managing the order of browsing pictures in the Galaxy Kylin system, characterized in that the steps include: Get the sorting mode of the directory to be browsed in the file manager; Obtain the picture information of each picture in the directory to be browsed in the file manager, wherein the picture information includes the picture name, file size and modification time; The browsing order of the pictures in the required browsing directory is sorted according to the acquired sorting method and the picture information of each picture, so that the sorted browsing order of the pictures is consistent with the order of the pictures displayed in the file manager, and a picture list is generated according to the sorted browsing order of the pictures.

2. The method for managing the browsing order of pictures in the Kylin system according to claim 1 is characterized in that: The directory sorting method includes sorting by file name, modification date, file type, and file size.

3. The method for managing the image browsing sequence of the Kylin system according to claim 1 is characterized in that: The method of obtaining the order of directories to be browsed in the file manager includes: Determine whether the directory to be browsed uses a global sorting method, where the global sorting method uses a unified sorting method; If it is determined that the global sorting method is used, the sorting method in the directory properties is obtained through gsettings; If it is determined that the global sorting method is not used, the sorting method in the directory attributes is obtained through the gio interface; The sorting methods in the directory attributes include file size, modification time in ascending order, and modification time in descending order.

4. The method for managing the image browsing sequence of the Kylin system according to claim 1 is characterized in that: The step of obtaining the picture information of each picture in the directory to be browsed in the file manager includes: Traverse the image list of the directory to be browsed, obtain the GFileInfo type information of each image to form a GFileInfo information list; Get the picture information of each picture according to the GFileInfo information list.

5. The method for managing the image browsing sequence of the Kylin system according to claim 1 is characterized in that: The step of sorting the browsing order of the pictures in the directory to be browsed according to the acquired sorting mode and the picture information of each picture so that the sorted browsing order of the pictures is consistent with the order of the pictures displayed in the file manager includes: Determine the type of sorting method obtained; If the acquired sorting method is sorting by file name, entering into a sorting by file name step, in which the picture names of two adjacent pictures are acquired in sequence and sorted according to an ascending or descending rule in the file manager; If the acquired sorting method is sorting by modification time, the step of sorting by modification time is entered. In the step of sorting by modification time, the modification time of two adjacent pictures is sequentially obtained and judged. If the modification time of the two adjacent pictures is not equal, the two pictures are sorted according to the ascending or descending rule in the file manager. Otherwise, the step of sorting by picture name is entered; If the obtained sorting method is to sort by picture size, enter the step of sorting by picture size. In the step of sorting by picture size, obtain the picture sizes of two adjacent pictures in turn and make judgments. If the picture sizes of the two adjacent pictures are not equal, sort the two pictures according to the ascending or descending rules in the file manager, otherwise enter the step of sorting by picture name.

6. The method for managing the image browsing sequence of the Kylin system according to claim 5 is characterized in that: The step of sorting by file name also includes determining whether to set a specified language priority and whether the picture names of two adjacent pictures start with the specified language. If the specified language priority is set and there is a picture whose picture name starts with the specified language, the picture whose name starts with the specified language among the two adjacent file names is given priority.

7. The method for managing the browsing order of pictures in the Kylin system according to any one of claims 1 to 6, characterized in that: The browsing order of images in the required directory is sorted by using the function std::sort(fileInfos.begin(), fileInfos.end(), Core::compareFileNames), where compareFileNames is a sorting function and the function is defined as bool compareFileNames(GFileInfo*left, GFileInfo*right), GFileInfo*left and GFileInfo*right respectively represent obtaining the corresponding image information according to the GFileInfo type of two adjacent images, and determining the return value of the function according to the ascending or descending rules in the file manager.

8. A device for managing the browsing order of pictures in the Kylin system, characterized in that: include: The sorting mode acquisition module is used to obtain the sorting mode of the directory to be browsed in the file manager; A picture information acquisition module, used to acquire the picture information of each picture in the directory to be browsed in the file manager, the picture information including the picture name, file size and modification time; The browsing order sorting module is used to sort the browsing order of pictures in the required browsing directory according to the acquired sorting method and the picture information of each picture, so that the sorted picture browsing order is consistent with the picture order displayed in the file manager, and generate a picture list according to the sorted picture browsing order.

9. A computer device comprising a processor and a memory, wherein the memory is used to store a computer program, wherein: The processor is used to execute the computer program to execute the Kylin system and control and manage the image browsing order according to the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • System and method for browsing pictures by mobile terminal, and mobile terminal

    CN103024145B