qumbiaprojectwizard 1.x
Create a new cumbia application or port a qtango application to cumbia
Setting up a graphical application with cumbia and tango.

This tutorial explains how to set up a cumbia graphical user interface with cumbia-qtcontrols widgets connected to the tango control system.

Requirements

The following components must be installed:

  • cumbia
  • cumbia-tango
  • cumbia-qtcontrols
  • qumbia-tango-controls
  • qumbia-plugins/qt-designer
  • qumbia-apps/cuuimake, the tool to process ui, pro, h and cpp files and
  • qumbia-apps/qumbiaprojectwizard, the tool to create a new cumbia project

Install qumbiaprojectwizard

Change directory into qumbia-apps/qumbiaprojectwizard and execute

qmake
make -j5
sudo make install

To build all the qumbia-apps utilities, the same code can be run from the qumbia-apps parent directory.

Command line

cumbia new project

Create a new qumbia tango application

Start the qumbiaprojectwizard application.
Fill in all the relevant fields as shown in the screenshot below. In the Support box on the top right, select "tango", and choose a project name. If you want, you can automatically open the qt-designer and qtcreator applications when qumbiaprojectwizard is closed.

qumbiaprojectwizard application

Create the UI with qt designer

If not launched by the qumbiaprojectwizard app, start the qt designer and edit the graphical interface. Usual Qt widgets can be used together with cumbia-qtcontrols graphical elements.

The screenshot below shows a simple widget with a QuLabel, a QuLed and a QuTrendPlot.

Qt designer with cumbia-qtcontrols widgets

Up to this point, the process of creating a cumbia Qt application is completely the same as QTango's. The syntax for sources and targets is the same:

  • tango/device/name/att_name for sources and targets
  • tango/device/name->command for sources and targets with an empty input argument
  • tango/device/name->command(10,100,..) for sources and targets with two or more input arguments
  • tango/device/name->command(&otherObject_name) for sources and targets with input argument to be taken from other widgets in the application
  • tango/device/name->command(12,100,&objname1,&objname2,-25,...,&objNameN) for sources and targets with mixed input arguments, constant and taken from other widgets.

Once the ui file is saved, you have a very basic application made up of a main.cpp, a ui file, a .cpp and a .h file containing the main class definition and implementation. The application is able to read / write the sources and targets associated to each cumbia-qtcontrols widget. In QTango, you would run:

  • qmake
  • make

to build the project.

To build a cumbia-qtcontrols project, you need the cuuimake command line utility. It parametrizes all cumbia-qtcontrols widget constructors as required. Please read the md_src_cuuimake documentation before proceeding to the next section.

In cumbia, to build a project you would run

  • qmake
  • cuuimake
  • make

or, alternatively

  • cuuimake –qmake –make

in a single line.

If the project includes custom cumbia "promoted widgets" in the ui drawn with the Qt designer, a file with a name like cuuimake.*.conf must be created in order to let cuuimake properly deal with class constructors expansion. See the md_src_cuuimake documentation for more details.