Exemple #1
0
    def __media_style(self):
        """
        Define the style used for media
        """

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(3)
        tbl.set_column_width(0, 32.3)
        tbl.set_column_width(1, 32.3)
        tbl.set_column_width(2, 32.3)
        self.default_style.add_table_style('REPO-MediaTab', tbl)

        cell = TableCellStyle()
        cell.set_padding(0.5)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        cell.set_right_border(0.5)
        cell.set_left_border(0.5)
        self.default_style.add_cell_style("REPO-MediaCell", cell)
    def __media_style(self):
        """
        Define the style used for media
        """

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(3)
        tbl.set_column_width(0, 32.3)
        tbl.set_column_width(1, 32.3)
        tbl.set_column_width(2, 32.3)
        self.default_style.add_table_style('REPO-MediaTab', tbl)

        cell = TableCellStyle()
        cell.set_padding(0.5)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        cell.set_right_border(0.5)
        cell.set_left_border(0.5)
        self.default_style.add_cell_style("REPO-MediaCell", cell)
Exemple #3
0
    def make_default_style(self, default_style):
        """Make default output style for the Family Group Report."""
        para = ParagraphStyle()
        #Paragraph Styles
        font = FontStyle()
        font.set_size(4)
        para.set_font(font)
        default_style.add_paragraph_style('FGR-blank', para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(16)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_header_level(1)
        para.set_description(_("The style used for the title of the page."))
        default_style.add_paragraph_style('FGR-Title', para)

        font = FontStyle()
        font.set_type_face(FONT_SERIF)
        font.set_size(10)
        font.set_bold(0)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The basic style used for the text display.'))
        default_style.add_paragraph_style('FGR-Normal', para)

        para = ParagraphStyle()
        font = FontStyle()
        font.set_type_face(FONT_SERIF)
        font.set_size(10)
        font.set_bold(0)
        para.set_font(font)
        para.set(lmargin=0.0)
        para.set_top_margin(0.0)
        para.set_bottom_margin(0.0)
        para.set_description(_('The basic style used for the note display.'))
        default_style.add_paragraph_style("FGR-Note", para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(10)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(
            _('The style used for the text related to the children.'))
        default_style.add_paragraph_style('FGR-ChildText', para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(12)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(3)
        para.set_description(_("The style used for the parent's name"))
        default_style.add_paragraph_style('FGR-ParentName', para)

        #Table Styles
        cell = TableCellStyle()
        cell.set_padding(0.2)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-ParentHead', cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-TextContents', cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(0)
        cell.set_left_border(1)
        cell.set_padding(0.1)
        default_style.add_cell_style('FGR-TextChild1', cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_left_border(1)
        cell.set_padding(0.1)
        default_style.add_cell_style('FGR-TextChild2', cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-TextContentsEnd', cell)

        cell = TableCellStyle()
        cell.set_padding(0.2)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-ChildName', cell)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0, 20)
        table.set_column_width(1, 40)
        table.set_column_width(2, 40)
        default_style.add_table_style('FGR-ParentTable', table)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(4)
        table.set_column_width(0, 7)
        table.set_column_width(1, 18)
        table.set_column_width(2, 35)
        table.set_column_width(3, 40)
        default_style.add_table_style('FGR-ChildTable', table)
Exemple #4
0
    def make_default_style(self, default_style):
        """Make the default output style for the Individual Complete Report."""
        # Paragraph Styles
        font = FontStyle()
        font.set_bold(1)
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(16)
        para = ParagraphStyle()
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_top_margin(ReportUtils.pt2cm(8))
        para.set_bottom_margin(ReportUtils.pt2cm(8))
        para.set_font(font)
        para.set_description(_("The style used for the title of the page."))
        default_style.add_paragraph_style("IDS-Title", para)

        font = FontStyle()
        font.set_bold(1)
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(12)
        font.set_italic(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(ReportUtils.pt2cm(3))
        para.set_bottom_margin(ReportUtils.pt2cm(3))
        para.set_description(_("The style used for category labels."))
        default_style.add_paragraph_style("IDS-TableTitle", para)

        font = FontStyle()
        font.set_bold(1)
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(12)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(ReportUtils.pt2cm(3))
        para.set_bottom_margin(ReportUtils.pt2cm(3))
        para.set_description(_("The style used for the spouse's name."))
        default_style.add_paragraph_style("IDS-Spouse", para)

        font = FontStyle()
        font.set_size(12)
        para = ParagraphStyle()
        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("IDS-Normal", para)

        font = FontStyle()
        font.set_size(12)
        font.set_italic(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(ReportUtils.pt2cm(3))
        para.set_bottom_margin(ReportUtils.pt2cm(3))
        para.set_description(_('The style used for the section headers.'))
        default_style.add_paragraph_style("IDS-Section", para)

        font = FontStyle()
        font.set_size(8)
        para = ParagraphStyle()
        para.set_alignment(PARA_ALIGN_RIGHT)
        para.set_font(font)
        para.set_top_margin(ReportUtils.pt2cm(3))
        para.set_bottom_margin(ReportUtils.pt2cm(3))
        para.set_description(_('A style used for image facts.'))
        default_style.add_paragraph_style("IDS-ImageNote", para)

        font = FontStyle()
        font.set_size(8)
        para = ParagraphStyle()
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_font(font)
        para.set_top_margin(ReportUtils.pt2cm(3))
        para.set_bottom_margin(ReportUtils.pt2cm(3))
        para.set_description(_('A style used for image captions.'))
        default_style.add_paragraph_style("IDS-ImageCaptionCenter", para)

        # Table Styles
        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(2)
        tbl.set_column_width(0, 20)
        tbl.set_column_width(1, 80)
        default_style.add_table_style("IDS-IndTable", tbl)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(2)
        tbl.set_column_width(0, 50)
        tbl.set_column_width(1, 50)
        default_style.add_table_style("IDS-ParentsTable", tbl)

        cell = TableCellStyle()
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        default_style.add_cell_style("IDS-TableHead", cell)

        cell = TableCellStyle()
        default_style.add_cell_style("IDS-NormalCell", cell)

        cell = TableCellStyle()
        cell.set_longlist(1)
        default_style.add_cell_style("IDS-ListCell", cell)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(3)
        tbl.set_column_width(0,20)
        tbl.set_column_width(1,50)
        tbl.set_column_width(2,30)
        default_style.add_table_style('IDS-PersonTable', tbl)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(2)
        tbl.set_column_width(0,20)
        tbl.set_column_width(1,80)
        default_style.add_table_style('IDS-PersonTable2', tbl)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(5)
        tbl.set_column_width(0,22) # Type
        tbl.set_column_width(1,22) # Date
        tbl.set_column_width(2,16) # Status
        tbl.set_column_width(3,22) # Temple
        tbl.set_column_width(4,18) # Place
        default_style.add_table_style('IDS-OrdinanceTable', tbl)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(6)
        tbl.set_column_width(0,20) # empty
        tbl.set_column_width(1,18) # Type
        tbl.set_column_width(2,18) # Date
        tbl.set_column_width(3,14) # Status
        tbl.set_column_width(4,18) # Temple
        tbl.set_column_width(5,12) # Place
        default_style.add_table_style('IDS-OrdinanceTable2', tbl)

        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(3)
        tbl.set_column_width(0, 33)
        tbl.set_column_width(1, 33)
        tbl.set_column_width(2, 34)
        default_style.add_table_style("IDS-GalleryTable", tbl)

        Endnotes.add_endnote_styles(default_style)
Exemple #5
0
    def make_default_style(self,default_style):
        """Make default output style for the Family Group Report."""
        para = ParagraphStyle()
        #Paragraph Styles
        font = FontStyle()
        font.set_size(4)
        para.set_font(font)
        default_style.add_paragraph_style('FGR-blank',para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(16)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_header_level(1)
        para.set_description(_("The style used for the title of the page."))
        default_style.add_paragraph_style('FGR-Title',para)

        font = FontStyle()
        font.set_type_face(FONT_SERIF)
        font.set_size(10)
        font.set_bold(0)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The basic style used for the text display.'))
        default_style.add_paragraph_style('FGR-Normal',para)

        para = ParagraphStyle()
        font = FontStyle()
        font.set_type_face(FONT_SERIF)
        font.set_size(10)
        font.set_bold(0)
        para.set_font(font)
        para.set(lmargin=0.0)
        para.set_top_margin(0.0)
        para.set_bottom_margin(0.0)
        para.set_description(_('The basic style used for the note display.'))
        default_style.add_paragraph_style("FGR-Note",para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(10)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for the text related to the children.'))
        default_style.add_paragraph_style('FGR-ChildText',para)

        font = FontStyle()
        font.set_type_face(FONT_SANS_SERIF)
        font.set_size(12)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(3)
        para.set_description(_("The style used for the parent's name"))
        default_style.add_paragraph_style('FGR-ParentName',para)

        #Table Styles
        cell = TableCellStyle()
        cell.set_padding(0.2)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-ParentHead',cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-TextContents',cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(0)
        cell.set_left_border(1)
        cell.set_padding(0.1)
        default_style.add_cell_style('FGR-TextChild1',cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_left_border(1)
        cell.set_padding(0.1)
        default_style.add_cell_style('FGR-TextChild2',cell)

        cell = TableCellStyle()
        cell.set_padding(0.1)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-TextContentsEnd',cell)

        cell = TableCellStyle()
        cell.set_padding(0.2)
        cell.set_bottom_border(1)
        cell.set_right_border(1)
        cell.set_left_border(1)
        default_style.add_cell_style('FGR-ChildName',cell)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0,20)
        table.set_column_width(1,40)
        table.set_column_width(2,40)
        default_style.add_table_style('FGR-ParentTable',table)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(4)
        table.set_column_width(0,7)
        table.set_column_width(1,18)
        table.set_column_width(2,35)
        table.set_column_width(3,40)
        default_style.add_table_style('FGR-ChildTable',table)
    def make_default_style(self, default_style):
        """
        Make the default output style for the Census report.
        """
        #
        # CEN-Title
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=16, bold=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(1)
        para.set_top_margin(0.25)
        para.set_bottom_margin(0.25)
        para.set_alignment(PARA_ALIGN_CENTER)       
        para.set_description(_('The style used for the title of the page.'))
        default_style.add_paragraph_style("CEN-Title", para)
    
        #
        # CEN-Heading
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=14, italic=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(2)
        para.set_top_margin(0.5)
        para.set_bottom_margin(0.125)        
        para.set_description(_('The style used for headings.'))
        default_style.add_paragraph_style("CEN-Heading", para)
    
        #
        # CEN-Name
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for names.'))
        default_style.add_paragraph_style("CEN-Name", para)
        
        #
        # CEN-Column
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10, italic=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for column headings.'))
        default_style.add_paragraph_style("CEN-Column", para)
        
        #
        # CEN-Normal
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        #para.set(first_indent=-1.0, lmargin=1.0)
        para.set_description(_('The default text style.'))
        default_style.add_paragraph_style("CEN-Normal", para)

        #
        # Table Styles
        #
        for census_id in get_census_ids():
            columns = get_report_columns(census_id)
            tbl = TableStyle()
            tbl.set_width(100)
            tbl.set_columns(len(columns))
            for index, column in enumerate(columns):
                tbl.set_column_width(index, column[1])
            default_style.add_table_style("CEN-" + census_id, tbl)

        #
        # CEN-HeadingTable
        #
        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(2)
        tbl.set_column_width(0, 30)
        tbl.set_column_width(1, 70)
        default_style.add_table_style("CEN-HeadingTable", tbl)
        
        #
        # CEN-HeadingCell
        #
        cell = TableCellStyle()
        default_style.add_cell_style("CEN-HeadingCell", cell)
        
        #
        # CEN-ColumnCell
        #
        cell = TableCellStyle()
        cell.set_left_border(1)
        cell.set_right_border(1)
        default_style.add_cell_style("CEN-ColumnCell", cell)
        
        #
        # CEN-BodyCell
        #
        cell = TableCellStyle()
        cell.set_left_border(1)
        cell.set_right_border(1)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        default_style.add_cell_style("CEN-BodyCell", cell)
    def make_default_style(self, default_style):
        """
        Make the default output style for the Census report.
        """
        #
        # CEN-Title
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=16, bold=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(1)
        para.set_top_margin(0.25)
        para.set_bottom_margin(0.25)
        para.set_alignment(PARA_ALIGN_CENTER)       
        para.set_description(_('The style used for the title of the page.'))
        default_style.add_paragraph_style("CEN-Title", para)
    
        #
        # CEN-Heading
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=14, italic=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_header_level(2)
        para.set_top_margin(0.5)
        para.set_bottom_margin(0.125)        
        para.set_description(_('The style used for headings.'))
        default_style.add_paragraph_style("CEN-Heading", para)
    
        #
        # CEN-Name
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for names.'))
        default_style.add_paragraph_style("CEN-Name", para)
        
        #
        # CEN-Column
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10, italic=1)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for column headings.'))
        default_style.add_paragraph_style("CEN-Column", para)
        
        #
        # CEN-Normal
        #
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        #para.set(first_indent=-1.0, lmargin=1.0)
        para.set_description(_('The default text style.'))
        default_style.add_paragraph_style("CEN-Normal", para)

        #
        # Table Styles
        #
        for census_id in get_census_ids():
            columns = get_report_columns(census_id)
            tbl = TableStyle()
            tbl.set_width(100)
            tbl.set_columns(len(columns))
            for index, column in enumerate(columns):
                tbl.set_column_width(index, column[1])
            default_style.add_table_style("CEN-" + census_id, tbl)

        #
        # CEN-HeadingTable
        #
        tbl = TableStyle()
        tbl.set_width(100)
        tbl.set_columns(2)
        tbl.set_column_width(0, 30)
        tbl.set_column_width(1, 70)
        default_style.add_table_style("CEN-HeadingTable", tbl)
        
        #
        # CEN-HeadingCell
        #
        cell = TableCellStyle()
        default_style.add_cell_style("CEN-HeadingCell", cell)
        
        #
        # CEN-ColumnCell
        #
        cell = TableCellStyle()
        cell.set_left_border(1)
        cell.set_right_border(1)
        default_style.add_cell_style("CEN-ColumnCell", cell)
        
        #
        # CEN-BodyCell
        #
        cell = TableCellStyle()
        cell.set_left_border(1)
        cell.set_right_border(1)
        cell.set_top_border(1)
        cell.set_bottom_border(1)
        default_style.add_cell_style("CEN-BodyCell", cell)