mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
pep8
This commit is contained in:
parent
38e447e519
commit
15c87a19d5
@ -92,7 +92,8 @@ class Completer(QListView): # {{{
|
|||||||
QListView.hide(self)
|
QListView.hide(self)
|
||||||
|
|
||||||
def item_chosen(self, index):
|
def item_chosen(self, index):
|
||||||
if not self.isVisible(): return
|
if not self.isVisible():
|
||||||
|
return
|
||||||
self.hide()
|
self.hide()
|
||||||
text = self.model().data(index, Qt.DisplayRole)
|
text = self.model().data(index, Qt.DisplayRole)
|
||||||
self.item_selected.emit(unicode(text))
|
self.item_selected.emit(unicode(text))
|
||||||
@ -287,7 +288,8 @@ class LineEdit(QLineEdit, LineEditECM):
|
|||||||
self.mcompleter.popup()
|
self.mcompleter.popup()
|
||||||
|
|
||||||
def text_edited(self, *args):
|
def text_edited(self, *args):
|
||||||
if self.no_popup: return
|
if self.no_popup:
|
||||||
|
return
|
||||||
self.update_completions()
|
self.update_completions()
|
||||||
select_first = len(self.mcompleter.model().current_prefix) > 0
|
select_first = len(self.mcompleter.model().current_prefix) > 0
|
||||||
if not select_first:
|
if not select_first:
|
||||||
@ -370,13 +372,13 @@ class EditWithComplete(EnComboBox):
|
|||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def all_items(self):
|
def all_items(self):
|
||||||
def fget(self): return self.lineEdit().all_items
|
def fget(self):
|
||||||
def fset(self, val): self.lineEdit().all_items = val
|
return self.lineEdit().all_items
|
||||||
|
def fset(self, val):
|
||||||
|
self.lineEdit().all_items = val
|
||||||
return property(fget=fget, fset=fset)
|
return property(fget=fget, fset=fset)
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
def text(self):
|
def text(self):
|
||||||
return unicode(self.lineEdit().text())
|
return unicode(self.lineEdit().text())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user