Package schrodinger :: Package application :: Module report2d :: Class PicturePrinter
[hide private]
[frames] | no frames]

Class PicturePrinter

object --+
         |
        PicturePrinter

Class for drawing structure pictures to a QPrinter for generating PDFs.

Instance Methods [hide private]
 
__init__(self, printer, pictures, progress, num_cols, max_scale_factor)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_calc_pic_size(self, width, height)
Determine the size that the QPicture of the given width and heights should be drawn at.
 
_calc_row_height(self, cells)
Calculate the height of the row, given a list of StrucInfo instances.
 
_draw_cell(self, st_info, x, y)
Draw the given StructInfo at the specified coordinate.
 
run(self)
Execute the drawing.

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

Class Variables [hide private]
  PAGE_MARGIN = 10
  CELL_PADDING = 10
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, printer, pictures, progress, num_cols, max_scale_factor)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • printer (QPrinter instance) - PDF printer to draw the pictures to.
  • pictures (List of StructInfo instances.) - Pictures to draw for each structure.
  • progress (QProgressDialog (or None if outside of Maestro)) - Progress dialog to update while drawing.
  • num_cols (int) - Number of columns to create in the PDF.
  • max_scale_factor (float) - This setting will set the limit on shrinking of smaller structures. So that, for example, benzens never take up the whole image.
Overrides: object.__init__