pvbrowser primer
Back Content Forward

Output to widgets

The reference for programming can be found at “Help->Manual->pvslib” within pvdevelop. All these functions have a “PARAM *p” as first parameter. In this structure pvserver holds some important information. The most important is p->s, which is the socket pvserver uses for communication with the client. Most of the provided functions will simply send a line of text terminated by newline to pvbrowser. pvbrowser will interpret this text and call the according Qt method.

Example:

pvPrintf(p, label1, ”Hello world. This is call number %d”, call_number++);

All widgets that you input in the designer are listed in the enum in your generated mask. Assume you have input a text label “label1”. Then you can print text to it as shown above. Most functions described in the reference manual work that way.

The most frequently used output functions can be inserted by selecting the “Widget Name” toolbox in pvdevelop and clicking on the according widget name id.


Back Content Forward