• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python base.Widget类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中miro.plat.frontends.widgets.base.Widget的典型用法代码示例。如果您正苦于以下问题:Python Widget类的具体用法?Python Widget怎么用?Python Widget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: remove_viewport

 def remove_viewport(self):
     self.item_changed_handler = None
     self.prevent_system_sleep(False)
     self.detach_from_parent_window()
     self.video_window.close()
     self.video_window = None
     Widget.remove_viewport(self)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:7,代码来源:video.py


示例2: __init__

 def __init__(self, path):
     Widget.__init__(self)
     self.nsimage = NSImage.alloc().initByReferencingFile_(
       filename_to_unicode(path))
     self.view = MiroImageView.alloc().init()
     self.view.setImage_(self.nsimage)
     # enabled when viewWillMoveToWindow:aWindow invoked
     self.view.setAnimates_(NO)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:8,代码来源:simple.py


示例3: remove_viewport

 def remove_viewport(self):
     app.info_updater.item_changed_callbacks.remove('manual', 'playback-list', self.on_items_changed)
     self.item_changed_handler = None
     self.prevent_system_sleep(False)
     self.detach_from_parent_window()
     self.video_window.close()
     self.video_window = None
     Widget.remove_viewport(self)
开发者ID:ShriramK,项目名称:miro,代码行数:8,代码来源:video.py


示例4: viewport_created

 def viewport_created(self):
     Widget.viewport_created(self)
     if self.view.isLoading():
         # We haven't set up our delegates yet, but have already started
         # loading a webpage.  Send the net-start signal now because the
         # delegate will miss it.
         self.emit("net-start")
     self._set_webkit_delegates(self.delegate)
开发者ID:geoffl,项目名称:miro,代码行数:8,代码来源:browser.py


示例5: __init__

 def __init__(self):
     Widget.__init__(self)
     self.url = None
     self.create_signal('net-start')
     self.create_signal('net-stop')
     self.delegate = BrowserDelegate.alloc().initWithBrowser_(self)
     self.view = MiroWebView.alloc().initWithFrame_(NSRect((0,0), self.calc_size_request()))
     self.view.setMaintainsBackForwardList_(YES)
     self.view.setApplicationNameForUserAgent_("%s/%s (%s)" % \
                                   (app.config.get(prefs.SHORT_APP_NAME),
                                    app.config.get(prefs.APP_VERSION),
                                    app.config.get(prefs.PROJECT_URL),))
开发者ID:nxmirrors,项目名称:miro,代码行数:12,代码来源:browser.py


示例6: __init__

 def __init__(self):
     Widget.__init__(self)
     self.create_signal('pressed')
     self.create_signal('released')
     self.create_signal('changed')
     self.create_signal('moved')
     self.view = CustomSliderView.alloc().init()
     self.view.setRefusesFirstResponder_(NO)
     if self.is_continuous():
         self.view.setContinuous_(YES)
     else:
         self.view.setContinuous_(NO)
开发者ID:nxmirrors,项目名称:miro,代码行数:12,代码来源:customcontrol.py


示例7: __init__

 def __init__(self, initial_text=None):
     Widget.__init__(self)
     if initial_text is None:
         initial_text = ""
     self.view = NSTextView.alloc().initWithFrame_(NSRect((0,0),(50,50)))
     self.view.setMaxSize_((1.0e7, 1.0e7))
     self.view.setHorizontallyResizable_(NO)
     self.view.setVerticallyResizable_(YES)
     self.notifications = NotificationForwarder.create(self.view)
     if initial_text is not None:
         self.set_text(initial_text)
     self.set_size(widgetconst.SIZE_NORMAL)
开发者ID:cool-RR,项目名称:Miro,代码行数:12,代码来源:control.py


示例8: __init__

 def __init__(self, text="", wrap=False):
     Widget.__init__(self)
     self.view = NSTextField.alloc().init()
     self.view.setEditable_(NO)
     self.view.setBezeled_(NO)
     self.view.setBordered_(NO)
     self.view.setDrawsBackground_(NO)
     self.wrap = wrap
     self.bold = False
     self.size = NSFont.systemFontSize()
     self.sizer_cell = self.view.cell().copy()
     self.set_font()
     self.set_text(text)
     self.__color = self.view.textColor()
开发者ID:cool-RR,项目名称:Miro,代码行数:14,代码来源:simple.py


示例9: __init__

 def __init__(self):
     Widget.__init__(self)
     self.url = None
     self.create_signal('net-start')
     self.create_signal('net-stop')
     self.create_signal('download-finished')
     self.delegate = BrowserDelegate.alloc().initWithBrowser_(self)
     self.view = MiroWebView.alloc().initWithFrame_(NSRect((0,0), self.calc_size_request()))
     self.view.setMaintainsBackForwardList_(YES)
     # XXX SL and better only
     if self.view.respondsToSelector_('setShouldUpdateWhileOffscreen:'):
         self.view.setShouldUpdateWhileOffscreen_(NO)
     self.view.setApplicationNameForUserAgent_("%s %s/%s (%s)" % \
                                   ('Safari/531.2+', # FIXME hack for #17370
                                    app.config.get(prefs.SHORT_APP_NAME),
                                    app.config.get(prefs.APP_VERSION),
                                    app.config.get(prefs.PROJECT_URL),))
开发者ID:geoffl,项目名称:miro,代码行数:17,代码来源:browser.py


示例10: __init__

    def __init__(self):
        quicktime.Player.__init__(self, SUPPORTED_MEDIA_TYPES)
        Widget.__init__(self)

        frame = ((0,0),(200,200))

        self.view = NSView.alloc().initWithFrame_(frame)

        self.video_view = MiroMovieView.alloc().initWithFrame_(frame)
        self.video_view.setFillColor_(NSColor.blackColor())
        self.video_view.setControllerVisible_(NO)
        self.video_view.setEditable_(NO)
        self.video_view.setPreservesAspectRatio_(YES)

        self.movie = None
        self.movie_notifications = None
        self.system_activity_updater_timer = None
        self.window_moved_handler = None
        self.item_changed_handler = None
开发者ID:cool-RR,项目名称:Miro,代码行数:19,代码来源:video.py


示例11: __init__

 def __init__(self, model):
     Widget.__init__(self)
     self.create_signal('selection-changed')
     self.create_signal('hotspot-clicked')
     self.create_signal('row-double-clicked')
     # row-activated is never emitted, but it should be
     # when space or enter is pressed with a row selected. --Kaz
     self.create_signal('row-activated')
     self.model = model
     self.columns = []
     self.drag_source = None
     self.context_menu_callback = None
     if self.is_tree():
         self.create_signal('row-expanded')
         self.create_signal('row-collapsed')
         self.tableview = MiroOutlineView.alloc().init()
         self.data_source = tablemodel.MiroOutlineViewDataSource.alloc()
     else:
         self.tableview = MiroTableView.alloc().init()
         self.data_source = tablemodel.MiroTableViewDataSource.alloc()
     self.view = self.tableview
     self.data_source.initWithModel_(self.model)
     self.tableview.setDataSource_(self.data_source)
     self.tableview.setVerticalMotionCanBeginDrag_(YES)
     self.set_columns_draggable(False)
     self.set_auto_resizes(False)
     self.draws_selection = True
     self.row_height_set = False
     self.set_fixed_height(False)
     self.auto_resizing = False
     self.header_view = MiroTableHeaderView.alloc().initWithFrame_(
         NSMakeRect(0, 0, 0, HEADER_HEIGHT))
     self.set_show_headers(True)
     self.notifications = NotificationForwarder.create(self.tableview)
     self._selected_before_change = None
     self.model.connect_weak('row-changed', self.on_row_change)
     self.model.connect_weak('structure-will-change',
             self.on_model_structure_change)
     self.iters_to_update = []
     self.height_changed = self.reload_needed = False
开发者ID:nxmirrors,项目名称:miro,代码行数:40,代码来源:tableview.py


示例12: enable

 def enable(self):
     Widget.enable(self)
     self.view.setTextColor_(self.__color)
     self.view.setEnabled_(True)
开发者ID:cool-RR,项目名称:Miro,代码行数:4,代码来源:simple.py


示例13: disable

 def disable(self):
     Widget.disable(self)
     self.view.setNeedsDisplay_(YES)
开发者ID:bbucommander,项目名称:miro,代码行数:3,代码来源:customcontrol.py


示例14: enable

 def enable(self):
     Widget.enable(self)
     self.view.setNeedsDisplay_(YES)
开发者ID:bbucommander,项目名称:miro,代码行数:3,代码来源:customcontrol.py


示例15: viewport_created

 def viewport_created(self):
     Widget.viewport_created(self)
     self.notifications.connect(self.on_changed, 'NSTextDidChangeNotification')
     self.notifications.connect(self.on_end_editing,
             'NSControlTextDidEndEditingNotification')
     self.invalidate_size_request()
开发者ID:codito,项目名称:miro,代码行数:6,代码来源:control.py


示例16: place

 def place(self, rect, containing_view):
     Widget.place(self, rect, containing_view)
     self.adjust_video_frame()
开发者ID:ShriramK,项目名称:miro,代码行数:3,代码来源:video.py


示例17: viewport_created

 def viewport_created(self):
     Widget.viewport_created(self)
     self.notifications.connect(self.on_changed, 'NSTextDidChangeNotification')
     self.invalidate_size_request()
开发者ID:cool-RR,项目名称:Miro,代码行数:4,代码来源:control.py


示例18: __init__

 def __init__(self):
     Widget.__init__(self)
     self.view = DrawingView.alloc().init()
开发者ID:cool-RR,项目名称:Miro,代码行数:3,代码来源:drawingwidgets.py


示例19: disable

 def disable(self):
     Widget.disable(self)
     self.view.setEnabled_(False)
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:customcontrol.py


示例20: enable

 def enable(self):
     Widget.enable(self)
     self.view.setEnabled_(True)
开发者ID:nxmirrors,项目名称:miro,代码行数:3,代码来源:customcontrol.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python threads.call_on_ui_thread函数代码示例发布时间:2022-05-27
下一篇:
Python base.Container类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap