CN110825367B - Design method of form designer suitable for Loongson CPU environment - Google Patents

Design method of form designer suitable for Loongson CPU environment Download PDF

Info

Publication number
CN110825367B
CN110825367B CN201910979562.8A CN201910979562A CN110825367B CN 110825367 B CN110825367 B CN 110825367B CN 201910979562 A CN201910979562 A CN 201910979562A CN 110825367 B CN110825367 B CN 110825367B
Authority
CN
China
Prior art keywords
electronic form
control
attribute information
form control
database
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.)
Active
Application number
CN201910979562.8A
Other languages
Chinese (zh)
Other versions
CN110825367A (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.)
Thinvent Digital Technology Co Ltd
Original Assignee
Thinvent Digital 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 Thinvent Digital Technology Co Ltd filed Critical Thinvent Digital Technology Co Ltd
Priority to CN201910979562.8A priority Critical patent/CN110825367B/en
Publication of CN110825367A publication Critical patent/CN110825367A/en
Application granted granted Critical
Publication of CN110825367B publication Critical patent/CN110825367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a design method of a form designer suitable for a Loongson CPU environment. The method comprises the steps of referring to a graphic view frame on a Linux operating system, and carrying out style reconstruction on standard components in the graphic view frame to form an electronic form control class; the electronic form control class inherits basic attributes of the graphic view standard component; establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with attribute information; and loading the electronic form control with the attribute information on a plug-in tool capable of running a Linux operating system in a Loongson CPU environment to issue, and generating a form designer. The form designer designed in the mode can normally operate in a Loongson CPU environment, works in a visual mode, and quickly builds an application system, so that the problem that a traditional form designer cannot normally operate in the Loongson CPU environment is solved.

Description

Design method of form designer suitable for Loongson CPU environment
Technical Field
Embodiments of the present invention relate generally to the field of application software development in a Loongson CPU environment, and more particularly, to a design method of a form designer suitable for use in a Loongson CPU environment.
Background
The conventional form designer generally can only normally operate in an X86 CPU environment, for example, infoPath of microsoft corporation is a common form designer in an X86 CPU environment, but the form designer in the X86 environment cannot normally operate in a loongson CPU environment because the loongson CPU is based on a MIPS instruction set and an operating system API and the like. With the application of Loongson CPUs independently developed in China in more fields, many application software originally developed in an x86 CPU environment needs to be migrated to the Loongson CPU environment for running. In the current environment, no form designer capable of migrating to operate in a Loongson CPU environment exists.
Disclosure of Invention
According to the embodiment of the invention, a design scheme of a form designer suitable for a Loongson CPU environment is provided.
In a first aspect of the present invention, a form designer design method suitable for use in a Loongson CPU environment is provided. The method comprises the following steps:
a graphical view frame is referenced on a Linux operating system, and standard components in the graphical view frame are subjected to style reconstruction to form an electronic form control class; the electronic form control class inherits basic attributes of the graphic view standard component;
establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with attribute information;
and loading the electronic form control with the attribute information on a plug-in tool for release to generate a form designer.
Further, the style reconstruction of the standard component in the graphic view frame comprises: initial pattern reconstruction and epi pattern reconstruction; wherein the method comprises the steps of
Reconstructing an initial style to reset basic attributes of the control;
the epitaxial style is reconfigured to add properties to the underlying properties of the control.
Further, the resetting includes:
modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
Further, the adding attributes include:
declaring an attribute field;
defining readable attributes of the fields;
writable attributes of the fields are defined.
Further, the establishing the connection relation between the electronic form control in the electronic form control class and the attribute information in the database includes:
and connecting the electronic form control with a database, and adding attribute information into the electronic form control to obtain the electronic form control with the attribute information.
Further, the attribute information comprises a database connection character string, a data table name, a field name, an associated field name, a primary key, a foreign key, a check rule event and a data pointer.
Further, when the data pointed by the data pointer of the electronic form control with the attribute information changes, the electronic form control is synchronized with the data in the background database.
Further, the plug-in tools of the Linux operating system capable of running in the Loongson CPU environment comprise a plug-in tool of Qt and a plug-in tool of Eclipse.
In a second aspect of the present invention, a form designer design apparatus suitable for use in a Loongson CPU environment is provided. The device comprises:
the style reconstruction module is used for referring to the graphic view frame on the Linux operating system, and carrying out style reconstruction on standard components in the graphic view frame to form an electronic form control class; the electronic form control class inherits basic attributes of the standard graphic view component;
the relation establishing module is used for establishing a connection relation between the electronic form control in the electronic form control class and attribute information in the database to obtain the electronic form control with the attribute information;
and the form designer generating module is used for loading the electronic form control with the attribute information on the plug-in tool for release to generate the form designer.
Further, the pattern reconstruction module further includes: an initial pattern reconstruction module and an extension pattern reconstruction module; wherein the method comprises the steps of
The initial style reconstruction module is used for resetting the basic attribute of the control;
and the extension style reconstruction module is used for adding attributes on the basic attributes of the control.
Further, the initial style reconstruction module further includes:
resetting a module for
Modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
Further, the epi-pattern reconstruction module further includes:
an attribute adding module for
Declaring an attribute field;
defining readable attributes of the fields;
writable attributes of the fields are defined.
Further, the relationship establishment module is used for
And connecting the electronic form control with a database, and adding attribute information into the electronic form control to obtain the electronic form control with the attribute information.
Further, the relation establishing module is further configured to synchronize the electronic form control with the data in the background database when the data pointed by the data pointer of the electronic form control with the attribute information changes.
In a third aspect of the invention, an electronic device is provided. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method as described above when executing the program.
In a fourth aspect of the invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as according to the first aspect of the invention.
The invention solves the problem that the traditional form designer can not normally operate in the Loongson CPU environment, and the designed form designer can normally operate in the Loongson CPU environment, work in a visual mode and quickly build an application system.
It should be understood that the description in this summary is not intended to limit the critical or essential features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
The above and other features, advantages and aspects of embodiments of the present invention will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which:
FIG. 1 shows a schematic diagram of a design methodology of a form designer in accordance with the present invention;
FIG. 2 is a schematic diagram of the present invention for style reorganization of a graphical view standard component;
FIG. 3 is a schematic diagram of a method for adding attributes during the reconstruction of an epitaxial pattern according to the present invention;
FIG. 4 shows a schematic diagram of a method of a first embodiment of the invention;
FIG. 5 is a schematic diagram showing style reorganization of a graphical view standard component in a first embodiment;
FIG. 6 shows a method schematic of a second embodiment of the invention;
FIG. 7 is a schematic diagram showing style reorganization of a graphical view standard component in a second embodiment;
FIG. 8 shows a block diagram of a form designer suitable for use in a Loongson CPU environment in accordance with the present invention;
fig. 9 shows a block diagram of an exemplary electronic device capable of implementing embodiments of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The form designer designed in the invention solves the problem that the traditional form designer can not normally operate in the Loongson CPU environment, and by the form designer, application software can develop the commonly used electronic form to configure the contents filled in and verified expression of a service system in a visual mode in the Loongson CPU environment, and provide a printed template in a visible and instant mode, thereby being capable of quickly building an application system.
FIG. 1 shows a schematic diagram of a design method of a form designer according to the present invention. Optionally under the operating system of the winning kylin Linux.
The method comprises the following steps:
s101, referring to a graphic view frame on a Linux operating system, and carrying out style reconstruction on standard components in the graphic view frame to form an electronic form control class; the electronic form control class inherits basic attributes of the standard graphic view component;
carrying out style reconstruction on standard components in the graphic view frame through the graphic view frame to form a new electronic form control class; wherein the standard graphical view component comprises: labels, multi-line text blocks, single-line text boxes, buttons, etc.; the correspondingly formed new electronic form control class also includes: labels, multiple lines of text blocks, single lines of text boxes, buttons, etc.
Through the style reconstruction of the standard graphic view component, the original component style can be modified, and the appearance effect of the original component style can be customized, so that the design requirement of a colorful electronic form interface can be met. And the electronic form control class executes event processing interfaces such as mouse drag, mouse click, key input response and the like of the standard graphic view component so as to reduce development workload.
S102, establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with the attribute information;
the electronic form control obtained in step S101 cannot complete functions such as binding of a database table field and verification of a table data, so that it is also necessary to add database connection attribute information, including a character string, a data table name, a field name, an associated field name, a primary key, an external key, a verification rule event and a data pointer.
Therefore, the electronic form control is connected with the database, and the connection relation between the electronic form control in the electronic form control class and the attribute information in the database can be realized by only adding the attribute information such as the data form name, the field name, the associated field name, the main key, the external key, the data pointer and the like to the electronic form control. After the connection relation is established, the functions of binding data fields, checking form data and the like can be completed.
S103, loading the electronic form control with the attribute information on a plug-in tool capable of running a Linux operating system in a Loongson CPU environment to be issued, and generating a form designer.
Because the plug-in tool can run in a Linux operating system supporting a Loongson CPU, and the generated form designer can run in a plug-in form in a development environment of the plug-in tool, the generated form designer can run on the Linux operating system (Loongson version).
FIG. 2 is a schematic diagram illustrating the style reorganization of a graphical view standard component in accordance with the present invention.
S200, further, the style reconstruction of the standard component in the graphic view frame includes: initial pattern reconstruction and epi pattern reconstruction; wherein the method comprises the steps of
S201, reconstructing an initial style to reset basic attributes of the control;
the resetting includes:
modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
One embodiment is: the resetting is as follows: and modifying the basic attribute value and carrying out self-defined reconstruction on the shape and the frame of the control.
One embodiment is: the resetting is as follows: the base attribute value is modified.
One embodiment is: the resetting is as follows: and carrying out self-defined reconstruction on the shape and the frame of the control.
The initial style reconstruction mainly comprises resetting the display effect (such as the border, font, color and shape of the control) of the control, and the extension style is to bind database connection information (such as database connection character strings, table names, field names and the like) on the basic attribute of the control.
The original assembly style can be modified and/or the appearance effect can be customized by reconstructing the style of the standard graphic view assembly so as to meet the design requirement of the colorful electronic form interface.
S202, reconstructing the extension style to add attributes on the basic attributes of the control.
Fig. 3 shows a schematic diagram of a method for adding attributes during the reconstruction of an epitaxial pattern according to the present invention.
S300, the adding attribute comprises:
s301, declaring an attribute field;
s302, defining readable attributes of the fields;
s303, defining writable attributes of the fields.
The method specifically comprises the following steps:
(1) Declaration attribute field:
private, field type field name;
(2) Readable properties of the definition field:
public field type get field name () {
A return field value;
}
(3) Writable attributes of defined fields:
public, void set field name (field type field value) {
Field name = field value;
}
and adding the attribute to expand the extension attribute of the reconstructed control, so that the control can be readable and writable. If an attribute only defines a readable attribute and no writable attribute is defined, then the attribute value of that attribute can only be read and vice versa.
The above method is further illustrated below in connection with specific examples.
The graphic view frame of the invention comprises a Qt graphic view frame realized by C++ language and a Swing packet of JAVA language. If a Qt graphic view frame implemented in the c++ language is used as the graphic view frame, the present invention can be implemented by the following first embodiment.
Fig. 4 shows a method schematic of a first embodiment of the invention.
S401, referring to a Qt graphic view frame realized by C++ language on a Linux operating system, and carrying out style reconstruction on standard components in the Qt graphic view frame to form an electronic form control class; the electronic form control class inherits the basic properties of the standard graphical view component.
The Qt graphical view framework is loaded with Qt Creator (Qt Creator is an integrated development tool for Qt). Qt is a cross-platform C++ application development framework and can normally run in a Linux operating system under a Loongson CPU environment. The Qt graphical view framework is a development toolkit for developing c++ application user interfaces, which can be used to manage 2D graphical items, support drawing, scaling, event response, etc., and help developers to create elegant user interfaces with rich, flexible functionality and modular components with little code.
Carrying out style reconstruction on standard components in the Qt graphic view frame by referring to the Qt graphic view frame realized by the C++ language to form a new electronic form control class; wherein the standard graphical view component comprises: labels, multi-line text blocks, single-line text boxes, buttons, etc.; the correspondingly formed new electronic form control class also includes: labels, multiple lines of text blocks, single lines of text boxes, buttons, etc.
Through the style reconstruction of the standard graphic view component, the original component style can be modified, and the appearance effect of the original component style can be customized, so that the design requirement of a colorful electronic form interface can be met. And the electronic form control class executes event processing interfaces such as mouse drag, mouse click, key input response and the like of the standard graphic view component so as to reduce development workload.
S402, establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with the attribute information;
the electronic form control obtained in step S401 cannot complete functions such as binding of a database table field and verification of a table form, so that attributes such as a database connection character string, a data table name, a field name, an associated field name, a primary key, an external key, a verification rule event, a data pointer and the like are required to be added.
Therefore, the QSqlDatabase is adopted to connect the database, after the database connection is established through the QSqlDatabase, the connection relation between the electronic form control in the electronic form control class and the attribute information in the database can be realized by only adding the data form name, the field name, the associated field name, the main key, the external key, the data pointer and other attribute information to the electronic form control. QSQL database is a standard set of methods for Qt connection to databases, and can mask the differences between different database manufacturers, and whatever database is connected can be accessed by QSQL database connection. After the connection relation is established, the functions of binding data fields, checking form data and the like can be completed.
S403, loading the electronic form control with the attribute information on a plug-in tool of the Qt for release, and generating a form designer.
Qt is a cross-platform c++ application development framework. In itself, it is just a framework and set of services for building a development environment through plug-in components. Qt is accompanied by a standard set of graphical view plug-ins and registration method. And loading the electronic form control with the attribute information on a plugin set of the Qt for release, and generating an electronic form designer in a plugin form. Because Qt can run in a Linux operating system supporting a loongson CPU, and the generated form designer can run in a Qt development environment in the form of a plug-in, the generated form designer can run on the Linux operating system (loongson version).
FIG. 5 is a schematic diagram showing style reorganization of a graphical view standard component in a first embodiment;
s200, further, performing style reconstruction on the standard component in the Qt graph view frame comprises the following steps: initial pattern reconstruction and epi pattern reconstruction; wherein the method comprises the steps of
S201, reconstructing an initial style to reset basic attributes of the control;
the resetting includes:
modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
The initial style reconstruction mainly comprises resetting the display effect (such as the border, font, color and shape of the control) of the control, and the extension style is to bind database connection information (such as database connection character strings, table names, field names and the like) on the basic attribute of the control. When the control is operated, synchronous and consistent storage of control data and database data is realized by calling the exec method of QSQL Query according to the bound database connection information.
The original assembly style can be modified and/or the appearance effect can be customized by reconstructing the style of the standard graphic view assembly so as to meet the design requirement of the colorful electronic form interface.
S202, reconstructing the extension style to add attributes on the basic attributes of the control.
The initial style reconstruction needs to set corresponding basic attribute values, such as attributes of displayed text information text, displayed icon, foreground color foreground, background color background, font and the like of a label CLabel control; the paintComponent, paintBorder method can also be customized to redraw the shape and borders of the control. The reconstruction of the extension style needs to add attributes, the field type of the database connection character string is string, and the field value is: svalue is exemplified:
(1) Declaration database join string attribute field:
the private, string database connects the character string;
(2) Readable properties of the definition field:
public, string get database join string () {
return svalue;
}
(3) Writable attributes of defined fields:
public, void set database concatenated string (string svalue) {
Database connection string = svalue;
}
the base attributes include: the display of text information, displayed icons, horizontal position, vertical position, mouse click, drag, etc., enabled/disabled, foreground color, background color, font, hint, whether visible, control name, control size, position in interface, whether to obtain focus of mouse, whether to run edit, width of text field, keyboard key event, whether to automatically wrap line when line is too long, number of lines, current total number of lines, tab size, etc.
And connecting a database by adopting QSQL database, and adding attribute information into the electronic form control to obtain the electronic form control with the attribute information. After the database connection is established through the QSQL database, the connection relation between the electronic form control in the electronic form control class and the attribute information in the database can be realized by only adding the data form name, the field name, the associated field name, the main key, the external key, the data pointer and other attribute information to the electronic form control.
When the data pointed by the data pointer of the electronic form control with the attribute information changes, the electronic form control automatically calls a database operation method of QSQL Query in an event processing function for processing the change of the data, and synchronizes with the data in a background database.
After the electronic form control with the established connection is operated, when a user adds, updates and deletes data, the data pointed by the data pointer of the control can be changed, and the electronic form control can automatically call exec of QSQL query in an event processing function for processing the changed data, so that synchronization and consistency of data of a background database are realized.
QSQL database is a standard set of methods for Qt connection to databases, which can mask the differences between different database vendors, and can be accessed by QSQL database no matter what database is connected.
And loading the electronic form control with the attribute information on a Qt plug-in tool, and releasing to generate a form designer. Qt is a cross-platform development framework of C++ language, and can normally operate under the Loongson CPU and Linux operating system environment based on MIPS instruction set.
If a Swing packet through the JAVA language is taken as the graphic view frame, the present invention can be implemented by the following second embodiment.
Fig. 6 shows a method schematic of a second embodiment of the invention.
S601, referring to a Swing packet of JAVA language on a Linux operating system, and carrying out style reconstruction on a standard Swing component in the Swing packet to form an electronic form control class; the electronic form control class inherits the basic attribute of the standard Swing component;
java is an object-oriented programming language that can write cross-platform application software, and is a generic term for Java programming language and Java platform (i.e., java) that was introduced by Sun Microsystems, inc. in month 5 of 1995. Swing is a development kit for developing Java application user interfaces. Abstract Window Toolkit (AWT) based allows cross-platform applications to use any pluggable appearance style. The Swing developer can create an elegant user interface with very little code using the Swing rich, flexible functions and modular components.
Carrying out style reconstruction on the standard Swing components in the Swing package by referring to the Swing package of the JAVA language to form a new electronic form control class; wherein the standard Swing assembly comprises: labels, multi-line text blocks, single-line text boxes, buttons, etc.; the correspondingly formed new electronic form control class also includes: labels, multiple lines of text blocks, single lines of text boxes, buttons, etc.
Through the reconstruction of the standard Swing assembly style, the original assembly style can be modified, and the appearance effect of the standard Swing assembly can be customized, so that the design requirement of a colorful electronic form interface can be met. And the electronic form control class executes event processing interfaces such as mouse drag, mouse click, key input response and the like of the standard Swing component so as to reduce development workload.
S602, establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with the attribute information;
the electronic form control obtained in step S601 cannot complete functions such as binding of a database table field and verification of form data, so that attributes such as a database connection character string, a data table name, a field name, an associated field name, a primary key, an external key, a verification rule event, a data pointer and the like are required to be added.
Therefore, the database is connected by adopting jdbc, and after the database connection is established by jdbc, the connection relation between the electronic form control in the electronic form control class and the attribute information in the database can be realized by only adding the data form name, the field name, the associated field name, the primary key, the external key, the data pointer and other attribute information to the electronic form control. jdbc is a set of standards for java connection databases, and can mask the difference of different database manufacturers, and can be used for connection access no matter what database is connected. After the connection relation is established, the functions of binding data fields, checking form data and the like can be completed.
S603, loading the electronic form control with the attribute information on an plug-in tool of Eclipse for release, and generating a form designer.
Eclipse is an open source, java-based extensible development platform. In itself, it is just a framework and set of services for building a development environment through plug-in components. Eclipse is accompanied by a standard plug-in set, including Java development tools (Java Development Kit, JDK). And loading the electronic form control with the attribute information on an plugin set of Eclipse for release, and generating an electronic form designer in a plugin form. Since Eclipse can run in a Linux operating system supporting a loongson CPU, and the generated form designer can run in Eclipse in the form of a plug-in, the generated form designer can run on a Linux operating system (loongson version).
Fig. 7 shows a schematic diagram of style reorganization of a graphical view standard component in a second embodiment.
S700, further, the performing style reconstruction on the standard Swing component in the Swing packet includes: initial pattern reconstruction and epi pattern reconstruction; wherein the method comprises the steps of
S701, reconstructing an initial style to reset basic attributes of the control;
the resetting includes:
modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
The initial style reconstruction mainly comprises resetting the display effect (such as the border, font, color and shape of the control) of the control, and the extension style is to bind database connection information (such as database connection character strings, table names, field names and the like) on the basic attribute of the control. When the control runs, synchronous and consistent storage of control data and database data is realized by calling an execteepdate method of jdbc according to the bound database connection information.
The original assembly style can be modified and/or the appearance effect can be customized by reconstructing the style of the standard Swing assembly so as to meet the design requirement of the colorful electronic form interface.
S702, reconstructing the extension style to add attributes on the basic attributes of the control.
The initial style reconstruction needs to set corresponding basic attribute values, such as displayed text information text, displayed icon, foreground color foreground, background color background, font and other attributes of a label JLabel control; the paintComponent, paintBorder method can also be customized to redraw the shape and borders of the control. The reconstruction of the extension style needs to add attributes, the field type of the database connection character string is string, and the field value is: svalue is exemplified:
(1) Declaration database join string attribute field:
the private string database is connected with the character string;
(2) Readable properties of the definition field:
public string get database concatenated string () {
Return svalue;
}
(3) Writable attributes of defined fields:
public void set database concatenated string (string svalue) {
this database connection string = svalue;
}
and after the database is connected by adopting jdbc, the connection relationship between the electronic form control in the electronic form control class and the attribute information in the database can be realized by only adding the data form name, the field name, the associated field name, the primary key, the external key, the data pointer and other attribute information to the electronic form control after the database connection is established by jdbc. After the electronic form control with the established connection is operated, when a user adds, updates and deletes data, the data pointed by the data pointer of the control can be changed, and the electronic form control can automatically call the execueepdate method of jdbc in an event processing function for processing the changed data, so that synchronization and consistency of the background database data are realized.
jdbc is a set of standards for java connection databases, and can mask the difference of different database manufacturers, and can be used for connection access no matter what database is connected.
And loading the electronic form control with the attribute information on an Eclipse plug-in tool, and releasing to generate a form designer.
Eclipse plug-in tools are software based on Loongson OpenJDK that has been put into practical use. The java language operates normally in the x86 environment, but the Loongson CPU is based on the MIPS instruction set, so that the java version in the x86 environment cannot operate normally in the Loongson CPU environment, and a list designer is required to be opened based on the java version OpenJDK to enable the Java version to operate normally in the Loongson environment.
In one embodiment of the invention, the form designer has editing and typesetting functions, can design electronic forms in rich formats by means of mouse dragging, seeing and obtaining, and provides binding support functions for data sources. The form designer mainly comprises functions of control library management, form attribute and behavior definition, form layout design, form data verification definition, form field association/sub-form management, form control behavior management, event script definition and the like.
Function 1: control library management: and is mainly responsible for loading the control library according to the configuration file. The control library currently supports the following 14 common form controls: labels, multi-line text blocks, single-line text boxes, buttons, check boxes, radio boxes, drop-down boxes, date controls, tree controls, graphic control groups (lines, rectangular boxes, etc.), attachment control groups (single-field attachments, multi-record attachments), office groups (supporting documents such as Word, excel, powerPoint, WPS, etc.), picture controls, audit opinion fields.
Function 2: form attributes and behavior definitions: the method is mainly responsible for processing the definition of events such as the own attribute of the form, the form initialization, the template loading, the data checking, the data saving and the like.
Function 3: form layout design: the electronic form with rich format can be designed by means of mouse dragging and what you see is what you get.
Function 4: form control attribute definition: is mainly responsible for defining the extrinsic properties of the control.
Function 5: form data validation definition: defining rules requiring verification of fields supports not only regular expressions and some common verification rules built-in to the system, but also comparison of values between fields in complex situations.
Function 6: form field association/sub-form management: the association information between tables/forms, i.e., the primary key foreign key information, is defined.
Function 7: form control behavior definition: and the control value is mainly responsible for processing other edit box events caused by the change of the control value, such as linkage drop-down boxes, values returned from the selected value and assigned to other field edit boxes, hidden states of the other field edit boxes and the like.
Function 8: event script definition: the most popular scripting languages, such as Java Script or VB Script, are supported. Scripts for electronic forms are divided into two categories, global scripts and "event" based scripts. Global scripts refer to variables, functions, and code that can be used within the context of the current form page. "event" based scripts refer to programs driven by the corresponding form component, such as: when the form designer is used for designing button pressing control functions, many functions (complex data calculation, data verification and the like) of the form designer can be completed without simply defining a form, and some script programs are required to be written to achieve the purpose.
Form controls are the basic elements that implement the functionality of an electronic form designer. Two categories can be distinguished depending on the purpose of the control: non-data controls and data controls. The actions of the non-data controls include beautifying the document, providing entry cues to the data controls, and the like. The role of the data control includes binding the data to the table field relationship and submitting the data to the control associated fields and tables.
The form control mainly comprises three parts of attribute management, event management and verification management:
1. attribute management: consists of two parts, namely a display attribute and a data attribute. The display attribute is the external expression information of the control, including the font color, size, direction, position and other contents of the control. The data attribute is information such as a data table and a field associated with the control, a main foreign key of the data table, a source table and a field of the data item, and the like.
2. Event management: events generated by controlling the triggering actions of the mouse and the keyboard or events generated by changing the control values. For example: what actions need to be done when the mouse is clicked, and what actions need to be done when the control value changes.
3. And (3) checking and managing: and setting filling-in check rules for the control values, wherein the filling-in check rules can be regular expression check or common check (numerical value, normal character, mail, mobile phone number, amount and the like). The check rule is used for judging whether the filled contents are valid or not before the form data are submitted.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are alternative embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
The above description of the method embodiments further describes the solution of the present invention by means of device embodiments.
FIG. 8 shows a block diagram of a design apparatus for a form designer suitable for use in a Loongson CPU environment, in accordance with an embodiment of the invention. The apparatus 800 includes:
the style reconstruction module 810 is configured to reference the graphic view frame on the Linux operating system, and perform style reconstruction on standard components in the graphic view frame to form an electronic form control class; the electronic form control class inherits basic attributes of the standard graphic view component;
the relationship establishing module 820 is configured to establish a connection relationship between the electronic form controls in the electronic form control class and attribute information in the database, so as to obtain electronic form controls with attribute information;
the form designer generating module 830 is configured to load the electronic form control with attribute information onto a plugin tool for publishing, and generate a form designer.
Further, the pattern reconstruction module further includes: an initial pattern reconstruction module 811 and an epi pattern reconstruction module 812; wherein the method comprises the steps of
An initial style reconstruction module 811, configured to reset a basic attribute of the control;
an epi-style reconstruction module 812 is configured to add attributes to the basic attributes of the control.
Further, the initial style reconstruction module 811 further includes:
resetting a module for
Modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
Further, the epi-pattern reconstruction module further includes:
an attribute adding module for
Declaring an attribute field;
defining readable attributes of the fields;
writable attributes of the fields are defined.
Further, the relationship establishment module 820 is configured to
And connecting the electronic form control with a database, and adding attribute information into the electronic form control to obtain the electronic form control with the attribute information.
Further, the relationship establishing module 820 is further configured to synchronize the data pointer of the electronic form control with the attribute information with the data in the background database when the data pointed by the data pointer of the electronic form control changes.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
Fig. 9 shows a schematic block diagram of an electronic device that may be used to implement an embodiment of the invention. As shown, the device 900 includes a loongson CPU901 that can perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 902 or loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In (RAM) 903, various programs and data required for the operation of the electronic device 900 can also be stored. Loongson CPU901, ROM 902, and RAM 903 are connected to each other via bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The processing unit 901 performs the respective methods and processes described above, for example, the methods S100, S200, S300. For example, in some embodiments, the methods S100, S200, S300 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into (RAM) 903 and executed by CPU901, one or more steps of the methods S100, S200, S300 described above may be performed. Alternatively, in other embodiments, loongson CPU901 may be configured to perform methods S100, S200, S300 by any other suitable means (e.g., by means of firmware).
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), etc.
Program code for carrying out methods of the present invention may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a computer, special purpose computer, or other programmable data processing apparatus that loads the Loongson CPU, such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (9)

1. The design method of the form designer suitable for the Loongson CPU environment is characterized by comprising the following steps of:
a graphical view frame is referenced on a Linux operating system, and standard components in the graphical view frame are subjected to style reconstruction to form an electronic form control class; the electronic form control class inherits basic attributes of the graphic view standard component;
establishing a connection relation between the electronic form controls in the electronic form control class and attribute information in a database to obtain electronic form controls with attribute information;
loading an electronic form control with attribute information on a plug-in tool capable of running a Linux operating system in a Loongson CPU environment to be issued, and generating a form designer; the plug-in tool comprises a plug-in tool of Qt or an plug-in tool of Eclipse.
2. The method of claim 1, wherein the style reconstructing of the standard components in the graphical view frame comprises: initial pattern reconstruction and epi pattern reconstruction; wherein the method comprises the steps of
Reconstructing an initial style to reset basic attributes of the control;
the epitaxial style is reconfigured to add properties to the underlying properties of the control.
3. The method of claim 2, wherein the resetting comprises:
modifying the base attribute value, and/or
And carrying out self-defined reconstruction on the shape and the frame of the control.
4. The method of claim 2, wherein the adding the attribute comprises:
declaring an attribute field;
defining readable attributes of the fields;
writable attributes of the fields are defined.
5. The method of claim 1, wherein establishing the connection between the electronic form controls in the electronic form control class and the attribute information in the database comprises:
and connecting the electronic form control with a database, and adding attribute information into the electronic form control to obtain the electronic form control with the attribute information.
6. The method of claim 1, wherein the electronic form control with attribute information synchronizes with data in the database when the data pointed to by the data pointer of the electronic form control changes.
7. A form designer design apparatus adapted for use in a loongson CPU environment, comprising:
the style reconstruction module is used for referring to the graphic view frame on the Linux operating system, and carrying out style reconstruction on standard components in the graphic view frame to form an electronic form control class; the electronic form control class inherits basic attributes of the graphic view standard component;
the relation establishing module is used for establishing a connection relation between the electronic form control in the electronic form control class and attribute information in the database to obtain the electronic form control with the attribute information;
the form designer generating module is used for loading the electronic form control with attribute information onto a plug-in tool of a Linux operating system capable of running in a Loongson CPU environment to be issued, so as to generate a form designer; the plug-in tool comprises a plug-in tool of Qt or an plug-in tool of Eclipse.
8. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements a method of designing a form designer suitable for use in a Loongson CPU environment as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the design method of a form designer suitable for use in a loongson CPU environment as claimed in any one of claims 1 to 6.
CN201910979562.8A 2019-10-15 2019-10-15 Design method of form designer suitable for Loongson CPU environment Active CN110825367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910979562.8A CN110825367B (en) 2019-10-15 2019-10-15 Design method of form designer suitable for Loongson CPU environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910979562.8A CN110825367B (en) 2019-10-15 2019-10-15 Design method of form designer suitable for Loongson CPU environment

Publications (2)

Publication Number Publication Date
CN110825367A CN110825367A (en) 2020-02-21
CN110825367B true CN110825367B (en) 2023-06-16

Family

ID=69549337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910979562.8A Active CN110825367B (en) 2019-10-15 2019-10-15 Design method of form designer suitable for Loongson CPU environment

Country Status (1)

Country Link
CN (1) CN110825367B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708529B (en) * 2020-06-23 2023-06-16 浪潮云信息技术股份公司 Method for generating form through dragging based on angular
CN112148290A (en) * 2020-11-24 2020-12-29 思创数码科技股份有限公司 Design method and device of form filling device based on Loongson architecture

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707945A (en) * 2012-04-11 2012-10-03 佳都新太科技股份有限公司 Implementation method of form designer based on layout template in Eclipse

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9417855B2 (en) * 2011-09-30 2016-08-16 Intel Corporation Instruction and logic to perform dynamic binary translation
CN108008953B (en) * 2017-12-01 2021-05-07 麒麟软件有限公司 Qt graphic program design method for dynamically adapting theme style of operating system
CN110275715A (en) * 2019-06-10 2019-09-24 河南华讯方舟航空科技有限公司 Unmanned aerial vehicle station software implementation method based on kylin operating system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707945A (en) * 2012-04-11 2012-10-03 佳都新太科技股份有限公司 Implementation method of form designer based on layout template in Eclipse

Also Published As

Publication number Publication date
CN110825367A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
US9258668B2 (en) Mobile application framework extensibiilty
US8762936B2 (en) Dynamic design-time extensions support in an integrated development environment
US8200710B2 (en) System and method for runtime rendering of web-based user interfaces for master data management
CN104704468B (en) The cross-system installation of WEB application program
KR20140019627A (en) An authoring tool for web applications and the authoring method thereof
KR101275871B1 (en) System and method for producing homepage in SaaS ENVIRONMENT, A computer-readable storage medium therefor
US10838744B2 (en) Web component design and integration system
CN114510231A (en) Application construction method, device, equipment and computer readable storage medium
US9703443B2 (en) Method and system for creating a free-form visual user interface element
US11194450B2 (en) Definition of a graphical user interface dashboard created with manually input code and user selections
CN113076096A (en) Desktop application program development method, device, equipment and storage medium
US20120227028A1 (en) Graphical programming object population user interface autogeneration
US7603624B2 (en) System and method for styling content in a graphical user interface control
WO2014045826A1 (en) Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method
CN110825367B (en) Design method of form designer suitable for Loongson CPU environment
CN115712413A (en) Low code development method, device, equipment and storage medium
CN104205103B (en) For CAD system is coupled to the data base and planning system method in order to exchange data between the two systems
WO2015042551A2 (en) Method and system for selection of user interface rendering artifacts in enterprise web applications using a manifest mechanism
US20120060141A1 (en) Integrated environment for software design and implementation
CN109086342B (en) Method, medium and terminal for mass production and operation and maintenance of website templates
CN107391118A (en) A kind of Web applications Consumer's Experience plateform system
CN116909553A (en) Page online development and local compiling operation system
US20200073919A1 (en) Virtual agent creation platform
CN116301785A (en) Method and device for realizing custom text editor component
US20230169138A1 (en) Rendering primitive child elements corresponding to child components of a user interface without instantiating the child components

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