mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
Port various import from QtGui to Qt
This commit is contained in:
parent
098f178dfc
commit
fa5a77afde
@ -8,15 +8,10 @@ __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
|
|||||||
|
|
||||||
import os, re
|
import os, re
|
||||||
from urlparse import urldefrag
|
from urlparse import urldefrag
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.Qt import (
|
||||||
from PyQt5.QtCore import QByteArray
|
Qt, QByteArray, QBuffer, QIODevice, QColor, QImage, QPainter, QSvgRenderer)
|
||||||
from PyQt5.QtCore import QBuffer
|
|
||||||
from PyQt5.QtCore import QIODevice
|
|
||||||
from PyQt5.QtGui import QColor
|
|
||||||
from PyQt5.QtGui import QImage
|
|
||||||
from PyQt5.QtGui import QPainter
|
|
||||||
from PyQt5.QtSvg import QSvgRenderer
|
|
||||||
from calibre.ebooks.oeb.base import XHTML, XLINK
|
from calibre.ebooks.oeb.base import XHTML, XLINK
|
||||||
from calibre.ebooks.oeb.base import SVG_MIME, PNG_MIME
|
from calibre.ebooks.oeb.base import SVG_MIME, PNG_MIME
|
||||||
from calibre.ebooks.oeb.base import xml2str, xpath
|
from calibre.ebooks.oeb.base import xml2str, xpath
|
||||||
|
@ -359,7 +359,7 @@ class CoverFlowMixin(object):
|
|||||||
self.cf_last_updated_at = time.time()
|
self.cf_last_updated_at = time.time()
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
from PyQt5.QtGui import QApplication, QMainWindow
|
from PyQt5.Qt import QApplication, QMainWindow
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
w = QMainWindow()
|
w = QMainWindow()
|
||||||
cf = CoverFlow()
|
cf = CoverFlow()
|
||||||
@ -378,7 +378,7 @@ def main(args=sys.argv):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from PyQt5.QtGui import QApplication, QMainWindow
|
from PyQt5.Qt import QApplication, QMainWindow
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
w = QMainWindow()
|
w = QMainWindow()
|
||||||
cf = CoverFlow()
|
cf = CoverFlow()
|
||||||
|
@ -4,7 +4,7 @@ __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
''''''
|
''''''
|
||||||
from PyQt5.QtGui import QDialog
|
from PyQt5.Qt import QDialog
|
||||||
from calibre.gui2.dialogs.comicconf_ui import Ui_Dialog
|
from calibre.gui2.dialogs.comicconf_ui import Ui_Dialog
|
||||||
from calibre.ebooks.lrf.comic.convert_from import config, PROFILES
|
from calibre.ebooks.lrf.comic.convert_from import config, PROFILES
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
import re
|
import re
|
||||||
from PyQt5.QtGui import QDialog, QLineEdit
|
from PyQt5.Qt import QDialog, QLineEdit, Qt
|
||||||
from PyQt5.QtCore import Qt
|
|
||||||
|
|
||||||
from calibre.gui2.dialogs.password_ui import Ui_Dialog
|
from calibre.gui2.dialogs.password_ui import Ui_Dialog
|
||||||
from calibre.gui2 import dynamic
|
from calibre.gui2 import dynamic
|
||||||
|
@ -13,8 +13,7 @@ from PyQt5.Qt import (Qt, QUrl, QFrame, QVBoxLayout, QLabel, QBrush, QTextEdit,
|
|||||||
QComboBox, QAbstractItemView, QHBoxLayout, QDialogButtonBox,
|
QComboBox, QAbstractItemView, QHBoxLayout, QDialogButtonBox,
|
||||||
QAbstractTableModel, QVariant, QTableView, QModelIndex,
|
QAbstractTableModel, QVariant, QTableView, QModelIndex,
|
||||||
QSortFilterProxyModel, QAction, QIcon, QDialog,
|
QSortFilterProxyModel, QAction, QIcon, QDialog,
|
||||||
QFont, QPixmap, QSize)
|
QFont, QPixmap, QSize, QLineEdit)
|
||||||
from PyQt5.QtGui import QLineEdit
|
|
||||||
|
|
||||||
from calibre import browser, prints
|
from calibre import browser, prints
|
||||||
from calibre.constants import numeric_version, iswindows, isosx, DEBUG, __appname__, __version__
|
from calibre.constants import numeric_version, iswindows, isosx, DEBUG, __appname__, __version__
|
||||||
|
@ -2,8 +2,8 @@ __license__ = 'GPL v3'
|
|||||||
|
|
||||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.Qt import (
|
||||||
from PyQt5.QtGui import QDialog, QIcon, QListWidgetItem
|
Qt, QDialog, QIcon, QListWidgetItem)
|
||||||
|
|
||||||
from calibre.gui2.dialogs.tag_categories_ui import Ui_TagCategories
|
from calibre.gui2.dialogs.tag_categories_ui import Ui_TagCategories
|
||||||
from calibre.gui2.dialogs.confirm_delete import confirm
|
from calibre.gui2.dialogs.confirm_delete import confirm
|
||||||
|
@ -3,8 +3,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.Qt import Qt, QDialog
|
||||||
from PyQt5.QtGui import QDialog
|
|
||||||
|
|
||||||
from calibre.gui2.dialogs.tag_editor_ui import Ui_TagEditor
|
from calibre.gui2.dialogs.tag_editor_ui import Ui_TagEditor
|
||||||
from calibre.gui2 import question_dialog, error_dialog, gprefs
|
from calibre.gui2 import question_dialog, error_dialog, gprefs
|
||||||
|
@ -480,7 +480,7 @@ if __name__ == '__main__':
|
|||||||
if not iswindows:
|
if not iswindows:
|
||||||
raise
|
raise
|
||||||
tb = traceback.format_exc()
|
tb = traceback.format_exc()
|
||||||
from PyQt5.QtGui import QErrorMessage
|
from PyQt5.Qt import QErrorMessage
|
||||||
logfile = os.path.join(os.path.expanduser('~'), 'calibre.log')
|
logfile = os.path.join(os.path.expanduser('~'), 'calibre.log')
|
||||||
if os.path.exists(logfile):
|
if os.path.exists(logfile):
|
||||||
log = open(logfile).read().decode('utf-8', 'ignore')
|
log = open(logfile).read().decode('utf-8', 'ignore')
|
||||||
|
@ -239,7 +239,7 @@ class ProceedQuestion(QDialog):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
from calibre.gui2 import Application
|
from calibre.gui2 import Application
|
||||||
from PyQt5.QtGui import QMainWindow
|
from PyQt5.Qt import QMainWindow
|
||||||
app = Application([])
|
app = Application([])
|
||||||
w = QMainWindow()
|
w = QMainWindow()
|
||||||
w.show()
|
w.show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user