Manually growing the field

The manual grow functionality is slightly more complicated than the automatically grow functionality. In our design we had the following:

Manual grow dialog

We added the following question to our investigation list:

  • Is there a special window type for dialogs or do I just use QMainWindow?


In the crop interface tutorials we added a dialog window to ask for light and water values to grow the crop manually. We will need to create a similar QDialog sub-class to ask for light, water and food values.

Once we have this dialog we can grow the field manually by:

  • Connecting the 'manually grow field' button to a suitable method
  • Having this method create an instance of our dialog to ask for light, water and food values
  • Passing these values to the grow() method of our Field class

The video below demonstrates this.

Task 10

Use the above video to add the necessary functionality to grow the field contents manually.