Project

General

Profile

Using the GUI builder

Creating a new GUI

Launch the server

As some operations involve connecting to a Control Object server and retrieving information from it, you should launch it prior to using the GUI Builder. To see how to do that, see how to launch a server.

Running the GUI builder

Run the file startGUI.py located in the GUI sub folder of the framework distribution root. For a first run we will not be using any of its options:

cd TOPLEVEL_OF_THE_FRAMEWORK
python GUI/startGUI.py

(on ESRF beamlines the TOPLEVEL_OF_THE_FRAMEWORK is $BLISSADM/python/bliss_modules/Framework4)

You will be presented with the main GUI builder interface. It is mostly empty, the only item in the application tree being the application item.

Configure the application item

Every item in the GUI can have property. The application item holds the object server property, which is the Control Object server your GUI will connect to. You can either enter the Control Object server as coserver_ip:port or coserver_hostname:port. The port default to port 6667.

If you don't specify your Object Server, you won't be able to establish the bricks connections.

Populate your GUI

You may now build your GUI. Add one or several windows, add layouts to them and bricks to the layouts. To do so, select the parent item in the application tree. You may then either add a purely GUI item (layout, groupbox, etc.) by clicking on it in the toolbar, or a brick by double-clicking on it in the brick list. If an element is not clickable, it means it cannot be inserted in the parent item you selected.

Connect the Bricks

To connect a brick click the connections item right under it. This opens the connection editor, which allows you to see the connectable objects which live on the server and which signals and slots are compatible with the Bricks'.

Save your work

Select Save As in the File menu.

A saved GUI is a folder containing 2 XML files (as of now) and with a ".gui" extension. It also has a single ".id" file, which contains a short text string - this allows to characterize a Framework 4 directory from a "normal" directory.

Screenshots of the various operations

Configuring the application's Control Objects server

Configuring the Objects server screenshot

Populating the GUI with GUI elements and Bricks

Populating theGUI screenshot

Steps in connecting a Brick

Connecting a Brick screenshot

Run or modify an existing GUI

Running an existing GUI

For everything to work the server configured in the application must be up and running.

To launch an existing GUI simply use the same command-line as when creating a GUI, passing the previously saved GUI as an argument:

cd FRAMEWORK_ROOT
python GUI/startGUI.py path/to/your/application.gui

Editing an existing GUI

Same as above, just use the ''-d'' option:

cd FRAMEWORK_ROOT
python GUI/startGUI.py path/to/your/application.gui -d

Then proceed like you are building a new GUI.

Configuring_application_item.png View - Configuring the Objects server screenshot (37.6 KB) Ohlsson, Staffan, 20/01/2012 01:22 PM

Populating_the_gui.png View - Populating theGUI screenshot (40.2 KB) Ohlsson, Staffan, 20/01/2012 01:24 PM

Connecting_a_Brick.png View - Connecting a Brick screenshot (77 KB) Ohlsson, Staffan, 20/01/2012 01:25 PM