...
Probably the best place to start. If you look at the production Dev Panel, 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 shell script button instead of a related display button, and it runs the command "pydm 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:
- 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
Anything not in a box is boilerplate and should be present in any PyDM GUI.
...
Info | ||
---|---|---|
| ||
If you're not familiar with Python and/or Object Oriented Programming, here's a nice guide I found that can help answer questions like "what is __init__?" |
...