CN110516192A - Picture resource material and textual materials are dragged to software interface method and its system - Google Patents

Picture resource material and textual materials are dragged to software interface method and its system Download PDF

Info

Publication number
CN110516192A
CN110516192A CN201910824126.3A CN201910824126A CN110516192A CN 110516192 A CN110516192 A CN 110516192A CN 201910824126 A CN201910824126 A CN 201910824126A CN 110516192 A CN110516192 A CN 110516192A
Authority
CN
China
Prior art keywords
picture
text
file
resource
software
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.)
Pending
Application number
CN201910824126.3A
Other languages
Chinese (zh)
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.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201910824126.3A priority Critical patent/CN110516192A/en
Publication of CN110516192A publication Critical patent/CN110516192A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Picture resource material and textual materials are dragged to software interface method, the method the present invention provides a kind of are as follows: step 1 establishes soft project and adds web browser control;Step 2, the imformosome for allowing soft project to receive webpage dragging event and parsing dragging event carrying;Step 3 judges whether the entity pulled is text or pictorial information;Step 4 is determined to generate the mode of text or picture and be performed corresponding processing according to the different imformosomes of carrying;The text of generation or picture are directly shown in software interface or are saved in soft project by step 5, soft project.Picture resource material and textual materials are dragged to software interface system the present invention also provides a kind of, operation of the present invention is simple, improves work efficiency.

Description

Picture resource material and textual materials are dragged to software interface method and its system
Technical field
The present invention relates to especially a kind of that picture resource material is dragged to software interface method with textual materials and its is System.
Background technique
IT software industry flourishes now, and powerful complete, especially development is more prominent.In all kinds of softwares In practical application, how the user of software is using fast quickly grabbing colourful picture resource material or textual materials As critically important focus.Although current partial software can support local file to be directly dragged in software, everybody is Know it is Internet era now, many texts and picture can directly acquire from network.But under justing think, at present by certain net Text or picture on standing are inserted into software, become software content displaying a function, most of user, all Text and picture could be added in software by following step:
Firstly, opening web browser (may be another software);
Secondly, input picture address, opens Web page picture right button for picture and is saved in local;If it is word content, then It is the word content then right button duplication that selection needs;
Finally, being inserted into software with " insert pictures " function that software provides from the picture file for being saved in disk;Such as Fruit is that file then does a file editor on software, then the content of duplication is pasted in editing machine.
It can be seen that picture and text could be inserted into corresponding software by sequence of operations, during which operate Step is complicated, cumbersome, frequently refers to the switching of multiterminal software.
Summary of the invention
In order to overcome the problems referred above, the object of the present invention is to provide a kind of picture resource material is dragged to textual materials it is soft Part interfacial process, improves work efficiency.
The present invention is realized using following scheme: a kind of that picture resource material and textual materials are dragged to software interface side Method, described method includes following steps:
Step 1 establishes soft project and adds web browser control;
Step 2, the imformosome for allowing soft project to receive webpage dragging event and parsing dragging event carrying;
Step 3 judges whether the entity pulled is text or pictorial information;
Step 4 is determined to generate the mode of text or picture and be performed corresponding processing according to the different imformosomes of carrying;
Step 5, soft project directly show the text of generation or picture or in software work in software interface It is saved in journey.
Further, the step 1 is further specifically:
Step 11: establishing soft project, design the corresponding UI operation interface of typesetting;
Step 12: web browser control is added in soft project, it is specified directly to be opened in soft project Webpage.
Further, the imformosome that dragging event carries is parsed in the step 2, using Integrated Development Environment QTCreator is as tool, as long as the component of software interface is arranged to receive to pull message.
Further, the step 3 is further specifically: pulls information according to the component responds of soft project and feeds back Information packet is carried, picture resource material and textual materials in information packet are obtained;By the picture resource material of acquisition and Textual materials are cached, and are used for step 4.
Further, the step 4 is further specifically:
If it is text information and no comprising network protocol header information for pulling the content that entity carries, regard network address text It is handled, word content is cached;Wherein, the foundation of judgement mainly judges whether it is with " http " or " https " Agreement is taken the lead and is not with " png ", " jpg ", " jpeg ", the extension name format ending of " bmp " picture;
If pulling the content that entity carries is text information and does not include network protocol header information and do not include this earth magnetism Word content is cached by disk file path then as being that webpage text is handled;The foundation wherein judged is that judgement is It is no not comprising " http " and " https ", and taken the lead with disk path;
If pulling the content that entity carries is text information and includes local disk file path address, regarding is this The file on ground is handled out, further judges whether this document is text file, if it is text file, then by word content Taking-up is cached;
If pulling the content that entity carries is picture and is Web page picture address, picture address is cached;Its The foundation of middle judgement is to see down to be to take the lead with " http " or " https ", and with " png ", " jpg ", " jpeg ", " bmp " The picture address of extension name ending;
If pull the content that entity carries be picture and be picture Base64 coding, the Base64 of picture is cached Get up;
If pulling the content that entity carries is picture binary stream data packet, binary stream is cached;Wherein, The foundation of judgement is directly to judge binary file type, and binary file type is all defined and the standard of full disclosure Format, and directly judge that the information header part of binary file can obtain the specific of picture according to disclosed file information structure Format;
If pulling the content that entity carries is local picture disk file address, by local picture disk file address It is cached.
Further, the step 5 is further specifically:
Step 51 is classified as according to the content property that step 4 caches: internet protocol address resource, binary file Flow resource, Base64 resource, local disk file resource, original sample resource;
Step 52 takes corresponding processing mode according to the classification respectively, obtains text or picture entity;
Text or picture entity are directly displayed or are stored according to the specific requirements of business software by step 53 In soft project.
Further, the step 52 is further specifically: and it if it is internet protocol address resource, and is text, then According to the needs of business software, address is shown on software interface or is saved with the format of software set;
It if it is internet protocol address resource, and is picture, then directly being downloaded according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by the picture;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, the directly figure to Base64 coding Piece decodes picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the exploitation of direct exploitation tool Library directly Loads Image from the picture file address of the local, and obtained picture is shown on software interface or is set with software Fixed format saves;
It if it is the address of local disk file resource, and is text file, then the exploitation of direct exploitation tool Corresponding text information is directly read from the text file of the local in library, obtained text is shown on software interface or with The format of software set saves;
If it is the picture file of binary file stream resource, then direct exploitation tool reads binary stream file Related API be read out, obtained picture is shown on software interface finally or is saved with the format of software set Come, pulls the text to come if it is other applications and also belong to such case;
Finally, illustrating it is currently common text information if being not admitted to above-mentioned situation, directly text importing existing It is saved on software interface or with the format of software set.
Picture resource material and textual materials are dragged to software interface system, the system the present invention also provides a kind of Including establishing module, receiving module, judgment module, processing module and display module:
It is described to establish module: for establishing soft project and adding web browser control;
The receiving module: allowing soft project to receive webpage dragging event and parses the imformosome of dragging event carrying;
The judgment module: judge whether the entity pulled is text or pictorial information;
The processing module: it determines to generate the mode of text or picture and carry out corresponding according to the different imformosomes of carrying Processing;
The display module: directly showing the text of generation or picture in software interface for soft project or Person saves in soft project.
Further, the module of establishing further comprises having design cell and adding unit:
The design cell: for establishing soft project, the corresponding UI operation interface of typesetting is designed;
The adding unit: for adding web browser control in soft project, so as to direct in soft project Open specified webpage.
Further, the imformosome that dragging event carries is parsed in the receiving module, using Integrated Development Environment QTCreator is as tool, as long as the component of software interface is arranged to receive to pull message.
Further, the judgment module is further specifically: pulls information feedback according to the component responds of soft project Information packet is carried back, obtains picture resource material and textual materials in information packet;By the picture resource element of acquisition Material and textual materials are cached, and are used for processing module.
Further, the processing module is further specifically:
If it is text information and no comprising network protocol header information for pulling the content that entity carries, regard network address text It is handled, word content is cached;Wherein, the foundation of judgement mainly judges whether it is with " http " or " https " Agreement is taken the lead and is not with " png ", " jpg ", " jpeg ", the extension name format ending of " bmp " picture;
If pulling the content that entity carries is text information and does not include network protocol header information and do not include this earth magnetism Word content is cached by disk file path then as being that webpage text is handled;The foundation wherein judged is that judgement is It is no not comprising " http " and " https ", and taken the lead with disk path;
If pulling the content that entity carries is text information and includes local disk file path address, regarding is this The file on ground is handled out, further judges whether this document is text file, if it is text file, then by word content Taking-up is cached;
If pulling the content that entity carries is picture and is Web page picture address, picture address is cached;Its The foundation of middle judgement is to see down to be to take the lead with " http " or " https ", and with " png ", " jpg ", " jpeg ", " bmp " The picture address of extension name ending;
If pull the content that entity carries be picture and be picture Base64 coding, the Base64 of picture is cached Get up;
If pulling the content that entity carries is picture binary stream data packet, binary stream is cached;Wherein, The foundation of judgement is directly to judge binary file type, and binary file type is all defined and the standard of full disclosure Format, and directly judge that the information header part of binary file can obtain the specific of picture according to disclosed file information structure Format;
If pulling the content that entity carries is local picture disk file address, by local picture disk file address It is cached.
Further, the display module further comprises taxon, acquiring unit and result treatment unit:
The taxon: for being classified as according to the content property cached in processing module: internet protocol address Resource, binary file stream resource, Base64 resource, local disk file resource, original sample resource;
The acquiring unit: for taking corresponding processing mode respectively according to the classification, text or picture are obtained Entity;
The result treatment unit: for being carried out text or picture entity directly according to the specific requirements of business software It shows or is stored in soft project.
Further, the acquiring unit is further specifically: and it if it is internet protocol address resource, and is text, that According to the needs of business software, address is shown on software interface or is saved with the format of software set;
It if it is internet protocol address resource, and is picture, then directly being downloaded according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by the picture;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, the directly figure to Base64 coding Piece decodes picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the exploitation of direct exploitation tool Library directly Loads Image from the picture file address of the local, and obtained picture is shown on software interface or is set with software Fixed format saves;
It if it is the address of local disk file resource, and is text file, then the exploitation of direct exploitation tool Corresponding text information is directly read from the text file of the local in library, obtained text is shown on software interface or with The format of software set saves;
If it is the picture file of binary file stream resource, then direct exploitation tool reads binary stream file Related API be read out, obtained picture is shown on software interface finally or is saved with the format of software set Come, pulls the text to come if it is other applications and also belong to such case;
Finally, illustrating it is currently common text information if being not admitted to above-mentioned situation, directly text importing existing It is saved on software interface or with the format of software set.
The beneficial effects of the present invention are: the present invention in addition to can comprising processing identification local file be dragged to software other than, Also the direct dragging of supported web page resource is come;Mode, which sums up, is exactly: directly embedding web browser in software, makes User wants that perhaps text is inserted into software and directly by picture or to need in embedded web browser certain picture in webpage The text wanted is dragged in software, and operating process is simple and convenient.
Detailed description of the invention
Fig. 1 is method flow schematic diagram of the invention.
Fig. 2 is system principle framework of the invention.
Specific embodiment
The present invention will be further described with reference to the accompanying drawing.
Refering to Figure 1, it is of the invention it is a kind of picture resource material and textual materials are dragged to software interface method, Described method includes following steps: step 1: establishing soft project and add web browser control;
Step 11: establishing soft project, design the corresponding UI operation interface of typesetting;Detailed description are as follows:
The step can be according to actual software function point, the corresponding software interface of progress;Simplest interface is exactly A window is created, when software main interface;
Step 12: adding web browser control, in soft project directly to open specified webpage in software; Detailed description are as follows:
The step can carry out corresponding software interface design according to actual software function point;Simplest interface is exactly A web browser control is directly placed on the window that step 11 creates;Using Integrated Development Environment QTCreator conduct Tool is the web pages component of QTCreator: QWebView;
Step 2: allowing soft project to receive webpage dragging event and parse the imformosome of its carrying;
Here use QTCreator as tool, as long as the component of software interface is arranged to receive to pull message, this While calling directly assembly method: setAcceptDrops (true).
Step 3: judging whether the entity pulled is text or pictorial information;Detailed description are as follows:
The step mainly responds dragging information according to component software and feeds back carrying information packet.There may be video Format, audio format and the non-legible format of other non-pictures, as long as but here picture and text formatting.In this step will Information packet is cached, and is used for next step.
Step 4: according to the mode and method for carrying different imformosomes decision generation texts or picture;It is described in detail such as Under:
Step 41: if it is text information and no comprising the first-class information of network protocol for pulling the content that entity carries, when It does network address text to be handled, word content is cached;The foundation of judgement here mainly judge whether be with " http " or Person " https " agreement is taken the lead and is not with the extension name format ending of the pictures such as " png ", " jpg ", " jpeg ", " bmp ";
Step 42: if pulling the content that entity carries is text information and does not include the first-class information of network protocol and do not wrap Word content is cached by file path containing local disk then as being that general webpage text is handled;Here judge One mainly judge whether not comprising " http " and " https ", and taken the lead with disk path, so-called disk road Diameter, such as: started if it is window system person with disk partition drive: C:, D:, E: etc.;If it is linux system System, then be usually/,/usr/ ,/etc/ etc.;
Step 43: if pulling the content that entity carries is text information and includes local disk file path address, As being that local file is handled out, further judge whether this document is text file, if it is text file, then will Word content taking-up is cached;The here foundation of judgement: being to be unsatisfactory under the premise of step 41 is also unsatisfactory for step 42, still The content is taken the lead with " disk file ".Illustrating that this pulls information is a disk file, further developing instrument API is called to sentence Disconnected this document is text file, if it is text file, then developing instrument API is called to read the disk text file content It takes out, is cached;
Step 44: if pull entity carry content be text information and be not belonging to step 41, step 42, step 43, The situation of step 44, then it is assumed that the text is to carry out pulling from other applications selection, then also by word content It is cached;The judgement of the step is relatively directly simpler, has eliminated other situations, as long as therefore text can directly delay It stores away;
Step 45: if pulling the content that entity carries is picture and is Web page picture address, picture address being cached Get up;Here judgement foundation be primarily to see down be taken the lead with " http " the latter " https ", and with " png ", " jpg ", The picture address of the extension name such as " jpeg ", " bmp " ending;
Step 46: if pull entity carry content be picture and be picture Base64 coding, Base64 is delayed It stores away;So-called Base64 coded format, the i.e. following format of form:
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMREhUTE xMVFRIXGBgYGRgYFxYYFhoaGRkYGRgZFhYbHyggHxolGxcbIjEiJSkrLi4uFx8zODMtNygtLisBC goKDg0OGxAQGzUmICUrLy0vNSstLS8tMi0tNS0uLS0tNS0tLS0tLS0tLS0tLS8tLS0rLS0tLS0tL S0tLS0tLf/AABEIANYA6wMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAABAUCAwYBB//EA D8QAAEDAgQDBgMGBAUEAwAAAAEAAhEDIQQSMUEFUWETInGBkaEGMrEUQlLB0fAjcpLhFRZisvEzw tLiQ1Oi/8QAGQEBAAMBAQAAAAAAAAAAAAAAAAIDBAEF/8QAKBEAAgIBBAICAgEFAAAAAAAAAAECE QMEEiExIlETQTJhoQUjcYGR/9oADAMBAAIRAxEAPwD7iiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiI AiIgCIiAq+L48ta8NsRlBPLMW6dYOq56nUIOYOOb8QN/MrosS8PdOwBHjce1lX47BZu835gAIEA EA/3O6wrWqORxl1fZfjpLkiUcbUa4PzuN9C4kHmImP0XV0Koe0OGhEhcrUwLgwuJAgE5YnQT806+ Ssfh3E60z/M3/uH0PmVshlhkva+hkimrReIiKRQEREAREQBERAEReO......
Step 47: if pulling the content that entity carries is picture binary stream data packet, binary stream being cached Come;The step judgement main foundation, be directly to judge binary file type, as picture file (png, jpg, jpeg, Bmp etc.) and binary file is all defined and the format of the standard of full disclosure, and generally according to disclosed the file information knot Structure directly judges that the information header part of its binary file can be obtained by the specific format of picture.
Step 48: if pulling the content that entity carries is local picture disk file address, by local picture disk File address is cached;So-called disk file address, such as: it is started if it is window system person with disk partition drive, : C:, D:, E: etc.;If it is Linux system, then be usually/,/usr/ ,/etc/ etc.;File address will with png, The file of the picture file extensions such as jpg, jpeg, bmp ending.
Step 5: software directly shows the text of generation or picture or in software with it in software interface He saves form;
The step 5, specifically comprises the following steps:
Step 51: being classified as according to the content property that step 4 caches: internet protocol address resource, binary file Flow resource, Base64 resource, local disk file resource, original sample resource;
Step 52: corresponding processing mode, the text or picture entity of acquisition are taken according to the classification of step 51 respectively; Concrete measure is as follows:
It if it is internet protocol address resource, and is text, then being shown address soft according to the needs of business software It is saved on part interface or with the format of software set;
It if it is internet protocol address resource, and is picture, then directly being downloaded according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by the picture;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, the directly figure to Base64 coding Piece decodes picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the exploitation of direct exploitation tool Library directly Loads Image from the picture file address of the local, and obtained picture is shown on software interface or is set with software Fixed format saves;
It if it is the address of local disk file resource, and is text file, then the exploitation of direct exploitation tool Corresponding text information is directly read from the text file of the local in library, obtained text is shown on software interface or with The format of software set saves;
If it is the picture file of binary file stream resource, then direct exploitation tool reads binary stream file Related API (general developing instrument more have corresponding library that can read and write this class file) be read out, the figure that will finally obtain Piece is shown on software interface or is saved with the set format of software;The text to come is pulled if it is other applications Word also belongs to such case.
Finally, illustrating to be currently common text information if being not admitted to situation as above, then processing mode also compares It is relatively simple, directly saved by text importing on software interface or with the set format of software.
Step 53: being directly displayed text or picture entity or by other according to the specific requirements of business software Mode is stored in software.
In addition, picture resource material and textual materials are dragged to software interface system the present invention provides a kind of, it is described System includes establishing module, receiving module, judgment module, processing module and display module:
It is described to establish module: for establishing soft project and adding web browser control;
The receiving module: allowing soft project to receive webpage dragging event and parses the imformosome of dragging event carrying;
The judgment module: judge whether the entity pulled is text or pictorial information;
The processing module: it determines to generate the mode of text or picture and carry out corresponding according to the different imformosomes of carrying Processing;
The display module: directly showing the text of generation or picture in software interface for soft project or Person saves in soft project.
Wherein, the module of establishing further comprises having design cell and adding unit:
The design cell: for establishing soft project, the corresponding UI operation interface of typesetting is designed;
The adding unit: for adding web browser control in soft project, so as to direct in soft project Open specified webpage.
The imformosome that dragging event carries is parsed in the receiving module, using Integrated Development Environment QTCreator conduct Tool, as long as the component of software interface is arranged to receive to pull message.
The judgment module is further specifically: pulls information according to the component responds of soft project and feeds back carrying letter Data packet is ceased, picture resource material and textual materials in information packet are obtained;By picture resource material and the text element of acquisition Material is cached, and is used for processing module.
The processing module is further specifically:
If it is text information and no comprising network protocol header information for pulling the content that entity carries, regard network address text It is handled, word content is cached;Wherein, the foundation of judgement mainly judges whether it is with " http " or " https " Agreement is taken the lead and is not with " png ", " jpg ", " jpeg ", the extension name format ending of " bmp " picture;
If pulling the content that entity carries is text information and does not include network protocol header information and do not include this earth magnetism Word content is cached by disk file path then as being that webpage text is handled;The foundation wherein judged is that judgement is It is no not comprising " http " and " https ", and taken the lead with disk path;Such as: if it is window system person with disk Subregion drive is started: C:, D:, E: etc.;If it is Linux system, then be usually/,/usr/ ,/etc/ etc.;
If pulling the content that entity carries is text information and includes local disk file path address, regarding is this The file on ground is handled out, further judges whether this document is text file, if it is text file, then by word content Taking-up is cached;
If pulling the content that entity carries is picture and is Web page picture address, picture address is cached;Its The foundation of middle judgement is to see down to be to take the lead with " http " or " https ", and with " png ", " jpg ", " jpeg ", " bmp " The picture address of extension name ending;
If pull the content that entity carries be picture and be picture Base64 coding, the Base64 of picture is cached Get up;
If pulling the content that entity carries is picture binary stream data packet, binary stream is cached;Wherein, The foundation of judgement is directly to judge binary file type, and binary file type is all defined and the standard of full disclosure Format, and directly judge that the information header part of binary file can obtain the specific of picture according to disclosed file information structure Format;
If pulling the content that entity carries is local picture disk file address, by local picture disk file address It is cached.Such as: started if it is window system person with disk partition drive: C:, D:, E: etc.;If it is Linux system, then be usually/,/usr/ ,/etc/ etc.;File address will be extended with picture files such as png, jpg, jpeg, bmp The file of name ending.
The display module further comprises taxon, acquiring unit and result treatment unit:
The taxon: for being classified as according to the content property cached in processing module: internet protocol address Resource, binary file stream resource, Base64 resource, local disk file resource, original sample resource;
The acquiring unit: for taking corresponding processing mode respectively according to the classification, text or picture are obtained Entity;
The result treatment unit: for being carried out text or picture entity directly according to the specific requirements of business software It shows or is stored in soft project.
The acquiring unit is further specifically: if it is internet protocol address resource, and is text, then according to business Address is shown on software interface or is saved with the format of software set by the needs of software;
It if it is internet protocol address resource, and is picture, then directly being downloaded according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by the picture;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, the directly figure to Base64 coding Piece decodes picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the exploitation of direct exploitation tool Library directly Loads Image from the picture file address of the local, and obtained picture is shown on software interface or is set with software Fixed format saves;It if it is the address of local disk file resource, and is text file, then direct exploitation work The development library of tool directly reads corresponding text information from the text file of the local, and obtained text is shown on software interface Show or is saved with the format of software set;
If it is the picture file of binary file stream resource, then direct exploitation tool reads binary stream file Related API be read out, obtained picture is shown on software interface finally or is saved with the format of software set Come, pulls the text to come if it is other applications and also belong to such case;
Finally, illustrating it is currently common text information if being not admitted to above-mentioned situation, directly text importing existing It is saved on software interface or with the format of software set.
The foregoing is merely presently preferred embodiments of the present invention, all equivalent changes done according to scope of the present invention patent with Modification, is all covered by the present invention.

Claims (14)

1. a kind of be dragged to software interface method for picture resource material and textual materials, it is characterised in that: the method includes Following steps:
Step 1 establishes soft project and adds web browser control;
Step 2, the imformosome for allowing soft project to receive webpage dragging event and parsing dragging event carrying;
Step 3 judges whether the entity pulled is text or pictorial information;
Step 4 is determined to generate the mode of text or picture and be performed corresponding processing according to the different imformosomes of carrying;
Step 5, soft project directly show the text of generation or picture or in soft project in software interface It saves.
2. it is according to claim 1 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the step 1 is further specifically:
Step 11: establishing soft project, design the corresponding UI operation interface of typesetting;
Step 12: adding web browser control, in soft project directly to open specified webpage in soft project.
3. it is according to claim 1 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the imformosome that dragging event carries is parsed in the step 2, using Integrated Development Environment QTCreator as tool, As long as the component of software interface is arranged to receive to pull message.
4. it is according to claim 1 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the step 3 is further specifically: pulls information according to the component responds of soft project and feeds back carrying Information Number According to packet, picture resource material and textual materials in information packet are obtained;The picture resource material and textual materials of acquisition are delayed It stores away, is used for step 4.
5. it is according to claim 1 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the step 4 is further specifically:
If it is text information and no comprising network protocol header information for pulling the content that entity carries, carried out as network address text Processing, word content is cached;Wherein, the foundation of judgement mainly judges whether it is with " http " or " https " agreement It takes the lead and is not with " png ", " jpg ", " jpeg ", the extension name format ending of " bmp " picture;
If pulling the content that entity carries is text information and does not include network protocol header information and do not include local disk text Word content is cached by part path then as being that webpage text is handled;The foundation wherein judged is to judge whether do not have It has comprising " http " and " https ", and is taken the lead with disk path;
If pulling the content that entity carries is text information and includes local disk file path address, it is local for regarding File is handled out, is further judged whether this document is text file, if it is text file, is then taken out word content It is cached;
If pulling the content that entity carries is picture and is Web page picture address, picture address is cached;Wherein sentence Disconnected foundation is to see down whether take the lead with " http " or " https ", and extend with " png ", " jpg ", " jpeg ", " bmp " The picture address of name ending;
If pull entity carry content be picture and be picture Base64 coding, the Base64 of picture is cached Come;
If pulling the content that entity carries is picture binary stream data packet, binary stream is cached;Wherein, judge Foundation be directly to judge binary file type, binary file type is all defined and the lattice of the standard of full disclosure Formula, and directly judge that the information header part of binary file can obtain the specific lattice of picture according to disclosed file information structure Formula;
If pulling the content that entity carries is local picture disk file address, by local picture disk file address caching Get up.
6. it is according to claim 5 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the step 5 is further specifically:
Step 51 is classified as according to the content property that step 4 caches: internet protocol address resource, binary file stream provide Source, Base64 resource, local disk file resource, original sample resource;
Step 52 takes corresponding processing mode according to the classification respectively, obtains text or picture entity;
Text or picture entity are directly displayed or are stored in software according to the specific requirements of business software by step 53 In engineering.
7. it is according to claim 6 it is a kind of picture resource material and textual materials are dragged to software interface method, it is special Sign is: the step 52 is further specifically: if it is internet protocol address resource, and is text, then soft according to business Address is shown on software interface or is saved with the format of software set by the needs of part;
It if it is internet protocol address resource, and is picture, then directly downloading the figure according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by piece;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, directly the picture solution to Base64 coding Code goes out picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the development library of direct exploitation tool is straight It connects from the picture file address of the local and Loads Image, obtained picture is shown on software interface or with software set Format saves;
It if it is the address of local disk file resource, and is text file, then the development library of direct exploitation tool is straight It connects from the text file of the local and reads corresponding text information, obtained text is shown on software interface or with software The format of setting saves;
If it is the picture file of binary file stream resource, then direct exploitation tool reads the phase of binary stream file It closes API to be read out, obtained picture is shown on software interface finally or is saved with the format of software set, such as Fruit is that the text that other applications dragging comes also belongs to such case;
Finally, illustrating it is currently common text information, directly by text importing in software if being not admitted to above-mentioned situation It is saved on interface or with the format of software set.
8. a kind of be dragged to software interface system for picture resource material and textual materials, it is characterised in that: the system comprises Establish module, receiving module, judgment module, processing module and display module:
It is described to establish module: for establishing soft project and adding web browser control;
The receiving module: allowing soft project to receive webpage dragging event and parses the imformosome of dragging event carrying;
The judgment module: judge whether the entity pulled is text or pictorial information;
The processing module: it determines to generate the mode of text or picture according to the different imformosomes of carrying and is accordingly located Reason;
The display module: for soft project by the text of generation or picture directly software interface show or It is saved in soft project.
9. it is according to claim 8 it is a kind of picture resource material and textual materials are dragged to software interface system, it is special Sign is: the module of establishing further comprises having design cell and adding unit:
The design cell: for establishing soft project, the corresponding UI operation interface of typesetting is designed;
The adding unit: for adding web browser control in soft project, directly to be opened in soft project Specified webpage.
10. it is according to claim 8 it is a kind of picture resource material and textual materials are dragged to software interface system, it is special Sign is: the imformosome that dragging event carries is parsed in the receiving module, using Integrated Development Environment QTCreator as work Tool, as long as the component of software interface is arranged to receive to pull message.
11. it is according to claim 8 it is a kind of picture resource material and textual materials are dragged to software interface system, it is special Sign is: the judgment module is further specifically: pulls information according to the component responds of soft project and feeds back carrying letter Data packet is ceased, picture resource material and textual materials in information packet are obtained;By picture resource material and the text element of acquisition Material is cached, and is used for processing module.
12. it is according to claim 8 it is a kind of picture resource material and textual materials are dragged to software interface system, it is special Sign is: the processing module is further specifically:
If it is text information and no comprising network protocol header information for pulling the content that entity carries, carried out as network address text Processing, word content is cached;Wherein, the foundation of judgement mainly judges whether it is with " http " or " https " agreement It takes the lead and is not with " png ", " jpg ", " jpeg ", the extension name format ending of " bmp " picture;
If pulling the content that entity carries is text information and does not include network protocol header information and do not include local disk text Word content is cached by part path then as being that webpage text is handled;The foundation wherein judged is to judge whether do not have It has comprising " http " and " https ", and is taken the lead with disk path;
If pulling the content that entity carries is text information and includes local disk file path address, it is local for regarding File is handled out, is further judged whether this document is text file, if it is text file, is then taken out word content It is cached;
If pulling the content that entity carries is picture and is Web page picture address, picture address is cached;Wherein sentence Disconnected foundation is to see down whether take the lead with " http " or " https ", and extend with " png ", " jpg ", " jpeg ", " bmp " The picture address of name ending;
If pull entity carry content be picture and be picture Base64 coding, the Base64 of picture is cached Come;
If pulling the content that entity carries is picture binary stream data packet, binary stream is cached;Wherein, judge Foundation be directly to judge binary file type, binary file type is all defined and the lattice of the standard of full disclosure Formula, and directly judge that the information header part of binary file can obtain the specific lattice of picture according to disclosed file information structure Formula;
If pulling the content that entity carries is local picture disk file address, by local picture disk file address caching Get up.
13. it is according to claim 12 it is a kind of picture resource material and textual materials are dragged to software interface system, Be characterized in that: the display module further comprises taxon, acquiring unit and result treatment unit:
The taxon: for being classified as according to the content property cached in processing module: internet protocol address resource, Binary file stream resource, Base64 resource, local disk file resource, original sample resource;
The acquiring unit: for taking corresponding processing mode respectively according to the classification, text or picture entity are obtained;
The result treatment unit: for being directly displayed text or picture entity according to the specific requirements of business software Or it is stored in soft project.
14. it is according to claim 13 it is a kind of picture resource material and textual materials are dragged to software interface system, Be characterized in that: the acquiring unit is further specifically: if it is internet protocol address resource, and is text, then according to industry The needs of business software, address is shown on software interface or is saved with the format of software set;
It if it is internet protocol address resource, and is picture, then directly downloading the figure according to this network piece path address Picture after downloading is shown on software interface or is saved with the format of software set by piece;
If it is the picture of Base64 resource, then the decoding library of exploitation tool, directly the picture solution to Base64 coding Code goes out picture resource, and obtained picture is shown on software interface or is saved with the format of software set;
It if it is the address of local disk file resource, and is picture file, then the development library of direct exploitation tool is straight It connects from the picture file address of the local and Loads Image, obtained picture is shown on software interface or with software set Format saves;
It if it is the address of local disk file resource, and is text file, then the development library of direct exploitation tool is straight It connects from the text file of the local and reads corresponding text information, obtained text is shown on software interface or with software The format of setting saves;
If it is the picture file of binary file stream resource, then direct exploitation tool reads the phase of binary stream file It closes API to be read out, obtained picture is shown on software interface finally or is saved with the format of software set, such as Fruit is that the text that other applications dragging comes also belongs to such case;
Finally, illustrating it is currently common text information, directly by text importing in software if being not admitted to above-mentioned situation It is saved on interface or with the format of software set.
CN201910824126.3A 2019-09-02 2019-09-02 Picture resource material and textual materials are dragged to software interface method and its system Pending CN110516192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910824126.3A CN110516192A (en) 2019-09-02 2019-09-02 Picture resource material and textual materials are dragged to software interface method and its system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910824126.3A CN110516192A (en) 2019-09-02 2019-09-02 Picture resource material and textual materials are dragged to software interface method and its system

Publications (1)

Publication Number Publication Date
CN110516192A true CN110516192A (en) 2019-11-29

Family

ID=68630480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910824126.3A Pending CN110516192A (en) 2019-09-02 2019-09-02 Picture resource material and textual materials are dragged to software interface method and its system

Country Status (1)

Country Link
CN (1) CN110516192A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626036A (en) * 2020-05-27 2020-09-04 南京蓝鲸人网络科技有限公司 Novel image-text typesetting processing method
CN116610823A (en) * 2023-04-28 2023-08-18 江苏传智播客教育科技股份有限公司 Method and system for uniformly accessing multimedia resources

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150261516A1 (en) * 2014-03-12 2015-09-17 Ca, Inc. Installing software using multiple metadata interfaces
CN105302572A (en) * 2015-11-19 2016-02-03 天脉聚源(北京)教育科技有限公司 Method and device for importing file into software
CN106843910A (en) * 2017-03-10 2017-06-13 锐达互动科技股份有限公司 A kind of method and system that Web page picture is dragged to software interface
CN108984162A (en) * 2018-07-06 2018-12-11 合肥明高软件技术有限公司 A kind of information dragging party System and method for

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150261516A1 (en) * 2014-03-12 2015-09-17 Ca, Inc. Installing software using multiple metadata interfaces
CN105302572A (en) * 2015-11-19 2016-02-03 天脉聚源(北京)教育科技有限公司 Method and device for importing file into software
CN106843910A (en) * 2017-03-10 2017-06-13 锐达互动科技股份有限公司 A kind of method and system that Web page picture is dragged to software interface
CN108984162A (en) * 2018-07-06 2018-12-11 合肥明高软件技术有限公司 A kind of information dragging party System and method for

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626036A (en) * 2020-05-27 2020-09-04 南京蓝鲸人网络科技有限公司 Novel image-text typesetting processing method
CN111626036B (en) * 2020-05-27 2021-04-30 南京蓝鲸人网络科技有限公司 Image-text typesetting processing method
CN116610823A (en) * 2023-04-28 2023-08-18 江苏传智播客教育科技股份有限公司 Method and system for uniformly accessing multimedia resources
CN116610823B (en) * 2023-04-28 2024-05-07 江苏传智播客教育科技股份有限公司 Method and system for uniformly accessing multimedia resources

Similar Documents

Publication Publication Date Title
KR101409673B1 (en) Persistent saving portal
US20040205708A1 (en) Code builders
US20080082965A1 (en) Providing globalization functionalities for javascript applications
TW201203097A (en) Metadata capture for screen sharing
KR20040002691A (en) Method and system for associating actions with semantic labels in electronic documents
JP2008257346A (en) Electronic file processing apparatus and electronic file processing program
US20070100865A1 (en) Aggregate file containing content-description files having native file formats
US20180239834A1 (en) Data transmission method and device
JP2010527051A (en) Document processing for mobile devices
CN113382083B (en) Webpage screenshot method and device
JP2004139466A (en) Electronic document printing program, and electronic document printing system
US8972881B2 (en) Add-in for download, upload, and rewriting
CN110516192A (en) Picture resource material and textual materials are dragged to software interface method and its system
JP2007328510A (en) Content conversion device, content display device, content browsing device, content conversion method, content browsing method and program
CN107436843A (en) Webpage performance test methods and device
US20070100846A1 (en) Aggregate file containing a content-description file and a resource file
JPH1091648A (en) Device for representing and giving link to information and quoted or reproduced material
CN112954030A (en) Web side picture compression method and device and electronic equipment
WO2011076023A1 (en) Method and terminal for dynamically managing applications
WO2010063070A1 (en) Method and system for displaying data on a mobile terminal
JP5267342B2 (en) Mashup program, mashup device, and mashup method
JP2004233577A (en) Method for forming speech recognition dictionary
CN115587075B (en) Layout file processing method and device, terminal equipment and storage medium
US20040205707A1 (en) Logical separation of code and content
KR100578128B1 (en) Communication system for short message including graphic icon

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191129

RJ01 Rejection of invention patent application after publication