本文整理汇总了Python中gramps.gen.plug.menu.NumberOption.set_help方法的典型用法代码示例。如果您正苦于以下问题:Python NumberOption.set_help方法的具体用法?Python NumberOption.set_help怎么用?Python NumberOption.set_help使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gramps.gen.plug.menu.NumberOption
的用法示例。
在下文中一共展示了NumberOption.set_help方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
category_name = _("Report Options")
if self.name.split(",")[0] == _PERSON_RPT_NAME:
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
else:
self.__pid = FamilyOption(_("Center Family"))
self.__pid.set_help(_("The center family for the report"))
menu.add_option(category_name, "pid", self.__pid)
genup = NumberOption(_("Generations up"), 10, 0, 100)
genup.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "genup", genup)
gendown = NumberOption(_("Generations down"), 10, 0, 100)
gendown.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "gendown", gendown)
siblings = BooleanOption(_("Include siblings"), True)
siblings.set_help(_("Include siblings of ancestors."))
menu.add_option(category_name, "siblings", siblings)
images = BooleanOption(_("Include images"), False)
images.set_help(_("Include images of people in the nodes."))
menu.add_option(category_name, "images", images)
示例2: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the menu for the ancestor report.
"""
category_name = _("Report Options")
pid = PersonOption(_("Center Person"))
pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", pid)
stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_private_data_option(menu, category_name)
maxgen = NumberOption(_("Generations"), 10, 1, 100)
maxgen.set_help(_("The number of generations to include in the report"))
menu.add_option(category_name, "maxgen", maxgen)
pagebbg = BooleanOption(_("Page break between generations"), False)
pagebbg.set_help(
_("Whether to start a new page after each generation."))
menu.add_option(category_name, "pagebbg", pagebbg)
namebrk = BooleanOption(_("Add linebreak after each name"), False)
namebrk.set_help(_("Indicates if a line break should follow the name."))
menu.add_option(category_name, "namebrk", namebrk)
stdoptions.add_localization_option(menu, category_name)
示例3: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
""" Add the options for this report """
category_name = _("Report Options")
title = StringOption(_("book|Title"), _("Title of the Book"))
title.set_help(_("Title string for the book."))
menu.add_option(category_name, "title", title)
subtitle = StringOption(_("Subtitle"), _("Subtitle of the Book"))
subtitle.set_help(_("Subtitle string for the book."))
menu.add_option(category_name, "subtitle", subtitle)
dateinfo = time.localtime(time.time())
rname = self.__db.get_researcher().get_name()
footer_string = _("Copyright %(year)d %(name)s") % {"year": dateinfo[0], "name": rname}
footer = StringOption(_("Footer"), footer_string)
footer.set_help(_("Footer string for the page."))
menu.add_option(category_name, "footer", footer)
imgid = MediaOption(_("Image"))
imgid.set_help(_("Gramps ID of the media object to use as an image."))
menu.add_option(category_name, "imgid", imgid)
imgsize = NumberOption(_("Image Size"), 0, 0, 20, 0.1)
imgsize.set_help(
_("Size of the image in cm. A value of 0 indicates " "that the image should be fit to the page.")
)
menu.add_option(category_name, "imgsize", imgsize)
示例4: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the menu for the kinship report.
"""
category_name = _("Report Options")
pid = PersonOption(_("Center Person"))
pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", pid)
stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_private_data_option(menu, category_name)
maxdescend = NumberOption(_("Max Descendant Generations"), 2, 1, 20)
maxdescend.set_help(_("The maximum number of descendant generations"))
menu.add_option(category_name, "maxdescend", maxdescend)
maxascend = NumberOption(_("Max Ancestor Generations"), 2, 1, 20)
maxascend.set_help(_("The maximum number of ancestor generations"))
menu.add_option(category_name, "maxascend", maxascend)
incspouses = BooleanOption(_("Include spouses"), True)
incspouses.set_help(_("Whether to include spouses"))
menu.add_option(category_name, "incspouses", incspouses)
inccousins = BooleanOption(_("Include cousins"), True)
inccousins.set_help(_("Whether to include cousins"))
menu.add_option(category_name, "inccousins", inccousins)
incaunts = BooleanOption(_("Include aunts/uncles/nephews/nieces"), True)
incaunts.set_help(_("Whether to include aunts/uncles/nephews/nieces"))
menu.add_option(category_name, "incaunts", incaunts)
stdoptions.add_localization_option(menu, category_name)
示例5: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the document menu for the AsciiDoc docgen.
"""
category_name = 'Document Options' # internal name: don't translate
linechars = NumberOption(_('Characters per line'), 72, 20, 9999)
linechars.set_help(_("The number of characters per line"))
menu.add_option(category_name, 'linechars', linechars)
示例6: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the document menu for the AsciiDoc docgen.
"""
category_name = DOCGEN_OPTIONS
linechars = NumberOption(_('Characters per line'), 72, 20, 9999)
linechars.set_help(_("The number of characters per line"))
menu.add_option(category_name, 'linechars', linechars)
示例7: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the document menu for the AsciiDoc docgen.
"""
# next line for internal use only, never will be in UI: don't translate
category_name = 'Document Options'
linechars = NumberOption(_('Characters per line'), 72, 20, 9999)
linechars.set_help(_("The number of characters per line"))
menu.add_option(category_name, 'linechars', linechars)
示例8: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the menu for the fan chart.
"""
category_name = _("Report Options")
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
max_gen = NumberOption(_("Generations"), 5, 1, self.max_generations)
max_gen.set_help(_("The number of generations "
"to include in the report"))
menu.add_option(category_name, "maxgen", max_gen)
circle = EnumeratedListOption(_('Type of graph'), HALF_CIRCLE)
circle.add_item(FULL_CIRCLE, _('full circle'))
circle.add_item(HALF_CIRCLE, _('half circle'))
circle.add_item(QUAR_CIRCLE, _('quarter circle'))
circle.set_help(_("The form of the graph: full circle, half circle,"
" or quarter circle."))
menu.add_option(category_name, "circle", circle)
background = EnumeratedListOption(_('Background color'), BACKGROUND_GEN)
background.add_item(BACKGROUND_WHITE, _('white'))
background.add_item(BACKGROUND_GEN, _('generation dependent'))
background.set_help(_("Background color is either white or generation"
" dependent"))
menu.add_option(category_name, "background", background)
radial = EnumeratedListOption(_('Orientation of radial texts'),
RADIAL_UPRIGHT)
radial.add_item(RADIAL_UPRIGHT, _('upright'))
radial.add_item(RADIAL_ROUNDABOUT, _('roundabout'))
radial.set_help(_("Print radial texts upright or roundabout"))
menu.add_option(category_name, "radial", radial)
draw_empty = BooleanOption(_("Draw empty boxes"), True)
draw_empty.set_help(_("Draw the background "
"although there is no information"))
menu.add_option(category_name, "draw_empty", draw_empty)
same_style = BooleanOption(_("Use one font style "
"for all generations"), True)
same_style.set_help(_("You can customize font and color "
"for each generation in the style editor"))
menu.add_option(category_name, "same_style", same_style)
category_name = _("Report Options (2)")
stdoptions.add_private_data_option(menu, category_name)
stdoptions.add_living_people_option(menu, category_name)
stdoptions.add_localization_option(menu, category_name)
示例9: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Create all the menu options for this report.
"""
category_name = _("Report Options")
pid = PersonOption(_("Center Person"))
pid.set_help(_("The Center person for the graph"))
menu.add_option(category_name, "pid", pid)
stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_private_data_option(menu, category_name)
stdoptions.add_living_people_option(menu, category_name)
max_gen = NumberOption(_('Max Descendant Generations'), 10, 1, 15)
max_gen.set_help(_("The number of generations of descendants to "
"include in the graph"))
menu.add_option(category_name, "maxdescend", max_gen)
max_gen = NumberOption(_('Max Ancestor Generations'), 10, 1, 15)
max_gen.set_help(_("The number of generations of ancestors to "
"include in the graph"))
menu.add_option(category_name, "maxascend", max_gen)
include_id = EnumeratedListOption(_('Include Gramps ID'), 0)
include_id.add_item(0, _('Do not include'))
include_id.add_item(1, _('Share an existing line'))
include_id.add_item(2, _('On a line of its own'))
include_id.set_help(_("Whether (and where) to include Gramps IDs"))
menu.add_option(category_name, "incid", include_id)
stdoptions.add_localization_option(menu, category_name)
################################
category_name = _("Graph Style")
################################
color = EnumeratedListOption(_("Graph coloring"), "filled")
for i in range( 0, len(_COLORS) ):
color.add_item(_COLORS[i]["value"], _COLORS[i]["name"])
color.set_help(_("Males will be shown with blue, females "
"with red. If the sex of an individual "
"is unknown it will be shown with gray."))
menu.add_option(category_name, "color", color)
roundedcorners = BooleanOption( # see bug report #2180
_("Use rounded corners"), False)
roundedcorners.set_help(
_("Use rounded corners to differentiate "
"between women and men."))
menu.add_option(category_name, "roundcorners", roundedcorners)
示例10: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
category_name = _("Report Options")
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
numbering = EnumeratedListOption(_("Numbering system"), "Simple")
numbering.set_items([
("Simple", _("Simple numbering")),
("d'Aboville", _("d'Aboville numbering")),
("Henry", _("Henry numbering")),
("Modified Henry", _("Modified Henry numbering")),
("de Villiers/Pama", _("de Villiers/Pama numbering")),
("Meurgey de Tupigny", _("Meurgey de Tupigny numbering"))])
numbering.set_help(_("The numbering system to be used"))
menu.add_option(category_name, "numbering", numbering)
gen = NumberOption(_("Generations"), 10, 1, 15)
gen.set_help(_("The number of generations to include in the report"))
menu.add_option(category_name, "gen", gen)
stdoptions.add_gramps_id_option(menu, category_name)
marrs = BooleanOption(_('Show marriage info'), False)
marrs.set_help(
_("Whether to show marriage information in the report."))
menu.add_option(category_name, "marrs", marrs)
divs = BooleanOption(_('Show divorce info'), False)
divs.set_help(_("Whether to show divorce information in the report."))
menu.add_option(category_name, "divs", divs)
dups = BooleanOption(_('Show duplicate trees'), True)
dups.set_help(
_("Whether to show duplicate Family Trees in the report."))
menu.add_option(category_name, "dups", dups)
category_name = _("Report Options (2)")
stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_place_format_option(menu, category_name)
stdoptions.add_private_data_option(menu, category_name)
stdoptions.add_living_people_option(menu, category_name)
locale_opt = stdoptions.add_localization_option(menu, category_name)
stdoptions.add_date_format_option(menu, category_name, locale_opt)
示例11: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
category_name = _("Report Options")
self.__filter = FilterOption(_("Filter"), 0)
self.__filter.set_help(
_("Select filter to restrict people that appear in the report"))
menu.add_option(category_name, "filter", self.__filter)
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
self.__pid.connect('value-changed', self.__update_filters)
self.__update_filters()
# We must figure out the value of the first option before we can
# create the EnumeratedListOption
fmt_list = global_name_display.get_name_format()
name_format = EnumeratedListOption(_("Name format"), 0)
name_format.add_item(0, _("Default"))
for num, name, fmt_str, act in fmt_list:
name_format.add_item(num, name)
name_format.set_help(_("Select the format to display names"))
menu.add_option(category_name, "name_format", name_format)
numbering = EnumeratedListOption(_("Numbering system"), "Simple")
numbering.set_items([
("Simple", _("Simple numbering")),
("de Villiers/Pama", _("de Villiers/Pama numbering")),
("Meurgey de Tupigny", _("Meurgey de Tupigny numbering"))])
numbering.set_help(_("The numbering system to be used"))
menu.add_option(category_name, "numbering", numbering)
gen = NumberOption(_("Generations"), 10, 1, 15)
gen.set_help(_("The number of generations to include in the report"))
menu.add_option(category_name, "gen", gen)
marrs = BooleanOption(_('Show marriage info'), False)
marrs.set_help(_("Whether to show marriage information in the report."))
menu.add_option(category_name, "marrs", marrs)
divs = BooleanOption(_('Show divorce info'), False)
divs.set_help(_("Whether to show divorce information in the report."))
menu.add_option(category_name, "divs", divs)
dups = BooleanOption(_('Show duplicate trees'), True)
dups.set_help(_("Whether to show duplicate family trees in the report."))
menu.add_option(category_name, "dups", dups)
示例12: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
category_name = _("Report Options")
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
maxgen = NumberOption(_("Generations"), 10, 1, 100)
maxgen.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "maxgen", maxgen)
images = BooleanOption(_("Include images"), False)
images.set_help(_("Include images of people in the nodes."))
menu.add_option(category_name, "images", images)
示例13: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""Add the menu options to the report dialog"""
category_name = _("Tree Options")
pid = PersonOption(_("Center Person"))
pid.set_help(_("The center person for the tree"))
menu.add_option(category_name, "pid", pid)
max_gen = NumberOption(_("Generations"), 10, 1, 50)
max_gen.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "maxgen", max_gen)
show_captions = BooleanOption(_("Show Mother/Father captions"), False)
show_captions.set_help(_("Show the title of mother or father beside each ancestor's box."))
menu.add_option(category_name, "showcaptions", show_captions)
示例14: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
category_name = _("Report Options")
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
maxgen = NumberOption(_("Generations"), 10, 1, 100)
maxgen.set_help(_("The number of generations to include in the tree"))
menu.add_option(category_name, "maxgen", maxgen)
shift = NumberOption(_("Grandparent family spacing"), 0, 0, 50)
shift.set_help(_("Extra spacing of grandparent families (mm)"))
menu.add_option(category_name, "shift", shift)
images = BooleanOption(_("Include images"), False)
images.set_help(_("Include images of people in the nodes."))
menu.add_option(category_name, "images", images)
示例15: add_menu_options
# 需要导入模块: from gramps.gen.plug.menu import NumberOption [as 别名]
# 或者: from gramps.gen.plug.menu.NumberOption import set_help [as 别名]
def add_menu_options(self, menu):
"""
Add options to the menu for the ancestor report.
"""
category_name = _("Report Options")
self.__pid = PersonOption(_("Center Person"))
self.__pid.set_help(_("The center person for the report"))
menu.add_option(category_name, "pid", self.__pid)
maxgen = NumberOption(_("Generations"), 10, 1, 300)
maxgen.set_help(_("The number of generations to include in the report"))
menu.add_option(category_name, "maxgen", maxgen)
Filleddigit = NumberOption(_("Filled digit"), 10, 1, 50)
Filleddigit.set_help(_("The number of digits after comma to include in the report for the percentage of ancestor found at a given generation"))
menu.add_option(category_name, "Filled_digit", Filleddigit)
Collapsedigit = NumberOption(_("Collapsed digit"), 10, 1, 50)
Collapsedigit.set_help(_("The number of digits after comma to include in the report for the pedigree Collapse"))
menu.add_option(category_name, "Collapsed_digit", Collapsedigit)
displayth = BooleanOption(_("Display theoretical"), False)
displayth.set_help(_("Whether to display the theoretical number of ancestor by generation"))
menu.add_option(category_name, "Display_theoretical", displayth)
stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_localization_option(menu, category_name)