| @@ -20,8 +20,13 @@ | |||||
| # Imports (Global) | # Imports (Global) | ||||
| from platform import architecture | from platform import architecture | ||||
| from PyQt5.QtCore import QFileSystemWatcher, QThread | |||||
| from PyQt5.QtWidgets import QApplication, QDialogButtonBox, QLabel, QMainWindow, QSizePolicy | |||||
| if True: | |||||
| from PyQt5.QtCore import QFileSystemWatcher, QThread | |||||
| from PyQt5.QtWidgets import QApplication, QDialogButtonBox, QLabel, QMainWindow, QSizePolicy | |||||
| else: | |||||
| from PyQt4.QtCore import QFileSystemWatcher, QThread | |||||
| from PyQt4.QtGui import QApplication, QDialogButtonBox, QLabel, QMainWindow, QSizePolicy | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -23,7 +23,11 @@ import os | |||||
| import sys | import sys | ||||
| from signal import signal, SIGINT, SIGTERM | from signal import signal, SIGINT, SIGTERM | ||||
| from time import sleep | from time import sleep | ||||
| from PyQt5.QtCore import QProcess | |||||
| if True: | |||||
| from PyQt5.QtCore import QProcess | |||||
| else: | |||||
| from PyQt4.QtCore import QProcess | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -3,7 +3,10 @@ | |||||
| # Imports (Global) | # Imports (Global) | ||||
| import dbus, sys | import dbus, sys | ||||
| from PyQt4.QtCore import QCoreApplication | |||||
| if True: | |||||
| from PyQt5.QtCore import QCoreApplication | |||||
| else: | |||||
| from PyQt4.QtCore import QCoreApplication | |||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| from shared_cadence import * | from shared_cadence import * | ||||
| @@ -19,11 +19,15 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, QSettings | |||||
| from PyQt5.QtWidgets import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| # FIXME QT4 | |||||
| #from PyQt5.QtXml import QDomDocument | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, QSettings | |||||
| from PyQt5.QtWidgets import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| # FIXME QT4 | |||||
| #from PyQt5.QtXml import QDomDocument | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QSettings | |||||
| from PyQt4.QtGui import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| from PyQt4.QtXml import QDomDocument | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -20,8 +20,13 @@ | |||||
| # Imports (Global) | # Imports (Global) | ||||
| from time import ctime | from time import ctime | ||||
| from PyQt5.QtCore import QPointF | |||||
| from PyQt5.QtWidgets import QAction, QApplication, QCheckBox, QHBoxLayout, QVBoxLayout, QTableWidgetItem, QTreeWidgetItem | |||||
| if True: | |||||
| from PyQt5.QtCore import QPointF | |||||
| from PyQt5.QtWidgets import QAction, QApplication, QCheckBox, QHBoxLayout, QVBoxLayout, QTableWidgetItem, QTreeWidgetItem | |||||
| else: | |||||
| from PyQt4.QtCore import QPointF | |||||
| from PyQt4.QtGui import QAction, QApplication, QCheckBox, QHBoxLayout, QVBoxLayout, QTableWidgetItem, QTreeWidgetItem | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -19,10 +19,15 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, Qt, QTimer, QSettings | |||||
| from PyQt5.QtWidgets import QMainWindow, QTableWidgetItem, QWidget | |||||
| from random import randint | from random import randint | ||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, Qt, QTimer, QSettings | |||||
| from PyQt5.QtWidgets import QMainWindow, QTableWidgetItem, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, Qt, QTimer, QSettings | |||||
| from PyQt4.QtGui import QMainWindow, QTableWidgetItem, QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -19,8 +19,12 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt5.QtWidgets import QLabel | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt5.QtWidgets import QLabel | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt4.QtGui import QLabel | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -19,11 +19,17 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, Qt, QSettings, QTimer | |||||
| from PyQt5.QtGui import QFontMetrics | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox | |||||
| from sys import platform, version_info | from sys import platform, version_info | ||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, Qt, QSettings, QTimer | |||||
| from PyQt5.QtGui import QFontMetrics | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, Qt, QSettings, QTimer | |||||
| from PyQt4.QtGui import QFontMetrics | |||||
| from PyQt4.QtGui import QDialog, QDialogButtonBox, QMessageBox | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -19,9 +19,14 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings | |||||
| from PyQt5.QtGui import QPalette, QSyntaxHighlighter | |||||
| from PyQt5.QtWidgets import QDialog | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings | |||||
| from PyQt5.QtGui import QPalette, QSyntaxHighlighter | |||||
| from PyQt5.QtWidgets import QDialog | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings | |||||
| from PyQt4.QtGui import QPalette, QSyntaxHighlighter | |||||
| from PyQt4.QtGui import QDialog | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -17,13 +17,22 @@ | |||||
| # For a full copy of the GNU General Public License see the GPL.txt file | # For a full copy of the GNU General Public License see the GPL.txt file | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject | |||||
| from PyQt5.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer | |||||
| from PyQt5.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath | |||||
| from PyQt5.QtGui import QCursor, QFont, QFontMetrics | |||||
| from PyQt5.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem | |||||
| from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect | |||||
| from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject | |||||
| from PyQt5.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer | |||||
| from PyQt5.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath | |||||
| from PyQt5.QtGui import QCursor, QFont, QFontMetrics | |||||
| from PyQt5.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem | |||||
| from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect | |||||
| from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject | |||||
| from PyQt4.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer | |||||
| from PyQt4.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath | |||||
| from PyQt4.QtGui import QCursor, QFont, QFontMetrics | |||||
| from PyQt4.QtGui import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem | |||||
| from PyQt4.QtGui import QGraphicsColorizeEffect, QGraphicsDropShadowEffect | |||||
| from PyQt4.QtGui import QInputDialog, QLineEdit, QMenu | |||||
| from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer | from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer | ||||
| @@ -19,8 +19,12 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import Qt | |||||
| from PyQt5.QtGui import QColor, QFont, QPen, QPixmap | |||||
| if True: | |||||
| from PyQt5.QtCore import Qt | |||||
| from PyQt5.QtGui import QColor, QFont, QPen, QPixmap | |||||
| else: | |||||
| from PyQt4.QtCore import Qt | |||||
| from PyQt4.QtGui import QColor, QFont, QPen, QPixmap | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # patchcanvas-theme.cpp | # patchcanvas-theme.cpp | ||||
| @@ -19,10 +19,15 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings | |||||
| from PyQt5.QtWidgets import QDialog | |||||
| from time import sleep | from time import sleep | ||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings | |||||
| from PyQt5.QtWidgets import QDialog | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings | |||||
| from PyQt4.QtGui import QDialog | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -23,9 +23,15 @@ import os | |||||
| import sys | import sys | ||||
| from codecs import open as codecopen | from codecs import open as codecopen | ||||
| from unicodedata import normalize | from unicodedata import normalize | ||||
| from PyQt5.QtCore import pyqtSignal, qWarning | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QApplication, QFileDialog, QMessageBox | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSignal, qWarning | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QApplication, QFileDialog, QMessageBox | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, qWarning | |||||
| from PyQt4.QtGui import QIcon | |||||
| from PyQt4.QtGui import QApplication, QFileDialog, QMessageBox | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Set Platform | # Set Platform | ||||
| @@ -19,9 +19,13 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import QProcess, QSettings | |||||
| from time import sleep | from time import sleep | ||||
| if True: | |||||
| from PyQt5.QtCore import QProcess, QSettings | |||||
| else: | |||||
| from PyQt4.QtCore import QProcess, QSettings | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -19,9 +19,14 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, QTimer | |||||
| from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt5.QtWidgets import QMainWindow, QMenu | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, QTimer | |||||
| from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt5.QtWidgets import QMainWindow, QMenu | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QTimer | |||||
| from PyQt4.QtGui import QCursor, QFontMetrics, QImage, QPainter | |||||
| from PyQt4.QtGui import QMainWindow, QMenu | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -19,8 +19,12 @@ | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from PyQt5.QtCore import pyqtSlot, QSettings | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox | |||||
| if True: | |||||
| from PyQt5.QtCore import pyqtSlot, QSettings | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QSettings | |||||
| from PyQt4.QtGui import QDialog, QDialogButtonBox | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -18,9 +18,15 @@ | |||||
| # Imports (Global) | # Imports (Global) | ||||
| import os, sys | import os, sys | ||||
| from PyQt5.QtCore import QTimer | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QAction, QMainWindow, QMenu, QSystemTrayIcon | |||||
| if True: | |||||
| from PyQt5.QtCore import QTimer | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QAction, QMainWindow, QMenu, QSystemTrayIcon | |||||
| else: | |||||
| from PyQt4.QtCore import QTimer | |||||
| from PyQt4.QtGui import QIcon | |||||
| from PyQt4.QtGui import QAction, QMainWindow, QMenu, QSystemTrayIcon | |||||
| try: | try: | ||||
| if os.getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/cadence/no_app_indicators"): | if os.getenv("DESKTOP_SESSION") in ("ubuntu", "ubuntu-2d") and not os.path.exists("/var/cadence/no_app_indicators"): | ||||