Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wir schaffen Wissen – heute für morgen A.C.Mezger, Paul Scherrer Institut, Switzerland caQtDM, an EPICS display manager with Qt Paul Scherrer Institut.

Similar presentations


Presentation on theme: "Wir schaffen Wissen – heute für morgen A.C.Mezger, Paul Scherrer Institut, Switzerland caQtDM, an EPICS display manager with Qt Paul Scherrer Institut."— Presentation transcript:

1 Wir schaffen Wissen – heute für morgen A.C.Mezger, Paul Scherrer Institut, Switzerland caQtDM, an EPICS display manager with Qt Paul Scherrer Institut Anton Mezger

2 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland caQtDM: what is it ? Qt: a new system for building graphic user interfaces. Qt-Display manager, Qt-Designer, components Qt-Designer, the GUI designer adl2ui: translator medm (.adl) files to xml (.ui) files Few remarks and hints. Conclusion, where is it ? Demo (offline for those interested). Outline of the presentation slide 2

3 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland caQtDM: what is it ? caQtDM a display manager using the Qt-Framework. replacement of MEDM, it reproduces its functionality + extensions (cameras, …) used at PSI for two control systems simultaneously: EPICS (CA) and an older home made CS used at the proton facility. functionality extendable through the Qt plugin-mechanism configured with the Qt-Designer using ui files or by writing scripts (pep files: home made) runs native on linux (x11) and on microsoft windows. slide 3

4 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Qt: a new system for writing graphic user interfaces What is the Qt-Framework (definition given by Wiki): Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit)cross-platformapplication framework application softwaregraphical user interface (GUI)widget toolkit Qt runs on the major desktop platforms and some of the mobile platforms. Qt comes with libraries, an integrated development environment (IDE) called QtCreator, with an user interface designer (Designer) and some third party libraries like qwt for 2D graphics and qwtplot3d for 3D graphics. The actual version we use is Qt For Qt 5 the C++ include file structure was changed and application software has to be adapted. slide 4

5 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Qt-Epics display manager: components Description file (.ui) Qt Designer Qt application = caQtdm plugged in widgets CAcaQtDM_Lib adl2uiMEDM.adl file Qt-Designer, the graphic user interface builder tool comes with Qt-SDK. Qt-Designer plugged in control system widgets / extensions developed in the context of our display manager. adl2ui tool to translate.adl files to xml.ui files used by Qt-designer developed in the context of our display manager, but can be modified easily when using other target widgets. caQtDM_Lib, the display and control system aware library class, used by applications, monitors with maximum default rate of 5 Hz caQtDM, the display manager glueying all together slide 5

6 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Qt-Designer, what can it do Qt-Designer = a tool for building graphic user interfaces with widgets like sliders, knobs, labels, buttons, …. Qt-Designer offers a plug-in mechanism for introducing your own widgets and build a rich environment with new entities. These are added to the widget box Many widgets have been integrated to be used for controls: Strip plot, cartesian plot, wheel switch, include, camera and many more Include (composite) widget is represented in Qt-designer with its contents Actually 30 widgets, including all MEDM objects. Widgets are not directly CS-aware, but provide the properties and methods to be used with applications. Application loads through a «designer» load call the ui file. slide 6

7 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Qt-Designer, what can it do However not a graphical editor like gimp, corel draw, … While widgets are used, you can only use widgets to draw objects. Drawing widget for rectangles, circles, ovals, lines, triangles has been created. Can overlap and can have transparency Property editor: slide 7

8 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Qt-Designer, what can it do Qt-Designer allows to make extensions having more interaction: Polylines, Polygones: widget created with an integrated editor for drawing with the mouse: Doubletab widget: a container widget allowing two dimensional selection: slide 8

9 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland The.adl files: translation to xml files Translator (adl2ui) is based on parser code of MEDM and generates ui files: Parses the.adl file and produces includes, you also have to parse the underlying ui files: The Qt-Designer will show all the includes, but you have to be in the directory where these are situated. Problems: The widget ordering (in front or behind) is not always correct due to the widget principle (one can correct this in Qt-Designer) In Qt, the width of a text widget has to fit the text, but in MEDM the width is not always correctly set by the user (one can correct this in Qt- Designer) slide 9

10 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland A few remarks and hints Edit with Qt-designer and execute display with caQtDM: Edition and active display together using the reload function of caQtDM. Stylesheets: Qt uses stylesheets at several levels and inheritance of styles (CSS), One can define styles at application level, at file level (mainwindow) and widget level Example: color for window: Qwidget#centralWidget {background: rgba(187, 187, 187, 255);} for included objects: Qwidget#centralWidget {background: rgba(187, 187, 187, 0);} Display rate: display manager uses a mechanism that limits the display rate, however by specifying the following option after the name of a pv one can change the display rate: channelname{monitor:{maxdisplayrate:20}} Layouts: resizable screens can be produced with Qt-Designer (possible but not easy) adl2ui produces non resizable screens slide 10

11 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Conclusion The Qt designer presents a good editor tool. With the plugin mechanism a rich environment can be created. caQtDM reproduces correctly the behavior of MEDM and is continuously extended. Many new widgets are integrated. Actually table, LEDS, toggles, cameras, double tabwidget as well as internal channels have been added. the.adl translator produces correct.ui files. Some few files have to be edited after translation. Resizing windows is possible, but needs a good knowledge of layouts and can be used for simple layouts. Other control systems can be integrated. At PSI the display manager services simultaneously 2 control systems (epics and a home made CS) EPICS 4 integration: interesting would be the standardisation of images / cameras ! slide 11

12 A.C.Mezger, Paul Scherrer Institut, Villigen, Switzerland Thank you for your attention Acknowledgments: The authors of MEDM for their code. Elettra people for providing some widgets. Download caQtDM from Demo on my laptop for those interested slide 12


Download ppt "Wir schaffen Wissen – heute für morgen A.C.Mezger, Paul Scherrer Institut, Switzerland caQtDM, an EPICS display manager with Qt Paul Scherrer Institut."

Similar presentations


Ads by Google