Helpviewer/History/HistoryCompleter.py

changeset 2954
bf0215fe12d1
parent 2302
f29e9405c851
child 3002
6ffc581f00f1
equal deleted inserted replaced
2953:703452a2876f 2954:bf0215fe12d1
53 def sizeHintForRow(self, row): 53 def sizeHintForRow(self, row):
54 """ 54 """
55 Public method to give a size hint for rows. 55 Public method to give a size hint for rows.
56 56
57 @param row row number (integer) 57 @param row row number (integer)
58 @return desired row height (integer)
58 """ 59 """
59 metrics = self.fontMetrics() 60 metrics = self.fontMetrics()
60 return metrics.height() 61 return metrics.height()
61 62
62 63
129 130
130 def isValid(self): 131 def isValid(self):
131 """ 132 """
132 Public method to check the model for validity. 133 Public method to check the model for validity.
133 134
134 @param flag indicating a valid status (boolean) 135 @return flag indicating a valid status (boolean)
135 """ 136 """
136 return self.__isValid 137 return self.__isValid
137 138
138 def setValid(self, valid): 139 def setValid(self, valid):
139 """ 140 """
209 # Sort results in descending frequency-derived score. 210 # Sort results in descending frequency-derived score.
210 return frequency_R < frequency_L 211 return frequency_R < frequency_L
211 212
212 213
213 class HistoryCompleter(QCompleter): 214 class HistoryCompleter(QCompleter):
215 """
216 Class implementing a completer for the browser history.
217 """
214 def __init__(self, model, parent=None): 218 def __init__(self, model, parent=None):
215 """ 219 """
216 Constructor 220 Constructor
217 221
218 @param model reference to the model (QAbstractItemModel) 222 @param model reference to the model (QAbstractItemModel)

eric ide

mercurial