Legender name editing method and device, drawing system, electronic equipment and medium

By generating an edit box in the legend area of ​​the QCustomPlot drawing library, users are allowed to edit the curve name without changing the original curve, which solves the problem of inconvenient operation in the existing technology and realizes convenient legend name editing operations.

CN119559298APending Publication Date: 2025-03-04CHENGDU GONGDING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411627371.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, the legend area in the QCustomPlot drawing library cannot edit the curve name without changing the original curve, which is inconvenient to operate.

Method used

By responding to the signal that the target legend is selected, an edit box is generated at the location of the target legend, and the edit box covers at least the target legend; the initial name of the target legend in the editable state is displayed in the edit box; and in response to the signal that edited the initial name, the name of the edited legend is displayed in the edit box.

Benefits of technology

It realizes the convenient operation of directly editing the curve name in the legend area, without deleting the original curve, and the operation is simple and convenient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559298A_ABST
    Figure CN119559298A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a legend name editing method and device, a drawing system, electronic equipment and a medium so as to achieve convenient operation of legend names. The method comprises the steps that in response to a signal that a target legend is selected, an edit box is generated at the position where the target legend is located, and the edit box at least covers the target legend; displaying an initial name of the target legend in the editable state in an edit box; and in response to a signal that the initial name is edited, displaying the edited legend name in the edit box. According to the legend name editing method provided by the embodiment of the invention, the legend name editing operation can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of drawing technology, and in particular to a method, device, drawing system, electronic equipment and medium for editing a legend name. Background Art

[0002] QCustomPlot is a high-performance drawing library for the Qt framework, which is widely used in data visualization and scientific computing projects. QCustomPlot has an area in the upper right corner of the canvas area that displays the data curve, which is used to display the name, color style and other information of the data curve. This area is usually called the legend. After a curve is generated in the canvas area, a line is added to the legend area accordingly, and its content contains the default name of the curve, but the curve name cannot be modified in the legend area.

[0003] In the prior art, when creating a curve, a user-defined curve name is provided. If the curve name needs to be modified, a new curve needs to be created again, and the operation method is not convenient enough. Summary of the invention

[0004] In order to solve the above problems in the prior art, an embodiment of the present invention provides a legend name editing method, device, drawing system, electronic device and medium to achieve convenient operation of legend name editing.

[0005] According to a first aspect of an embodiment of the present application, a method for editing a legend name is provided, the method comprising:

[0006] In response to a signal that a target legend is selected, an edit box is generated at the location of the target legend, and the edit box at least covers the target legend;

[0007] Display the initial name of the target legend in the editable state in the edit box;

[0008] In response to a signal indicating that editing of the initial name is completed, the edited legend name is displayed in the edit box.

[0009] In one embodiment, in response to a signal that a target legend is selected, generating an edit box at a location where the target legend is located includes:

[0010] Determine the height of the edit box based on the height of the initial name;

[0011] Determine the length of the edit box based on the length of the initial name;

[0012] Generate an edit box at the location of the target legend based on the height and length of the edit box.

[0013] In one embodiment, generating an edit box at the location of the target legend according to the height and length of the edit box includes:

[0014] Get the coordinate point of the upper left corner of the target legend;

[0015] Get the length of non-text in the target legend;

[0016] Generate an edit box based on the coordinates of the upper left corner of the target legend, the length of the non-text, and the length and height of the edit box. The edit box is an opaque layer.

[0017] In one embodiment, the height of the edit box is the same as the height of the target legend, and the length of the edit box is the same as the length of the target legend.

[0018] In one embodiment, before the edit box displays the edited legend name, the method further includes:

[0019] Determine whether the edited legend name is consistent with the initial name, and obtain the determination result;

[0020] If the judgment result indicates that the edited legend name is inconsistent with the initial name, the edited legend name is displayed in the edit box;

[0021] If the judgment result indicates that the edited legend name is consistent with the initial name, the edit box is deleted.

[0022] In one embodiment, after the edit box displays the edited legend name, the method further includes:

[0023] Hide the edit box border.

[0024] In one embodiment, the initial name of the legend in the editable state is displayed in the edit box, including:

[0025] Get the item element pointer of the target legend;

[0026] Determine the initial name of the legend based on the project element pointer;

[0027] The initial name of the target legend is displayed in the edit box.

[0028] According to a second aspect of an embodiment of the present application, a device for editing a legend name is provided, the device comprising:

[0029] A generating unit, configured to generate an edit box at the location of the target legend in response to a signal that the target legend is selected, wherein the edit box at least covers the target legend;

[0030] An editing unit, used to display the initial name of the target legend in the editable state in the edit box;

[0031] The display unit is used to display the edited legend name in the edit box in response to the signal that the editing of the initial name is completed.

[0032] According to a third aspect of an embodiment of the present application, a drawing system is provided, the system comprising: a legend area control subsystem, the legend area control subsystem being used to execute a legend name editing method as in the first aspect or any possible implementation of the first aspect.

[0033] According to a fourth aspect of the embodiments of the present application, an electronic device is provided, the electronic device comprising: a memory and a processor;

[0034] The memory is connected to the processor and is used for storing programs;

[0035] The processor is used to implement the legend name editing method in the first aspect or any possible implementation of the first aspect by running the program in the memory.

[0036] According to a fifth aspect of an embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the legend name editing method in the first aspect or any possible implementation method of the first aspect is implemented.

[0037] The legend name editing method, device, drawing system, electronic device and medium provided by the embodiment of the present invention generate an edit box at the location of the target legend in response to a signal that the target legend is selected, and the edit box at least covers the target legend; the initial name of the target legend in an editable state is displayed in the edit box; in response to a signal that the initial name is edited, the edit box displays the edited legend name. The legend name editing method provided by the embodiment of the present invention can directly edit the curve name in the legend area without deleting the original curve, and the operation is convenient and simple. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0039] Figure 1 A flowchart of a method for editing a legend name provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of an example provided for an embodiment of the present invention;

[0041] Figure 3 A structural block diagram of a device for editing a legend name provided by an embodiment of the present invention;

[0042] Figure 4 A structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] QCustomPlot is a high-performance drawing library for the Qt framework, which is widely used in data visualization and scientific computing projects. QCustomPlot has an area in the upper right corner of the canvas area that displays the data curve, which is used to display the name, color style and other information of the data curve. This area is usually called a legend. After a curve is generated in the canvas area, a corresponding line is added to the legend area, and its content includes the default name of the curve, but the curve name cannot be modified in the legend area. In the prior art, when creating a curve, a user-defined curve name is provided. If the curve name needs to be modified, a new curve needs to be rebuilt, and the operation method is not convenient enough.

[0045] The legend name editing method, device, drawing system, electronic device and medium provided by the embodiment of the present invention generate an edit box at the location of the target legend in response to a signal that the target legend is selected, and the edit box at least covers the target legend; the initial name of the target legend in an editable state is displayed in the edit box; in response to a signal that the initial name is edited, the edit box displays the edited legend name. The legend name editing method provided by the embodiment of the present invention can directly edit the curve name in the legend area without deleting the original curve, and the operation is convenient and simple.

[0046] Exemplary Implementation Environment

[0047] The implementation environment of the legend name editing method provided by the embodiment of the present invention involves QCustomPlot drawing software, which is a high-performance 2D drawing library based on the Qt framework and is widely used in data visualization and scientific computing projects. QCustomPlot provides a rich variety of chart types and highly customizable drawing functions, which are very suitable for real-time data display, data analysis and scientific applications. When drawing in QCustomPlot, the legend name editing method can be executed to realize convenient editing of the legend name.

[0048] Exemplary Methods

[0049] Figure 1 Flow chart of the method for editing the legend name provided by the embodiment of the present invention. Figure 1In an exemplary embodiment, a method for editing a legend name is provided, and the method may include:

[0050] S120: In response to a signal indicating that a target legend is selected, generating an edit box at a location where the target legend is located.

[0051] Figure 2 Schematic diagram of an example provided by the present invention. Figure 2 As shown, the canvas area may include drawn curves, which may be one or more curves, and the number of curves may be drawn according to actual needs. There is also a legend indicating the name, color, and style of the curve on the canvas, which is generally located at the upper left or upper right of the canvas area.

[0052] The signal that the target legend is selected can be a double-click signal of the mouse. When the user double-clicks the mouse, the editing operation of the target legend is triggered. In actual applications, it is determined by judging whether the double-click signal of the legend element of QCustomPlot triggers the setting of the edit box display.

[0053] The edit box can be directly superimposed on the target legend name position, and the edit box at least covers the target legend, so that the curve name in the legend can be modified directly, which is easy for users to understand.

[0054] S140: Displaying the initial name of the target legend in the editable state in the edit box.

[0055] The initial name of the legend can be obtained through the project element pointer, and the initial name of the target legend is displayed in the edit box. The initial name is editable and can be edited directly.

[0056] S160: In response to a signal indicating that the editing of the initial name is completed, displaying the edited legend name in the edit box.

[0057] After the initial name of the legend is edited, an editing completion signal will be received. After receiving the signal that the initial name editing is completed, it can be determined whether to change the name based on whether the new name is consistent with the initial name; if a change occurs, the edited new name will be set as the name of the curve, and the edited legend name will be displayed in the edit box.

[0058] The legend name editing method provided by the embodiment of the present invention directly generates an edit box at the location of the target legend, and the initial name of the legend name can be displayed in the edit box. The initial name can be edited in the edit box without deleting the original curve, and the operation is convenient. Since the location of the edit box can at least cover the target legend, the effect of direct modification can be achieved, which brings a good experience to the user.

[0059] In one embodiment, in response to a signal that a target legend is selected, generating an edit box at the location of the target legend may include:

[0060] Determine the height of the edit box based on the height of the initial name;

[0061] Determine the length of the edit box based on the length of the initial name;

[0062] Generate an edit box at the location of the target legend based on the height and length of the edit box.

[0063] In practical applications, you can use the QFontMetrics method to calculate the initial name length of the target legend. For example, boundingRect() returns the bounding rectangle of a given string, which can be used to calculate the size of the text. height() returns the height of the font, which refers to the maximum distance from the baseline of the font to the ascender of the font plus the distance from the baseline to the descender of the font. ascent() returns the height of the ascender of the font, that is, the distance from the baseline to the top of the font. descent() returns the height of the descender of the font, that is, the distance from the baseline to the bottom. The QFontMetrics method can be used to obtain the height of the initial name as the height of the edit box.

[0064] like Figure 2 As shown, the legend includes a text portion indicating the legend name, and also includes an icon used to indicate the color and style of the curve. In practical applications, the icon size in the target legend can be obtained through the iconSize interface of QCPLegend. In the Qt framework, iconSize is usually associated with a subclass of QWidget such as QPushButton or QToolButton, and is used to set the size of the icon displayed on the button. In the embodiment of the present invention, the size of the non-text portion in the target legend can be obtained through the iconSize method.

[0065] In one embodiment, generating an edit box at the location of the target legend according to the height and length of the edit box includes:

[0066] Get the coordinate point of the upper left corner of the target legend;

[0067] Get the length of non-text in the target legend;

[0068] The edit box is generated according to the coordinates of the upper left corner of the target legend, the length of the non-text, and the length and height of the edit box, and the edit box is an opaque layer.

[0069] In actual applications, the QRect interface of QCPPlottableLegendItem can be used to obtain the coordinates of the upper left corner of the target legend, and the iconSize method can be used to obtain the length of the non-text in the target legend. After obtaining the coordinates of the upper left corner of the icon through the pointer, the length of the non-text in the target legend is subtracted, and the coordinates are converted to the coordinates in the global coordinate system, which are used as the coordinates of the upper left corner of the edit box, and a rectangular edit box is generated based on the length and height of the edit box to establish an edit section in the name part of the target legend to achieve better visualization. In addition, since the position of the edit box is based on the initial position of the target legend obtained by the pointer, the display of the edit box is not affected by the change of the position of the target legend.

[0070] The edit box can be set with an opaque layer to obtain better visual effects, and enable the edit box to cover the underlying target legend initial name when displayed, so that when the edit box is displayed, the target legend initial name will no longer be displayed.

[0071] In one embodiment, the height of the edit box is the same as the height of the target legend, and the length of the edit box is the same as the length of the target legend. This setting allows the edit box to just cover the initial name of the target legend, avoiding display effects on other legends in the legend area.

[0072] The legend name editing method of the embodiment of the present invention can achieve a visualization effect of modifying the target legend directly by setting the size of the edit box to be consistent with the size of the target legend.

[0073] In one embodiment, before the edit box displays the edited legend name, the method may further include:

[0074] Determine whether the edited legend name is consistent with the initial name, and obtain the determination result;

[0075] If the judgment result indicates that the edited legend name is inconsistent with the initial name, the edited legend name is displayed in the edit box;

[0076] If the judgment result indicates that the edited legend name is consistent with the initial name, the edit box is deleted.

[0077] In actual applications, the editing completion signal is obtained through QLineEdit to determine whether the edited legend name is consistent with the initial name. If the edited legend name is inconsistent with the initial name, the edited legend name is used as the name of the target legend through QCPAbstractPlottable to edit the target legend name, so that the edited target legend name can still be displayed after the name is edited in the edit box.

[0078] In one embodiment, after the edit box displays the edited legend name, the method further includes:

[0079] Hide the edit box border.

[0080] By hiding the border of the edit box, you can display only the legend name in the edit box without displaying the edit box border, which can improve the display effect of the legend name in the edit box.

[0081] In one embodiment, the initial name of the legend in the editable state is displayed in the edit box, including:

[0082] Get the item element pointer of the target legend;

[0083] Determine the initial name of the legend based on the project element pointer;

[0084] The initial name of the target legend is displayed in the edit box.

[0085] When creating a QCPGraph object, you can set the object's line color, data, and name. At the same time, store the graph pointer in the graphs container. The name of the target legend can be obtained through the getGraphName method. For example, use the graph->name() method to obtain the initial name of the target legend. By obtaining the initial name of the target legend and displaying the initial name in the edit box, it is convenient for users to edit the name of the target legend.

[0086] The legend name editing method provided by the embodiment of the present invention directly generates an edit box at the location of the target legend, and the initial name of the legend name can be displayed in the edit box. The initial name can be edited in the edit box without deleting the original curve, and the operation is convenient. Since the location of the edit box can at least cover the target legend, the effect of direct modification can be achieved, which brings a good experience to the user.

[0087] Exemplary Devices

[0088] Correspondingly, the embodiment of the present application also provides a legend name editing device, Figure 3 This is a structural block diagram of a legend name editing device provided by an embodiment of the present invention. Figure 3 , the device may include:

[0089] A generating unit 310, configured to generate an edit box at the location of the target legend in response to a signal that the target legend is selected, wherein the edit box at least covers the target legend;

[0090] An editing unit 330, used for displaying the initial name of the target legend in an editable state in an editing box;

[0091] The display unit 350 is used to display the edited legend name in the edit box in response to the signal indicating that the editing of the initial name is completed.

[0092] In one embodiment, the generation unit 310 is further used to determine the height of the edit box according to the height of the initial name; determine the length of the edit box according to the length of the initial name; and generate the edit box at the location of the target legend according to the height and length of the edit box.

[0093] In one embodiment, the generation unit 310 is also used to obtain the upper left corner coordinate point of the target legend; obtain the length of non-text in the target legend; generate an edit box according to the upper left corner coordinates of the target legend and the length of the non-text, as well as the length and height of the edit box, and the edit box is an opaque layer.

[0094] In one embodiment, the height of the edit box is the same as the height of the target legend, and the length of the edit box is the same as the length of the target legend.

[0095] In one embodiment, the apparatus further comprises:

[0096] The judgment unit is used to judge whether the edited legend name is consistent with the initial name and obtain a judgment result; if the judgment result indicates that the edited legend name is inconsistent with the initial name, the edited legend name is displayed in the edit box; if the judgment result indicates that the edited legend name is consistent with the initial name, the edit box is deleted.

[0097] In one embodiment, the apparatus comprises:

[0098] Hidden cell, used to hide the border of the edit box.

[0099] In one embodiment, the editing unit 330 is further used to obtain an item element pointer of the target legend; determine the initial name of the legend according to the item element pointer; and display the initial name of the target legend in the edit box.

[0100] The legend name editing device provided in this embodiment belongs to the same application concept as the legend name editing method provided in the above embodiments of this application, and can execute the legend name editing method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the legend name editing method. For technical details not fully described in this embodiment, please refer to the specific processing content of the legend name editing method provided in the above embodiments of this application, and will not be repeated here.

[0101] The functions implemented by the above generation unit 310, editing unit 330 and display unit 350 can be implemented by the same or different processors respectively, and the embodiments of the present application are not limited thereto.

[0102] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by the configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of hardware circuits, or in part by a processor calling software, and the remaining part is implemented in the form of hardware circuits.

[0103] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0104] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0105] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0106] Exemplary Systems

[0107] An embodiment of the present application also provides a drawing system, the system comprising: a legend area control subsystem, the legend area control subsystem is used to execute the above-mentioned legend name editing method.

[0108] It should be noted that the drawing system in this embodiment may be QCustomPlot software, and the legend name editing method may be directly executed on the software.

[0109] Exemplary Electronic Devices

[0110] Another embodiment of the present application also provides an electronic device, see Figure 4 As shown, the device includes:

[0111] Memory 400 and processor 410;

[0112] The memory 400 is connected to the processor 410 and is used to store programs;

[0113] The processor 410 is used to implement the legend name editing method disclosed in any of the above embodiments by running the program stored in the memory 400.

[0114] Specifically, the above-mentioned text minutes generating device may further include: a bus, a communication interface 420 , an input device 430 and an output device 440 .

[0115] The processor 410, the memory 400, the communication interface 420, the input device 430 and the output device 440 are connected to each other via a bus.

[0116] A bus may include a pathway that transfers information between components of a computer system.

[0117] Processor 410 may be a general purpose processor, such as a general purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0118] The processor 410 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0119] The memory 400 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 400 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0120] The input device 430 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0121] Output device 440 may include a device that allows information to be output to a user, such as a display screen, a printer, a speaker, etc.

[0122] The communication interface 420 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0123] The processor 410 executes the program stored in the memory 400 and calls other devices, which can be used to implement each step of any legend name editing method provided in the above embodiments of the present application.

[0124] An embodiment of the present application also proposes a chip, which includes a processor and a data interface. The processor reads and runs a program stored in a memory through the data interface to execute the legend name editing method introduced in any of the above embodiments. The specific processing process and its beneficial effects can be found in the introduction to the embodiment of the legend name editing method mentioned above.

[0125] Exemplary computer program products and storage media

[0126] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the legend name editing method according to various embodiments of the present application described in any of the above embodiments of this specification.

[0127] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0128] In addition, the embodiment of the present application may also be a storage medium on which a computer program is stored. The computer program is executed by a processor to execute the steps of the legend name editing method according to various embodiments of the present application described in any of the above embodiments of this specification, and specifically the following steps may be implemented:

[0129] S120: In response to a signal indicating that a target legend is selected, generating an edit box at a location where the target legend is located.

[0130] S140: Displaying the initial name of the target legend in the editable state in the edit box.

[0131] S160: In response to a signal indicating that the editing of the initial name is completed, displaying the edited legend name in the edit box.

[0132] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0133] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0134] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0135] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.

[0136] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0137] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0139] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0140] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0141] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0142] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for editing a legend name, characterized in that: include: In response to a signal that a target legend is selected, generating an edit box at a location where the target legend is located, wherein the edit box at least covers the target legend; Displaying the initial name of the target legend in an editable state in the edit box; In response to a signal that the editing of the initial name is completed, the edited legend name is displayed in the edit box.

2. The method for editing a legend name according to claim 1, characterized in that: In response to a signal that a target legend is selected, generating an edit box at the location of the target legend comprises: Determine the height of the edit box according to the height of the initial name; Determining the length of the edit box according to the length of the initial name; An edit box is generated at the location of the target legend according to the height and length of the edit box.

3. The method for editing a legend name according to claim 2, characterized in that: Generating an edit box at the location of the target legend according to the height and length of the edit box includes: Get the coordinate point of the upper left corner of the target legend; Get the length of non-text in the target legend; The edit box is generated according to the coordinates of the upper left corner of the target legend, the length of the non-text, and the length and height of the edit box, and the edit box is an opaque layer.

4. The method for editing a legend name according to claim 1, characterized in that: The height of the edit box is the same as the height of the target legend, and the length of the edit box is the same as the length of the target legend.

5. The method for editing a legend name according to claim 1, characterized in that: Before the edit box displays the edited legend name, the method further includes: Determine whether the edited legend name is consistent with the initial name, and obtain a determination result; If the judgment result indicates that the edited legend name is inconsistent with the initial name, then displaying the edited legend name in the edit box; If the judgment result indicates that the edited legend name is consistent with the initial name, the edit box is deleted.

6. The method for editing a legend name according to claim 1, characterized in that: After the edit box displays the edited legend name, the method further includes: Hides the border of the edit box.

7. The method for editing a legend name according to claim 1, characterized in that: The initial name of the legend displayed in the editable state in the edit box includes: Get the item element pointer of the target legend; Determining an initial name of the legend according to the project element pointer; The initial name of the target legend is displayed in the edit box.

8. A legend name editing device, characterized in that: include: a generating unit, configured to generate an edit box at a location of the target legend in response to a signal that the target legend is selected, wherein the edit box at least covers the target legend; An editing unit, used for displaying the initial name of the target legend in an editable state in the editing box; The display unit is used for displaying the edited legend name in the edit box in response to a signal that the editing of the initial name is completed.

9. A drawing system, characterized in that: include: A legend area control subsystem, wherein the legend area control subsystem is used to execute the legend name editing method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the legend name editing method as described in any one of claims 1 to 7 by running the program in the memory.

11. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for editing the legend name according to any one of claims 1 to 7 is implemented.