mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
7fe19d6774
commit
638f70b640
@ -148,7 +148,7 @@ class InterfaceAction(QObject):
|
|||||||
def genesis(self):
|
def genesis(self):
|
||||||
'''
|
'''
|
||||||
Setup this plugin. Only called once during initialization. self.gui is
|
Setup this plugin. Only called once during initialization. self.gui is
|
||||||
available. The action secified by :attr:`action_spec` is available as
|
available. The action specified by :attr:`action_spec` is available as
|
||||||
``self.qaction``.
|
``self.qaction``.
|
||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
@ -71,15 +71,12 @@ class ResultsModel(QAbstractTableModel):
|
|||||||
return len(self.COLUMNS)
|
return len(self.COLUMNS)
|
||||||
|
|
||||||
def headerData(self, section, orientation, role):
|
def headerData(self, section, orientation, role):
|
||||||
if role != Qt.DisplayRole:
|
if orientation == Qt.Horizontal and role == Qt.DisplayRole:
|
||||||
return NONE
|
|
||||||
if orientation == Qt.Horizontal:
|
|
||||||
try:
|
try:
|
||||||
return QVariant(self.COLUMNS[section])
|
return QVariant(self.COLUMNS[section])
|
||||||
except:
|
except:
|
||||||
return NONE
|
return NONE
|
||||||
else:
|
return NONE
|
||||||
return QVariant(unicode(section+1))
|
|
||||||
|
|
||||||
def data_as_text(self, book, col):
|
def data_as_text(self, book, col):
|
||||||
if col == 0:
|
if col == 0:
|
||||||
@ -324,6 +321,11 @@ class IdentifyWidget(QWidget): # {{{
|
|||||||
|
|
||||||
self.results_view.show_results(self.worker.results)
|
self.results_view.show_results(self.worker.results)
|
||||||
|
|
||||||
|
self.comments_view.show_data('''
|
||||||
|
<div style="margin-bottom:2ex">Found <b>%d</b> results</div>
|
||||||
|
<div>To see <b>details</b>, click on any result</div>''' %
|
||||||
|
len(self.worker.results))
|
||||||
|
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
self.abort.set()
|
self.abort.set()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user