Versions Compared

Key

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

...

  1. Navigate to the simple subdirectory and run pydm simple.py. This will launch a simple GUI:
  2. Play with it. Note that the "selected options" output doesn't change until you click the "update status" button. It's meant to reflect the state of the checkboxes at the point the button is pressed
  3. Launch designer and open simple.ui
    1. Note the Object Names in the Object Inspector:
      1. The checkboxes, push button, and output label all have custom names that reflect what they are (the standard names are typically not helpful and make connecting to them in python much harder)
    2. Note the different layouts; they allow for window resizing and snapping to grid
      1. Window resizing happens by right clicking the background of your widget and clicking Lay out to select the kind you want
    3. Note that we changed the window title in the Property Editor
  4. Open the tutorial repo with PyCharm and navigate to simple.py. Read through it and try to understand how the connections are happening (clicking through the provided links as necessary)

Exercises

...

Layouts in Designer

  1. Create and checkout a new branch called layouts 
  2. Right click the background of the widget and

...

  1. select Lay out > Break Layout

...

  1. Notice that the GUI will no longer resize or snap to grid

...

  1. ; try to get it back to where it was

...

  1. Run git status and observe your changes
  2. Git add, git commit, and git push your changes to your fork

Renaming Widgets in Designer

  1. Create and checkout a new branch called rename_widgets
  2. Rename a widget in designer without changing the python file

...

  1. Note the error message and try to edit the python file to make it work again
  2. Run git status and observe your changes
  3. Git add, git commit, and git push your changes to your fork

Introducing New Functionality

  1. Create and checkout a new branch called auto_update
  2. Disable or delete the button

...

  1. in designer
  2. Use signals and slots to make the status label update whenever either of the checkboxes is toggled
  3. Run git status and observe your changes
  4. Git add, git commit, and git push your changes to your fork

PV Readout

Info

This section will need the simulacrum sc_rf_service running. Please refer to prerequisites step 1

...