Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Probably the best place to start. If you look at the production Dev PanelopsDevPanel.ui, you should see an "Example Dev Panel" on it. If you click it, you'll launch a really simple GUI whose entire function is to print what it's doing. If you look in the example subdirectory, you'll see example.ui and example.py, which together make up that simple GUI. I created example.ui using designer in the exact same way we created our dev panels in the tutorial. The difference here is that the button on opsDevPanel.ui is a related display button that leads to a python file instead of a ui file (example/example.py – you can open it up in designer to see). If you look at example.py, you'll see the format for a PyDM GUI:

Image AddedImage ModifiedImage Modified

  • Blue: The name of your GUI (and file – whatever name you choose for your GUI, the python file should be [name].py)
  • Green: The names you gave the UI elements in designer. Note that PyQt is an actual thing out in the google-able world; I literally googled "pyqt button pressed" to try to figure out how to get the "someone clicked this button" signal and connect it to something

  • Red: The custom functions for that GUI! It can be anything you want, this is just an example of a GUI that prints out what you're doing, but you could make a GUI that calculates power or something

...

This should theoretically be straightforward (famous last words). If you look at example.py in devPanel/example/example. py, that's what a PyDM backend file looks like. It should largely be putting things in that format taking a Qt4 GUI, deleting its autogenerated *_UI.py file, and changing Qt4 syntax to Qt5 syntax.

...