Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Life cycle in UML sequence Diagram drawn by EA

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "EA drawing UML sequence chart example analysis of the life cycle", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "EA draw UML sequence chart in the life cycle example analysis" this article.

In real programs, processes that control the life cycle of objects such as creating and deleting objects can be said to be everywhere.

Create object

The following is an example of creating a new object by double-clicking the mouse in the graphics editing software.

Processing flow:

The user double clicks the mouse.

Framework generates QMouseEvent and sends it to DrawerView

DrawerView gets the mouse position from the MouseEvent

Call the clone method of the current shape

Create a new drawing in the clone method.

Set the mouse position to the location of the new drawin

Log in the new drawing to DrawerData

Drawing method

Open the properties dialog box of the message for creating a new drawing in the clone method, and select [Leftcycle] as [New]. Although it is not necessary, in order to clearly express the designer's purpose, you can also set the [Sterotype] option to [create].

Delete object

Next, take the user pressing the Delete key in the graphics editing software to delete the current object as an example.

Processing flow

User presses Delte key

Framework will generate QKeyEvent and send it to DrawView

DrawView removes m_currentShape from DrawerData

Delete m_currentShape object

Set m_currentShape to a null pointer

Drawing method

Open the properties dialog box for deleting graphic messages and select [Leftcycle] as [Delete]. Although it is not necessary, in order to clearly express the designer's purpose, you can also set the [Sterotype] option to [destroy].

Current situation of QtDrawer

Because the class diagram and the sequence diagram are linked, when we complete the above sequence diagram, the class diagram looks like the following.

The above is all the content of the article "sample Analysis of Life cycle in EA drawing UML sequence Chart". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report