mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Initial auto-conversion of PyQt imports
This commit is contained in:
parent
203707010d
commit
dae94f64ee
@ -133,7 +133,7 @@ class Plugin(object): # {{{
|
||||
True if the user clicks OK, False otherwise. The changes are
|
||||
automatically applied.
|
||||
'''
|
||||
from PyQt5.Qt import QDialog, QDialogButtonBox, QVBoxLayout, \
|
||||
from qt.core import QDialog, QDialogButtonBox, QVBoxLayout, \
|
||||
QLabel, Qt, QLineEdit
|
||||
from calibre.gui2 import gprefs
|
||||
|
||||
@ -148,7 +148,7 @@ class Plugin(object): # {{{
|
||||
if geom is None:
|
||||
config_dialog.resize(config_dialog.sizeHint())
|
||||
else:
|
||||
from PyQt5.Qt import QApplication
|
||||
from qt.core import QApplication
|
||||
QApplication.instance().safe_restore_geometry(config_dialog, geom)
|
||||
|
||||
button_box.accepted.connect(config_dialog.accept)
|
||||
|
@ -70,7 +70,7 @@ def get_icons(zfp, name_or_list_of_names):
|
||||
If a single path is passed in the return value will
|
||||
be A QIcon.
|
||||
'''
|
||||
from PyQt5.Qt import QIcon, QPixmap
|
||||
from qt.core import QIcon, QPixmap
|
||||
names = name_or_list_of_names
|
||||
ans = get_resources(zfp, names)
|
||||
if isinstance(names, string_or_bytes):
|
||||
|
@ -724,7 +724,7 @@ class Cache(object):
|
||||
return
|
||||
ret = buf.getvalue()
|
||||
if as_image:
|
||||
from PyQt5.Qt import QImage
|
||||
from qt.core import QImage
|
||||
i = QImage()
|
||||
i.loadFromData(ret)
|
||||
ret = i
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import textwrap
|
||||
|
||||
from PyQt5.Qt import (QWidget, QLabel, QGridLayout, QLineEdit, QVBoxLayout,
|
||||
from qt.core import (QWidget, QLabel, QGridLayout, QLineEdit, QVBoxLayout,
|
||||
QDialog, QDialogButtonBox, QCheckBox, QPushButton)
|
||||
|
||||
from calibre.gui2.device_drivers.tabbed_device_config import TabbedDeviceConfig, DeviceConfigTab, DeviceOptionsGroupBox
|
||||
|
@ -148,8 +148,8 @@ class PDFOutput(OutputFormatPlugin):
|
||||
# Ensure Qt is setup to be used with WebEngine
|
||||
# specialize_options is called early enough in the pipeline
|
||||
# that hopefully no Qt application has been constructed as yet
|
||||
from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage # noqa
|
||||
from qt.webengine import QWebEngineUrlScheme
|
||||
from qt.webengine import QWebEnginePage # noqa
|
||||
from calibre.gui2 import must_use_qt
|
||||
from calibre.constants import FAKE_PROTOCOL
|
||||
scheme = QWebEngineUrlScheme(FAKE_PROTOCOL.encode('ascii'))
|
||||
|
@ -12,7 +12,7 @@ from math import ceil, sqrt, cos, sin, atan2
|
||||
from polyglot.builtins import iteritems, itervalues, map, zip, string_or_bytes
|
||||
from itertools import chain
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QImage, Qt, QFont, QPainter, QPointF, QTextLayout, QTextOption,
|
||||
QFontMetrics, QTextCharFormat, QColor, QRect, QBrush, QLinearGradient,
|
||||
QPainterPath, QPen, QRectF, QTransform, QRadialGradient
|
||||
@ -727,7 +727,7 @@ def generate_masthead(title, output_path=None, width=600, height=60, as_qimage=F
|
||||
|
||||
|
||||
def test(scale=0.25):
|
||||
from PyQt5.Qt import QLabel, QPixmap, QMainWindow, QWidget, QScrollArea, QGridLayout
|
||||
from qt.core import QLabel, QPixmap, QMainWindow, QWidget, QScrollArea, QGridLayout
|
||||
from calibre.gui2 import Application
|
||||
app = Application([])
|
||||
mi = Metadata('Unknown', ['Kovid Goyal', 'John & Doe', 'Author'])
|
||||
|
@ -73,7 +73,7 @@ every time you add an HTML file to the library.\
|
||||
True if the user clicks OK, False otherwise. The changes are
|
||||
automatically applied.
|
||||
'''
|
||||
from PyQt5.Qt import (QDialog, QDialogButtonBox, QVBoxLayout,
|
||||
from qt.core import (QDialog, QDialogButtonBox, QVBoxLayout,
|
||||
QLabel, Qt, QLineEdit, QCheckBox)
|
||||
|
||||
config_dialog = QDialog(parent)
|
||||
|
@ -50,7 +50,7 @@ def load_as_html(html):
|
||||
def load_html(path, view, codec='utf-8', mime_type=None,
|
||||
pre_load_callback=lambda x:None, path_is_html=False,
|
||||
force_as_html=False, loading_url=None):
|
||||
from PyQt5.Qt import QUrl, QByteArray
|
||||
from qt.core import QUrl, QByteArray
|
||||
if mime_type is None:
|
||||
mime_type = guess_type(path)[0]
|
||||
if not mime_type:
|
||||
|
@ -13,8 +13,8 @@ try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
import sip
|
||||
from PyQt5.Qt import QApplication, QEventLoop, pyqtSignal
|
||||
from PyQt5.QtWebEngineWidgets import (
|
||||
from qt.core import QApplication, QEventLoop, pyqtSignal
|
||||
from qt.webengine import (
|
||||
QWebEnginePage, QWebEngineProfile, QWebEngineScript
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class CMYKImage(BaseError):
|
||||
level = WARN
|
||||
|
||||
def __call__(self, container):
|
||||
from PyQt5.Qt import QImage
|
||||
from qt.core import QImage
|
||||
from calibre.gui2 import pixmap_to_data
|
||||
ext = container.mime_map[self.name].split('/')[-1].upper()
|
||||
if ext == 'JPG':
|
||||
|
@ -8,7 +8,7 @@ __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>'
|
||||
|
||||
import os, re
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core 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
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
import sys
|
||||
|
||||
from PyQt5.Qt import QApplication, QUrl, QPageLayout, QPageSize, QMarginsF
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage
|
||||
from qt.core import QApplication, QUrl, QPageLayout, QPageSize, QMarginsF
|
||||
from qt.webengine import QWebEnginePage
|
||||
|
||||
from calibre.gui2 import load_builtin_fonts, must_use_qt
|
||||
from calibre.utils.podofo import get_podofo
|
||||
|
@ -14,11 +14,11 @@ from collections import namedtuple
|
||||
from html5_parser import parse
|
||||
from io import BytesIO
|
||||
from itertools import count, repeat
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QApplication, QMarginsF, QObject, QPageLayout, Qt, QTimer, QUrl, pyqtSignal
|
||||
)
|
||||
from PyQt5.QtWebEngineCore import QWebEngineUrlRequestInterceptor
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineProfile
|
||||
from qt.webengine import QWebEngineUrlRequestInterceptor
|
||||
from qt.webengine import QWebEnginePage, QWebEngineProfile
|
||||
|
||||
from calibre import detect_ncpus, human_readable, prepare_string_for_xml
|
||||
from calibre.constants import __version__, iswindows
|
||||
|
@ -3,7 +3,7 @@
|
||||
# License: GPL v3 Copyright: 2019, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from PyQt5.Qt import QMarginsF, QPageLayout, QPageSize, QSizeF
|
||||
from qt.core import QMarginsF, QPageLayout, QPageSize, QSizeF
|
||||
|
||||
from calibre.constants import filesystem_encoding
|
||||
from calibre.ebooks.pdf.render.common import cicero, cm, didot, inch, mm, pica
|
||||
|
@ -5,7 +5,7 @@ __license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QPrinter
|
||||
from qt.core import QPrinter
|
||||
|
||||
UNITS = {
|
||||
'millimeter' : QPrinter.Unit.Millimeter,
|
||||
|
@ -10,7 +10,7 @@ import sys, copy
|
||||
from polyglot.builtins import map, range
|
||||
from collections import namedtuple
|
||||
|
||||
from PyQt5.Qt import QLinearGradient, QPointF
|
||||
from qt.core import QLinearGradient, QPointF
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
from math import sqrt
|
||||
from collections import namedtuple
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QBrush, QPen, Qt, QPointF, QTransform, QPaintEngine, QImage)
|
||||
|
||||
from calibre.ebooks.pdf.render.common import (
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import hashlib, numbers
|
||||
from polyglot.builtins import map, iteritems
|
||||
|
||||
from PyQt5.Qt import QBuffer, QByteArray, QImage, Qt, QColor, qRgba, QPainter
|
||||
from qt.core import QBuffer, QByteArray, QImage, Qt, QColor, qRgba, QPainter
|
||||
|
||||
from calibre.constants import (__appname__, __version__)
|
||||
from calibre.ebooks.pdf.render.common import (
|
||||
|
@ -6,10 +6,10 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QApplication, QMarginsF, QPageLayout, QPageSize, Qt, QTimer, QUrl
|
||||
)
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineScript
|
||||
from qt.webengine import QWebEnginePage, QWebEngineScript
|
||||
|
||||
from calibre.ebooks.metadata.pdf import page_images
|
||||
from calibre.gui2 import must_use_qt
|
||||
|
@ -13,14 +13,13 @@ import threading
|
||||
from contextlib import contextmanager
|
||||
from threading import Lock, RLock
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QT_VERSION, QApplication, QBuffer, QByteArray, QCoreApplication, QDateTime,
|
||||
QDesktopServices, QDialog, QEvent, QFileDialog, QFileIconProvider, QFileInfo, QPalette,
|
||||
QFont, QFontDatabase, QFontInfo, QFontMetrics, QIcon, QLocale, QColor,
|
||||
QNetworkProxyFactory, QObject, QSettings, QSocketNotifier, QStringListModel, Qt,
|
||||
QThread, QTimer, QTranslator, QUrl, pyqtSignal, QIODevice, QDialogButtonBox
|
||||
QThread, QTimer, QTranslator, QUrl, pyqtSignal, QIODevice, QDialogButtonBox, QStyle
|
||||
)
|
||||
from PyQt5.QtWidgets import QStyle # Gives a nicer error message than import from Qt
|
||||
|
||||
from calibre import as_unicode, prints
|
||||
from calibre.constants import (
|
||||
@ -1171,14 +1170,14 @@ class Application(QApplication):
|
||||
|
||||
@property
|
||||
def current_custom_colors(self):
|
||||
from PyQt5.Qt import QColorDialog
|
||||
from qt.core import QColorDialog
|
||||
|
||||
return [col.getRgb() for col in
|
||||
(QColorDialog.customColor(i) for i in range(QColorDialog.customCount()))]
|
||||
|
||||
@current_custom_colors.setter
|
||||
def current_custom_colors(self, colors):
|
||||
from PyQt5.Qt import QColorDialog
|
||||
from qt.core import QColorDialog
|
||||
num = min(len(colors), QColorDialog.customCount())
|
||||
for i in range(num):
|
||||
QColorDialog.setCustomColor(i, QColor(*colors[i]))
|
||||
@ -1386,7 +1385,7 @@ def elided_text(text, font=None, width=300, pos='middle'):
|
||||
rendered, replacing characters from the left, middle or right (as per pos)
|
||||
of the string with an ellipsis. Results in a string much closer to the
|
||||
limit than Qt's elidedText().'''
|
||||
from PyQt5.Qt import QFontMetrics, QApplication
|
||||
from qt.core import QFontMetrics, QApplication
|
||||
if font is None:
|
||||
font = QApplication.instance().font()
|
||||
fm = (font if isinstance(font, QFontMetrics) else QFontMetrics(font))
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
from functools import partial
|
||||
from zipfile import ZipFile
|
||||
|
||||
from PyQt5.Qt import (QToolButton, QAction, QIcon, QObject, QMenu,
|
||||
from qt.core import (QToolButton, QAction, QIcon, QObject, QMenu,
|
||||
QKeySequence)
|
||||
|
||||
from calibre import prints
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os
|
||||
from collections import defaultdict
|
||||
from functools import partial
|
||||
from PyQt5.Qt import QApplication, QDialog, QPixmap, QTimer
|
||||
from qt.core import QApplication, QDialog, QPixmap, QTimer
|
||||
|
||||
from calibre import as_unicode, guess_type
|
||||
from calibre.constants import iswindows
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import pyqtSignal, QModelIndex, QThread, Qt
|
||||
from qt.core import pyqtSignal, QModelIndex, QThread, Qt
|
||||
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -3,7 +3,7 @@
|
||||
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from PyQt5.Qt import QDialog
|
||||
from qt.core import QDialog
|
||||
from calibre.gui2 import gprefs
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from polyglot.builtins import iteritems, map, range
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from PyQt5.Qt import Qt
|
||||
from qt.core import Qt
|
||||
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import re, os, shutil, errno
|
||||
|
||||
from PyQt5.Qt import QModelIndex
|
||||
from qt.core import QModelIndex
|
||||
|
||||
from calibre.gui2 import choose_dir, error_dialog, warning_dialog
|
||||
from calibre.gui2.tools import generate_catalog
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os, posixpath, weakref, sys
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import (QMenu, Qt, QInputDialog, QToolButton, QDialog,
|
||||
from qt.core import (QMenu, Qt, QInputDialog, QToolButton, QDialog,
|
||||
QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QIcon, QSize,
|
||||
QCoreApplication, pyqtSignal, QVBoxLayout, QTimer, QAction)
|
||||
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import QModelIndex, QTimer
|
||||
from qt.core import QModelIndex, QTimer
|
||||
|
||||
from calibre.gui2 import error_dialog, Dispatcher, gprefs
|
||||
from calibre.gui2.tools import convert_single_ebook, convert_bulk_ebook
|
||||
|
@ -12,7 +12,7 @@ from threading import Thread
|
||||
from contextlib import closing
|
||||
from collections import defaultdict
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QToolButton, QDialog, QGridLayout, QIcon, QLabel, QDialogButtonBox,
|
||||
QApplication, QLineEdit, QHBoxLayout, QFormLayout, QCheckBox, QWidget,
|
||||
QScrollArea, QVBoxLayout, Qt, QListWidgetItem, QListWidget, QSize, QAbstractItemView)
|
||||
|
@ -10,7 +10,7 @@ import errno, os
|
||||
from functools import partial
|
||||
from collections import Counter
|
||||
|
||||
from PyQt5.Qt import QObject, QTimer, QModelIndex, QDialog
|
||||
from qt.core import QObject, QTimer, QModelIndex, QDialog
|
||||
|
||||
from calibre.constants import ismacos
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QIcon, QMenu, QTimer, QToolButton, pyqtSignal
|
||||
from qt.core import QIcon, QMenu, QTimer, QToolButton, pyqtSignal
|
||||
|
||||
from calibre.gui2 import info_dialog, question_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -11,7 +11,7 @@ import os
|
||||
import shutil
|
||||
from functools import partial
|
||||
from io import BytesIO
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QAction, QApplication, QDialog, QIcon, QMenu, QMimeData, QModelIndex, QTimer, QUrl
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import QTimer, QProgressDialog, Qt
|
||||
from qt.core import QTimer, QProgressDialog, Qt
|
||||
|
||||
from calibre import force_unicode
|
||||
from calibre.gui2 import gprefs
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import gc
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import Qt
|
||||
from qt.core import Qt
|
||||
|
||||
from calibre.gui2 import Dispatcher
|
||||
from calibre.gui2.tools import fetch_scheduled_recipe
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QUrl
|
||||
from qt.core import QUrl
|
||||
|
||||
from calibre.gui2 import open_url
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import QTimer, QApplication, Qt, QEvent
|
||||
from qt.core import QTimer, QApplication, Qt, QEvent
|
||||
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2011, Grant Drake <grant.drake@gmail.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QApplication, Qt, QIcon
|
||||
from qt.core import QApplication, Qt, QIcon
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
|
||||
FILTER_ALL, FILTER_UPDATE_AVAILABLE)
|
||||
|
@ -11,7 +11,7 @@ from collections import OrderedDict
|
||||
from functools import partial
|
||||
from polyglot.builtins import iteritems, itervalues, map, unicode_type
|
||||
|
||||
from PyQt5.Qt import (QDialog, QGridLayout, QIcon, QCheckBox, QLabel, QFrame,
|
||||
from qt.core import (QDialog, QGridLayout, QIcon, QCheckBox, QLabel, QFrame,
|
||||
QApplication, QDialogButtonBox, Qt, QSize, QSpacerItem,
|
||||
QSizePolicy, QTimer, QModelIndex, QTextEdit,
|
||||
QInputDialog, QMenu)
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import QIcon, Qt
|
||||
from qt.core import QIcon, Qt
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.preferences.main import Preferences
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import Qt
|
||||
from qt.core import Qt
|
||||
try:
|
||||
from PyQt5 import sip
|
||||
except ImportError:
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import QAction
|
||||
from qt.core import QAction
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.dialogs.quickview import Quickview
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import QDialog
|
||||
from qt.core import QDialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.dialogs.template_dialog import TemplateDialog
|
||||
from calibre.gui2 import error_dialog
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import QToolButton
|
||||
from qt.core import QToolButton
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from polyglot.builtins import string_or_bytes
|
||||
|
@ -5,7 +5,7 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from PyQt5.Qt import QToolButton, QAction, pyqtSignal, QIcon
|
||||
from qt.core import QToolButton, QAction, pyqtSignal, QIcon
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.utils.icu import sort_key
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import QIcon, QSize
|
||||
from qt.core import QIcon, QSize
|
||||
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -3,7 +3,7 @@
|
||||
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from PyQt5.Qt import QDialog
|
||||
from qt.core import QDialog
|
||||
from polyglot.builtins import iteritems, map, range
|
||||
|
||||
from calibre.gui2 import gprefs
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt5.Qt import (QTimer, QDialog, QGridLayout, QCheckBox, QLabel,
|
||||
from qt.core import (QTimer, QDialog, QGridLayout, QCheckBox, QLabel,
|
||||
QDialogButtonBox, QIcon)
|
||||
|
||||
from calibre.gui2 import error_dialog, gprefs
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import time
|
||||
|
||||
from PyQt5.Qt import QTimer, QDialog, QDialogButtonBox, QCheckBox, QVBoxLayout, QLabel, Qt
|
||||
from qt.core import QTimer, QDialog, QDialogButtonBox, QCheckBox, QVBoxLayout, QLabel, Qt
|
||||
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import os, weakref, shutil
|
||||
|
||||
from PyQt5.Qt import (QDialog, QVBoxLayout, QHBoxLayout, QRadioButton, QFrame,
|
||||
from qt.core import (QDialog, QVBoxLayout, QHBoxLayout, QRadioButton, QFrame,
|
||||
QPushButton, QLabel, QGroupBox, QGridLayout, QIcon, QSize, QTimer)
|
||||
|
||||
from calibre import as_unicode
|
||||
|
@ -10,7 +10,7 @@ import json
|
||||
import os
|
||||
import time
|
||||
from functools import partial
|
||||
from PyQt5.Qt import QAction, QIcon, Qt, pyqtSignal, QDialog
|
||||
from qt.core import QAction, QIcon, Qt, pyqtSignal, QDialog
|
||||
|
||||
from calibre.constants import ismacos, iswindows
|
||||
from calibre.gui2 import (
|
||||
|
@ -2,7 +2,7 @@
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPLv3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
from PyQt5.Qt import QToolButton, QAction
|
||||
from qt.core import QToolButton, QAction
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
|
||||
|
@ -14,7 +14,7 @@ import traceback
|
||||
import weakref
|
||||
from collections import OrderedDict
|
||||
from io import BytesIO
|
||||
from PyQt5.Qt import QObject, Qt, pyqtSignal
|
||||
from qt.core import QObject, Qt, pyqtSignal
|
||||
from threading import Thread
|
||||
|
||||
from calibre import as_unicode, prints
|
||||
|
@ -10,7 +10,7 @@ import os, tempfile, shutil, time
|
||||
from threading import Thread, Event
|
||||
from polyglot.builtins import map
|
||||
|
||||
from PyQt5.Qt import (QFileSystemWatcher, QObject, Qt, pyqtSignal, QTimer, QApplication, QCursor)
|
||||
from qt.core import (QFileSystemWatcher, QObject, Qt, pyqtSignal, QTimer, QApplication, QCursor)
|
||||
|
||||
from calibre import prints
|
||||
from calibre.db.adding import filter_filename, compile_rule
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from functools import partial
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
Qt, QAction, QMenu, QObject, QToolBar, QToolButton, QSize, pyqtSignal, QKeySequence,
|
||||
QTimer, QPropertyAnimation, QEasingCurve, pyqtProperty, QPainter, QWidget, QPalette)
|
||||
try:
|
||||
|
@ -7,7 +7,7 @@ import os
|
||||
import re
|
||||
from collections import namedtuple
|
||||
from functools import partial
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QAction, QApplication, QColor, QEasingCurve, QIcon, QKeySequence, QLayout, QMenu,
|
||||
QMimeData, QPainter, QPen, QPixmap, QPropertyAnimation, QRect, QSize, QClipboard,
|
||||
QSizePolicy, Qt, QUrl, QWidget, pyqtProperty, pyqtSignal
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import QWidget, QListWidgetItem
|
||||
from qt.core import QWidget, QListWidgetItem
|
||||
|
||||
from calibre.gui2 import gprefs
|
||||
from calibre.gui2.catalog.catalog_bibtex_ui import Ui_Form
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QWidget, QListWidgetItem, Qt, QVBoxLayout, QLabel, QListWidget, QAbstractItemView
|
||||
from qt.core import QWidget, QListWidgetItem, Qt, QVBoxLayout, QLabel, QListWidget, QAbstractItemView
|
||||
|
||||
from calibre.constants import ismacos
|
||||
from calibre.gui2 import gprefs
|
||||
|
@ -18,7 +18,7 @@ from calibre.utils.localization import localize_user_manual_link
|
||||
from polyglot.builtins import native_string_type, unicode_type, zip, range
|
||||
|
||||
from .catalog_epub_mobi_ui import Ui_Form
|
||||
from PyQt5.Qt import (Qt, QAbstractItemView, QCheckBox, QComboBox,
|
||||
from qt.core import (Qt, QAbstractItemView, QCheckBox, QComboBox,
|
||||
QDoubleSpinBox, QIcon, QInputDialog, QLineEdit, QRadioButton,
|
||||
QSize, QSizePolicy, QTableWidget, QTableWidgetItem, QTextEdit, QToolButton,
|
||||
QUrl, QVBoxLayout, QWidget)
|
||||
|
@ -11,7 +11,7 @@ from contextlib import contextmanager
|
||||
|
||||
from html5_parser import parse
|
||||
from lxml import html
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QAction, QApplication, QBrush, QByteArray, QCheckBox, QColor, QColorDialog,
|
||||
QDialog, QDialogButtonBox, QFont, QFontInfo, QFontMetrics, QFormLayout,
|
||||
QHBoxLayout, QIcon, QKeySequence, QLabel, QLineEdit, QMenu, QPalette,
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QLineEdit, QAbstractListModel, Qt, pyqtSignal, QObject, QKeySequence, QAbstractItemView,
|
||||
QApplication, QListView, QPoint, QModelIndex, QEvent,
|
||||
QStyleOptionComboBox, QStyle, QComboBox, QTimer)
|
||||
@ -519,7 +519,7 @@ class EditWithComplete(EnComboBox):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.Qt import QDialog, QVBoxLayout
|
||||
from qt.core import QDialog, QVBoxLayout
|
||||
from calibre.gui2 import Application
|
||||
app = Application([])
|
||||
d = QDialog()
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import textwrap, codecs, importlib
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import (QWidget, QSpinBox, QDoubleSpinBox, QLineEdit, QTextEdit,
|
||||
from qt.core import (QWidget, QSpinBox, QDoubleSpinBox, QLineEdit, QTextEdit,
|
||||
QCheckBox, QComboBox, Qt, QIcon, pyqtSignal, QLabel, QFontComboBox, QFont,
|
||||
QFontInfo, QPlainTextEdit)
|
||||
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import shutil
|
||||
|
||||
from PyQt5.Qt import QModelIndex, QDialog, QApplication, QDialogButtonBox
|
||||
from qt.core import QModelIndex, QDialog, QApplication, QDialogButtonBox
|
||||
|
||||
from calibre.gui2.convert.single import Config, GroupModel, gprefs
|
||||
from calibre.gui2.convert.look_and_feel import LookAndFeelWidget
|
||||
|
@ -5,7 +5,7 @@ __license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QFormLayout, QComboBox, QCheckBox, QLineEdit, QDoubleSpinBox, QSizePolicy
|
||||
from qt.core import QFormLayout, QComboBox, QCheckBox, QLineEdit, QDoubleSpinBox, QSizePolicy
|
||||
|
||||
from calibre.gui2.convert import Widget
|
||||
from calibre.ebooks.conversion.config import OPTIONS
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QDialog, QDialogButtonBox
|
||||
from qt.core import QDialog, QDialogButtonBox
|
||||
|
||||
from calibre.gui2.convert.font_key_ui import Ui_Dialog
|
||||
from calibre.utils.localization import localize_user_manual_link
|
||||
@ -102,7 +102,7 @@ class FontKeyChooser(QDialog, Ui_Dialog):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.Qt import QApplication
|
||||
from qt.core import QApplication
|
||||
app = QApplication([])
|
||||
d = FontKeyChooser()
|
||||
d.exec_()
|
||||
|
@ -5,7 +5,7 @@ __license__ = 'GPL 3'
|
||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import Qt
|
||||
from qt.core import Qt
|
||||
|
||||
from calibre.gui2 import gprefs
|
||||
from calibre.gui2.convert.heuristics_ui import Ui_Form
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import json
|
||||
|
||||
from PyQt5.Qt import Qt, QDialog
|
||||
from qt.core import Qt, QDialog
|
||||
|
||||
from calibre.gui2.convert.look_and_feel_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import os, re, errno
|
||||
|
||||
from PyQt5.Qt import QPixmap
|
||||
from qt.core import QPixmap
|
||||
|
||||
from calibre.gui2 import choose_images, error_dialog
|
||||
from calibre.gui2.convert.metadata_ui import Ui_Form
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import Qt, QAbstractListModel, QModelIndex, QItemSelectionModel
|
||||
from qt.core import Qt, QAbstractListModel, QModelIndex, QItemSelectionModel
|
||||
|
||||
from calibre.gui2.convert.page_setup_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
|
@ -6,7 +6,7 @@ __copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from PyQt5.Qt import QHBoxLayout, QFormLayout, QDoubleSpinBox, QCheckBox, QVBoxLayout
|
||||
from qt.core import QHBoxLayout, QFormLayout, QDoubleSpinBox, QCheckBox, QVBoxLayout
|
||||
|
||||
from calibre.gui2.convert.pdf_output_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import os
|
||||
|
||||
from PyQt5.Qt import (QDialog, QWidget, QDialogButtonBox, QApplication,
|
||||
from qt.core import (QDialog, QWidget, QDialogButtonBox, QApplication,
|
||||
QBrush, QTextCursor, QTextEdit, QByteArray, Qt, pyqtSignal)
|
||||
|
||||
from calibre.gui2.convert.regex_builder_ui import Ui_RegexBuilder
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import codecs, json
|
||||
|
||||
from PyQt5.Qt import Qt, QTableWidgetItem
|
||||
from qt.core import Qt, QTableWidgetItem
|
||||
|
||||
from calibre.gui2.convert.search_and_replace_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import shutil
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QAbstractListModel, QCheckBox, QComboBox, QCoreApplication, QDialog,
|
||||
QDialogButtonBox, QFont, QFrame, QGridLayout, QHBoxLayout, QIcon, QLabel,
|
||||
QListView, QModelIndex, QScrollArea, QSize, QSizePolicy, QSpacerItem,
|
||||
|
@ -5,7 +5,7 @@ __license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QListWidgetItem, Qt
|
||||
from qt.core import QListWidgetItem, Qt
|
||||
|
||||
from calibre.gui2.convert.txt_input_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
|
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt5.Qt import QDialog, QWidget, Qt, QDialogButtonBox, QVBoxLayout
|
||||
from qt.core import QDialog, QWidget, Qt, QDialogButtonBox, QVBoxLayout
|
||||
|
||||
from calibre.gui2.convert.xpath_wizard_ui import Ui_Form
|
||||
from calibre.gui2.convert.xexp_edit_ui import Ui_Form as Ui_Edit
|
||||
@ -108,7 +108,7 @@ class XPathEdit(QWidget, Ui_Edit):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.Qt import QApplication
|
||||
from qt.core import QApplication
|
||||
app = QApplication([])
|
||||
w = XPathEdit()
|
||||
w.setObjectName('test')
|
||||
|
@ -11,7 +11,7 @@ Module to implement the Cover Flow feature
|
||||
|
||||
import sys, os, time
|
||||
|
||||
from PyQt5.Qt import (QImage, QSizePolicy, QTimer, QDialog, Qt, QSize, QAction,
|
||||
from qt.core import (QImage, QSizePolicy, QTimer, QDialog, Qt, QSize, QAction,
|
||||
QStackedLayout, QLabel, pyqtSignal, QKeySequence, QFont, QApplication, QItemSelectionModel)
|
||||
|
||||
from calibre.ebooks.metadata import rating_to_stars
|
||||
@ -444,7 +444,7 @@ class CoverFlowMixin(object):
|
||||
|
||||
|
||||
def test():
|
||||
from PyQt5.Qt import QMainWindow
|
||||
from qt.core import QMainWindow
|
||||
app = QApplication([])
|
||||
w = QMainWindow()
|
||||
cf = CoverFlow()
|
||||
@ -465,7 +465,7 @@ def main(args=sys.argv):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.Qt import QMainWindow
|
||||
from qt.core import QMainWindow
|
||||
app = QApplication([])
|
||||
w = QMainWindow()
|
||||
cf = CoverFlow()
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QWidget, QHBoxLayout, QTabWidget, QLabel, QSizePolicy, QSize, QFormLayout,
|
||||
QSpinBox, pyqtSignal, QPixmap, QDialog, QVBoxLayout, QDialogButtonBox,
|
||||
QListWidget, QListWidgetItem, Qt, QGridLayout, QPushButton, QIcon, QApplication,
|
||||
|
@ -3,7 +3,7 @@
|
||||
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QWidget, QVBoxLayout, QHBoxLayout, QLabel, QComboBox, QLineEdit,
|
||||
QPushButton, QSize, pyqtSignal, QMenu, QDialogButtonBox, QTextCursor
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import (Qt, QComboBox, QLabel, QSpinBox, QDoubleSpinBox,
|
||||
from qt.core import (Qt, QComboBox, QLabel, QSpinBox, QDoubleSpinBox,
|
||||
QDateTime, QGroupBox, QVBoxLayout, QSizePolicy, QGridLayout, QUrl,
|
||||
QSpacerItem, QIcon, QCheckBox, QWidget, QHBoxLayout, QLineEdit,
|
||||
QMessageBox, QToolButton, QPlainTextEdit, QApplication, QStyle, QDialog)
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import time
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QApplication, QMainWindow, QVBoxLayout, Qt, QKeySequence, QAction, QEvent, QStyle,
|
||||
QActionGroup, QMenu, QPushButton, QWidget, QTimer, QMessageBox, pyqtSignal)
|
||||
|
||||
|
@ -9,7 +9,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
# dbus-menu.xml from the libdbusmenu project https://launchpad.net/libdbusmenu
|
||||
|
||||
import dbus, sip
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QApplication, QMenu, QIcon, QKeySequence, QObject, QEvent, QTimer, pyqtSignal, Qt)
|
||||
|
||||
from calibre.utils.dbus_service import Object, BusName, method as dbus_method, dbus_property, signal as dbus_signal
|
||||
|
@ -13,7 +13,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
# Partial spec: https://wiki.gnome.org/Projects/GLib/GApplication/DBusAPI
|
||||
|
||||
import dbus
|
||||
from PyQt5.Qt import QObject, pyqtSignal, QTimer, Qt
|
||||
from qt.core import QObject, pyqtSignal, QTimer, Qt
|
||||
|
||||
from calibre.utils.dbus_service import Object, method as dbus_method, signal as dbus_signal
|
||||
from calibre.gui2.dbus_export.utils import set_X_window_properties
|
||||
|
@ -14,7 +14,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import os
|
||||
|
||||
import dbus
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QApplication, QObject, pyqtSignal, Qt, QPoint, QRect, QMenu,
|
||||
QSystemTrayIcon, QIcon)
|
||||
|
||||
|
@ -9,7 +9,7 @@ import sys, array, re, os, errno
|
||||
|
||||
import dbus
|
||||
|
||||
from PyQt5.Qt import QSize, QImage, Qt, QKeySequence, QBuffer, QByteArray, QIODevice
|
||||
from qt.core import QSize, QImage, Qt, QKeySequence, QBuffer, QByteArray, QIODevice
|
||||
|
||||
from polyglot.builtins import unicode_type, iteritems
|
||||
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import time, sys, weakref
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QObject, QMenuBar, QAction, QEvent, QSystemTrayIcon, QApplication, Qt)
|
||||
|
||||
from calibre.constants import iswindows, ismacos
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import os, traceback, time, io, re, sys, weakref
|
||||
from threading import Thread, Event
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QMenu, QAction, QActionGroup, QIcon, Qt, pyqtSignal, QDialog,
|
||||
QObject, QVBoxLayout, QDialogButtonBox, QCursor, QCoreApplication,
|
||||
QApplication, QEventLoop, QTimer)
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import textwrap
|
||||
|
||||
from PyQt5.Qt import (QWidget, QListWidgetItem, Qt, QLabel,
|
||||
from qt.core import (QWidget, QListWidgetItem, Qt, QLabel,
|
||||
QLineEdit, QCheckBox, QComboBox)
|
||||
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import weakref
|
||||
|
||||
from PyQt5.Qt import (QWidget, QListWidgetItem, Qt, QToolButton, QLabel,
|
||||
from qt.core import (QWidget, QListWidgetItem, Qt, QToolButton, QLabel,
|
||||
QTabWidget, QGridLayout, QListWidget, QIcon, QLineEdit, QVBoxLayout,
|
||||
QPushButton, QGroupBox, QScrollArea, QHBoxLayout, QComboBox,
|
||||
pyqtSignal, QSizePolicy, QDialog, QDialogButtonBox, QPlainTextEdit,
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
from operator import attrgetter
|
||||
|
||||
from PyQt5.Qt import (QTabWidget, QTreeWidget, QTreeWidgetItem, Qt, QDialog,
|
||||
from qt.core import (QTabWidget, QTreeWidget, QTreeWidgetItem, Qt, QDialog,
|
||||
QDialogButtonBox, QVBoxLayout, QSize, pyqtSignal, QIcon, QLabel)
|
||||
|
||||
from calibre.gui2 import file_icon_provider
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import weakref, textwrap
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QWidget, QLabel, QTabWidget, QGridLayout, QLineEdit, QVBoxLayout,
|
||||
QGroupBox, QComboBox, QSizePolicy, QDialog, QDialogButtonBox, QCheckBox,
|
||||
QSpacerItem)
|
||||
|
@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en'
|
||||
__license__ = 'GPL v3'
|
||||
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QDialog, QGridLayout, QLabel, QDialogButtonBox, QApplication, QSpinBox,
|
||||
QToolButton, QIcon, QLineEdit, QComboBox, QCheckBox)
|
||||
from calibre.ebooks.metadata import string_to_authors
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import os
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QDialog, QApplication, QIcon, QVBoxLayout, QHBoxLayout, QDialogButtonBox,
|
||||
QPlainTextEdit, QPushButton, QLabel, QLineEdit, Qt
|
||||
)
|
||||
|
@ -7,7 +7,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QDialog, QGridLayout, QDialogButtonBox, QListWidget, QApplication, Qt,
|
||||
pyqtSignal, QSize, QPushButton, QIcon, QStyledItemDelegate, QLabel, QAbstractItemView)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
import textwrap
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QAction, QApplication, QBrush, QCheckBox, QCoreApplication, QDialog, QGridLayout,
|
||||
QHBoxLayout, QIcon, QKeySequence, QLabel, QListView, QModelIndex, QPalette,
|
||||
QPixmap, QPushButton, QShortcut, QSize, QSplitter, Qt, QTimer, QToolButton,
|
||||
|
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
|
||||
import os, sys, importlib, weakref
|
||||
|
||||
from PyQt5.Qt import QDialog, QCoreApplication, QSize, QScrollArea, QApplication, QDialogButtonBox
|
||||
from qt.core import QDialog, QCoreApplication, QSize, QScrollArea, QApplication, QDialogButtonBox
|
||||
|
||||
from calibre.customize.ui import config
|
||||
from calibre.gui2.dialogs.catalog_ui import Ui_Dialog
|
||||
@ -218,7 +218,7 @@ class Catalog(QDialog, Ui_Dialog):
|
||||
To add help functionality for a specific format:
|
||||
In gui2.catalog.catalog_<format>.py, add the following:
|
||||
from calibre.gui2 import open_url
|
||||
from PyQt5.Qt import QUrl
|
||||
from qt.core import QUrl
|
||||
|
||||
In the PluginWidget() class, add this method:
|
||||
def show_help(self):
|
||||
|
@ -8,7 +8,7 @@ __license__ = 'GPL v3'
|
||||
import os
|
||||
from threading import Thread
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QDialog, QVBoxLayout, QHBoxLayout, QTreeWidget, QLabel, QPushButton,
|
||||
QApplication, QTreeWidgetItem, QLineEdit, Qt, QSize,
|
||||
QTimer, QIcon, QTextEdit, QSplitter, QWidget, QGridLayout, pyqtSignal)
|
||||
|
@ -5,7 +5,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from functools import partial
|
||||
|
||||
from PyQt5.Qt import (
|
||||
from qt.core import (
|
||||
QDialog, QListWidgetItem, QModelIndex, QIcon, QLabel, QVBoxLayout, QSize,
|
||||
QDialogButtonBox, QListWidget, QHBoxLayout, QPushButton, QMenu)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||
|
||||
from PyQt5.Qt import QDialog, QTreeWidgetItem, QIcon, QModelIndex
|
||||
from qt.core import QDialog, QTreeWidgetItem, QIcon, QModelIndex
|
||||
|
||||
from calibre.gui2 import file_icon_provider
|
||||
from calibre.gui2.dialogs.choose_format_device_ui import Ui_ChooseFormatDeviceDialog
|
||||
|
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import os, errno
|
||||
from threading import Thread, Event
|
||||
|
||||
from PyQt5.Qt import QDialog, QTimer, Qt, pyqtSignal
|
||||
from qt.core import QDialog, QTimer, Qt, pyqtSignal
|
||||
|
||||
from calibre.gui2.dialogs.choose_library_ui import Ui_Dialog
|
||||
from calibre.gui2.dialogs.progress import ProgressDialog as PD
|
||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
||||
__license__ = 'GPL v3'
|
||||
|
||||
|
||||
from PyQt5.Qt import (QDialog, QVBoxLayout, QLabel, QDialogButtonBox,
|
||||
from qt.core import (QDialog, QVBoxLayout, QLabel, QDialogButtonBox,
|
||||
QListWidget, QAbstractItemView, QSizePolicy)
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
__license__ = 'GPL v3'
|
||||
|
||||
from PyQt5.Qt import Qt, QDialog, QDialogButtonBox, QVBoxLayout, QPlainTextEdit, QSize, QApplication
|
||||
from qt.core import Qt, QDialog, QDialogButtonBox, QVBoxLayout, QPlainTextEdit, QSize, QApplication
|
||||
|
||||
from calibre.gui2 import gprefs, Application
|
||||
from calibre.gui2.dialogs.comments_dialog_ui import Ui_CommentsDialog
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user