UI/UserInterface.py

changeset 3776
ccb6eacb50e5
parent 3721
e9a8622ece09
child 3788
195dd519bf29
equal deleted inserted replaced
3774:285e5aa860a0 3776:ccb6eacb50e5
17 import sys 17 import sys
18 import logging 18 import logging
19 19
20 from PyQt5.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \ 20 from PyQt5.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \
21 PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \ 21 PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \
22 QUrlQuery, QObject, Qt 22 QObject, Qt
23 from PyQt5.QtGui import QKeySequence, QDesktopServices 23 from PyQt5.QtGui import QKeySequence, QDesktopServices
24 from PyQt5.QtWidgets import QSizePolicy, QWidget, QWhatsThis, QToolBar, \ 24 from PyQt5.QtWidgets import QSizePolicy, QWidget, QWhatsThis, QToolBar, \
25 QDialog, QSplitter, QApplication, QMenu, QVBoxLayout, QDockWidget, \ 25 QDialog, QSplitter, QApplication, QMenu, QVBoxLayout, QDockWidget, \
26 QAction, QLabel 26 QAction, QLabel
27 from PyQt5.Qsci import QSCINTILLA_VERSION_STR 27 from PyQt5.Qsci import QSCINTILLA_VERSION_STR
3031 Utilities.generateVersionInfo("\r\n"), 3031 Utilities.generateVersionInfo("\r\n"),
3032 Utilities.generatePluginsVersionInfo("\r\n"), 3032 Utilities.generatePluginsVersionInfo("\r\n"),
3033 Utilities.generateDistroInfo("\r\n")) 3033 Utilities.generateDistroInfo("\r\n"))
3034 3034
3035 url = QUrl("mailto:{0}".format(address)) 3035 url = QUrl("mailto:{0}".format(address))
3036 urlQuery = QUrlQuery() 3036 if qVersion() >= "5.0.0":
3037 urlQuery.addQueryItem("subject", subject) 3037 from PyQt5.QtCore import QUrlQuery
3038 urlQuery.addQueryItem("body", body) 3038 urlQuery = QUrlQuery()
3039 url.setQuery(urlQuery) 3039 urlQuery.addQueryItem("subject", subject)
3040 urlQuery.addQueryItem("body", body)
3041 url.setQuery(urlQuery)
3042 else:
3043 url.addQueryItem("subject", subject)
3044 url.addQueryItem("body", body)
3040 QDesktopServices.openUrl(url) 3045 QDesktopServices.openUrl(url)
3041 3046
3042 def checkForErrorLog(self): 3047 def checkForErrorLog(self):
3043 """ 3048 """
3044 Public method to check for the presence of an error log and ask the 3049 Public method to check for the presence of an error log and ask the

eric ide

mercurial