mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: add results_view.py
This commit is contained in:
parent
f824581b5e
commit
843a89aa8b
27
src/calibre/gui2/store/results_view.py
Normal file
27
src/calibre/gui2/store/results_view.py
Normal file
@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt4.Qt import (QTreeView)
|
||||
|
||||
from calibre.gui2.metadata.single_download import RichTextDelegate
|
||||
|
||||
|
||||
class ResultsView(QTreeView):
|
||||
|
||||
def __init__(self, *args):
|
||||
QTreeView.__init__(self,*args)
|
||||
|
||||
from search import Matches
|
||||
self._model = Matches()
|
||||
self.setModel(self._model)
|
||||
|
||||
self.rt_delegate = RichTextDelegate(self)
|
||||
|
||||
for i in self._model.HTML_COLS:
|
||||
self.setItemDelegateForColumn(i, self.rt_delegate)
|
||||
|
Loading…
x
Reference in New Issue
Block a user