Nothing Special   »   [go: up one dir, main page]

CN107729107B - Modal dialog box processing method and device - Google Patents

Modal dialog box processing method and device Download PDF

Info

Publication number
CN107729107B
CN107729107B CN201710930590.1A CN201710930590A CN107729107B CN 107729107 B CN107729107 B CN 107729107B CN 201710930590 A CN201710930590 A CN 201710930590A CN 107729107 B CN107729107 B CN 107729107B
Authority
CN
China
Prior art keywords
modal dialog
dialog box
original
modal
parent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710930590.1A
Other languages
Chinese (zh)
Other versions
CN107729107A (en
Inventor
李从章
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710930590.1A priority Critical patent/CN107729107B/en
Publication of CN107729107A publication Critical patent/CN107729107A/en
Application granted granted Critical
Publication of CN107729107B publication Critical patent/CN107729107B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a modal dialog box processing method and a modal dialog box processing device, which are applied to the field of information processing, wherein the modal dialog box processing method comprises the following steps: if a related message for creating a new modal dialog box is received, acquiring the original modal dialog box and all father modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a brother dialog box of the original modal dialog box; hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box, and opening and displaying the created new modal dialog box after the original modal dialog box and all the parent modal dialog boxes are hidden, so that the technical problem that all modal dialog boxes are not operable when the brother modal dialog box is popped up in the prior art is solved.

Description

Modal dialog box processing method and device
Technical Field
The present invention relates to the field of information processing, and in particular, to a modal dialog processing method and apparatus.
Background
Generally, in Windows applications, dialogs are classified into modal dialogs and modeless dialogs. The difference between the two is whether the user is allowed to perform the operation of other objects when the dialog box is opened.
Modal dialogs mask user manipulation of other windows, so typically, i.e., manually, a program has only one modal dialog and its associated parent modal dialog present at the same time. During development, it is found that in a special case, a plurality of modal dialog boxes without parent-child relationship are popped up, namely, a plurality of sibling modal dialog boxes exist. Many problems can occur when a plurality of brother modal dialogs exist simultaneously, the newly popped modal dialog box can replace the previous modal dialog box to shield the user from operating the former modal dialog box, and if the newly popped modal dialog box is smaller than the previous modal dialog box, a mouse clicks the previous modal dialog box, the newly popped modal dialog box can hide behind the previous modal dialog box, so that all the modal dialog boxes cannot be operated, and the user cannot operate any window.
Disclosure of Invention
The embodiment of the invention provides a modal dialog box processing method and device, and solves the technical problem that each modal dialog box is inoperable when a brother modal dialog box is popped up in the prior art.
In a first aspect, an embodiment of the present invention provides a modal dialog processing method, including:
if a related message for creating a new modal dialog box is received, acquiring the original modal dialog box and all father modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a brother dialog box of the original modal dialog box;
hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box;
after the original modal dialog and all parent modal dialogs are hidden, opening and displaying the new modal dialog that has been created.
Optionally, after the opening and displaying the new modal dialog box that has been created, the method further includes:
if the closing message of the new modal dialog box is received, closing the new modal dialog box;
after the new modality dialog is closed, the original modality dialog and all parent modality dialogs of the original modality dialog are closed.
Optionally, the closing the original modal dialog and all parent modal dialogs of the original modal dialog includes:
closing the original modal dialog box;
and closing all the parent modal dialog boxes of the original modal dialog box in sequence according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box.
Optionally, the original modal dialog box is an active modal dialog box currently located at the topmost layer;
the acquiring the original modal dialog box and all parent modal dialog boxes of the original modal dialog box comprises:
acquiring and saving the active modal dialog box;
acquiring all father modal dialog boxes of the active modal dialog boxes through the active modal dialog boxes;
and saving all the acquired parent modal dialog boxes of the active modal dialog box.
Optionally, hiding the original modal dialog and all parent modal dialogs of the original modal dialog includes:
calling a hidden function of the original modal dialog box to hide the original modal dialog box;
after the original modal dialog box is hidden, sequentially calling respective hiding functions of all parent modal dialog boxes of the original modal dialog box according to the acquiring sequence of all parent modal dialog boxes of the original modal dialog box so as to sequentially hide all parent modal dialog boxes of the original modal dialog box.
In a second aspect, an embodiment of the present invention provides a modal dialog processing apparatus, including:
a dialog box obtaining unit, configured to obtain the original modal dialog box and all parent modal dialog boxes of the original modal dialog box if a related message for creating a new modal dialog box is received, where the new modal dialog box is a sibling dialog box of the original modal dialog box;
a hiding unit, configured to hide the original modal dialog and all parent modal dialogs of the original modal dialog;
and the opening unit is used for opening and displaying the created new modal dialog box after the original modal dialog box and all the father modal dialog boxes are hidden.
Optionally, the apparatus further comprises:
the first closing unit is used for closing the new modal dialog box if the closing message of the new modal dialog box is received;
and the second closing unit is used for closing the original modal dialog box and all the parent modal dialog boxes of the original modal dialog box after the new modal dialog box is closed.
The second closing unit is specifically configured to: closing the original modal dialog box; according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box, closing all the parent modal dialog boxes of the original modal dialog box in sequence;
the original modal dialog box is an active modal dialog box which is positioned at the topmost layer currently;
the dialog box obtaining unit is specifically configured to: acquiring and saving the active modal dialog box; acquiring all father modal dialog boxes of the active modal dialog boxes through the active modal dialog boxes; and saving all the acquired parent modal dialog boxes of the active modal dialog box.
Optionally, the hiding unit is specifically configured to:
calling a hidden function of the original modal dialog box to hide the original modal dialog box;
after the original modal dialog box is hidden, sequentially calling respective hiding functions of all parent modal dialog boxes of the original modal dialog box according to the acquiring sequence of all parent modal dialog boxes of the original modal dialog box so as to sequentially hide all parent modal dialog boxes of the original modal dialog box.
In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps described in any one of the implementation manners in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps described in any of the embodiments of the first aspect when executing the program.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
if the related information for creating the new modal dialog box is received, acquiring the original modal dialog box and all father modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a brother dialog box of the original modal dialog box; hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box; after the original modal dialog and all parent modal dialogs are hidden, the new modal dialog that has been created is opened and displayed. Therefore, before the new modal dialog box is opened, the dialog box which has no parent-child relationship with the new modal dialog box, namely the brother dialog box, is hidden but not closed, so that the display execution function of the original modal dialog box can not return at the moment, namely, a window closing message is not required to be sent to the currently displayed original modal dialog box, message blocking can not be caused, and the original modal dialog box object is not closed, so that the program is not destroyed, the technical problem that each modal dialog box is not operable when the brother modal dialog box is popped up is effectively solved, and the popped modal dialog box is ensured to be operable.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a modal dialog processing method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a modal dialog processing apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a modal dialog box processing method and a modal dialog box processing device, solves the technical problem that each modal dialog box is inoperable when a brother modal dialog box is popped up in the prior art, and solves the technical problems by adopting the technical scheme of the embodiment of the invention, and the general idea is as follows:
if the other sibling modal dialog currently displayed is closed before the new modal dialog is opened. Because the modal dialog is synchronously blocked, that is, the display function of the current modal dialog waits to return, and the window closing message needs to be sent when the synchronous display function returns, even if the closing message is sent to the current modal dialog immediately, the message is still blocked after the new modal dialog is opened. If the current modal dialog box is built on the heap through the new function, the delete is used for destroying when the dialog box is closed, and after the new modal dialog box is closed, the original modal dialog box returns to continue execution, but because the dialog box object is destroyed before, the program is crashed due to the memory problem; if the memory is not destroyed when the memory is closed, the memory may leak.
If the embodiment of the invention receives the related information for creating the new modal dialog box, the original modal dialog box and all father modal dialog boxes of the original modal dialog box are obtained, and the new modal dialog box is the brother dialog box of the original modal dialog box; hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box; after the original modal dialog and all parent modal dialogs are hidden, the new modal dialog that has been created is opened and displayed.
Through the technical scheme, the dialog box which has no parent-child relationship with the new modal dialog box, namely the brother dialog box, can be hidden before the new modal dialog box is opened, and because the dialog box is just hidden but not closed, the display execution function of the original modal dialog box can not return at the moment, namely, the window closing message does not need to be sent to the currently displayed original modal dialog box, message blocking can not be caused, and because the original modal dialog box object is not closed, the dialog box is not destroyed, the program crash can not be caused, the technical problem that each modal dialog box is not operable when the brother modal dialog box is popped up is effectively solved, and the popped up modal dialog box is ensured to be operable.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, a modal dialog processing method according to an embodiment of the present invention includes the following steps:
s101, if relevant information for creating a new modal dialog box is received, acquiring the original modal dialog box and all parent modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a sibling dialog box of the original modal dialog box.
The new modal dialog box is a brother dialog box of the original modal dialog box, and the new modal dialog box is characterized in that no parent-child relationship exists between the new modal dialog box and the original modal dialog box.
Specifically, the related message may be: the receipt of the process of creating a new modal dialog causes the currently displayed original modal dialog to generate an abnormal signal, e.g., the logged-in user corresponding to the original modal dialog is squeezed out and a related signal is received. Specifically, a client program that needs to be authenticated by the server logs in using the account number, and then opens a setup window, which is a modal dialog. At this time, the login window of another client program uses the same account number to log in, if the subsequent login window is a modal dialog window, the subsequent login window and the setting window on the previous client program are brother dialog boxes, and at this time, the login user on the previous client program may be squeezed out and related information is prompted. Then step S101 is executed to acquire the original modal dialog box and all parent modal dialog boxes of the original modal dialog box. Specifically, a setting window on a previous client program and a parent window of the setting window are obtained.
It should be noted that, if the slot function connected to the relevant signal receives the relevant signal, for example, if the relevant signal extruded by the login user corresponding to the client program is received, the situation that a new modal dialog box needs to be displayed is processed in the slot function connected to the relevant signal, and then the subsequent steps S102 to S104 are specifically executed in the slot function connected to the relevant signal.
Specifically, the currently displayed original modal dialog box is the topmost active modal dialog box. Correspondingly, if the original modal dialog box and all parent modal dialog boxes of the original modal dialog box are obtained, S101 specifically includes the following steps:
first, step S1011 is executed: and acquiring and saving the active modal dialog box currently displayed at the topmost layer.
Specifically, if there is an active modality dialog currently displayed at the topmost layer, step S1012 is then performed, otherwise step S103 is performed.
In the specific implementation process, the QWIDGet type object of the modal window corresponding to the active modal dialog box displayed at the top layer at present is obtained through the QAPPLICATION. And judging whether the value of the QWIdget type object of the modal window is 0, if so, indicating that no active modal dialog box displayed at the topmost layer exists currently, and if not, indicating that the active modal dialog box displayed at the topmost layer exists currently. If there is an active modal dialog currently displayed at the top level, the modal window QWIdget type object of the active modal dialog currently displayed at the top level is saved.
Step S1012: all parent modal dialogs of an active modal dialog are obtained through the active modal dialog currently displayed at the topmost level.
Specifically, each parent modal dialog box of the original modal dialog box is sequentially acquired from near to far according to the parent-child relationship with the original modal dialog box.
In the specific implementation process, the acquiring of the parent modal dialog box comprises the following steps:
step 1, acquiring a parent window object corresponding to a parent modal dialog box of the active modal dialog box currently displayed at the topmost layer through a parent member function parent of a modal window QWIDGet type object of the active modal dialog box currently displayed at the topmost layer, and entering step 5 if the return value of the parent member function parent is 0, indicating that the active modal dialog box currently displayed at the topmost layer does not have the parent modal dialog box; if the return value of parent function parent is not 0, it indicates that the active modal dialog box currently displayed at the top layer, and then step 2 is entered.
It should be noted that the QWidget class is a base class of all user interface objects, all UI class objects on the Qt program are inherited by the QWidget class, and the QWidget class is inherited by the QObject class, wherein the parent window object of the active-mode dialog box previously displayed at the topmost layer is a QObject type object.
Step 2, judging whether the parent window object of the active modal dialog box displayed at the topmost layer is a window component or not through an isWidgetType member function of a QObject type, and if not, entering step 5; if yes, the parent window object of the active mode dialog box displayed at the topmost layer is forcedly converted into a QWIdget type object by the QObject type object, and then the step 3 is carried out.
Step 3, judging whether the father window object is a modal dialog box or not through the isomodal member function of the father window object which is the QObject type object, and entering step 5 if not; if yes, entering step 4;
and 4, storing the parent window object which is the QObject type object, acquiring a parent mode window directly related to the parent window object which is the QObject type object, and returning to the step 2.
Step 5, the loop is exited, whereby the active modality dialog and all parent modalities of the active modality dialog are acquired, and step S1013 is performed.
Step S1013: the retrieved active modality dialog and all parent modality dialogs of the active modality dialog are saved.
After step S101, step S102 is then performed: hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box.
Specifically, the original modal dialog box is hidden first, and then all parent modal dialog boxes of the original modal dialog box are hidden, wherein the hiding sequence of the parent modal dialog boxes is the same as the acquiring sequence of the parent modal dialog boxes.
In the following, a specific embodiment of hiding the original modal dialog and all parent modal dialogs of the original modal dialog is given, which includes:
hiding the original modal dialog box by calling a hidden function hide of the original modal dialog box; after the original modal dialog box is hidden, according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box, the respective hiding functions of all the parent modal dialog boxes are called in sequence, and therefore all the parent modal dialog boxes of the original modal dialog box are hidden in sequence.
After step S102, step S103 is then performed: after the original modal dialog and all parent modal dialogs are hidden, the new modal dialog that has been created is opened and displayed.
The synchronization function is called to open the new modal dialog box, and the calling of the synchronization function prevents the subsequent steps from being executed continuously, so that the subsequent steps are executed continuously until the displayed new modal dialog box is closed, for example, the step S104 is executed after the displayed new modal dialog box is closed.
Or after the displayed new modal dialog box is closed, the hidden original modal dialog box and the parent modal dialog box of the original modal dialog box can be displayed.
In conjunction with the foregoing embodiment, the present embodiment provides step S104 after the new modal dialog is opened and displayed, so that after the displayed new modal dialog is closed, the hidden original modal dialog and all parent dialogs of the original modal dialog are no longer displayed, thereby maintaining the consistency of the application.
Step S104, if the closing message of the new modal dialog box is received, closing the new modal dialog box; after the new modal dialog is closed, the original modal dialog and all parent modal dialogs of the original modal dialog are closed.
Specifically, the original modal dialog box is closed first, and then all parent modal dialog boxes of the original modal dialog box are closed, and the closing sequence of each parent modal dialog box is the same as the acquiring sequence of the parent modal dialog box.
In the specific implementation process, the process of closing the original modal dialog box and each parent modal dialog box of the original modal dialog box specifically includes: and closing the original modal dialog box, and after the original modal dialog box is in a closed state, closing all the parent modal dialog boxes of the original modal dialog box in sequence according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box.
Specifically, the hidden original modal dialog boxes are closed by calling the close functions of the original modal dialog boxes, and then the close functions of the parent modal dialog boxes are sequentially called according to the acquisition sequence of the parent modal dialog boxes, so that the parent modal dialog boxes are sequentially closed.
According to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box, the mode of closing all the parent modal dialog boxes of the original modal dialog box in sequence avoids the situation that the parent window is destroyed and the child window still exists, and further avoids application program collapse caused by memory problems.
Based on the same inventive concept, an embodiment of the present invention provides a modal dialog processing apparatus, which is shown in fig. 2 and includes:
a dialog box obtaining unit 201, configured to obtain the original modal dialog box and all parent modal dialog boxes of the original modal dialog box if a related message for creating a new modal dialog box is received, where the new modal dialog box is a sibling dialog box of the original modal dialog box;
a hiding unit 202, configured to hide the original modal dialog and all parent modal dialogs of the original modal dialog;
and the opening unit 203 is used for opening and displaying the created new modal dialog box after the original modal dialog box and all the parent modal dialog boxes are hidden.
In combination with the foregoing embodiment, in another embodiment, the apparatus further includes:
the first closing unit is used for closing the new modal dialog box if a closing message of the new modal dialog box is received;
and the second closing unit is used for closing the original modal dialog box and all the parent modal dialog boxes of the original modal dialog box after the new modal dialog box is closed.
The second closing unit is specifically configured to: closing the original modal dialog box; according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box, closing all the parent modal dialog boxes of the original modal dialog box in sequence;
the original modal dialog box is an active modal dialog box at the topmost layer currently;
the dialog box obtaining unit 201 is specifically configured to: acquiring and saving an active modal dialog box; acquiring all father modal dialog boxes of the active modal dialog boxes through the active modal dialog boxes; all parent modal dialogs of the retrieved active modal dialog are saved.
In an embodiment, the hiding unit 202 is specifically configured to:
calling a hidden function of the original modal dialog box to hide the original modal dialog box;
after the original modal dialog box is hidden, respective hiding functions of all the parent modal dialog boxes of the original modal dialog box are called in sequence according to the acquiring sequence of all the parent modal dialog boxes of the original modal dialog box, and the parent modal dialog boxes of the original modal dialog box are hidden in sequence.
The detailed implementation of the apparatus in the present embodiment and its various modifications can be understood by those skilled in the art, so that the detailed description of how the apparatus implements the modal dialog processing method embodiment of the present invention is not provided here. The scope of the present invention is intended to cover the apparatus used by those skilled in the art to implement the modal dialog processing method of the present invention.
Based on the same inventive concept, referring to fig. 3, an embodiment of the present invention provides a computer-readable storage medium 301, on which a computer program 302 is stored, where the program 302, when executed by a processor, implements the steps of any of the foregoing modal dialog processing method embodiments.
Based on the same inventive concept, the embodiment of the present invention provides a computer device 400, which is shown in fig. 4 and includes a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and running on the processor 420, wherein when the processor 420 executes the computer program 411, the steps of any embodiment of the modal dialog processing method embodiment are implemented.
One or more embodiments of the invention provide at least the following technical effects or advantages:
if the related message for creating the new modal dialog box is received, acquiring the original modal dialog box and all father modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a brother dialog box of the original modal dialog box; hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box; after the original modal dialog and all parent modal dialogs are hidden, the new modal dialog that has been created is opened and displayed. Therefore, before the new modal dialog box is opened, the dialog box which has no parent-child relationship with the new modal dialog box, namely the brother dialog box, is hidden but not closed, so that the display execution function of the original modal dialog box can not return at the moment, namely, a window closing message is not required to be sent to the currently displayed original modal dialog box, message blocking can not be caused, and the original modal dialog box object is not closed, so that the program is not destroyed, the technical problem that each modal dialog box is not operable when the brother modal dialog box is popped up is effectively solved, and the popped modal dialog box is ensured to be operable.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A modal dialog processing method, comprising:
if a related message for creating a new modal dialog box is received, acquiring an original modal dialog box and all father modal dialog boxes of the original modal dialog box, wherein the new modal dialog box is a brother dialog box of the original modal dialog box;
hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box;
after the original modal dialog and all parent modal dialogs are hidden, opening and displaying the new modal dialog that has been created.
2. The modal dialog box processing method of claim 1 wherein after said opening and displaying of said new modal dialog box that has been created, said method further comprises:
if the closing message of the new modal dialog box is received, closing the new modal dialog box;
after the new modality dialog is closed, the original modality dialog and all parent modality dialogs of the original modality dialog are closed.
3. The modal dialog processing method of claim 2 wherein said closing said original modal dialog and all parent modal dialogs of said original modal dialog comprises:
closing the original modal dialog box;
and closing all the parent modal dialog boxes of the original modal dialog box in sequence according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box.
4. A modal dialog box processing method according to claim 3, wherein the original modal dialog box is an active modal dialog box currently at the topmost level;
the acquiring of the original modal dialog and all parent modal dialogs of the original modal dialog includes:
acquiring and saving the active modal dialog box;
acquiring all father modal dialog boxes of the active modal dialog boxes through the active modal dialog boxes;
and saving all the acquired parent modal dialog boxes of the active modal dialog box.
5. A modal dialog box processing method according to claim 4, wherein said hiding the original modal dialog box and all parent modal dialog boxes of the original modal dialog box comprises:
calling a hidden function of the original modal dialog box to hide the original modal dialog box;
after the original modal dialog box is hidden, sequentially calling respective hiding functions of all parent modal dialog boxes of the original modal dialog box according to the acquiring sequence of all parent modal dialog boxes of the original modal dialog box so as to sequentially hide all parent modal dialog boxes of the original modal dialog box.
6. A modal dialog processing apparatus, comprising:
a dialog box obtaining unit, configured to obtain an original modal dialog box and all parent modal dialog boxes of the original modal dialog box if a related message for creating a new modal dialog box is received, where the new modal dialog box is a sibling dialog box of the original modal dialog box;
a hiding unit, configured to hide the original modal dialog and all parent modal dialogs of the original modal dialog;
and the opening unit is used for opening and displaying the created new modal dialog box after the original modal dialog box and all the parent modal dialog boxes are hidden.
7. The modal dialog processing apparatus of claim 6 wherein said apparatus further comprises:
the first closing unit is used for closing the new modal dialog box if the closing message of the new modal dialog box is received;
a second closing unit, configured to close the original modal dialog box and all parent modal dialog boxes of the original modal dialog box after the new modal dialog box is closed;
the second closing unit is specifically configured to: closing the original modal dialog box; according to the acquisition sequence of all the parent modal dialog boxes of the original modal dialog box, closing all the parent modal dialog boxes of the original modal dialog box in sequence;
the original modal dialog box is an active modal dialog box which is positioned at the topmost layer currently;
the dialog box obtaining unit is specifically configured to: acquiring and saving the active modal dialog box; acquiring all father modal dialog boxes of the active modal dialog boxes through the active modal dialog boxes; and saving all the acquired parent modal dialog boxes of the active modal dialog box.
8. The modal dialog processing apparatus of claim 7, wherein the hiding unit is specifically configured to:
calling a hidden function of the original modal dialog box to hide the original modal dialog box;
after the original modal dialog box is hidden, sequentially calling respective hiding functions of all parent modal dialog boxes of the original modal dialog box according to the acquiring sequence of all parent modal dialog boxes of the original modal dialog box so as to sequentially hide all parent modal dialog boxes of the original modal dialog box.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 5.
10. A computer device having a computer program stored thereon, characterized in that the program, when being executed by a processor, carries out the method of any one of claims 1-5.
CN201710930590.1A 2017-10-09 2017-10-09 Modal dialog box processing method and device Expired - Fee Related CN107729107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710930590.1A CN107729107B (en) 2017-10-09 2017-10-09 Modal dialog box processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710930590.1A CN107729107B (en) 2017-10-09 2017-10-09 Modal dialog box processing method and device

Publications (2)

Publication Number Publication Date
CN107729107A CN107729107A (en) 2018-02-23
CN107729107B true CN107729107B (en) 2021-02-02

Family

ID=61208774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710930590.1A Expired - Fee Related CN107729107B (en) 2017-10-09 2017-10-09 Modal dialog box processing method and device

Country Status (1)

Country Link
CN (1) CN107729107B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078540B (en) * 2019-11-29 2023-03-07 四川九洲空管科技有限责任公司 QT-development-based universal aviation flight service software memory anomaly detection and positioning method
CN116266126A (en) * 2021-12-17 2023-06-20 北京字跳网络技术有限公司 Control method, device, equipment and storage medium of modal window

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147736A (en) * 2010-02-10 2011-08-10 华为技术有限公司 Method and device for installing software
US20120216134A1 (en) * 2011-02-18 2012-08-23 Nuance Communications, Inc. Latency Hiding Techniques for Multi-Modal User Interfaces
CN103430132A (en) * 2010-10-01 2013-12-04 Flex Electronics ID Co.,Ltd. Modals in dual display communication device
CN103718161A (en) * 2011-07-26 2014-04-09 苹果公司 Web application architecture
US20170242567A1 (en) * 2016-02-24 2017-08-24 Microsoft Technology Licensing, Llc Transparent Messaging

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147736A (en) * 2010-02-10 2011-08-10 华为技术有限公司 Method and device for installing software
CN103430132A (en) * 2010-10-01 2013-12-04 Flex Electronics ID Co.,Ltd. Modals in dual display communication device
US20120216134A1 (en) * 2011-02-18 2012-08-23 Nuance Communications, Inc. Latency Hiding Techniques for Multi-Modal User Interfaces
CN103718161A (en) * 2011-07-26 2014-04-09 苹果公司 Web application architecture
US20170242567A1 (en) * 2016-02-24 2017-08-24 Microsoft Technology Licensing, Llc Transparent Messaging

Also Published As

Publication number Publication date
CN107729107A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
CN110020323B (en) Page switching method and system for hybrid application, computer equipment and storage medium
US10949154B2 (en) Systems and methods for using screen sampling to detect display changes
WO2016155388A1 (en) Method and device for installing and running application
CN106383712B (en) Toast component implementation method and system
US20160366248A1 (en) System, method, and device for remotely operating a server
US10565105B2 (en) Method and apparatus for logging out of application
US11467717B2 (en) Optimizing window resize actions for remoted applications
US20170168653A1 (en) Context-driven, proactive adaptation of user interfaces with rules
EP2859452A2 (en) Visualized code review
US9286142B2 (en) Methods and systems for supporting a rendering API using a runtime environment
US10540150B2 (en) Composable context menus
CN105183457A (en) Method and device for monitoring interface life cycle callback
CN107729107B (en) Modal dialog box processing method and device
CN111143019B (en) Control method and system for popup window of mobile terminal
US9037994B2 (en) Navigation to a data definition in a diff context
CN115309516A (en) Application life cycle detection method and device and computer equipment
CN110442499A (en) Test, the method and apparatus for improving page response performance, terminal device
CN108228126B (en) Screen projection control method and device, electronic terminal and readable storage medium
CN106610830B (en) Page element drag-and-drop method and device
CN109819329B (en) Window display method and smart television
CN110673921A (en) Information processing method and device and electronic equipment
CN115688102A (en) Window processing method and device, processor and electronic equipment
US20140237368A1 (en) Proxying non-interactive controls to enable narration
CN115129444A (en) Application program display method and device and computer readable storage medium
CN114356299A (en) Event arrangement method and device in page building process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210202

CF01 Termination of patent right due to non-payment of annual fee