Package butler :: Module butlerGUI :: Class ButlerGUI
[hide private]
[frames] | no frames]

Class ButlerGUI

object --+
         |
        ButlerGUI

This class contains the user interface for the Butler wine diary program, which allows a single user to add evaluations of wines into the application window.

Please note that multiple users and persistent storage of data into files are not supported by this version of the program.

Creating an object (calling ButlerGui() ) starts the program. Methods not to be called from outside:

read_wine() add_new_wine() mark_favorite_wine()

Instance Methods [hide private]
 
__init__(self)
Creates a new Butler user interface (i.e.
 
read_wine(self)
An event handler method: reacts to the pressing of buttons by the user.
 
add_new_wine(self, new_wine)
Adds a new wine evaluation to the user's wine diary and updates the GUI accordingly.
 
mark_favorite_wine(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Creates a new Butler user interface (i.e. a window and its contents) and makes it visible onscreen.

Overrides: object.__init__

read_wine(self)

 

An event handler method: reacts to the pressing of buttons by the user. In this case, if the "Add wine" button is pressed, the user is prompted for the data of the new wine diary entry, and the new wine is added for the user.

add_new_wine(self, new_wine)

 

Adds a new wine evaluation to the user's wine diary and updates the GUI accordingly.

Parameters:
  • new_wine - new wine object to add