CN104360855B - Using the method for graphic user interface installation procedure - Google Patents

Using the method for graphic user interface installation procedure Download PDF

Info

Publication number
CN104360855B
CN104360855B CN201410612532.0A CN201410612532A CN104360855B CN 104360855 B CN104360855 B CN 104360855B CN 201410612532 A CN201410612532 A CN 201410612532A CN 104360855 B CN104360855 B CN 104360855B
Authority
CN
China
Prior art keywords
window
installation procedure
user interface
graphic user
file
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
CN201410612532.0A
Other languages
Chinese (zh)
Other versions
CN104360855A (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410612532.0A priority Critical patent/CN104360855B/en
Publication of CN104360855A publication Critical patent/CN104360855A/en
Application granted granted Critical
Publication of CN104360855B publication Critical patent/CN104360855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of methods using graphic user interface installation procedure, including:Build the development environment of Python and PyGTK;Window is created using Glade, and interface is carried out to each window using Glade, binds the destroy signals of window to corresponding call back function, binds the click signals of the next step button of window to corresponding call back function;Each window interface design document is preserved, by the carry out format conversion of the file of preservation;Python files are write, installation procedure is carried out.The present invention can be quick and easy progress installation procedure interface development, provide the graphical interfaces with good experience to the user.

Description

Using the method for graphic user interface installation procedure
Technical field
The present invention relates to field of computer technology more particularly to a kind of methods using graphic user interface installation procedure.
Background technology
Graphic user interface, also known as graphical user interface (GUI, Graphical User Interface) refer to using The computer operation environment user interface that graphics mode is shown.Compared with the Command Line Interface that early stage computer uses, figure circle It faces more easy to be easy-to-use for user.The extensive use of GUI is one of the significant achievement of computer nowadays development, it is greatly The use people that ground facilitates unprofessional user no longer need to memorize mechanically a large amount of order from this, instead can use It is easily operated by modes such as window, menu, buttons.And embedded type GUI has wanting substantially for following several aspects It asks:It is light-duty, take up less resources, high-performance, high reliability, convenient for transplanting, it is configurable the features such as.
Part installation procedure cannot provide a graphical interfaces and be installed at present, and installation process can only be come by order line It completes, very inconvenient to use, user-friendliness is relatively low.Even if the installation procedure for possessing graphical interfaces C language multi-purpose greatly is come It realizes, code structure is complicated, realizes that difficulty is larger, is unfavorable for the maintenance of debugging and later stage.
Invention content
In order to solve the above technical problem, the present invention provides a kind of method using graphic user interface installation procedure, The interface development of progress installation procedure that can be quick and easy, provides the graphical interfaces with good experience to the user.
In order to reach the object of the invention, the present invention provides a kind of method using graphic user interface installation procedure, packets It includes:Build the development environment of Python and PyGTK;Window is created using Glade, and interface is carried out to each window using Glade Design, binds the destroy signals of window to corresponding call back function, the click signals for binding the next step button of window arrive Corresponding call back function;Each window interface design document is preserved, by the carry out format conversion of the file of preservation;Write Python texts Part carries out installation procedure.
Further, each window interface design document of preservation, including:The format for preserving each window is libglade.
Further, the carry out format conversion of the file by preservation, including:Using gtk-builder-convert The carry out format conversion to the file of preservation, the file format of preservation is ordered to be converted to xml.
Further, described to write Python files, installation procedure is carried out, including:New Python files are created, are created One new class;New init functions are write for class;By init functions, the example of gtk.Builder is created, and is adjusted With its method add_from_file, parameter is the xml document after format conversion;Its connect_signals method is called, is joined Number is self;It calls its get_object method, obtains follow-up the control object in need operated;It is write for class Corresponding call back function;The example of class is created, and calls show () method of its first window;Call gtk.main () Method.
Compared with prior art, the present invention is based on PyGTK to create graphic user interface, and is installed using graphic user interface Program, implementation method is simple, and process is clear, and code structure is bright and clear, is easy to developer's exploitation, debugging and safeguards;In addition, interface Part is separated with logical gate, and the later stage is easier to make for changing and safeguard, provides figure circle with good experience to the user Face.
Description of the drawings
Fig. 1 is flow diagram of the present invention using the method for graphic user interface installation procedure.
Specific implementation mode
The present invention is further described in detail below in conjunction with the accompanying drawings.Shown by these implementations of description detailed enough Example so that those skilled in the art can put into practice the present invention.It without departing from the spirit and scope in the present invention, can be right Implement to make logic, realize and others change.
The present invention carries out the establishment of graphic user interface using PyGTK.The PyGTK is to create to have figure using Python The program of user interface, wherein Python is the advanced procedures design language of a kind of explanation type, object-oriented, dynamic data type Speech.In addition, the PyGTK can without modification, steadily be run on various operating systems, such as Linux, Windows, MacOS Deng.Other than easy to use and quick prototyping ability, PyGTK also has unique work(of first-class processing local language Energy.
Fig. 1 is flow diagram of the present invention using the method for graphic user interface installation procedure.As shown in Figure 1, specific May include:
Step 11, the development environment of Python and PyGTK are built.
In this step, it is assumed that have following environment:Hardware:X86 frameworks pc;Software:window_7_x86.
The development environment of Python and PyGTK are built, including:It downloads and uses default setting that python- is installed 2.7.8.msi;It downloads and uses default setting that pygtk-all-in-one-2.24.2.win32-py2.7.msi is installed.
Step 12, window is created using Glade.
In this step, Glade is graphic user interface generator.
Window is created using Glade, including:Glade-3.exe is opened, 2 window window can be created, respectively Window1 and window2.
Step 13, interface is carried out to each window using Glade, and binds the destroy signals of window to corresponding Call back function binds the click signals of the next step button of window to corresponding call back function.
Step 14, each window interface design document is preserved;
In this step, the filename for preserving each window interface design can be window.glade, and format is libglade。
Step 15, by the carry out format conversion of the file of preservation.
In this step, with the gtk-builder-convert under PyGTK installation directories to the file that is preserved in step 14 Format conversion is carried out, transformed format is xml, and specific instructions are as follows:gtk-builder-convert xxx.glade xxx.xml。
Step 16, Python files are write, installation procedure is carried out.
In this step, new Python files are created, a new class is created;New init letters are write for class Number;By init functions, the example of gtk.Builder is created, and calls its method add_from_file, parameter turns for format Xml document after changing;Call its connect_signals method, parameter self;Its get_object method is called, is obtained Follow-up the control object in need operated;Corresponding call back function is write for class;The example of class is created, and is adjusted With show () method of its first window;The gtk.main () method of calling.
The present invention is based on PyGTK to create graphic user interface, and uses graphic user interface installation procedure, implementation method letter Single, process is clear, and code structure is bright and clear, is easy to developer's exploitation, debugging and safeguards;In addition, interface portion and logical gate Phase separation, later stage are easier to make for changing and safeguard, provide the graphical interfaces with good experience to the user.
It should be appreciated that although this specification is described according to embodiment, not each embodiment only includes one A independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should will say As a whole, the technical solution in each embodiment may also be suitably combined to form those skilled in the art can for bright book With the other embodiment of understanding.
The series of detailed descriptions listed above only for the present invention feasible embodiment specifically Bright, they are not intended to limit protection scope of the present invention, all without departing from equivalent implementations made by technical spirit of the present invention Or change should all be included in the protection scope of the present invention.

Claims (4)

1. a kind of method using graphic user interface installation procedure, which is characterized in that including:
Build the development environment of Python and PyGTK;
Multiple windows are created using Glade, and interface is carried out to each window using Glade, bind the destroy letters of window Number corresponding call back function is arrived, binds the click signals of the next step button of window to corresponding call back function;
Each window interface design document is preserved, by the carry out format conversion of the file of preservation;
Python files are write, installation procedure is carried out.
2. the method according to claim 1 using graphic user interface installation procedure, which is characterized in that described to preserve respectively Window interface design document, including:The format for preserving each window is libglade.
3. the method according to claim 1 or 2 using graphic user interface installation procedure, which is characterized in that described to incite somebody to action The carry out format conversion of the file of preservation, including:Using gtk-builder-convert orders to the carry out lattice of the file of preservation Formula is converted, and the file format of preservation is converted to xml.
4. the method according to claim 1 using graphic user interface installation procedure, which is characterized in that described to write Python files carry out installation procedure, including:New Python files are created, a new class is created;It is write for class New init functions;By init functions, the example of gtk.Builder is created, and calls its method add_from_file, is joined Number is the xml document after format conversion;Call its connect_signals method, parameter self;Call its get_object Method obtains follow-up the control object in need operated;Corresponding call back function is write for class;Create class's Example, and call show () method of its first window;The gtk.main () method of calling.
CN201410612532.0A 2014-11-04 2014-11-04 Using the method for graphic user interface installation procedure Active CN104360855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410612532.0A CN104360855B (en) 2014-11-04 2014-11-04 Using the method for graphic user interface installation procedure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410612532.0A CN104360855B (en) 2014-11-04 2014-11-04 Using the method for graphic user interface installation procedure

Publications (2)

Publication Number Publication Date
CN104360855A CN104360855A (en) 2015-02-18
CN104360855B true CN104360855B (en) 2018-11-13

Family

ID=52528119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410612532.0A Active CN104360855B (en) 2014-11-04 2014-11-04 Using the method for graphic user interface installation procedure

Country Status (1)

Country Link
CN (1) CN104360855B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8209633B1 (en) * 2008-09-30 2012-06-26 Adobe Systems Incorporated Generating a timeline for transitions between states
CN103176770A (en) * 2011-12-21 2013-06-26 上海三一精机有限公司 Creation method of interface system in numerical control system
CN103635871A (en) * 2011-05-02 2014-03-12 英特尔公司 Methods to adapt user interfaces and input controls

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8209633B1 (en) * 2008-09-30 2012-06-26 Adobe Systems Incorporated Generating a timeline for transitions between states
CN103635871A (en) * 2011-05-02 2014-03-12 英特尔公司 Methods to adapt user interfaces and input controls
CN103176770A (en) * 2011-12-21 2013-06-26 上海三一精机有限公司 Creation method of interface system in numerical control system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Glade3 tutorial in Chinese;漩涡鸣人;《http://www.cnblogs.com/lovemo1314/archive/2011/08/20/2147448.html》;20110820;第1-16页 *
在windows下使用PyGTK和Glade构建用户界面;岁月流水;《http://www.cppblog.com/jasson/archive/2008/12/17/69664.aspx》;20081217;第1-7页 *

Also Published As

Publication number Publication date
CN104360855A (en) 2015-02-18

Similar Documents

Publication Publication Date Title
US20110112819A1 (en) User interface systems and methods between a portable device and a computer
US10216585B2 (en) Enabling disk image operations in conjunction with snapshot locking
EP4328739A3 (en) Control flow in blockchain scripts
US20100146431A1 (en) Object picker with window splitter
US11048485B2 (en) User interface code re-use based upon machine learning of design documents
CA2690081A1 (en) Migration of legacy applications
CN104935618B (en) A kind of clustered deploy(ment) method
US10761717B2 (en) Controlling application launch
WO2017142389A1 (en) A type of smart device control system and method that supports natural language message interaction
CN104360855B (en) Using the method for graphic user interface installation procedure
CN103019748B (en) The method and system of local application inserted in table top forms under Linux
CN105354069A (en) Method for booting Windows PE system by U disk
CN110347364A (en) Application control method, electronic device and computer readable storage medium
Gokhale et al. Multi-platform strategies, approaches and challenges for developing mobile applications
US10291701B2 (en) Virtualizing a shortcut to a file in a cloud desktop
CN107391135A (en) A kind of view steering method based on Objective C
US10168876B2 (en) Creating multiple cursors for duplicated entry
CN107861798B (en) The system-level operations method and device of application
CN104133684A (en) Graphical user interface state control method based on state machine
CN111367610B (en) File dragging method and device between client system and cloud virtual machine
CN109739567B (en) Method, device, computer equipment and storage medium for rapidly terminating application program
WO2015172401A1 (en) Inter-program communication and reprograming software design, implementation and man-machine interaction method
Li et al. Accelerating complex modeling workflows in CyberWater using on-demand HPC/Cloud resources
CN106227544B (en) A kind of interface architecture implementation method based on uboot
US10678517B1 (en) User interface synthesis based upon extracted presentation document graphical features

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant