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


Python InfoExpander.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from bauble.view import InfoExpander [as 别名]
# 或者: from bauble.view.InfoExpander import __init__ [as 别名]
    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)
开发者ID:juanpenadillo,项目名称:bauble.classic,代码行数:30,代码来源:species.py

示例2: __init__

# 需要导入模块: from bauble.view import InfoExpander [as 别名]
# 或者: from bauble.view.InfoExpander import __init__ [as 别名]
 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)
开发者ID:Guillon88,项目名称:ghini.desktop,代码行数:9,代码来源:location.py

示例3: __init__

# 需要导入模块: from bauble.view import InfoExpander [as 别名]
# 或者: from bauble.view.InfoExpander import __init__ [as 别名]
    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)
开发者ID:Ghini,项目名称:ghini.desktop,代码行数:16,代码来源:location.py

示例4: __init__

# 需要导入模块: from bauble.view import InfoExpander [as 别名]
# 或者: from bauble.view.InfoExpander import __init__ [as 别名]
    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)
开发者ID:Jean-FrancoisGagnon,项目名称:bauble.classic,代码行数:46,代码来源:family.py

示例5: __init__

# 需要导入模块: from bauble.view import InfoExpander [as 别名]
# 或者: from bauble.view.InfoExpander import __init__ [as 别名]
    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)
开发者ID:Jean-FrancoisGagnon,项目名称:bauble.classic,代码行数:42,代码来源:genus.py


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