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


Python IconView.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
    def __init__(self,
                 tag,
                 limit=10,
                 has_add=True,
                 fetch_add_item=True,
                 padding_x=0,
                 padding_y=0):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-radios", gtk.TARGET_SAME_APP, 1),
                   ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets,
                             gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)

        self.tag = tag
        self.__start = 0
        self.__limit = limit
        self.__fetch_thread_id = 0
        self.__render_id = 0
        self.__genre_id = "335"
        self.__keyword = ""
        self.__total = None
        # self.more_item = MoreIconItem()
        self.fetch_add_item = fetch_add_item

        self.connect("single-click-item", self.on_iconview_single_click_item)
        self.connect("motion-item", self.on_motion_item)
        # if has_add:
        #     self.add_items([self.more_item])
        self.is_finish = False
开发者ID:haskyLue,项目名称:deepin-music-player,代码行数:33,代码来源:radio_view.py

示例2: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
    def __init__(self, network_interface, padding_x=8, padding_y=10, download_dir=None):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        self.download_dir = download_dir

        self.connect("double-click-item", self.__on_double_click_item)
        self.connect("single-click-item", self.__on_single_click_item)
        self.__fetch_thread_id = 0
        self.network_interface = network_interface
开发者ID:martyr-deepin,项目名称:deepin-system-settings,代码行数:11,代码来源:cache_page.py

示例3: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
 def __init__(self, padding_x=0, padding_y=0, status_box=None):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     self.untitled_theme = theme_manager.get_untitled_theme()
     self.status_box = status_box
     
     self.__is_double_click = False
     self.__single_click_item = None
     self.connect("double-click-item", self.__on_double_click_item)
     self.connect("single-click-item", self.__on_single_click_item)
     self.connect("right-click-item", self.__on_right_click_item)
     event_manager.add_callback("clear-systemview-highlight", self.clear_highlight_status)
     gobject.timeout_add(500, lambda : self.__init_themes())
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:14,代码来源:theme_view.py

示例4: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
 def __init__(self, monitor_dir, padding_x=8, padding_y=10, filter_dir=None, add_system=False):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     
     self.system_wallpapper_dir = get_system_wallpaper_dirs()[1]
     self.is_file_added = False
     self.monitor_dir = monitor_dir
     self.filter_dir = filter_dir
     self.library_monitor = LibraryMonitor(monitor_dir)
     self.library_monitor.set_property("monitored", True)
     self.library_monitor.connect("file-added", self.on_library_file_added)
     self.library_monitor.connect("folder-added", self.on_library_folder_added)
     self.library_monitor.connect("location-removed", self.on_library_location_removed)
     self.__image_index = 0
     self.__init_monitor_images(add_system)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:16,代码来源:select_page.py

示例5: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
    def __init__(self, padding_x=8, padding_y=10):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
        
        self.add_item = AddItem()
        self.add_items([self.add_item])

        self.connect("right-click-item", self.__on_right_click_item)
        
        event_manager.add_callback("add-wallpapers", self.on_add_wallpapers)
        event_manager.add_callback("add-download-wallpapers", self.on_add_wallpapers)
        event_manager.add_callback("wallpapers-deleted", self.on_wallpapers_deleted)
        event_manager.add_callback("select-wallpaper", self.on_wallpaper_select)
        event_manager.add_callback("apply-wallpaper", self.on_wallpaper_apply)
        event_manager.add_callback("apply-download-wallpaper", self.on_download_wallpaper_apply)
        event_manager.add_callback("delete-wallpaper-link", self.__on_delete_wallpaper_link)
        self.theme = None
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:18,代码来源:wallpaper_view.py

示例6: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
    def __init__(self, padding_x=18, padding_y=18):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-webcasts", gtk.TARGET_SAME_APP, 1), ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets, gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)
开发者ID:WilliamRen,项目名称:deepin-music-player,代码行数:8,代码来源:webcast_view.py

示例7: __init__

# 需要导入模块: from dtk.ui.iconview import IconView [as 别名]
# 或者: from dtk.ui.iconview.IconView import __init__ [as 别名]
 def __init__(self, padding_x=8, padding_y=10):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     
     event_manager.add_callback("wallpapers-deleted", self.on_wallpapers_deleted)
     self.theme = None
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:7,代码来源:delete_view.py


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