Helpviewer/HelpWebSearchWidget.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3035
36e9f388958b
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
113 def __setupCompleterMenu(self): 113 def __setupCompleterMenu(self):
114 """ 114 """
115 Private method to create the completer menu. 115 Private method to create the completer menu.
116 """ 116 """
117 if not self.__suggestions or \ 117 if not self.__suggestions or \
118 (self.__model.rowCount() > 0 and \ 118 (self.__model.rowCount() > 0 and
119 self.__model.item(0) != self.__suggestionsItem): 119 self.__model.item(0) != self.__suggestionsItem):
120 self.__model.clear() 120 self.__model.clear()
121 self.__suggestionsItem = None 121 self.__suggestionsItem = None
122 else: 122 else:
123 self.__model.removeRows(1, self.__model.rowCount() - 1) 123 self.__model.removeRows(1, self.__model.rowCount() - 1)
124 124
371 newEngine.suggestions.connect(self.__newSuggestions) 371 newEngine.suggestions.connect(self.__newSuggestions)
372 372
373 self.setInactiveText(self.__openSearchManager.currentEngineName()) 373 self.setInactiveText(self.__openSearchManager.currentEngineName())
374 self.__currentEngine = self.__openSearchManager.currentEngineName() 374 self.__currentEngine = self.__openSearchManager.currentEngineName()
375 self.__engineButton.setIcon(QIcon(QPixmap.fromImage( 375 self.__engineButton.setIcon(QIcon(QPixmap.fromImage(
376 self.__openSearchManager.currentEngine().image()))) 376 self.__openSearchManager.currentEngine().image())))
377 self.__suggestions = [] 377 self.__suggestions = []
378 self.__setupCompleterMenu() 378 self.__setupCompleterMenu()
379 379
380 def __engineImageChanged(self): 380 def __engineImageChanged(self):
381 """ 381 """
382 Private slot to handle a change of the current search engine icon. 382 Private slot to handle a change of the current search engine icon.
383 """ 383 """
384 self.__engineButton.setIcon(QIcon(QPixmap.fromImage( 384 self.__engineButton.setIcon(QIcon(QPixmap.fromImage(
385 self.__openSearchManager.currentEngine().image()))) 385 self.__openSearchManager.currentEngine().image())))
386 386
387 def mousePressEvent(self, evt): 387 def mousePressEvent(self, evt):
388 """ 388 """
389 Protected method called by a mouse press event. 389 Protected method called by a mouse press event.
390 390

eric ide

mercurial