本文整理汇总了Python中bauble.view.InfoExpander类的典型用法代码示例。如果您正苦于以下问题:Python InfoExpander类的具体用法?Python InfoExpander怎么用?Python InfoExpander使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InfoExpander类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, widgets):
"""
the constructor
"""
InfoExpander.__init__(self, _("General"), widgets)
general_box = self.widgets.sp_general_box
self.widgets.remove_parent(general_box)
self.vbox.pack_start(general_box)
self.widgets.sp_name_data.set_line_wrap(True)
# make the check buttons read only
def on_enter(button, *args):
button.emit_stop_by_name("enter-notify-event")
return True
self.current_obj = None
def on_nacc_clicked(*args):
cmd = "acc where species.id=%s" % self.current_obj.id
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.sp_nacc_data, on_nacc_clicked)
def on_nplants_clicked(*args):
cmd = "plant where accession.species.id=%s" % self.current_obj.id
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.sp_nplants_data, on_nplants_clicked)
示例2: __init__
def __init__(self, widgets):
'''
'''
InfoExpander.__init__(self, _("General"), widgets)
general_box = self.widgets.loc_gen_box
self.widgets.remove_parent(general_box)
self.vbox.pack_start(general_box)
示例3: __init__
def __init__(self, widgets):
'''
'''
InfoExpander.__init__(self, _("General"), widgets)
general_box = self.widgets.loc_gen_box
self.widgets.remove_parent(general_box)
self.vbox.pack_start(general_box)
self.current_obj = None
def on_nplants_clicked(*args):
cmd = 'plant where location.code="%s"' % self.current_obj.code
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.loc_nplants_data,
on_nplants_clicked)
示例4: __init__
def __init__(self, widgets):
"""
Arguments:
- `widgets`:
"""
InfoExpander.__init__(self, _("General"), widgets)
general_box = self.widgets.fam_general_box
self.widgets.remove_parent(general_box)
self.vbox.pack_start(general_box)
def on_ngen_clicked(*args):
f = self.current_obj
cmd = 'genus where family.family="%s" and family.qualifier="%s"'\
% (f.family, f.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.fam_ngen_data,
on_ngen_clicked)
def on_nsp_clicked(*args):
f = self.current_obj
cmd = 'species where genus.family.family="%s" '\
'and genus.family.qualifier="%s"' % (f.family, f.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.fam_nsp_data,
on_nsp_clicked)
def on_nacc_clicked(*args):
f = self.current_obj
cmd = 'acc where species.genus.family.family="%s" ' \
'and species.genus.family.qualifier="%s"' \
% (f.family, f.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.fam_nacc_data,
on_nacc_clicked)
def on_nplants_clicked(*args):
f = self.current_obj
cmd = 'plant where accession.species.genus.family.family="%s" ' \
'and accession.species.genus.family.qualifier="%s"' \
% (f.family, f.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.fam_nplants_data,
on_nplants_clicked)
示例5: __init__
def __init__(self, widgets):
'''
the constructor
'''
InfoExpander.__init__(self, _("General"), widgets)
general_box = self.widgets.gen_general_box
self.widgets.remove_parent(general_box)
self.vbox.pack_start(general_box)
self.current_obj = None
def on_family_clicked(*args):
select_in_search_results(self.current_obj.family)
utils.make_label_clickable(self.widgets.gen_fam_data,
on_family_clicked)
def on_nsp_clicked(*args):
g = self.current_obj
cmd = 'species where genus.genus="%s" and genus.qualifier="%s"' \
% (g.genus, g.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.gen_nsp_data,
on_nsp_clicked)
def on_nacc_clicked(*args):
g = self.current_obj
cmd = 'acc where species.genus.genus="%s" ' \
'and species.genus.qualifier="%s"' \
% (g.genus, g.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.gen_nacc_data,
on_nacc_clicked)
def on_nplants_clicked(*args):
g = self.current_obj
cmd = 'plant where accession.species.genus.genus="%s" and ' \
'accession.species.genus.qualifier="%s"' \
% (g.genus, g.qualifier)
bauble.gui.send_command(cmd)
utils.make_label_clickable(self.widgets.gen_nplants_data,
on_nplants_clicked)