HumaneX GUI

Introduction

In this assignment you’ll create a simple desktop GUI for the Humane Society.

General Instructions

This is an individual assignment.

Collaboration at a reasonable level will not result in substantially similar code. Students may only collaborate with fellow students currently taking CS 2316, the TA’s and the lecturer. Collaboration means talking through problems, assisting with debugging, explaining a concept, etc. You should not exchange code or write code for others.

Notes:

Problem Description

You work for the Humane Society and are tasked with creating a desktop GUI application to nicely view the profiles of pets in the shelters.

Solution Description

Write a program in humanexgui.py that reads data from a Humane Society database, shows pet information in a table, and shows information for each pet, possibly including a picture of the pet. The database will use the schema created by humanex-schema.sql. Note the x in the name to distinguish this extended version of the Humane Society database we’ve seen before. You may wish to populate your database with humanex-data.sql to test your application.

Specific Instructions

DbLoginDialog

Your program should start by displaying a database login dialog like the one in mysql_browser.py to get correct login credentials. After successful database connection, the MainWindow should be displayed. If the user supplies incorrect credentials or the database connection failes for some other reason, exit and print an error message to the console.

Your DbLoginDialog should look something like this when it is first displayed:

ManWindow

After successfully connecting to the database your program should read the contents of the pet and shelter tables and display Shelter Name, Pet Name and Breed in a QTableView. Note that you’ll need to join the shelter and pet tables.

Your MainWindow should look something like this (note that you may have scroll bars):

PetDetails Dialog

Your PetDetailsDialog should look something like this:

Heidi Details

Bonus

Tips and Considerations

Grading

Bonus (these will require additional database queries):

Yes, there are 200 points available on this homework.

Turn-in Procedure

Submit your humanexgui.py file on Canvas as an attachment. When you’re ready, double-check that you have submitted and not just saved a draft.

Verify the Success of Your Submission to Canvas

Practice safe submission! Verify that your HW files were truly submitted correctly, the upload was successful, and that your program runs with no syntax or runtime errors. It is solely your responsibility to turn in your homework and practice this safe submission safeguard.