CN115495079B - Qt interface dynamic generation method and system based on PSD file format - Google Patents

Qt interface dynamic generation method and system based on PSD file format Download PDF

Info

Publication number
CN115495079B
CN115495079B CN202211205267.5A CN202211205267A CN115495079B CN 115495079 B CN115495079 B CN 115495079B CN 202211205267 A CN202211205267 A CN 202211205267A CN 115495079 B CN115495079 B CN 115495079B
Authority
CN
China
Prior art keywords
interface
layer
file
information
mask
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
CN202211205267.5A
Other languages
Chinese (zh)
Other versions
CN115495079A (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.)
Xinchuanhui Electronic Technology Co ltd
Original Assignee
Xinchuanhui Electronic 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 Xinchuanhui Electronic Technology Co ltd filed Critical Xinchuanhui Electronic Technology Co ltd
Priority to CN202211205267.5A priority Critical patent/CN115495079B/en
Publication of CN115495079A publication Critical patent/CN115495079A/en
Application granted granted Critical
Publication of CN115495079B publication Critical patent/CN115495079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a Qt interface dynamic generation method based on PSD file format, comprising the following steps: s1, loading a PSD file and analyzing the attribute of a basic file; s2, analyzing the layer and mask related attributes in the basic file attributes; s3, editing interface element attributes; s4, generating a Qt interface file; s5, generating and correlating Qt interface patterns. Meanwhile, the invention also provides a Qt interface dynamic generation system based on the PSD file format, which comprises a PSD file analyzer, a PSD layer and mask attribute analyzer, an interface element attribute editor, a Qt interface file generator, a Qt interface style generator and a correlator. The method solves the problem of the efficiency of rapidly generating the application program interface from the design prototype effect graph in the development of the Qt application program by the Qt interface dynamic generation method, and greatly reduces the burden of interface development, interface style editing and debugging of program interface developers.

Description

Qt interface dynamic generation method and system based on PSD file format
Technical Field
The invention relates to an interface development technology of a Qt application program, in particular to a Qt interface dynamic generation method and a Qt interface dynamic generation system based on a PSD file format.
Background
In the development process of the Qt application program, a designer is required to design an interface interaction prototype first, an application program developer carries out interface development based on the interface prototype designed by the designer, a general designer can export a designed intermediate file through special design software, and then the developer carries out interface development based on the intermediate file.
The PSD format is a file format of the intermediate file, and the PSD format file is a special graphic file format of the image processing software Photoshop. Such file formats may store layers, channels, color patterns, etc. in Photoshop. The PSD format compresses the pictures during storage to reduce the occupied storage space.
If the PSD file format and the attribute are analyzed, and the Qt interface file and the automatically associated Qt interface style attribute are automatically generated, the development efficiency of the Qt application program interface can be greatly improved. Therefore, the invention needs to provide a dynamic Qt interface generation method and a system based on PSD file format to solve the above problems.
Disclosure of Invention
The invention aims to provide a Qt interface dynamic generation method and a Qt interface dynamic generation system based on a PSD file format, so as to solve the problems in the background technology.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the Qt interface dynamic generation method based on the PSD file format is characterized by comprising the following steps of:
S1, loading a PSD file and analyzing the attribute of a basic file;
S2, analyzing the layers and mask related attributes in the basic file attributes, generating unique identification names for each layer of the PSD file, and acquiring association relations and hierarchical relations between the layers; converting attribute information of each layer and mask of the PSD file into standard CSS style information;
The standard CSS style information is associated with a unique identification name of a layer, the standard CSS style information of a corresponding layer is obtained through the unique identification name, and the standard CSS style information is an identifiable CSS code;
S3, editing interface element attributes
Performing interface element attribute editing on the corresponding relation between the layers and masks of the PSD file and the types of the Qt interface and the interface control thereof, generating the object names of the Qt interface and the interface control thereof according to the unique identification names of the layers, establishing the corresponding relation with the unique identification names of the layers, and generating father-son relations of the Qt interface and the control thereof according to the association relation and the hierarchical relation between the layers;
S4, qt interface file generation
According to the corresponding relation between the layer and the mask, the Qt interface and the control type thereof, and the father-son relation between the Qt interface and the control thereof, the Qt interface is automatically generated, and the ui file of the Qt application program is automatically generated, so that the interface control layout is realized;
s5, qt interface style generation and association
And converting the standard CSS style information into QSS files of the Qt interface and the control thereof, and carrying out style association through the object names of the Qt interface and the control thereof.
Further, in step S2, the layer and mask related attributes include attributes and mask attributes of each layer of the PSD file, all data of the layer may be obtained in the image data segment by using the layer attributes and mask attributes, and the layer attribute information includes: total length of layer and mask information data, length of layer information data, number of layers, and list of information data of each layer; the layer number and the layer information data list comprise the header information, the mask information, the effect layer information and the setting information of the layers and the data format of the information.
Further, in step S2, the layer type, layer position, layer width and height, tracing attribute, font style and text content need to be obtained through parsing the layer and mask related attribute.
Further, in step S4, the ui file is an XML format file, where the XML format file includes a class name, a base class name, a current class name, and an attribute corresponding to the interface type, and the setting of the interface size, the interface title, and the interface style is implemented through the attribute.
Meanwhile, the invention also provides a Qt interface dynamic generation system based on the PSD file format, which realizes the generation of the Qt interface by the Qt interface dynamic generation method based on the PSD file format, and is characterized in that:
The system comprises a PSD file analyzer, a PSD layer and mask attribute analyzer, an interface element attribute editor, a Qt interface file generator and a Qt interface style generator and a correlator;
The PSD file analyzer is used for loading PSD files and analyzing basic file attributes, and the PSD files comprise file header sections, color mode data group sections, image resource sections, image layers and mask information sections and image data sections;
the PSD layer and mask attribute analyzer is used for analyzing the layer and mask related attributes;
the interface element attribute editor is used for editing the corresponding relation between the layer and mask of the PSD file and the type of the Qt interface and the interface control;
The Qt interface file generator is used for automatically generating a Qt interface according to the corresponding relation between the image layer generated by the interface element attribute editor and the Qt interface and the control types thereof and the father-son relation between the Qt interface and the control thereof, and automatically realizing the layout of the interface control;
The Qt interface style generation and association device is used for converting standard CSS style information analyzed according to the PSD file into QSS files of the Qt interface and the control thereof, and carrying out style association through the object names of the Qt interface and the control thereof.
Further, the layer and mask related attributes include: layer combinations, flat image data, color patterns and corresponding values, font type, font size, font color, layer and mask visibility and opacity.
Further, the image resource segment mainly comprises an image resource block and an image resource identifier, wherein the image resource block comprises an original file format of PSD, JPEG and TIFF, and is used for storing non-pixel data associated with an image.
Further, the layer and mask information segment contains information about the layer and mask for introducing the format of the layer record and mask record.
Further, the image data segment contains image pixel data, which is stored in planar order, first all red data, then all green data, and so on.
Compared with the prior art, the invention has the beneficial effects that: the Qt interface is dynamically generated through analyzing the PSD file, so that the development efficiency of the Qt application program interface can be greatly improved, and the burden of interface development, interface style editing and debugging of a program interface developer is greatly reduced.
Drawings
FIG. 1 is an overall flowchart of a Qt interface dynamic generation method based on PSD file format in the embodiment of the invention;
FIG. 2 is a schematic structural diagram of a PSD file format-based Qt interface dynamic generation system according to an embodiment of the present invention;
FIG. 3 is a diagram of a PSD file structure according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating PSD layer and mask attribute resolution according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of ui files of a Qt application generated by the Qt interface file generator in an embodiment of the present invention.
The reference numerals are as follows:
The system comprises a 1-PSD file parser, a 2-PSD layer and mask attribute parser, a 3-interface element attribute editor, a 4-Qt interface file generator, a 5-Qt interface style generator and a correlator.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. 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.
Referring to fig. 1, the present invention provides a technical solution:
A Qt interface dynamic generation method based on PSD file format includes the following steps:
S1, loading a PSD file and analyzing the attribute of a basic file;
s2, analyzing the layers and mask related attributes in the basic file attributes, generating unique identification names for each layer of the PSD file, and acquiring association relations and hierarchical relations between the layers; converting attribute information of each layer and mask of the PSD file into standard CSS style information;
the CSS style information is associated with the unique identification name of the layer, CSS style information of the corresponding layer can be obtained through the unique identification name, and the CSS style information is identifiable CSS codes;
S3, editing interface element attributes
Performing interface element attribute editing on the corresponding relation between the layers and masks of the PSD file and the types of the Qt interface and the interface control thereof, generating the object names of the Qt interface and the interface control thereof according to the unique identification names of the layers, establishing the corresponding relation with the unique identification names of the layers, and generating father-son relations of the Qt interface and the control thereof according to the association relation and the hierarchical relation between the layers;
S4, qt interface file generation
According to the corresponding relation between the layer and the mask, the Qt interface and the control type thereof, and the father-son relation between the Qt interface and the control thereof, the Qt interface is automatically generated, and the ui file of the Qt application program is automatically generated, so that the interface control layout is realized;
s5, qt interface style generation and association
And converting the standard CSS style information into QSS files of the Qt interface and the control thereof, and carrying out style association through the object names of the Qt interface and the control thereof.
In step S2, the layer and mask related attributes include attributes and mask attributes of each layer of the PSD file, and all data of the layer may be obtained in the image data segment by using the layer attributes and mask attributes, where the layer attribute information includes: total length of layer and mask information data, length of layer information data, number of layers, and list of information data of each layer; the layer number and the layer information data list comprise the header information, the mask information, the effect layer information and the setting information of the layers and the data format of the information.
In step S2, the layer type, layer position, layer width and height, tracing attribute, font style and text content are also required to be obtained by parsing the layer and mask related attribute.
In step S4, the ui file is an XML format file, where the XML format file includes a class name, a base class name, a current class name, and an attribute corresponding to the interface type, and the setting of the interface size, the interface title, and the interface style is implemented through the attribute.
As shown in fig. 2, the invention further provides a Qt interface dynamic generation system based on a PSD file format, which comprises a PSD file parser 1, a PSD layer and mask attribute parser 2, an interface element attribute editor 3, a Qt interface file generator 4, and a Qt interface style generation and association device 5;
The PSD file analyzer 1 mainly completes loading of PSD files and analysis of basic file attributes, completes analysis of file header sections, color mode data group sections, image resource sections, image layers, mask information sections, image data sections and the like of PSD files, and the structure of the PSD files is shown in fig. 3.
The PSD layer and mask attribute analyzer 2 mainly completes the analysis of the layer and mask related attributes, and mainly comprises: analyzing properties such as layer combination, plane image data, color mode, corresponding numerical value, font type, size, color, layer and catalog visibility, opacity and the like, generating unique identification names for each layer in a PSD file, acquiring association relations and hierarchical relations among layers, converting attribute information of each layer and masks of the PSD file into standard CSS style information, associating the standard CSS style information with the unique identification names of the layers, acquiring standard CSS style information of corresponding layers through the unique identification names, wherein the standard CSS style information is identifiable CSS codes, and a PSD layer and mask attribute analysis diagram is shown in fig. 4.
The interface element attribute editor 3 mainly completes editing of the PSD layer and the corresponding relation between masks and types of the Qt interface and interface control thereof, generates the object names of the Qt interface and interface control thereof according to the unique identification names of the layer, establishes the corresponding relation with the unique identification names of the layer, and can acquire the unique identification names of the layer through the object names or acquire the object names through the unique identification names. And generating a Qt interface and parent-child relations of the controls of the Qt interface according to the association relation and the hierarchical relation of the layers in the PSD file.
The Qt interface file generator 4 automatically generates a Qt interface according to the corresponding relation between the image layer generated by the interface element attribute editor 3 and the Qt interface and the control types thereof, the father-son relation between the Qt interface and the control thereof, and the interface control layout and the like are automatically realized.
And the Qt interface style generation and association device 5 converts the standard CSS style information analyzed by the PSD file into QSS files of the Qt interface and the control thereof, and carries out style association through the object names of the Qt interface and the control thereof.
The PSD file is divided into five main parts, as shown in FIG. 3, and there are many length markers that are used to move from one part to the next, the length markers typically being padded with bytes to be rounded to the nearest 2 or 4 byte interval. The PSD file mainly comprises a file header section, a color mode data group section, an image resource section, a layer and mask information section and an image data section. The information of each section is as follows:
1. Header section of file
The header contains the basic attributes of the image
2. Color mapping table
Only the index color and the two-tone have color pattern data, and for all other patterns, this part is only a 4-byte length field, which is set to zero;
Index color image length 768; the color data includes a color table of the image in a non-staggered order;
two-tone image-color data contains two-tone specification (its format is not recorded), other read PSD file can treat two-tone image as gray image, and only the content of two-tone information is remained when reading and writing file.
3. Image resource segment
The image resource section mainly comprises an image resource block and an image resource identifier, wherein the image resource block is a basic construction unit of several file formats, including an original file format of PSD, JPEG and TIFF, the image resource block is used for storing non-pixel data associated with an image, the basic structure of the image resource block is displayed in the image resource block, and the last field is a data area which changes according to the resource type.
4. Layer and mask information segment
The layer and mask information segment is the fourth portion of the PSD file that contains information about the layer and mask for introducing the format of the layer record and mask record. The complete combined image data is not stored here, the complete combined/composite image being located in the last part of the file; if the maximum compatibility is not chosen, no merge/composition is created and the layer data must be read to regenerate the final image.
5. Image data segment
The image data segment is the last part of the PSD file, which contains the image pixel data. The image data is stored in planar order, first all red data, then all green data, and so on. Each plane is stored in scan line order, without stuff bytes.
Further, the PSD layer and mask attribute analyzer 2 mainly completes the analysis of the layer and mask information segment in the PSD file, the segment is the core segment of the PSD file, and includes the attribute and mask attribute of each layer of the PSD file, all data of the layer can be obtained in the image data segment through the layer attribute and mask attribute, and finally the attribute information of each layer of the PSD file is converted into identifiable CSS codes. The main attribute information of each layer of the PSD file is as follows:
1. layer and mask information data total length
2. Layer information data length
3. Number of layers
4. Each layer information data list comprises header information, mask information, effect layer information and setting information of the layers, and the data format is as follows:
1) Layer range top
2) Layer range left
3) Layer range bottom
4) Layer range right
5) Number of layer channels
6) Header information for each layer channel
7) Mixed mode signature
8) Hybrid mode type
9) Opacity degree
10 Clipmask mark)
11 Layer setting mark
12 Layer setting reservation mark
13 Layer additional effects layer data length
14 Layer mask information data length
15 Layer mixed color band information data length
16 Gray-black of the layer in the layer mixed color band information
17 Gray-white of the layer in the layer mixed color band information
18 Gray-black for the next layer in the layer mixed color band information
19 Gray-white for the next layer in the layer mixed color band information
20 Layer mixed color band information for each color channel layer of layer mixed color band
21 Layer name length, followed by layer name (Pascal string), layer name length must be a multiple of 4, and if not enough, 0 is appended at the end.
22 Data length is shown in the upper layer additional effect layer data length.
As shown in fig. 4, by analyzing the PSD file layer and mask attribute, layer type, layer position, layer width and height, tracing attribute, font style, text content, and the like are mainly obtained. And generating unique identification names for each layer of the PSD, analyzing the association relationship and the hierarchical relationship between the layers, converting the attribute information of each layer and the mask of the PSD file into CSS patterns, associating the standard CSS pattern information with the unique identification names of the layers, and acquiring the CSS patterns of the corresponding layers through the unique identification names.
Furthermore, the interface element property editor 3 analyzes only information corresponding to the image layer from the PSD file, and does not have corresponding Qt interface control information, so that a developer needs to specify a control type corresponding to the image layer according to service requirements.
Further, the method generates the object names of the Qt interface and the interface control thereof according to the unique identification names of the layers, and establishes a corresponding relation with the unique identification names of the layers, wherein the unique identification names of the layers can be acquired through the object names, and the object names can also be acquired through the unique identification names.
Further, as shown in fig. 5, the Qt interface file generator 4 automatically generates a ui file of the Qt application according to the interface element attribute editing result, where the ui file is essentially an XML file, the format of which is shown in the following figure, class is a class name corresponding to the interface, the widget attribute includes a base class name and a name of the current class, property is an attribute corresponding to the interface type, and the interface size, the interface title, the interface style, and the like can be set through the attribute.
Further, the interface control association relationship can specify the interface and the parent object of the control through the Qt interface and the parent-child relationship of the control.
Further, the Qt interface style generation and association device 5 converts the standard CSS style information analyzed by the PSD file into QSS files of the Qt interface and its control, and performs style association through the object names of the Qt interface and its control.
Among them, the CSS is called a cascading style sheet (english holly: CASCADING STYLE SHEETS) which is a computer language for representing file styles such as HTML (an application of standard general markup language) or XML (a subset of standard general markup language). The CSS not only can statically modify the web page, but also can dynamically format each element of the web page in cooperation with various scripting languages. The CSS can accurately control the typesetting of element positions in the webpage at a pixel level, supports almost all font size styles, and has the capability of editing webpage objects and model styles.
Wherein QSS (Qt Style Sheets) is a style sheet of Qt, providing the Qt with a number of mechanisms such as attributes, pseudo-states, child controls, etc. to customize the appearance of the control, similar to CSS in HTML.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (7)

1. A Qt interface dynamic generation method based on PSD file format is characterized by comprising the following steps:
S1, loading a PSD file and analyzing the attribute of a basic file;
S2, analyzing the layers and mask related attributes in the basic file attributes, generating unique identification names for each layer of the PSD file, and acquiring association relations and hierarchical relations between the layers; converting attribute information of each layer and mask of the PSD file into standard CSS style information;
The standard CSS style information is associated with a unique identification name of a layer, the standard CSS style information of a corresponding layer is obtained through the unique identification name, and the standard CSS style information is an identifiable CSS code;
S3, editing interface element attributes
Performing interface element attribute editing on the corresponding relation between the layers and masks of the PSD file and the types of the Qt interface and the interface control thereof, generating the object names of the Qt interface and the interface control thereof according to the unique identification names of the layers, establishing the corresponding relation with the unique identification names of the layers, and generating father-son relations of the Qt interface and the control thereof according to the association relation and the hierarchical relation between the layers;
S4, qt interface file generation
According to the corresponding relation between the layer and the mask, the Qt interface and the control type thereof, and the father-son relation between the Qt interface and the control thereof, the Qt interface is automatically generated, and the ui file of the Qt application program is automatically generated, so that the interface control layout is realized;
s5, qt interface style generation and association
Converting the standard CSS style information into QSS files of the Qt interface and the control thereof, and carrying out style association through the object names of the Qt interface and the control thereof;
in step S2, the layer and mask related attributes include attributes and mask attributes of each layer of the PSD file, and all data of the layer may be obtained in the image data segment by using the layer attributes and mask attributes, where the layer attribute information includes: total length of layer and mask information data, length of layer information data, number of layers
Each layer information data list; the layer number and each layer information data list comprises header information, mask information, effect layer information and setting information of the layers and data format of the effect layer information;
in step S2, the layer type, layer position, layer width and height, tracing attribute, font style and text content are also required to be obtained by parsing the layer and mask related attribute.
2. The method for dynamically generating the Qt interface based on the PSD file format according to claim 1, which is characterized in that:
in step S4, the ui file is an XML format file, where the XML format file includes a class name, a base class name, a current class name, and an attribute corresponding to the interface type, and the setting of the interface size, the interface title, and the interface style is implemented through the attribute.
3. The Qt interface dynamic generation system based on PSD file format realizes Qt interface generation by the Qt interface dynamic generation method based on PSD file format according to any one of claims 1-2, and is characterized in that:
the system comprises a PSD file analyzer (1), a PSD layer and mask attribute analyzer (2), an interface element attribute editor (3), a Qt interface file generator (4) and a Qt interface style generation and association device (5);
the PSD file analyzer (1) is used for loading PSD files and analyzing the attributes of basic files, wherein the PSD files comprise file header sections, color mode data group sections, image resource sections, image layer and mask information sections and image data sections;
The PSD layer and mask attribute analyzer (2) is used for analyzing the layer and mask related attributes;
the interface element attribute editor (3) is used for editing the corresponding relation between the layer and mask of the PSD file and the type of the Qt interface and the interface control thereof;
the Qt interface file generator (4) is used for automatically generating a Qt interface according to the corresponding relation between the image layer generated by the interface element attribute editor (3) and the Qt interface and the control type thereof and the father-son relation between the Qt interface and the control thereof, and automatically realizing the layout of the interface control;
The Qt interface style generation and association device (5) is used for converting standard CSS style information analyzed according to the PSD file into QSS files of the Qt interface and the control thereof, and carrying out style association through the object names of the Qt interface and the control thereof;
in step S2, the layer and mask related attributes include attributes and mask attributes of each layer of the PSD file, and all data of the layer may be obtained in the image data segment by using the layer attributes and mask attributes, where the layer attribute information includes: total length of layer and mask information data, length of layer information data, number of layers, and list of information data of each layer; the layer number and each layer information data list comprises header information, mask information, effect layer information and setting information of the layers and data format of the effect layer information;
in step S2, the layer type, layer position, layer width and height, tracing attribute, font style and text content are also required to be obtained by parsing the layer and mask related attribute.
4. A system for dynamically generating a Qt interface based on a PSD file format according to claim 3, characterized in that:
the layer and mask related attributes include: layer combinations, flat image data, color patterns and corresponding values, font type, font size, font color, layer and mask visibility and opacity.
5. A system for dynamically generating a Qt interface based on a PSD file format according to claim 4 or 3, characterized in that:
the image resource segment mainly comprises an image resource block and an image resource identifier, wherein the image resource block comprises an original file format of PSD, JPEG and TIFF, and is used for storing non-pixel data associated with an image.
6. The system for dynamically generating a Qt interface based on a PSD file format in accordance with claim 5, wherein:
the layer and mask information field contains information about the layer and mask for introducing the format of the layer record and mask record.
7. The system for dynamically generating a Qt interface based on a PSD file format of claim 6, wherein:
The image data segment contains image pixel data that is stored in planar order, first all red data, then all green data, and so on.
CN202211205267.5A 2022-09-30 2022-09-30 Qt interface dynamic generation method and system based on PSD file format Active CN115495079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211205267.5A CN115495079B (en) 2022-09-30 2022-09-30 Qt interface dynamic generation method and system based on PSD file format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211205267.5A CN115495079B (en) 2022-09-30 2022-09-30 Qt interface dynamic generation method and system based on PSD file format

Publications (2)

Publication Number Publication Date
CN115495079A CN115495079A (en) 2022-12-20
CN115495079B true CN115495079B (en) 2024-04-30

Family

ID=84472592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211205267.5A Active CN115495079B (en) 2022-09-30 2022-09-30 Qt interface dynamic generation method and system based on PSD file format

Country Status (1)

Country Link
CN (1) CN115495079B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904353B (en) * 2023-03-02 2023-06-23 上海合见工业软件集团有限公司 Method and system for generating target source file of user interface

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
BRPI0805491A2 (en) * 2008-12-30 2010-09-08 Fundacao Cpqd Ct De Pesquisa E method and system for real time generation of ad hoc thematic maps via web
CN108984172A (en) * 2018-05-31 2018-12-11 北京奇艺世纪科技有限公司 A kind of generation method and device of interface file
CN110069257A (en) * 2019-04-25 2019-07-30 腾讯科技(深圳)有限公司 A kind of interface processing method, device and terminal
WO2019228090A1 (en) * 2018-05-30 2019-12-05 中兴通讯股份有限公司 Method and apparatus for accelerating application interface loading
CN111190519A (en) * 2020-01-02 2020-05-22 广州虎牙科技有限公司 File and control processing method, device, equipment and storage medium thereof
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium
CN111562919A (en) * 2020-07-14 2020-08-21 成都市映潮科技股份有限公司 Method, system and storage medium for generating front-end webpage code based on PSD file
CN112764741A (en) * 2021-03-02 2021-05-07 浙江鸿城科技有限责任公司 Method and device for visually editing interface and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
BRPI0805491A2 (en) * 2008-12-30 2010-09-08 Fundacao Cpqd Ct De Pesquisa E method and system for real time generation of ad hoc thematic maps via web
WO2019228090A1 (en) * 2018-05-30 2019-12-05 中兴通讯股份有限公司 Method and apparatus for accelerating application interface loading
CN108984172A (en) * 2018-05-31 2018-12-11 北京奇艺世纪科技有限公司 A kind of generation method and device of interface file
CN110069257A (en) * 2019-04-25 2019-07-30 腾讯科技(深圳)有限公司 A kind of interface processing method, device and terminal
CN111190519A (en) * 2020-01-02 2020-05-22 广州虎牙科技有限公司 File and control processing method, device, equipment and storage medium thereof
CN111475163A (en) * 2020-06-22 2020-07-31 腾讯科技(深圳)有限公司 Method, device and equipment for generating code file of view template and storage medium
CN111562919A (en) * 2020-07-14 2020-08-21 成都市映潮科技股份有限公司 Method, system and storage medium for generating front-end webpage code based on PSD file
CN112764741A (en) * 2021-03-02 2021-05-07 浙江鸿城科技有限责任公司 Method and device for visually editing interface and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CEGUI界面编辑器的设计与实现;***;陈滔滔;杜晓荣;;计算机与现代化;20130715(07);192-197 *
动态生成图形界面程序的设计与实现;易彤;;电脑编程技巧与维护;20091118(第22期);105-106 *

Also Published As

Publication number Publication date
CN115495079A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
RU2358311C2 (en) Word processing document, stored as single xml file, which can be manipulated by applications which can read xml language
JP4698668B2 (en) Document markup method and system
US20060224952A1 (en) Adaptive layout templates for generating electronic documents with variable content
US9430455B2 (en) Methods and systems for intelligent form-filling and electronic document generation
CN111309313A (en) Method for quickly generating HTML (hypertext markup language) and storing form data
CN110705237B (en) Automatic document generation method, data processing device and storage medium
JP2010218577A (en) Method and apparatus for processing document
GB2258552A (en) Document processing system
JPH04503881A (en) Document management and creation system
US20100107048A1 (en) Document processor and document processing method
CN115495079B (en) Qt interface dynamic generation method and system based on PSD file format
CN109492199A (en) A kind of pdf document conversion method judged in advance based on OCR
CN112579086B (en) Template construction method adaptive to multi-platform front-end View
US20070208995A1 (en) Document Processing Device and Document Processing Method
US20070198915A1 (en) Document Processing Device And Document Processing Method
Bagley et al. Creating reusable well-structured PDF as a sequence of component object graphic (COG) elements
JP4566196B2 (en) Document processing method and apparatus
US20080282143A1 (en) Document Processing Device and Document Processing Method
US20080256437A1 (en) Document Processing Apparatus and Document Processing Method
WO2006103760A1 (en) Document conversion use system
EP1780645A1 (en) Document processing method and device
US20080270887A1 (en) Document Processing Device And Document Processing Method
CN113546409B (en) Method for playing GIF format resource by Laya engine and storage medium
US20070240036A1 (en) Document Processing Device and Document Processing Method
JP4719743B2 (en) Graph processing device

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