Package schrodinger :: Package application :: Package bioluminate :: Module pml_menus :: Class ColorChooserPanel
[hide private]
[frames] | no frames]

Class ColorChooserPanel

PyQt4.QtGui.QDialog --+
                      |
                     ColorChooserPanel

A window that lets the user choose a Maestro color. The window simply consists of a table with cells colored by each known Maestro color. The user chooses the color by clicking on the cell.

Easiest use is to access this via the get_color() function, which creates the panel, displays it and returns the chosen color Maestro name and RGBA values.

Instance Methods [hide private]
 
__init__(self, colors)
Create a ColorChoosePanel instance
 
picked(self, row, column)
Sets the self.picked_color attribute to the (color name, RGBA) tuple selected by the user.
Method Details [hide private]

__init__(self, colors)
(Constructor)

 

Create a ColorChoosePanel instance

Parameters:
  • colors (dict) - a dictionary with the Maestro colors in it whose keys are a RGB tuple and values are Maestro color name

picked(self, row, column)

 

Sets the self.picked_color attribute to the (color name, RGBA) tuple selected by the user. RGBA is a tuple of 4 integers giving the red, green, blue and alpha values of the color.

This then closes the window.