eric6/WebBrowser/Tools/WebIconProvider.py

changeset 7533
88261c96484b
parent 7360
9190402e4505
child 7593
68b03f6ebed5
equal deleted inserted replaced
7532:1358e9d67a1c 7533:88261c96484b
172 @return icon for the URL 172 @return icon for the URL
173 @rtype QIcon 173 @rtype QIcon
174 """ 174 """
175 scheme = url.scheme() 175 scheme = url.scheme()
176 if scheme in ["eric", "about"]: 176 if scheme in ["eric", "about"]:
177 return UI.PixmapCache.getIcon("ericWeb.png") 177 return UI.PixmapCache.getIcon("ericWeb")
178 elif scheme == "qthelp": 178 elif scheme == "qthelp":
179 return UI.PixmapCache.getIcon("qthelp.png") 179 return UI.PixmapCache.getIcon("qthelp")
180 elif scheme == "file": 180 elif scheme == "file":
181 return UI.PixmapCache.getIcon("fileMisc.png") 181 return UI.PixmapCache.getIcon("fileMisc")
182 elif scheme == "abp": 182 elif scheme == "abp":
183 return UI.PixmapCache.getIcon("adBlockPlus.png") 183 return UI.PixmapCache.getIcon("adBlockPlus")
184 elif scheme == "ftp": 184 elif scheme == "ftp":
185 return UI.PixmapCache.getIcon("network-server.png") 185 return UI.PixmapCache.getIcon("network-server")
186 186
187 self.load() 187 self.load()
188 188
189 urlStr = self.__urlToString(url) 189 urlStr = self.__urlToString(url)
190 for iconUrlStr in self.__iconsDB: 190 for iconUrlStr in self.__iconsDB:
199 for iconUrlStr in self.__iconsDB: 199 for iconUrlStr in self.__iconsDB:
200 if iconUrlStr.startswith(urlStr): 200 if iconUrlStr.startswith(urlStr):
201 return self.__iconsDB[iconUrlStr] 201 return self.__iconsDB[iconUrlStr]
202 202
203 if scheme == "https": 203 if scheme == "https":
204 return UI.PixmapCache.getIcon("securityHigh32.png") 204 return UI.PixmapCache.getIcon("securityHigh32")
205 else: 205 else:
206 return UI.PixmapCache.getIcon("defaultIcon.png") 206 return UI.PixmapCache.getIcon("defaultIcon")
207 207
208 def clear(self): 208 def clear(self):
209 """ 209 """
210 Public method to clear the icons cache. 210 Public method to clear the icons cache.
211 """ 211 """

eric ide

mercurial