def make_default_style(self, default_style): """Make the default output style for the Ancestor Tree.""" ## Paragraph Styles: f = docgen.FontStyle() f.set_size(9) f.set_type_face(docgen.FONT_SANS_SERIF) p = docgen.ParagraphStyle() p.set_font(f) p.set_description(_('The basic style used for the text display.')) default_style.add_paragraph_style("PC-Normal", p) f = docgen.FontStyle() f.set_size(16) f.set_type_face(docgen.FONT_SANS_SERIF) p = docgen.ParagraphStyle() p.set_font(f) p.set_alignment(docgen.PARA_ALIGN_CENTER) p.set_description(_('The basic style used for the title display.')) default_style.add_paragraph_style("PC-Title", p) f = docgen.FontStyle() f.set_size(8) f.set_type_face(docgen.FONT_SANS_SERIF) f.set_italic(1) p = docgen.ParagraphStyle() p.set_font(f) p.set_description(_('Style used for labels and captions')) default_style.add_paragraph_style("PC-Caption", p) g = docgen.GraphicsStyle() g.set_paragraph_style("PC-Normal") #g.set_shadow(1, 0.2) g.set_fill_color((255, 255, 255)) default_style.add_draw_style("PC-box", g) g = docgen.GraphicsStyle() g.set_paragraph_style("PC-Title") g.set_color((0, 0, 0)) g.set_fill_color((255, 255, 255)) g.set_line_width(0) default_style.add_draw_style("PC-title", g) g = docgen.GraphicsStyle() g.set_paragraph_style("PC-Caption") g.set_color((0, 0, 0)) g.set_fill_color((255, 255, 255)) g.set_line_width(0) default_style.add_draw_style("PC-caption", g) g = docgen.GraphicsStyle() default_style.add_draw_style("PC-line", g) g = docgen.GraphicsStyle() g.set_line_style(docgen.DOTTED) default_style.add_draw_style("PC-adopted_line", g)
def make_default_style(self, default_style): """Make default output style for the QR Code Generator Report.""" #Paragraph Styles font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(12) font.set_bold(0) para = docgen.ParagraphStyle() para.set_font(font) para.set_alignment(docgen.PARA_ALIGN_CENTER) para.set_description(_('The basic style used for the text display')) para.set_padding(3) default_style.add_paragraph_style('QRCG-Normal', para) table = docgen.TableStyle() table.set_width(100) table.set_columns(3) table.set_column_width(0, 33) table.set_column_width(1, 33) table.set_column_width(2, 33) default_style.add_table_style('QRCG-Table', table) cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_top_border(1) cell.set_right_border(1) cell.set_left_border(1) cell.set_bottom_border(1) default_style.add_cell_style('QRCG-Cell', cell)
def make_default_style(self, default_style): """Make the default output style for the Todo Report.""" # Paragraph Styles font = docgen.FontStyle() font.set_size(16) font.set_type_face(docgen.FONT_SANS_SERIF) font.set_bold(1) para = docgen.ParagraphStyle() para.set_header_level(1) para.set_bottom_border(1) para.set_top_margin(ReportUtils.pt2cm(3)) para.set_bottom_margin(ReportUtils.pt2cm(3)) para.set_font(font) para.set_alignment(docgen.PARA_ALIGN_CENTER) para.set_description(_("The style used for the title of the page.")) default_style.add_paragraph_style("TR-Title", para) font = docgen.FontStyle() font.set(face=docgen.FONT_SANS_SERIF, size=14, italic=1) para = docgen.ParagraphStyle() para.set_font(font) para.set_header_level(2) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the section headers.')) default_style.add_paragraph_style("TR-Heading", para) font = docgen.FontStyle() font.set_size(12) para = docgen.ParagraphStyle() para.set(first_indent=-0.75, lmargin=.75) para.set_font(font) para.set_top_margin(ReportUtils.pt2cm(3)) para.set_bottom_margin(ReportUtils.pt2cm(3)) para.set_description(_('The basic style used for the text display.')) default_style.add_paragraph_style("TR-Normal", para) font = docgen.FontStyle() font.set_size(12) font.set_bold(True) para = docgen.ParagraphStyle() para.set(first_indent=-0.75, lmargin=.75) para.set_font(font) para.set_top_margin(ReportUtils.pt2cm(3)) para.set_bottom_margin(ReportUtils.pt2cm(3)) para.set_description(_('The basic style used for table headings.')) default_style.add_paragraph_style("TR-Normal-Bold", para) para = docgen.ParagraphStyle() para.set(first_indent=-0.75, lmargin=.75) para.set_top_margin(ReportUtils.pt2cm(3)) para.set_bottom_margin(ReportUtils.pt2cm(3)) para.set_description(_('The basic style used for the note display.')) default_style.add_paragraph_style("TR-Note", para) #Table Styles cell = docgen.TableCellStyle() default_style.add_cell_style('TR-TableCell', cell) cell = docgen.TableCellStyle() cell.set_bottom_border(1) default_style.add_cell_style('TR-BorderCell', cell) table = docgen.TableStyle() table.set_width(100) table.set_columns(4) table.set_column_width(0, 10) table.set_column_width(1, 30) table.set_column_width(2, 30) table.set_column_width(3, 30) default_style.add_table_style('TR-Table', table)
def make_default_style(self, default_style): """Make default output style for the Family Sheet Report.""" #Paragraph Styles font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(10) font.set_bold(0) para = docgen.ParagraphStyle() para.set_font(font) para.set_description(_('The basic style used for the text display')) default_style.add_paragraph_style('FSR-Normal', para) font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(10) font.set_bold(0) para = docgen.ParagraphStyle() para.set_font(font) para.set_alignment(docgen.PARA_ALIGN_RIGHT) para.set_description(_('The style used for the page key on the top')) default_style.add_paragraph_style('FSR-Key', para) font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(12) font.set_bold(1) para = docgen.ParagraphStyle() para.set_font(font) para.set_description(_("The style used for names")) default_style.add_paragraph_style('FSR-Name', para) font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(12) font.set_bold(1) para = docgen.ParagraphStyle() para.set_font(font) para.set_alignment(docgen.PARA_ALIGN_CENTER) para.set_description(_("The style used for numbers")) default_style.add_paragraph_style('FSR-Number', para) font = docgen.FontStyle() font.set_type_face(docgen.FONT_SANS_SERIF) font.set_size(8) font.set_bold(0) para = docgen.ParagraphStyle() para.set_font(font) para.set_description( _('The style used for footnotes (notes and source references)')) default_style.add_paragraph_style('FSR-Footnote', para) #Table Styles cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_top_border(1) cell.set_left_border(1) cell.set_right_border(1) default_style.add_cell_style('FSR-HeadCell', cell) cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_left_border(1) default_style.add_cell_style('FSR-EmptyCell', cell) cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_top_border(1) cell.set_left_border(1) default_style.add_cell_style('FSR-NumberCell', cell) cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_top_border(1) cell.set_right_border(1) cell.set_left_border(1) default_style.add_cell_style('FSR-DataCell', cell) cell = docgen.TableCellStyle() cell.set_padding(0.1) cell.set_top_border(1) default_style.add_cell_style('FSR-FootCell', cell) table = docgen.TableStyle() table.set_width(100) table.set_columns(3) table.set_column_width(0, 7) table.set_column_width(1, 7) table.set_column_width(2, 86) default_style.add_table_style('FSR-Table', table)
def make_default_style(self, default_style): # this is for the page header font = docgen.FontStyle() font.set_size(18) font.set_type_face(docgen.FONT_SANS_SERIF) font.set_bold(True) para = docgen.ParagraphStyle() para.set_header_level(1) para.set_alignment(docgen.PARA_ALIGN_CENTER) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_font(font) para.set_description(_('The style used for the title of the page.')) default_style.add_paragraph_style('LCR-Title',para) # this is for the section headers font = docgen.FontStyle() font.set_size(14) font.set_type_face(docgen.FONT_SANS_SERIF) font.set_bold(True) para = docgen.ParagraphStyle() para.set_header_level(2) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_font(font) para.set_description(_('The style used for the section headers.')) default_style.add_paragraph_style('LCR-SecHeader',para) font = docgen.FontStyle() font.set_size(12) font.set_type_face(docgen.FONT_SERIF) para = docgen.ParagraphStyle() para.set_font(font) para.set_description(_('The style used for normal text')) default_style.add_paragraph_style('LCR-Normal',para) font = docgen.FontStyle() font.set_size(12) font.set_bold(True) para = docgen.ParagraphStyle() para.set(first_indent=-0.75, lmargin=.75) para.set_font(font) para.set_top_margin(ReportUtils.pt2cm(3)) para.set_bottom_margin(ReportUtils.pt2cm(3)) para.set_description(_('The basic style used for table headings.')) default_style.add_paragraph_style("LCR-Normal-Bold", para) #Table Styles cell = docgen.TableCellStyle() default_style.add_cell_style('LCR-TableCell', cell) cell = docgen.TableCellStyle() cell.set_bottom_border(1) default_style.add_cell_style('LCR-BorderCell', cell) table = docgen.TableStyle() table.set_width(100) table.set_columns(4) table.set_column_width(0, 5) table.set_column_width(1, 15) table.set_column_width(2, 50) table.set_column_width(3, 30) default_style.add_table_style('LCR-Table', table)