Helpviewer/HelpWindow.py

changeset 1963
9c5b3235abf9
parent 1957
2fed7bc4ad83
child 1965
96f5a76e1845
equal deleted inserted replaced
1961:2e7f691cade9 1963:9c5b3235abf9
42 from .History.HistoryManager import HistoryManager 42 from .History.HistoryManager import HistoryManager
43 from .History.HistoryMenu import HistoryMenu 43 from .History.HistoryMenu import HistoryMenu
44 from .Passwords.PasswordManager import PasswordManager 44 from .Passwords.PasswordManager import PasswordManager
45 from .Network.NetworkAccessManager import NetworkAccessManager, SSL_AVAILABLE 45 from .Network.NetworkAccessManager import NetworkAccessManager, SSL_AVAILABLE
46 from .AdBlock.AdBlockManager import AdBlockManager 46 from .AdBlock.AdBlockManager import AdBlockManager
47 from .AdBlock.AdBlockIcon import AdBlockIcon
47 from .OfflineStorage.OfflineStorageConfigDialog import OfflineStorageConfigDialog 48 from .OfflineStorage.OfflineStorageConfigDialog import OfflineStorageConfigDialog
48 from .UserAgent.UserAgentMenu import UserAgentMenu 49 from .UserAgent.UserAgentMenu import UserAgentMenu
49 from .UserAgent.UserAgentManager import UserAgentManager 50 from .UserAgent.UserAgentManager import UserAgentManager
50 from .HelpTabWidget import HelpTabWidget 51 from .HelpTabWidget import HelpTabWidget
51 from .Download.DownloadManager import DownloadManager 52 from .Download.DownloadManager import DownloadManager
203 self.restoreGeometry(g) 204 self.restoreGeometry(g)
204 205
205 self.__setIconDatabasePath() 206 self.__setIconDatabasePath()
206 self.__initWebSettings() 207 self.__initWebSettings()
207 208
209 self.__adBlockIcon = AdBlockIcon(self)
210 self.statusBar().addPermanentWidget(self.__adBlockIcon)
211 self.__adBlockIcon.setEnabled(Preferences.getHelp("AdBlockEnabled"))
212
208 self.__initActions() 213 self.__initActions()
209 self.__initMenus() 214 self.__initMenus()
210 self.__initToolbars() 215 self.__initToolbars()
211 216
212 self.historyManager() 217 self.historyManager()
2435 progressBar.setTextVisible(False) 2440 progressBar.setTextVisible(False)
2436 progressBar.setFixedHeight(16) 2441 progressBar.setFixedHeight(16)
2437 progressBar.setSizePolicy(sizePolicy) 2442 progressBar.setSizePolicy(sizePolicy)
2438 layout.addWidget(progressBar) 2443 layout.addWidget(progressBar)
2439 2444
2440 self.statusBar().addPermanentWidget(self.__indexingProgress) 2445 self.statusBar().insertPermanentWidget(0, self.__indexingProgress)
2441 2446
2442 def __indexingFinished(self): 2447 def __indexingFinished(self):
2443 """ 2448 """
2444 Private slot to handle the start of the indexing process. 2449 Private slot to handle the start of the indexing process.
2445 """ 2450 """
2836 if cls._adblockManager is None: 2841 if cls._adblockManager is None:
2837 cls._adblockManager = AdBlockManager() 2842 cls._adblockManager = AdBlockManager()
2838 2843
2839 return cls._adblockManager 2844 return cls._adblockManager
2840 2845
2846 def adBlockIcon(self):
2847 """
2848 Public method to get a reference to the AdBlock icon.
2849
2850 @return reference to the AdBlock icon (AdBlockIcon)
2851 """
2852 return self.__adBlockIcon
2853
2841 @classmethod 2854 @classmethod
2842 def downloadManager(cls): 2855 def downloadManager(cls):
2843 """ 2856 """
2844 Class method to get a reference to the download manager. 2857 Class method to get a reference to the download manager.
2845 2858
2883 """ 2896 """
2884 if cls.helpwindows: 2897 if cls.helpwindows:
2885 return cls.helpwindows[0] 2898 return cls.helpwindows[0]
2886 else: 2899 else:
2887 return None 2900 return None
2901
2902 @classmethod
2903 def mainWindows(cls):
2904 """
2905 Class method to get references to all main windows.
2906
2907 @return references to all main window (list of HelpWindow)
2908 """
2909 return cls.helpwindows
2888 2910
2889 def openSearchManager(self): 2911 def openSearchManager(self):
2890 """ 2912 """
2891 Public method to get a reference to the opensearch manager object. 2913 Public method to get a reference to the opensearch manager object.
2892 2914

eric ide

mercurial