A kind of management method of SP menus of mobile phones
Technical field
The present invention relates to a kind of mobile communication technology, particularly relate to the management method of a kind of mobile phone SP (Service Provider, service provider) menu.
Background technology
Nowadays, wireless communication technology is widely applied in daily life, and mobile telephone terminal is also popularized because of the convenience of its use.Mobile telephone terminal software design and development is the important step in the design of mobile terminal.Menu is a basic control in Software for Design, and the design of menu and management have accounted for very large workload in Software for Design, are one of them important steps.
Software Zhong, operator and cell phone manufacturer at mobile phone all can provide some SP menu services, for example, and weather forecast, mobile phone newspaper etc.It is basic identical that user operates these menus, and the service function being only to provide is different.In Software for Design, manage this menu now, generally adopt the method for static menu or list menu, each menu of this method will create a window and menu control, so not only waste resource, and size of code is also very large.If SP menu will be revised, the maintenance workload of code is also many.
Summary of the invention
The technical problem to be solved in the present invention is in order to overcome the defect of prior art, and a kind of management method of SP menus of mobile phones is provided, and it can save mobile phone resources, facilitates the management of menu, is convenient to the maintenance of code.
The present invention solves above-mentioned technical problem by following technical proposals: a kind of management method of SP menus of mobile phones, it is characterized in that, a SP menu comprises menu sign, Menu Type, menu level, father's menu sign, submenu number and menu parameter pointer, a plurality of SP menus build menu information administration queue, and the method comprises the following steps:
S1, user select to enter SP menu;
S2, establishment menu window and menu control;
The second-level menu of S3, initialization SP menu is searched all second-level menus in menu information administration queue, is loaded into menu control and is shown to user;
S4, user operation, if select of second-level menu, performs step S5, S6, S9 successively; If select to return to Previous Menu, perform step successively S7-S9;
S5, select in second-level menu;
The second-level menu item that S6, judgement user select is father's menu or function menu, if father's menu, enter its submenu: father's menu of searching all menus in menu information administration queue is designated all items of the menu sign of active user's selection, is re-loaded to menu control; If the second-level menu item that user selects is function menu, entered function window treatments;
S7, user select to turn back to Previous Menu;
S8, father's menu sign of searching the current set of menu item in menu information administration queue, find after father's menu sign menu item, searches in menu queue and identify identical all menu items and be re-loaded in menu control with father's menu, is Previous Menu;
S9, arbitration functions menu whether operated or step S8 in return to Previous Menu and whether operated, if so, finish, if not, turn back to step S4.
Preferably, described menu sign represents the current set of menu item.
Preferably, described father's menu sign represents the Previous Menu sign of the current set of menu item.
Preferably, described menu parameter pointer represents the parameter of the current set of menu item.
Preferably, described menu information administration queue shows menus at different levels.
Preferably, according to the information of menu in described menu information administration queue, the menu of same type is display management in same window.
Preferably, described SP menu represents with structure.
Preferably, it is in the current set of menu parameter pointer, to find functional description item that the function window in described step S6 is processed, and completes the operation of function menu.
Positive progressive effect of the present invention is: the present invention makes SP menu management mode more diversified, all menus with submenu can be managed realization in menu window, all function menus can, by the number with parameter, have corresponding function window to process.The present invention has avoided the processing mode of a window of a menu, window resource and control resource have been saved, reduced the code amount of writing, and if need not revise code in the time of the upgrading of SP menu services or modification, only need to revise menu management queue and corresponding menu parameter, facilitate maintenance and the upgrading of code.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the SP menu structure body that uses of the present invention.
Fig. 2 is the flow chart of the management method of SP menu of the present invention.
Embodiment
Below in conjunction with accompanying drawing, provide preferred embodiment of the present invention, to describe technical scheme of the present invention in detail.
As shown in Figure 1, SP menu represents with structure, and SP menu comprises menu sign, Menu Type, menu level, father's menu sign, submenu number and menu parameter pointer, and wherein menu sign represents the current set of menu item; Menu Type represents what menu the current set of menu item belongs to, and menu generally can be divided into father's menu, printenv function menu, band parameter function menu etc.; Menu level represents that what menu the current set of menu item is, such as second-level menu; Father's menu sign represents the Previous Menu sign of the current set of menu item; Submenu number represents if the number of the submenu of the current set of menu while having submenu; Menu parameter pointer represents some parameters of the current set of menu item, has demonstration text, menu function etc.According to a plurality of SP menus, build menu information administration queue, according to menu information administration queue, show menus at different levels, according to the information of menu in menu information administration queue, the menu of same type is display management in same window.
As shown in Figure 2, the concrete steps of the management method of SP menu of the present invention are as follows:
Step 101: user selects to enter SP menu;
Step 102: create menu window and menu control;
Step 103: the second-level menu of initialization SP menu, in menu information administration queue, search all second-level menus, be loaded into menu control and be shown to user;
Step 104: user operation, if select of second-level menu, performs step 105,106,109 successively; If select to return to Previous Menu, perform step successively 107-109;
Step 105: select in second-level menu;
Step 106: the second-level menu item that judgement user selects is father's menu or function menu, if father's menu, enter its submenu: father's menu of searching all menus in menu information administration queue is designated all items of the menu sign of active user's selection, is re-loaded to menu control.If the second-level menu item that user selects is function menu, entered function window treatments finds functional description item in the current set of menu parameter pointer, completes the operation of function menu;
Step 107: user selects to turn back to Previous Menu;
Step 108: father's menu sign of searching the current set of menu item in menu information administration queue, find after father's menu sign menu item, search in menu queue and identify identical all menu items and be re-loaded in menu control with father's menu, suppose be designated " identifying 2 " of father's menu, father's menu of father's menu is designated " identifying 1 ", search all father's menus in menu queue and be designated the menu item of " identifying 1 " and be re-loaded in menu control, be Previous Menu.
Step 109: arbitration functions menu whether operated or step 108 in return to Previous Menu and whether operated, if so, finish, if not, turn back to step 104.
In sum, all menus with submenu can be managed realization in menu window, and all function menus can, by the number with parameter, have corresponding function window to process.Avoided the processing mode of a window of a menu.Save window resource and control resource, reduced the code amount of writing.And if need not revise code in the time of the upgrading of SP menu or modification, only need to revise menu information administration queue and corresponding menu parameter, facilitate maintenance and the upgrading of code.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, do not deviating under the prerequisite of principle of the present invention and essence, can make various changes or modifications to these execution modes.Therefore, protection scope of the present invention is limited by appended claims.