Next Previous Contents

3. Usage

The usage of ProcessViewBrowser is similar to an Internet Browser. You select a node to which you want to connect. Then you will see the masks that are defined on that server.

Example:

cd ~/processviewserver/processviewserver
processviewserver     // for the moment start the example server in the foreground
cd ~/processview/processview
processview
now select localhost or the name of your host
you should see the example masks

3.1 General Usage

In general you do not have to modify ProcessViewBrowser. It is able to show any mask that is defined in ProcessViewServer. Your main task will be to define your own masks in ProcessViewServer. Every mask contains a number of widgets. All widgets have to be defined in an enum in the file defining your mask. When you call a mask you will first have to define what is in your mask (see example server). Then you will enter a message loop. You can read your data out of shared memory, a database, receive it from other applications via IPC mechanisms or whatever. Then you show the data on the mask. The masks you want to define can be designed with Qt Designer. The xml-file produced by Qt Designer can be converted to c-sourcecode with ui2pvc.

ui2pvc

Since Version 0.4 you can use Qt designer to generate your servercode.
Start designer and choose a new Dialog.
Within designer you are only allowed to use the following widgets:

  • QPushButton
  • QWidget
  • QLabel
  • QLineEdit
  • QComboBox
  • QLCDNumber
  • QSlider
  • QButtonGroup
  • QRadioButton
  • QCheckBox
  • QFrame
  • QTabWidget
  • QGroupBox
  • QListBox
  • QTable
  • QSpinBox
  • QDial
  • QLine
  • QProgressBar
  • QTextBrowser
  • QMultiLineEdit
  • QListView
  • QIconView
  • QDateTimeEdit
  • QDateEdit
  • QTimeEdit
  • QToolBox

  • Additionally these custom widgets can be used:

  • QDraw
  • QImage // you have to define the property "text" for this widget (text=filename.bmp)
  • QGLWidget
  • QVtkTclWidget
  • QwtPlot
  • QwtScale
  • QwtThermo
  • QwtKnob
  • QwtCounter
  • QwtWheel
  • QwtSlider
  • QwtCompass

  • In order to define this custom widgets, choose tools->custom->edit custom widgets->Load Descriptions ...
    Choose ./ui2pvc/ui2pvc/designer.cw

    Designer stores it's data in an xml-file file.ui
    Then you can generate sourcecode with:

    usage: ui2pvc file.ui file.c


    Next Previous Contents