Disclosure of Invention
In view of the above, the present invention provides a simple and efficient method and apparatus for quickly copying an object by using gestures.
Based on the above purpose, the method for quickly copying the object by using the gesture provided by the invention is applied to the electronic whiteboard software input by the touch device, and comprises the following steps:
detecting three-to-five point touch operation continuously input by a single hand of a user;
when all the point touch operations are within a preset time interval and a preset distance interval and all the point touch operations fall on the same editable object, entering a copy mode;
in the copy mode, after detecting a subsequent point touch operation acting on the editable object, copying and generating a copy of the editable object at the position of the subsequent point touch operation, and converting and identifying the subsequent point touch operation as a drag operation on the copy;
after entering the copy mode, the method further comprises the steps of: and displaying the editable object with a highlight effect until the copy mode is exited.
Preferably, the method further comprises the following steps: and when all the point touch operations falling on the editable object are completely finished, exiting the copy mode.
Preferably, after the drag operation is finished, if there is an overlapping portion between the copy and the position of the editable object, the copy is removed.
Preferably, when entering the copy mode, the method further includes the steps of: and restoring all touch operation effects triggered in the process of entering the copy mode.
Optionally, the highlighting effect display includes: flashing, edge highlighting, eye-catching overlay, or popping up an indicator box.
The invention also provides a device for quickly copying the object by using the gesture, which comprises:
the detection module is used for detecting the point touch operation of three to five points continuously input by a single hand of a user;
the starting module is used for entering a copying mode when all the point touch operations are within a preset time interval and a preset distance interval and all the point touch operations fall on the same editable object;
an execution module, configured to, in the copy mode, copy and generate a copy of the editable object at a position of a subsequent point touch operation after detecting the subsequent point touch operation performed on the editable object, and convert and recognize the subsequent point touch operation as a drag operation on the copy;
and the prompting module is used for displaying the editable object in a highlighting effect after the copying mode is entered until the copying mode is exited.
Preferably, the system further comprises an end module, configured to exit the copy mode when all the point touch operations falling on the editable object are completely ended.
Preferably, the execution module is further configured to, after the drag operation is finished, clear the copy if there is an overlapping portion between the copy and the editable object.
Preferably, the starting module is further configured to, when entering the copy mode, further include the steps of: and restoring all touch operation effects triggered in the process of entering the copy mode.
Optionally, the highlighting effect display includes: flashing, edge highlighting, eye-catching overlay, or popping up an indicator box.
From the above, the method and the device for quickly copying the object by using the gesture provided by the invention trigger the user to enter the copying mode by detecting the point touch operation of three to five points of the user falling on the same editable object; in a copy mode, detecting subsequent point touch operation on the editable object, directly generating a copy of the editable object, further identifying the subsequent point touch operation as a dragging operation on the copy, and enabling a user to drag the copy to other positions directly. Compared with the prior art, the method greatly simplifies the operation steps of copying the object, has simple, quick and easily realized whole processing process, and obviously improves the working efficiency of the user.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
The method and the device for quickly copying the object by using the gesture are applied to electronic whiteboard software input through touch equipment. The embodiment of the invention is applied to the courseware making process, and the teacher generates the electronic courseware by inserting and editing various editable objects on the electronic courseware editing page.
The electronic whiteboard software supports touch equipment input, and is generally a touch screen of an electronic whiteboard or a handheld terminal; and supports some commonly used gesture input operations such as: point touch dragging of objects, rotation of two-point touch, zooming of objects, sliding track display and the like.
Referring to fig. 1, a flowchart of a method for quickly copying an object by using a gesture according to an embodiment of the present invention is shown.
The method for quickly copying the object by using the gesture comprises the following steps:
step 101: detecting three-to-five point touch operation continuously input by a single hand of a user;
step 102: when all the point touch operations are within a preset time interval and a preset distance interval and all the point touch operations fall on the same editable object, entering a copy mode;
step 103: in the copy mode, after detecting a subsequent point touch operation acting on the editable object, copying and generating a copy of the editable object at the position of the subsequent point touch operation, and converting and identifying the subsequent point touch operation as a drag operation on the copy.
In step 101, a point touch operation of a user is detected, where the detection conditions are: the touch points are continuously input and the number is three to five, namely three, four or five touch points falling on the touch screen are detected, which are continuously input by the user. The lower limit of the number of point touch operations, i.e. the setting of three, is to distinguish from some common touch operations such as the point touch dragging object, the rotation of the two-point touch, the zooming object, and the like, so as to avoid the detection conflict and reduce the calculation amount of the detection processing. The upper limit of the number of point touch operations, namely five settings, is based on the operation habit of a human body, and the touch operation on the same object is generally finished by one hand, so that the operation by two hands is avoided, and the operation process is simplified.
In step 102, further determining the three-to-five point touch operations detected in step 101, and determining whether all the three-to-five point touch operations fall on the same editable object on the editing page in the electronic whiteboard software; and whether the time interval and the distance interval between any two consecutive point touch operations are both within a preset range. For the time interval, in the present embodiment, the preset time interval is 0-20 ms, that is, for any two consecutive point touch operations, the time difference between the two points touch on the touch screen does not exceed 20 ms; considering that the point touch operation gesture is operated by a single person, the point touch operation is completed by a single finger of a user, the operation is a relatively coherent action, a plurality of fingers press the same object, and a plurality of fingers can all fall on the touch screen in a short time. For the distance interval, in this embodiment, the preset distance interval is 0-20 pixels, that is, the difference between the distances between the points falling on the touch screen for any two consecutive point touch operations does not exceed 20 pixels; considering that the point touch operation gesture is operated by a single person, for the completion of point touch by a single finger of a user, points of a plurality of fingers falling on the touch screen are concentrated in a range. When the two determination results are yes, that is, all the point touch operations are within the preset time interval and distance interval and all fall on the same editable object, the copy mode is entered.
In step 103, in the copy mode, the editable object is continuously selected and fixed at the selected position without moving. And then further detecting whether a subsequent point touch operation, namely a subsequent point touch operation, acts on the editable object. When the subsequent point touch operation is detected, a copy of the editable object is directly generated at the falling position of the subsequent point touch operation, and meanwhile, the subsequent point touch operation is converted and recognized as a dragging operation acting on the copy, namely, the user continues to slide on the touch screen based on the falling position of the subsequent point touch operation, namely, the copy can be dragged to other positions on the editing page. After entering the copy mode, the method further comprises the following steps: and displaying the editable object with a highlight effect until the copy mode is exited.
In the copy mode, after completing a copy process, the subsequent touch operation of the user is detected continuously, and when the subsequent touch operation is detected again, the process of step 103 is repeated to realize the copy process of the plurality of editable objects.
In this embodiment, taking three-point touch operation as an example, the whole operation process of the user is as follows: and touching the touch screen by three fingers, and enabling all three points to fall on the same editable object on an editing page in the electronic whiteboard software, and then entering a copy mode. And the user continues to click and touch the touch screen, falls on the editable object, directly generates a copy of the editable object at the click position, slides on the touch screen by taking the click position as a starting point to realize the dragging of the copy, and drags the copy to a required position.
It can be seen that, with the method of this embodiment, the copy mode is triggered by the point touch operation, which is similar to "selecting" a target object, and then the target object is continuously selected, so as to quickly generate a copy, and drag the copy to a desired position.
Referring to fig. 2, a flowchart of a method for quickly copying an object by using a gesture according to another embodiment of the present invention is shown.
As another embodiment, the method for quickly copying the object by using the gesture comprises the following steps:
step 201: and detecting three-to-five point touch operation continuously input by a single hand of a user.
Step 202: and entering a copy mode when all the point touch operations are within a preset time interval and a preset distance interval and all the point touch operations fall on the same editable object.
Step 203: and restoring all touch operation effects triggered in the process of entering the copy mode.
When the touch screen enters the copy mode, the point touch operations sequentially fall on the touch screen, and meanwhile, because a finger falls on the touch screen and a small movement which is not easy to be perceived by a user occurs, in the process that the point touch operations sequentially fall, the point touch operations which fall first are likely to be recognized as other conventional gesture touch operations. For example, when the first point touch operation falls and slightly moves, the first point touch operation is recognized as a sliding track display gesture, and a small segment of track appears on the editable object; when the second point touch operation falls and slightly moves relative to the first point touch operation, the second point touch operation is recognized as a zooming gesture, and the editable object is zoomed. In order to avoid the above problem, in this step, all touch operation effects triggered in the process of entering the copy mode are restored, that is, the above moving and zooming effects are all cancelled.
Step 204: and after entering the copy mode, displaying the editable object with a highlight effect until exiting the copy mode.
In the copy mode, the editable object is selected as a copy target, and the position and the state of the editable object cannot be changed, so that in the step, after the copy mode is entered, the editable object is displayed with a highlight effect to prompt a user that the copy mode is entered currently. Specifically, the highlighting effect display includes: and the editable object is subjected to overall flashing, edge highlighting, eye-catching color covering or a pop-up indication box points to the editable object and the like, so that the editable object is obviously different from other editable objects, and a prompt effect is achieved.
Step 205: in the copy mode, after detecting a subsequent point touch operation acting on the editable object, copying and generating a copy of the editable object at the position of the subsequent point touch operation, and converting and identifying the subsequent point touch operation as a drag operation on the copy.
In this step, a further determination is made at the end of the drag operation, that is, it is determined whether there is an overlapping portion between the positions of the copy and the editable object at the end of the drag operation, and if there is an overlapping portion, the copy is erased. In the actual operation of the user, subsequent point touch operation may not be followed by dragging after the point touch operation falls down, or the dragging position is small, at this time, the copy will finally stay at the same position as the editable object, and the subsequent editing operation of the user may be affected.
Step 206: and when all the point touch operations falling on the editable object are completely finished, exiting the copy mode.
In this step, since there is a possibility that the point touch operation is terminated due to the shaking of the user's finger or the shaking of the touch screen device, the determination condition for exiting the copy mode is set to: all point touch operations that fall on the editable object in step 201 end.
The embodiment of the invention also provides a device for quickly copying an object by using a gesture, and the device is a schematic structural diagram of the device for quickly copying the object by using the gesture according to the embodiment of the invention with reference to fig. 3.
The device for quickly copying the object by utilizing the gesture comprises:
the detection module 301 is configured to detect a point touch operation of three to five points continuously input by a single hand of a user;
a starting module 302, configured to enter a copy mode when all the point touch operations are within a preset time interval and a preset distance interval and all the point touch operations fall on the same editable object;
an executing module 303, configured to, in the copy mode, copy and generate a copy of the editable object at a position of a subsequent point touch operation after the subsequent point touch operation acting on the editable object is detected, and convert and recognize the subsequent point touch operation as a drag operation on the copy.
In this embodiment, the apparatus further includes: an end module 304, configured to exit the alignment mode when all the point touch operations falling on the editable object are completely ended.
The executing module 303 is further configured to, after the dragging operation is finished, clear the copy if there is an overlapping portion between the copy and the editable object.
The starting module 302 is further configured to restore all touch operation effects triggered in the process of entering the copy mode when entering the copy mode.
Further, the device further comprises: a prompt module 305, configured to display the editable object with a highlight effect after entering the copy mode until exiting the copy mode. Specifically, the highlighting effect display includes: flashing, edge highlighting, eye-catching overlay, or popping up an indicator box.
Those of ordinary skill in the art will understand that: the invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.