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


Python HobButton.hide方法代码示例

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


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

示例1: ImageConfigurationPage

# 需要导入模块: from bb.ui.crumbs.hobwidget import HobButton [as 别名]
# 或者: from bb.ui.crumbs.hobwidget.HobButton import hide [as 别名]

#.........这里部分代码省略.........
            self.box_group_area.pack_end(box, False, False)

    def show_machine(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = False)
        self.show_all()

    def update_progress_bar(self, title, fraction, status=None):
        if self.stopping == False:
            self.progress_bar.update(fraction)
            self.progress_bar.set_text(title)
            self.progress_bar.set_rcstyle(status)

    def show_info_populating(self):
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = True)
        self.show_all()

    def show_info_populated(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = False)
        self.set_config_baseimg_layout()
        self.show_all()

    def show_baseimg_selected(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = True)
        self.set_config_machine_layout(show_progress_bar = False)
        self.set_config_baseimg_layout()
        self.show_all()
        if self.builder.recipe_model.get_selected_image() == self.builder.recipe_model.__custom_image__:
            self.just_bake_button.hide()

    def create_config_machine(self):
        self.machine_title = gtk.Label()
        self.machine_title.set_alignment(0.0, 0.5)
        mark = "<span %s>Select a machine</span>" % self.span_tag('x-large', 'bold')
        self.machine_title.set_markup(mark)

        self.machine_title_desc = gtk.Label()
        self.machine_title_desc.set_alignment(0.0, 0.5)
        mark = ("<span %s>Your selection is the profile of the target machine for which you"
        " are building the image.\n</span>") % (self.span_tag('medium'))
        self.machine_title_desc.set_markup(mark)

        self.machine_combo = gtk.combo_box_new_text()
        self.machine_combo.connect("changed", self.machine_combo_changed_cb)

        icon_file = hic.ICON_LAYERS_DISPLAY_FILE
        hover_file = hic.ICON_LAYERS_HOVER_FILE
        self.layer_button = HobImageButton("Layers", "Add support for machines, software, etc.",
                                icon_file, hover_file)
        self.layer_button.connect("clicked", self.layer_button_clicked_cb)

        markup = "Layers are a powerful mechanism to extend the Yocto Project "
        markup += "with your own functionality.\n"
        markup += "For more on layers, check the <a href=\""
        markup += "http://www.yoctoproject.org/docs/current/dev-manual/"
        markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
        self.layer_info_icon = HobInfoButton(markup, self.get_parent())

#        self.progress_box = gtk.HBox(False, 6)
        self.progress_bar = HobProgressBar()
#        self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
开发者ID:MentorEmbedded,项目名称:bitbake,代码行数:70,代码来源:imageconfigurationpage.py

示例2: ImageConfigurationPage

# 需要导入模块: from bb.ui.crumbs.hobwidget import HobButton [as 别名]
# 或者: from bb.ui.crumbs.hobwidget.HobButton import hide [as 别名]

#.........这里部分代码省略.........
            self.box_group_area.pack_end(box, False, False)

    def show_machine(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = False)
        self.show_all()

    def update_progress_bar(self, title, fraction, status=None):
        if self.stopping == False:
            self.progress_bar.update(fraction)
            self.progress_bar.set_text(title)
            self.progress_bar.set_rcstyle(status)

    def show_info_populating(self):
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = True)
        self.show_all()

    def show_info_populated(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = False)
        self.set_config_machine_layout(show_progress_bar = False)
        self.set_config_baseimg_layout()
        self.show_all()

    def show_baseimg_selected(self):
        self.progress_bar.reset()
        self._pack_components(pack_config_build_button = True)
        self.set_config_machine_layout(show_progress_bar = False)
        self.set_config_baseimg_layout()
        self.show_all()
        if self.builder.recipe_model.get_selected_image() == self.builder.recipe_model.__custom_image__:
            self.just_bake_button.hide()

    def add_warnings_bar(self):
        #create the warnings bar shown when recipes parsing generates warnings
        color = HobColors.KHAKI
        warnings_bar = gtk.EventBox()
        warnings_bar.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
        warnings_bar.set_flags(gtk.CAN_DEFAULT)
        warnings_bar.grab_default()

        build_stop_tab = gtk.Table(10, 20, True)
        warnings_bar.add(build_stop_tab)

        icon = gtk.Image()
        icon_pix_buffer = gtk.gdk.pixbuf_new_from_file(hic.ICON_INDI_ALERT_FILE)
        icon.set_from_pixbuf(icon_pix_buffer)
        build_stop_tab.attach(icon, 0, 2, 0, 10)

        label = gtk.Label()
        label.set_alignment(0.0, 0.5)
        warnings_nb = len(self.builder.parsing_warnings)
        if warnings_nb == 1:
            label.set_markup("<span size='x-large'><b>1 recipe parsing warning</b></span>")
        else:
            label.set_markup("<span size='x-large'><b>%s recipe parsing warnings</b></span>" % warnings_nb)
        build_stop_tab.attach(label, 2, 12, 0, 10)

        view_warnings_button = HobButton("View warnings")
        view_warnings_button.connect('clicked', self.view_warnings_button_clicked_cb)
        build_stop_tab.attach(view_warnings_button, 15, 19, 1, 9)

        return warnings_bar
开发者ID:Dagaweyne,项目名称:yocto-for-pandaboard,代码行数:69,代码来源:imageconfigurationpage.py


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