本文整理匯總了Python中sugar.graphics.toolbarbox.ToolbarBox.hide方法的典型用法代碼示例。如果您正苦於以下問題:Python ToolbarBox.hide方法的具體用法?Python ToolbarBox.hide怎麽用?Python ToolbarBox.hide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sugar.graphics.toolbarbox.ToolbarBox
的用法示例。
在下文中一共展示了ToolbarBox.hide方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Record
# 需要導入模塊: from sugar.graphics.toolbarbox import ToolbarBox [as 別名]
# 或者: from sugar.graphics.toolbarbox.ToolbarBox import hide [as 別名]
#.........這裏部分代碼省略.........
return False
def _play_pause_clicked(self, widget):
self.model.play_pause()
def set_mode(self, mode):
self._toolbar_controls.set_mode(mode)
# can be called from gstreamer thread, so must not do any GTK+ stuff
def set_glive_sink(self, sink):
return self._media_view.set_video_sink(sink)
# can be called from gstreamer thread, so must not do any GTK+ stuff
def set_gplay_sink(self, sink):
return self._media_view.set_video2_sink(sink)
def get_selected_quality(self):
return self._toolbar_controls.get_quality()
def get_selected_timer(self):
return self._toolbar_controls.get_timer()
def get_selected_duration(self):
return self._toolbar_controls.get_duration() * 60 # convert to secs
def set_progress(self, value, text):
self._progress.set_progress(value)
self._progress.set_text(text)
def set_countdown(self, value):
if value == 0:
self._shutter_button.show()
self._countdown_image.hide()
self._countdown_image.clear()
return
self._shutter_button.hide()
self._countdown_image.show()
self._countdown_image.set_value(value)
def _title_changed(self, widget):
self._active_recd.setTitle(self._title_entry.get_text())
def _media_view_media_clicked(self, widget):
if self._play_button.props.visible and self._play_button.props.sensitive:
self._play_button.clicked()
def _media_view_pip_clicked(self, widget):
# clicking on the PIP always returns to live mode
self.model.set_state(constants.STATE_READY)
def _media_view_info_clicked(self, widget):
self._toggle_info()
def _toggle_info(self):
recd = self._active_recd
if not recd:
return
if self._showing_info:
self._show_recd(recd, play=False)
return
self._showing_info = True
if self.model.get_mode() in (constants.MODE_PHOTO, constants.MODE_AUDIO):