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
|
||||
from urlparse import urldefrag
|
||||
|
||||
from lxml import etree
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtCore import QByteArray
|
||||
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 PyQt5.Qt import (
|
||||
Qt, QByteArray, QBuffer, QIODevice, QColor, QImage, QPainter, QSvgRenderer)
|
||||
from calibre.ebooks.oeb.base import XHTML, XLINK
|
||||
from calibre.ebooks.oeb.base import SVG_MIME, PNG_MIME
|
||||
from calibre.ebooks.oeb.base import xml2str, xpath
|
||||
|
@ -359,7 +359,7 @@ class CoverFlowMixin(object):
|
||||
self.cf_last_updated_at = time.time()
|
||||
|
||||
def test():
|
||||
from PyQt5.QtGui import QApplication, QMainWindow
|
||||
from PyQt5.Qt import QApplication, QMainWindow
|
||||
app = QApplication([])
|
||||
w = QMainWindow()
|
||||
cf = CoverFlow()
|
||||
@ -378,7 +378,7 @@ def main(args=sys.argv):
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.QtGui import QApplication, QMainWindow
|
||||
from PyQt5.Qt import QApplication, QMainWindow
|
||||
app = QApplication([])
|
||||
w = QMainWindow()
|
||||
cf = CoverFlow()
|
||||
|
@ -4,7 +4,7 @@ __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
''''''
|
||||
from PyQt5.QtGui import QDialog
|
||||
from PyQt5.Qt import QDialog
|
||||
from calibre.gui2.dialogs.comicconf_ui import Ui_Dialog
|
||||
from calibre.ebooks.lrf.comic.convert_from import config, PROFILES
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import re
|
||||
from PyQt5.QtGui import QDialog, QLineEdit
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.Qt import QDialog, QLineEdit, Qt
|
||||
|
||||
from calibre.gui2.dialogs.password_ui import Ui_Dialog
|
||||
from calibre.gui2 import dynamic
|
||||
|
@ -13,8 +13,7 @@ from PyQt5.Qt import (Qt, QUrl, QFrame, QVBoxLayout, QLabel, QBrush, QTextEdit,
|
||||
QComboBox, QAbstractItemView, QHBoxLayout, QDialogButtonBox,
|
||||
QAbstractTableModel, QVariant, QTableView, QModelIndex,
|
||||
QSortFilterProxyModel, QAction, QIcon, QDialog,
|
||||
QFont, QPixmap, QSize)
|
||||
from PyQt5.QtGui import QLineEdit
|
||||
QFont, QPixmap, QSize, QLineEdit)
|
||||
|
||||
from calibre import browser, prints
|
||||
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>'
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QDialog, QIcon, QListWidgetItem
|
||||
from PyQt5.Qt import (
|
||||
Qt, QDialog, QIcon, QListWidgetItem)
|
||||
|
||||
from calibre.gui2.dialogs.tag_categories_ui import Ui_TagCategories
|
||||
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 PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QDialog
|
||||
from PyQt5.Qt import Qt, QDialog
|
||||
|
||||
from calibre.gui2.dialogs.tag_editor_ui import Ui_TagEditor
|
||||
from calibre.gui2 import question_dialog, error_dialog, gprefs
|
||||
|
@ -480,7 +480,7 @@ if __name__ == '__main__':
|
||||
if not iswindows:
|
||||
raise
|
||||
tb = traceback.format_exc()
|
||||
from PyQt5.QtGui import QErrorMessage
|
||||
from PyQt5.Qt import QErrorMessage
|
||||
logfile = os.path.join(os.path.expanduser('~'), 'calibre.log')
|
||||
if os.path.exists(logfile):
|
||||
log = open(logfile).read().decode('utf-8', 'ignore')
|
||||
|
@ -239,7 +239,7 @@ class ProceedQuestion(QDialog):
|
||||
|
||||
def main():
|
||||
from calibre.gui2 import Application
|
||||
from PyQt5.QtGui import QMainWindow
|
||||
from PyQt5.Qt import QMainWindow
|
||||
app = Application([])
|
||||
w = QMainWindow()
|
||||
w.show()
|
||||
|
Loading…
x
Reference in New Issue
Block a user