当前位置: 首页>>代码示例>>Python>>正文


Python TableStyle.set_column_width方法代码示例

本文整理汇总了Python中gramps.gen.plug.docgen.TableStyle.set_column_width方法的典型用法代码示例。如果您正苦于以下问题:Python TableStyle.set_column_width方法的具体用法?Python TableStyle.set_column_width怎么用?Python TableStyle.set_column_width使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gramps.gen.plug.docgen.TableStyle的用法示例。


在下文中一共展示了TableStyle.set_column_width方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def make_default_style(self,default_style):
        """Make the default output style for the Note Link Report."""
        # Paragraph Styles
        f = FontStyle()
        f.set_size(16)
        f.set_type_face(FONT_SANS_SERIF)
        f.set_bold(1)
        p = ParagraphStyle()
        p.set_header_level(1)
        p.set_bottom_border(1)
        p.set_top_margin(ReportUtils.pt2cm(3))
        p.set_bottom_margin(ReportUtils.pt2cm(3))
        p.set_font(f)
        p.set_alignment(PARA_ALIGN_CENTER)
        p.set_description(_("The style used for the title of the page."))
        default_style.add_paragraph_style("NoteLink-Title", p)
        
        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.25)
        para.set_bottom_margin(0.25)
        para.set_description(_('The style used for the section headers.'))
        default_style.add_paragraph_style("NoteLink-Heading", para)
        
        font = FontStyle()
        font.set_size(12)
        p = ParagraphStyle()
        p.set(first_indent=-0.75, lmargin=.75)
        p.set_font(font)
        p.set_top_margin(ReportUtils.pt2cm(3))
        p.set_bottom_margin(ReportUtils.pt2cm(3))
        p.set_description(_('The basic style used for the text display.'))
        default_style.add_paragraph_style("NoteLink-Normal", p)
        
        font = FontStyle()
        font.set_size(12)
        font.set_bold(True)
        p = ParagraphStyle()
        p.set(first_indent=-0.75, lmargin=.75)
        p.set_font(font)
        p.set_top_margin(ReportUtils.pt2cm(3))
        p.set_bottom_margin(ReportUtils.pt2cm(3))
        p.set_description(_('The basic style used for table headings.'))
        default_style.add_paragraph_style("NoteLink-Normal-Bold", p)
        
        #Table Styles
        cell = TableCellStyle()
        default_style.add_cell_style('NoteLink-TableCell', cell)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(4)
        table.set_column_width(0, 10)
        table.set_column_width(1, 15)
        table.set_column_width(2, 65)
        table.set_column_width(3, 10)
        default_style.add_table_style('NoteLink-Table',table)
开发者ID:nblock,项目名称:gramps,代码行数:62,代码来源:notelinkreport.py

示例2: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def make_default_style(self, default_style):
        """Make the default output style for the AlphabeticalIndex report."""
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=14)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_bottom_margin(0.25)
        para.set_description(_("The style used for the title."))
        default_style.add_paragraph_style("IDX-Title", para)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(2)
        table.set_column_width(0, 80)
        table.set_column_width(1, 20)
        default_style.add_table_style("IDX-Table", table)

        cell = TableCellStyle()
        default_style.add_cell_style("IDX-Cell", cell)

        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_("The style used for index entries."))
        default_style.add_paragraph_style("IDX-Entry", para)
开发者ID:pat49,项目名称:gramps,代码行数:28,代码来源:alphabeticalindex.py

示例3: __stat_table_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def __stat_table_style(self):
        """
        Define the style used for event table
        """
        table = TableStyle()
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0, 35)
        table.set_column_width(1, 15)
        table.set_column_width(2, 15)

        self.default_style.add_table_style("SRC-StatTable", table)
开发者ID:uli22,项目名称:gramps-reports,代码行数:14,代码来源:PeopleCitationsEventRoleRelationXLSReport.py

示例4: __stat_right_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def __stat_right_style(self):
        """
        Define the style used for the stat table right
        """
        font = FontStyle()
        font.set(face=FONT_SERIF, size=10)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_alignment(PARA_ALIGN_RIGHT)       
        para.set_description(_('The style used for the stat table right.'))
        self.default_style.add_paragraph_style("SRC-StatCell", para)

#    def __personevent_table_style(self):
        """
        Define the style used for personevent table
        """
        table = TableStyle()
        table.set_width(100)
        table.set_columns(7)
        table.set_column_width(0, 5)
        table.set_column_width(1, 35)
        table.set_column_width(2, 10)
        table.set_column_width(3, 15)
        table.set_column_width(4, 15)
        table.set_column_width(5, 15)
        table.set_column_width(6, 30)
        
        self.default_style.add_table_style("SRC-PersonEventTable", table)
开发者ID:uli22,项目名称:gramps-reports,代码行数:30,代码来源:PeopleCitationsEventRoleRelationXLSReport.py

示例5: __media_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    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)
开发者ID:phejl,项目名称:addons-source,代码行数:22,代码来源:RepositoriesReportAlt.py

示例6: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def make_default_style(self, default_style):
        """Make the default output style for the TableOfContents report."""
        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=14)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_bottom_margin(0.25)
        para.set_description(_('The style used for the title.'))
        default_style.add_paragraph_style("TOC-Title", para)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(2)
        table.set_column_width(0, 80)
        table.set_column_width(1, 20)
        default_style.add_table_style("TOC-Table", table)

        cell = TableCellStyle()
        default_style.add_cell_style("TOC-Cell", cell)

        para = ParagraphStyle()
        para.set_font(font)
        para.set_description(_('The style used for first level headings.'))
        default_style.add_paragraph_style("TOC-Heading1", para)

        para = ParagraphStyle()
        para.set_font(font)
        para.set_first_indent(0.5)
        para.set_description(_('The style used for second level headings.'))
        default_style.add_paragraph_style("TOC-Heading2", para)

        para = ParagraphStyle()
        para.set_font(font)
        para.set_first_indent(1)
        para.set_description(_('The style used for third level headings.'))
        default_style.add_paragraph_style("TOC-Heading3", para)
开发者ID:belissent,项目名称:gramps,代码行数:38,代码来源:tableofcontents.py

示例7: __event_table_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
 def __event_table_style(self):
     """
     Define the style used for event table
     """
     table = TableStyle()
     table.set_width(100)
     table.set_columns(4)
     table.set_column_width(0, 25)
     table.set_column_width(1, 15)
     table.set_column_width(2, 35)
     table.set_column_width(3, 25)
     self.default_style.add_table_style("PLC-EventTable", table)
     table.set_width(100)
     table.set_columns(4)
     table.set_column_width(0, 35)
     table.set_column_width(1, 15)
     table.set_column_width(2, 25)
     table.set_column_width(3, 25)
     self.default_style.add_table_style("PLC-PersonTable", table)
开发者ID:SNoiraud,项目名称:gramps,代码行数:21,代码来源:placereport.py

示例8: __index_table_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
 def __index_table_style(self):
     """
     Define the style used for indext table
     """
     table = TableStyle()
     table.set_width(100)
     table.set_columns(4)
     table.set_column_width(0, 5)
     table.set_column_width(1, 35)
     table.set_column_width(2, 35)
     table.set_column_width(3, 5)
     
     self.default_style.add_table_style("SRC-IndexTable", table)
开发者ID:uli22,项目名称:gramps-reports,代码行数:15,代码来源:sourcescitationsindex.py

示例9: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def make_default_style(self, default_style):
        """ Add the styles used in this report """
        self.make_my_style(default_style, "DIFF-Text", 
                           _('Text'), 12, justified="left")
        self.make_my_style(default_style, "DIFF-Title", 
                           _('Text'), 16, justified="left", 
                           bold=1)
        self.make_my_style(default_style, "DIFF-Heading", 
                           _('Text'), 14, justified="left", 
                           bold=1, italic=1)
        self.make_my_style(default_style, "DIFF-TableHeading", 
                           _('Text'), 12, justified="left", 
                           bold=1)

        #Table Styles
        cell = TableCellStyle()
        cell.set_borders(1)
        default_style.add_cell_style('DIFF-TableCell', cell)

        cell = TableCellStyle()
        default_style.add_cell_style('DIFF-TableCellNoBorder', cell)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0, 50)
        table.set_column_width(1, 25)
        table.set_column_width(2, 25)
        default_style.add_table_style('DIFF-Table3',table)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(2)
        table.set_column_width(0, 15)
        table.set_column_width(1, 85)
        default_style.add_table_style('DIFF-Table2',table)
开发者ID:SNoiraud,项目名称:addons-source,代码行数:38,代码来源:differences.py

示例10: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    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)

#.........这里部分代码省略.........
开发者ID:DaAwesomeP,项目名称:gramps,代码行数:103,代码来源:indivcomplete.py

示例11: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def make_default_style(self, default_style):
        """Make the default output style for the End of Line Report."""
        # Paragraph Styles
        font = FontStyle()
        font.set_size(16)
        font.set_type_face(FONT_SANS_SERIF)
        font.set_bold(1)
        para = ParagraphStyle()
        para.set_header_level(1)
        para.set_bottom_border(1)
        para.set_bottom_margin(utils.pt2cm(8))
        para.set_font(font)
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_description(_("The style used for the title."))
        default_style.add_paragraph_style("EOL-Title", para)

        font = FontStyle()
        font.set(face=FONT_SANS_SERIF, size=12, italic=1)
        para = ParagraphStyle()
        para.set_bottom_margin(utils.pt2cm(6))
        para.set_font(font)
        para.set_alignment(PARA_ALIGN_CENTER)
        para.set_description(_('The style used for the subtitle.'))
        default_style.add_paragraph_style("EOL-Subtitle", para)

        font = FontStyle()
        font.set_size(10)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(utils.pt2cm(6))
        para.set_bottom_margin(utils.pt2cm(6))
        para.set_description(_('The basic style used for the text display.'))
        default_style.add_paragraph_style("EOL-Normal", para)

        font = FontStyle()
        font.set_size(12)
        font.set_italic(True)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(utils.pt2cm(6))
        para.set_description(_('The style used for the generation header.'))
        default_style.add_paragraph_style("EOL-Generation", para)

        font = FontStyle()
        font.set_size(8)
        para = ParagraphStyle()
        para.set_font(font)
        para.set_top_margin(0)
        para.set_bottom_margin(utils.pt2cm(6))
        para.set_description(_('The style used for details.'))
        default_style.add_paragraph_style("EOL-Pedigree", para)

        #Table Styles
        cell = TableCellStyle()
        default_style.add_cell_style('EOL-TableCell', cell)

        cell = TableCellStyle()
        cell.set_bottom_border(1)
        default_style.add_cell_style('EOL_GenerationCell', cell)

        table = TableStyle()
        table.set_width(100)
        table.set_columns(2)
        table.set_column_width(0, 10)
        table.set_column_width(1, 90)
        default_style.add_table_style('EOL-Table', table)
开发者ID:SNoiraud,项目名称:gramps,代码行数:68,代码来源:endoflinereport.py

示例12: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]

#.........这里部分代码省略.........

        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)
开发者ID:DaAwesomeP,项目名称:gramps,代码行数:104,代码来源:familygroup.py

示例13: make_default_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    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
#.........这里部分代码省略.........
开发者ID:SNoiraud,项目名称:addons-source,代码行数:103,代码来源:CensusReport.py

示例14: __LEQUODET_table_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def __LEQUODET_table_style(self):
        """
        Define the style used for event table
        """
        table = TableStyle()
        table.set_width(100)
        table.set_columns(14)
        table.set_column_width(0, 8)
        table.set_column_width(1, 3)
        table.set_column_width(2, 6)
        table.set_column_width(3, 6)
        table.set_column_width(4, 6)
        table.set_column_width(5, 6)
        table.set_column_width(6, 6)
        table.set_column_width(7, 12)
        table.set_column_width(8, 6)
        table.set_column_width(9, 30)
        table.set_column_width(10, 5)

        self.default_style.add_table_style("SRC-LEQUODETTable", table)          
开发者ID:uli22,项目名称:gramps-reports,代码行数:22,代码来源:ledigquote-v3.py

示例15: __event_table_style

# 需要导入模块: from gramps.gen.plug.docgen import TableStyle [as 别名]
# 或者: from gramps.gen.plug.docgen.TableStyle import set_column_width [as 别名]
    def __event_table_style(self):
        """
        Define the style used for event table
        """
        table = TableStyle()
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0, 35)
        table.set_column_width(1, 15)
        table.set_column_width(2, 35)

        self.default_style.add_table_style("SRC-EventTable", table)
        
        table = TableStyle()
        table.set_width(100)
        table.set_columns(9)
        table.set_column_width(0, 5)
        table.set_column_width(1, 6)
        table.set_column_width(2, 8)
        table.set_column_width(3, 12)
        table.set_column_width(4, 25)
        table.set_column_width(5, 6)
        table.set_column_width(6, 25)
        table.set_column_width(7, 6)
        table.set_column_width(8, 10)
        table.set_column_width(7, 5)

        self.default_style.add_table_style("SRC-PersonEventRoleTable", table)      
            
        table.set_width(100)
        table.set_columns(3)
        table.set_column_width(0, 35)
        table.set_column_width(1, 15)
        table.set_column_width(2, 35)

        self.default_style.add_table_style("SRC-PersonTable", table)
开发者ID:uli22,项目名称:gramps-reports,代码行数:38,代码来源:PeopleCitationsEventRoleRelationXLSReport.py


注:本文中的gramps.gen.plug.docgen.TableStyle.set_column_width方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。