Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for performing two-dimensional graphic layer drawing and event handling by using Qt

An event processing and two-dimensional map technology, applied in the direction of program control devices, etc., can solve the problems of non-penetration of event propagation and cumbersome two-dimensional layer drawing process, and achieve the effect of solving the cumbersome drawing process and simplifying the drawing process.

Active Publication Date: 2017-06-09
南京仁谷防务科技有限公司
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The technical problem mainly solved by the present invention is to provide a two-dimensional layer drawing and event processing method using Qt, which can effectively solve the problems of cumbersome Qt two-dimensional layer drawing process and impenetrable event propagation

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for performing two-dimensional graphic layer drawing and event handling by using Qt
  • Method for performing two-dimensional graphic layer drawing and event handling by using Qt

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, so as to define the protection scope of the present invention more clearly.

[0019] Embodiments of the present invention include the following steps:

[0020] 1. Layer drawing: classify the drawn layers, sort out the conditions that need to be provided for each type of drawing, after the drawing is completed, the layer will automatically adjust the size, and adjust the size to the minimum to enclose the drawn graphics. Then add this graphic to the layer drawing queue for managed management;

[0021] 2. Layer selection: click on any part of the layer to activate the layer; after the event is generated, the queue management module will hand over the event to the layer in the reverse direction of the enqueuing order. After t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for performing two-dimensional graphic layer drawing and event handling by using Qt. The method extracts out different basic graphic drawing conditions and combines with gesture operation, and the drawing process is simplified. State management is conducted on the drawn graphic layer. When multiple graphics having overlapped zones are drawn, coordinate mapping is conducted on selection points firstly, conversion from a global coordinate system to a graphic layer internal coordinate system is achieved, then the selection points are reversely transmitted to graphic layers according to a queue creating sequence, different position relation judging algorithms are automatically called according to the types of the graphic layers, and finally state switching is achieved. In addition, state tracking conducted on produced system events is supported, inter-layer transfer of the produced events is performed, whether the events are needed to be processed or not is judged by the graphic layers till the events are processed or neglected, and state tracking is completed at the moment. The problems of the complicated Qt two-dimensional graphic layer drawing process and non-penetrating event propagation are effectively solved by adopting the method.

Description

technical field [0001] The invention relates to the field of computer layer processing, in particular to a two-dimensional layer drawing and event processing method using Qt. Background technique [0002] Qt provides two drawing mechanisms, one is the GraphicsView mechanism, and the other is custom drawing graphics based on the QWidget widget. The former has implemented functions such as layer selection, event processing, and state management, but the latter has not provided them. This method is mainly aimed at enhancing the graphics drawing functions of the latter. [0003] The QWidget window is a rectangular, transparent window layer, which can be programmed to implement graphics drawing, event processing and other functions. However, in practical applications, the following problems will arise (such as figure 1 shown): [0004] 1. Layer drawing: When using QWidget to draw layers, it only provides general functions for drawing, but does not specify the drawing process, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 王卓妮
Owner 南京仁谷防务科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products