CN104360855A - Method for installing program by adopting graphic user interface - Google Patents
Method for installing program by adopting graphic user interface Download PDFInfo
- Publication number
- CN104360855A CN104360855A CN201410612532.0A CN201410612532A CN104360855A CN 104360855 A CN104360855 A CN 104360855A CN 201410612532 A CN201410612532 A CN 201410612532A CN 104360855 A CN104360855 A CN 104360855A
- Authority
- CN
- China
- Prior art keywords
- window
- file
- user interface
- graphic user
- installation procedure
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides a method for installing a program by adopting a graphic user interface. The method comprises the steps of establishing a Python and PyGTK developing environment; creating a window by utilizing Glade, designing an interface of each window by utilizing the Glade, binding a destroy signal of the window to a corresponding callback function, and binding a click signal of a next step key of the window to a corresponding callback function; storing each window interface design file, and converting a format of each stored file; editing a Python file, and installing the program. By adopting the method, the interface development of the installation program can be rapidly and simply carried out, and the graphic interface with good experience can be provided for users.
Description
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of method adopting graphic user interface installation procedure.
Background technology
Graphic user interface, also known as graphical user interface (GUI, Graphical User Interface), refers to the computer operation environment user interface adopting graphics mode display.Compared with the Command Line Interface used with early stage computing machine, graphical interfaces is for more easy to be easy-to-use user.The widespread use of GUI is one of significant achievement of computer nowadays development, from then on the use people that it is very easy to unprofessional user no longer need to memorize mechanically a large amount of orders, the substitute is and can operate easily with by modes such as window, menu, buttons.And embedded type GUI has the basic demand of several aspect below: light-duty, take that resource is few, high-performance, high reliability, be convenient to features such as transplanting, configurable.
Current part installation procedure can not provide a graphical interfaces to install, and installation process can only rely on order line, and being inconvenient to very uses, and user-friendliness is lower.Even if the large multiplex C language of the installation procedure having graphical interfaces realizes, code structure is complicated, realizes difficulty comparatively large, is unfavorable for debugging the maintenance with the later stage.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of method adopting graphic user interface installation procedure, simply can carry out the interface development of installation procedure fast, for user provides the graphical interfaces with good experience.
In order to reach the object of the invention, the invention provides a kind of method adopting graphic user interface installation procedure, comprising: the development environment building Python and PyGTK; Use Glade to create window, and use Glade to carry out interface to each window, the destroy signal of binding window is to corresponding call back function, and the click signal of next step button of binding window is to corresponding call back function; Preserve each window interface design document, the file of preservation carried out format conversion; Write Python file, carry out installation procedure.
Further, each window interface design document of described preservation, comprising: the form preserving each window is libglade.
Further, described the file of preservation carried out format conversion, comprising: what adopt gtk-builder-convert order to the file of preservation carries out format conversion, and the file layout of preservation is converted to xml.
Further, described in write Python file, carry out installation procedure, comprising: create new Python file, create a new class; For class writes new init function; By init function, create the example of gtk.Builder, and call its method add_from_file, parameter is the xml file after format conversion; Call its connect_signals method, parameter is self; Call its get_object method, obtain the control object that follow-up all needs carry out operating; For class writes corresponding call back function; Create the example of class, and call the show () method of its first window; Call gtk.main () method.
Compared with prior art, the present invention is based on PyGTK and create graphic user interface, and adopt graphic user interface installation procedure, 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 portion and logical gate are separated, and the later stage more easily modifies and safeguards, for user provides the graphical interfaces with good experience.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet that the present invention adopts the method for graphic user interface installation procedure.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.By these exemplifying embodiments of enough detailed description, those skilled in the art are made to put into practice the present invention.Without departing from the spirit and scope in the present invention, can to implement to make logic, realize and other change.
The present invention uses PyGTK to carry out the establishment of graphic user interface.This PyGTK uses Python to create the program with graphic user interface, and wherein, Python is the high-level programming language of a kind of explanation type, object-oriented, dynamic data type.In addition, this PyGTK can not add amendment ground, stably run on various operating system, as Linux, Windows, MacOS etc.Except be simple and easy to and fast except prototyping ability, PyGTK also has the unique function of first-class process local language.
Fig. 1 is the schematic flow sheet that the present invention adopts the method for graphic user interface installation procedure.As shown in Figure 1, specifically can comprise:
Step 11, builds the development environment of Python and PyGTK.
In this step, suppose there is following environment: hardware: x86 framework pc; Software: window_7_x86.
Build the development environment of Python and PyGTK, comprising: download and adopt default setting that python-2.7.8.msi is installed; Download and adopt default setting that pygtk-all-in-one-2.24.2.win32-py2.7.msi is installed.
Step 12, uses Glade to create window.
In this step, Glade is graphic user interface generator.
Use Glade to create window, comprising: open glade-3.exe, 2 window window can be created, be respectively window1 and window2.
Step 13, uses Glade to carry out interface to each window, and binds the call back function of destroy signal to correspondence of window, and the click signal of next step button of binding window is to corresponding call back function.
Step 14, preserves each window interface design document;
In this step, the filename preserving the design of each window interface can be window.glade, and form is libglade.
Step 15, carries out format conversion by the file of preservation.
In this step, carry out format conversion with the gtk-builder-convert under PyGTK installation directory to the file preserved in step 14, the form after changing is xml, and specific instructions is as follows: gtk-builder-convert xxx.glade xxx.xml.
Step 16, writes Python file, carries out installation procedure.
In this step, create new Python file, create a new class; For class writes new init function; By init function, create the example of gtk.Builder, and call its method add_from_file, parameter is the xml file after format conversion; Call its connect_signals method, parameter is self; Call its get_object method, obtain the control object that follow-up all needs carry out operating; For class writes corresponding call back function; Create the example of class, and call the show () method of its first window; Call gtk.main () method.
The present invention is based on PyGTK and create graphic user interface, and adopt graphic user interface installation procedure, 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 portion and logical gate are separated, and the later stage more easily modifies and safeguards, for user provides the graphical interfaces with good experience.
Be to be understood that, although this instructions is described according to embodiment, but not each embodiment only comprises an independently technical scheme, this narrating mode of instructions is only for clarity sake, those skilled in the art should by instructions integrally, technical scheme in each embodiment also through appropriately combined, can form other embodiments that it will be appreciated by those skilled in the art that.
A series of detailed description listed is above only illustrating for feasibility embodiment of the present invention; they are not for limiting the scope of the invention, all do not depart from equivalent implementations that skill of the present invention spirit does or change all should be included within protection scope of the present invention.
Claims (4)
1. adopt a method for graphic user interface installation procedure, it is characterized in that, comprising:
Build the development environment of Python and PyGTK;
Use Glade to create window, and use Glade to carry out interface to each window, the destroy signal of binding window is to corresponding call back function, and the click signal of next step button of binding window is to corresponding call back function;
Preserve each window interface design document, the file of preservation carried out format conversion;
Write Python file, carry out installation procedure.
2. the method for employing graphic user interface installation procedure according to claim 1, is characterized in that, each window interface design document of described preservation, comprising: the form preserving each window is libglade.
3. the method for employing graphic user interface installation procedure according to claim 1 and 2, it is characterized in that, described the file of preservation carried out format conversion, comprise: what adopt gtk-builder-convert order to the file preserved carries out format conversion, and the file layout of preservation is converted to xml.
4. the method for employing graphic user interface installation procedure according to claim 1, is characterized in that, described in write Python file, carry out installation procedure, comprising: create new Python file, create a new class; For class writes new init function; By init function, create the example of gtk.Builder, and call its method add_from_file, parameter is the xml file after format conversion; Call its connect_signals method, parameter is self; Call its get_object method, obtain the control object that follow-up all needs carry out operating; For class writes corresponding call back function; Create the example of class, and call the show () method of its first window; Call gtk.main () method.
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 true CN104360855A (en) | 2015-02-18 |
CN104360855B 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)
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 |
-
2014
- 2014-11-04 CN CN201410612532.0A patent/CN104360855B/en active Active
Patent Citations (3)
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)
Title |
---|
岁月流水: "在windows下使用PyGTK和Glade构建用户界面", 《HTTP://WWW.CPPBLOG.COM/JASSON/ARCHIVE/2008/12/17/69664.ASPX》 * |
漩涡鸣人: "Glade3 tutorial in Chinese", 《HTTP://WWW.CNBLOGS.COM/LOVEMO1314/ARCHIVE/2011/08/20/2147448.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN104360855B (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Alliance | Android | |
JP5021211B2 (en) | Method and system for digital device menu editor | |
US20100281475A1 (en) | System and method for mobile smartphone application development and delivery | |
US20090313004A1 (en) | Platform-Independent Application Development Framework | |
WO2015035908A1 (en) | Smart television operation system | |
US20120284686A1 (en) | System and method for mobile application development | |
CN103927163A (en) | Plugin frame processing device and plugin system | |
US20180349107A1 (en) | Preview Changes To Mobile Applications At Different Display Resolutions | |
US20090150822A1 (en) | Method and system for scrolling | |
CN103345405A (en) | Application program starting method and device and client | |
CN103635871A (en) | Methods to adapt user interfaces and input controls | |
US11048485B2 (en) | User interface code re-use based upon machine learning of design documents | |
WO2016176059A1 (en) | Mapping between local and remote for seamless build and design time experience | |
JP2012529093A (en) | Method, system and computer program for screen capture | |
CN103809983A (en) | Method for modifying BIOS SETUP interface | |
CN108228170A (en) | A kind of embedded software componentization customizes assemble method | |
CN101833447B (en) | Method for realizing desktop Widget animation by using tweening animation | |
CN104035766A (en) | Android system trimming method based on coverage rate test | |
CN104123155A (en) | Business system page layer development platform and method based on WEB | |
KR102141749B1 (en) | APP program execution method and device | |
CN105117339A (en) | Method and apparatus for debugging native command debugging program by utilizing plugin | |
CN101714095A (en) | Method, terminal and server for replacing skin of embedded user interface system | |
US20210271458A1 (en) | Managing an app method and system | |
CN112114789A (en) | Service development method and equipment | |
CN106127072A (en) | E-seal stamped signature apparatus and method |
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 |