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


Python StopButton.show方法代码示例

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


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

示例1: _setup_toolbars

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def _setup_toolbars(self):
        ''' Setup the toolbars.. '''

        tools_toolbar = Gtk.Toolbar()
        numbers_toolbar = Gtk.Toolbar()
        toolbox = ToolbarBox()

        self.activity_toolbar_button = ActivityToolbarButton(self)

        toolbox.toolbar.insert(self.activity_toolbar_button, 0)
        self.activity_toolbar_button.show()

        self.numbers_toolbar_button = ToolbarButton(
            page=numbers_toolbar,
            icon_name='number-tools')
        if MODE == 'number':
            numbers_toolbar.show()
            toolbox.toolbar.insert(self.numbers_toolbar_button, -1)
            self.numbers_toolbar_button.show()

        self.tools_toolbar_button = ToolbarButton(
            page=tools_toolbar,
            icon_name='view-source')

        self.button_pattern = button_factory(
            'new-pattern-game', toolbox.toolbar, self._select_game_cb,
            cb_arg='pattern', tooltip=_('New game'))

        self._set_extras(toolbox.toolbar)

        self._sep.append(separator_factory(toolbox.toolbar, True, False))

        stop_button = StopButton(self)
        stop_button.props.accelerator = '<Ctrl>q'
        toolbox.toolbar.insert(stop_button, -1)
        stop_button.show()

        button_factory('score-copy', self.activity_toolbar_button,
                       self._write_scores_to_clipboard,
                       tooltip=_('Export scores to clipboard'))

        self.set_toolbar_box(toolbox)
        toolbox.show()

        if MODE == 'word':
            self.words_tool_button = button_factory(
                'word-tools', tools_toolbar, self._edit_words_cb,
                tooltip=_('Edit word lists.'))

        self.import_button = button_factory(
            'image-tools', tools_toolbar, self.image_import_cb,
            tooltip=_('Import custom cards'))

        self.button_custom = button_factory(
            'new-custom-game', tools_toolbar, self._select_game_cb,
            cb_arg='custom', tooltip=_('New custom game'))
        self.button_custom.set_sensitive(False)

        if MODE == 'number':
            self._setup_number_buttons(numbers_toolbar)
开发者ID:sugarlabs,项目名称:dimensions,代码行数:62,代码来源:Dimensions.py

示例2: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):

        toolbar_box = ToolbarBox()
        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()

        activity_button = ActivityToolbarButton(self)
        toolbar_box.toolbar.insert(activity_button, -1)
        activity_button.show()

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(False)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        button = ToolButton('speaker-muted-100')
        button.set_tooltip(_('Sound'))
        button.connect('clicked', self.sound_control)
        toolbar_box.toolbar.insert(button, -1)

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.show_all()
开发者ID:sugarlabs,项目名称:Stick-Hero,代码行数:34,代码来源:activity.py

示例3: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):

        # Create the toolbar box
        toolbar_box = ToolbarBox()
        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()

        # Create the activity button
        activity_button = ActivityToolbarButton(self)
        toolbar_box.toolbar.insert(activity_button, -1)
        activity_button.show()

        # Create the pause/play button
        stop_play = ToolButton('media-playback-stop')
        stop_play.set_tooltip(_("Stop"))
        stop_play.set_accelerator(_('<ctrl>space'))
        stop_play.connect('clicked', self.stop_play_cb)
        stop_play.show()

        toolbar_box.toolbar.insert(stop_play, -1)

        # Create a blank separator and a Stop button
        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()
开发者ID:FOSSRIT,项目名称:SkyTime,代码行数:33,代码来源:SkyTimeActivity.py

示例4: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):
        toolbar_box = ToolbarBox()

        view_toolbar = ViewToolbar()
        view_toolbar.connect('go-fullscreen',
                self.view_toolbar_go_fullscreen_cb)
        view_toolbar.show()
        view_toolbar_button = ToolbarButton(
            page=view_toolbar,
            icon_name='toolbar-view')
        toolbar_box.toolbar.insert(view_toolbar_button, -1)
        view_toolbar_button.show()

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        stop_button.props.accelerator = '<Ctrl><Shift>Q'
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()
开发者ID:sugarlabs,项目名称:myosa-examples,代码行数:28,代码来源:DemoiselleActivity.py

示例5: make_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def make_toolbar(self):
        
        toolbar_box = ToolbarBox()

        activity_button = ActivityToolbarButton(self)
        toolbar_box.toolbar.insert(activity_button, 0)
        activity_button.show()
        self._go_home = ToolButton('go-home')
        self._go_home.set_tooltip(_('Home page'))
        self._go_home.connect('clicked', self._go_home_cb)
        toolbar_box.toolbar.insert(self._go_home, -1)
        self._go_home.show()
        self._browse = ToolButton('browse')
        self._browse.set_tooltip(_('Open in Browse'))
        self._browse.connect('clicked', self._do_browse_clicked_cb)
        toolbar_box.toolbar.insert(self._browse, -1)
        self._browse.show()

	separator=Gtk.SeparatorToolItem(draw=False)
	separator.set_expand(True)
	toolbar_box.toolbar.insert(separator,-1)
	separator.show()
	stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

   	self.set_toolbar_box(toolbar_box)
        toolbar_box.show()
开发者ID:crusher95,项目名称:webconfusion,代码行数:30,代码来源:WebConfusion.py

示例6: makeToolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
 def makeToolbar(self, activity):
     self.activity = activity
     
     toolbar = ToolbarBox()
     
     activity_button = ActivityToolbarButton(activity)
     toolbar.toolbar.insert(activity_button, -1)
     activity_button.show()
     
     editmode = ToolButton('edit-description')
     editmode.set_tooltip(_("Enter Edit Mode"))
     editmode.set_accelerator(_('<ctrl>e'))
     editmode.connect('clicked', self.gotoCoding)
     toolbar.toolbar.insert(editmode, -1)
     editmode.show()
     
     separator = Gtk.SeparatorToolItem()
     separator.props.draw = False
     separator.set_expand(True)
     toolbar.toolbar.insert(separator, -1)
     separator.show()
     
     stop_button = StopButton(activity)
     toolbar.toolbar.insert(stop_button, -1)
     stop_button.show()
     
     return toolbar
开发者ID:ColdSauce,项目名称:golems,代码行数:29,代码来源:intscene.py

示例7: _setup_toolbars

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def _setup_toolbars(self):
        custom_toolbar = Gtk.Toolbar()
        toolbox = ToolbarBox()
        self._toolbar = toolbox.toolbar
        self._activity_button = ActivityToolbarButton(self)
        self._activity_button.connect('clicked', self._update_graphics)
        self._toolbar.insert(self._activity_button, 0)
        self._activity_button.show()

        self._custom_toolbar_button = ToolbarButton(
            label=_('Custom'),
            page=custom_toolbar,
            icon_name='view-source')
        self._custom_toolbar_button.connect('clicked', self._update_graphics)
        custom_toolbar.show()
        self._toolbar.insert(self._custom_toolbar_button, -1)
        self._custom_toolbar_button.show()

        self._load_standard_buttons(self._toolbar)

        self._separator = Gtk.SeparatorToolItem()
        self._separator.props.draw = False
        self._separator.set_expand(True)
        self._toolbar.insert(self._separator, -1)
        self._separator.show()

        stop_button = StopButton(self)
        stop_button.props.accelerator = _('<Ctrl>Q')
        self._toolbar.insert(stop_button, -1)
        stop_button.show()
        self.set_toolbar_box(toolbox)
        toolbox.show()

        self._load_custom_buttons(custom_toolbar)
开发者ID:leonardcj,项目名称:fractionbounce,代码行数:36,代码来源:FractionBounceActivity.py

示例8: __init__

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def __init__(self, handle):
        """Set up the HelloWorld activity."""
        activity.Activity.__init__(self, handle)

        self.max_participants = 1

        toolbar_box = ToolbarBox()

        activity_button = ActivityToolbarButton(self)
        toolbar_box.toolbar.insert(activity_button, 0)
        activity_button.show()

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()

        self.init_fonts()

        self.font_list = FontsList(self._all_fonts, self._font_white_list)
        self.set_canvas(self.font_list)
        self.show_all()
开发者ID:YashAgarwal,项目名称:edit-fonts-activity,代码行数:32,代码来源:activity.py

示例9: __make_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def __make_toolbar(self):
        # toolbar with the new toolbar redesign
        toolbar_box = ToolbarBox()

        activity_button = ActivityButton(self)
        toolbar_box.toolbar.insert(activity_button, 0)
        activity_button.show()

        title_entry = TitleEntry(self)
        toolbar_box.toolbar.insert(title_entry, -1)
        title_entry.show()

        share_button = ShareButton(self)
        toolbar_box.toolbar.insert(share_button, -1)
        share_button.show()

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()
开发者ID:sugarlabs,项目名称:pilas-activity,代码行数:30,代码来源:motor_activity.py

示例10: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):
        toolbar_box = ToolbarBox()

        activity_button = ActivityButton(self)
        toolbar_box.toolbar.insert(activity_button, 0)
        activity_button.show()

        title_entry = TitleEntry(self)
        toolbar_box.toolbar.insert(title_entry, -1)
        title_entry.show()

        description_item = DescriptionItem(self)
        toolbar_box.toolbar.insert(description_item, -1)
        description_item.show()

        share_button = ShareButton(self)
        toolbar_box.toolbar.insert(share_button, -1)
        share_button.show()

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()
开发者ID:rafaelcor,项目名称:comunicate,代码行数:33,代码来源:activity.py

示例11: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):

        toolbox = ToolbarBox()

        activity_button = ActivityToolbarButton(self)
        toolbox.toolbar.insert(activity_button, -1)
        activity_button.show()

        self.build_birth_toolbar(toolbox)
        self.build_today_toolbar(toolbox)

        separador13 = Gtk.SeparatorToolItem()
        separador13.props.draw = False
        separador13.set_expand(True)
        toolbox.toolbar.insert(separador13, -1)

        stop_button = StopButton(self)
        stop_button.props.accelerator = _('<Ctrl>Q')
        toolbox.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbox)
        toolbox.show()

        self.show_all()
开发者ID:sugarlabs,项目名称:biorhythm,代码行数:27,代码来源:activity.py

示例12: build_toolbar

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def build_toolbar(self):
        toolbar_box = ToolbarBox()
        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()

        activity_button = ActivityToolbarButton(self)
        toolbar_box.toolbar.insert(activity_button, -1)
        activity_button.show()

        # Pause/Play button:

        stop_play = ToolButton('media-playback-stop')
        stop_play.set_tooltip(_("Stop"))
        stop_play.set_accelerator(_('<ctrl>space'))
        stop_play.connect('clicked', self._stop_play_cb)
        stop_play.show()

        toolbar_box.toolbar.insert(stop_play, -1)

        # Blank space (separator) and Stop button at the end:

        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()
开发者ID:redxdev,项目名称:Matching,代码行数:32,代码来源:MatchingActivity.py

示例13: __init__

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def __init__(self,handle):

        activity.Activity.__init__(self,handle,False)

        self.set_title("Ceibal_Radio")

        barraprincipal = ToolbarBox(self)

        activity_button = ActivityButton(self)
        barraprincipal.toolbar.insert(activity_button, 0)
        activity_button.show()

        title_entry = TitleEntry(self)
        barraprincipal.toolbar.insert(title_entry, -1)
        title_entry.show()
        
        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        barraprincipal.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        barraprincipal.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(barraprincipal)
        if not failure:
            vistareproductor = VistaReproductor()
            self.set_canvas(vistareproductor)
        else:
            error = Gtk.Label("Sorry, this activity doesn't work on this computer.")
            self.set_canvas(error)

        self.show_all()
开发者ID:Daksh,项目名称:CeibalRadio,代码行数:37,代码来源:CeibalRadioActivity.py

示例14: __init__

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def __init__(self, handle):
        activity.Activity.__init__(self, handle)

        self.max_participants = 1

        toolbar_box = ToolbarBox()

        activity_button = ActivityButton(self)
        toolbar_box.toolbar.insert(activity_button, 0)
        activity_button.show()

        title_entry = TitleEntry(self)
        toolbar_box.toolbar.insert(title_entry, -1)
        title_entry.show()
        
        separator = Gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar_box.toolbar.insert(separator, -1)
        separator.show()

        stop_button = StopButton(self)
        toolbar_box.toolbar.insert(stop_button, -1)
        stop_button.show()

        self.set_toolbar_box(toolbar_box)
        toolbar_box.show()

        self.signal = self.connect("draw", self.execute)
开发者ID:leonardcj,项目名称:Time-Line,代码行数:31,代码来源:timeline.py

示例15: _setup_toolbars

# 需要导入模块: from sugar3.activity.widgets import StopButton [as 别名]
# 或者: from sugar3.activity.widgets.StopButton import show [as 别名]
    def _setup_toolbars(self):
        """ Setup the toolbars. """

        self.max_participants = 4

        toolbox = ToolbarBox()

        # Activity toolbar
        activity_button = ActivityToolbarButton(self)

        toolbox.toolbar.insert(activity_button, 0)
        activity_button.show()

        self.set_toolbar_box(toolbox)
        toolbox.show()
        self.toolbar = toolbox.toolbar

        self._new_game_button_h = button_factory(
            'new-game', self.toolbar, self._new_game_cb,
            tooltip=_('Start a game.'))

        self.status = label_factory(self.toolbar, '')

        separator_factory(toolbox.toolbar, True, False)

        self.solver = button_factory(
            'help-toolbar', self.toolbar,
            self._solve_cb,
            tooltip=_('Solve the puzzle'))

        stop_button = StopButton(self)
        stop_button.props.accelerator = '<Ctrl>q'
        toolbox.toolbar.insert(stop_button, -1)
        stop_button.show()
开发者ID:sugarlabs,项目名称:flip,代码行数:36,代码来源:FlipActivity.py


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