Helpviewer/HelpWebSearchWidget.py

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

eric ide

mercurial