當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。