-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: [email protected] <falkTX>
- Loading branch information
1 parent
104839f
commit c5b601b
Showing
48 changed files
with
701 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ qrc_resources.cpp | |
*.pyc | ||
|
||
# Qt files | ||
qt_config.py | ||
*_ui.hpp | ||
*_ui.py | ||
*_rc.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla Native Plugins | ||
# Copyright (C) 2012-2019 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
||
from PyQt5.QtCore import Qt | ||
from qt_compat import qt_config | ||
|
||
if qt_config == 5: | ||
from PyQt5.QtCore import Qt | ||
elif qt_config == 6: | ||
from PyQt6.QtCore import Qt | ||
|
||
# ----------------------------------------------------------------------- | ||
# Imports (Custom) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla plugin host (plugin UI) | ||
# Copyright (C) 2013-2020 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the GPL.txt file | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
||
from PyQt5.QtGui import QKeySequence, QMouseEvent | ||
from PyQt5.QtWidgets import QFrame, QSplitter | ||
from qt_compat import qt_config | ||
|
||
if qt_config == 5: | ||
from PyQt5.QtGui import QKeySequence, QMouseEvent | ||
from PyQt5.QtWidgets import QFrame, QSplitter | ||
elif qt_config == 6: | ||
from PyQt6.QtGui import QKeySequence, QMouseEvent | ||
from PyQt6.QtWidgets import QFrame, QSplitter | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Custom Stuff) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla application | ||
# Copyright (C) 2013-2020 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
@@ -28,11 +14,18 @@ | |
from ctypes import CDLL, RTLD_GLOBAL | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (PyQt5) | ||
# Imports (PyQt) | ||
|
||
from PyQt5.QtCore import QT_VERSION, Qt, QCoreApplication, QLibraryInfo, QLocale, QTranslator | ||
from PyQt5.QtGui import QColor, QIcon, QPalette | ||
from PyQt5.QtWidgets import QApplication | ||
from qt_compat import qt_config | ||
|
||
if qt_config == 5: | ||
from PyQt5.QtCore import QT_VERSION, Qt, QCoreApplication, QLibraryInfo, QLocale, QTranslator | ||
from PyQt5.QtGui import QColor, QIcon, QPalette | ||
from PyQt5.QtWidgets import QApplication | ||
elif qt_config == 6: | ||
from PyQt6.QtCore import QT_VERSION, Qt, QCoreApplication, QLibraryInfo, QLocale, QTranslator | ||
from PyQt6.QtGui import QColor, QIcon, QPalette | ||
from PyQt6.QtWidgets import QApplication | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Custom) | ||
|
@@ -137,21 +130,21 @@ def __init__(self, appName = "Carla2", libPrefix = None): | |
self.createPaletteBlue() | ||
|
||
def createApp(self, appName): | ||
if LINUX: | ||
if qt_config == 5 and LINUX: | ||
# AA_X11InitThreads is not available on old PyQt versions | ||
try: | ||
attr = Qt.AA_X11InitThreads | ||
except: | ||
attr = 10 | ||
QApplication.setAttribute(attr) | ||
|
||
if QT_VERSION >= 0x50600: | ||
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) | ||
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) | ||
|
||
if MACOS: | ||
QApplication.setAttribute(Qt.AA_DontShowIconsInMenus) | ||
|
||
if QT_VERSION >= 0x50600: | ||
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) | ||
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) | ||
|
||
args = sys.argv[:] | ||
|
||
if WINDOWS: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla Backend code (Qt stuff) | ||
# Copyright (C) 2011-2020 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
||
from PyQt5.QtCore import pyqtSignal, QObject | ||
from qt_compat import qt_config | ||
|
||
if qt_config == 5: | ||
from PyQt5.QtCore import pyqtSignal, QObject | ||
elif qt_config == 6: | ||
from PyQt6.QtCore import pyqtSignal, QObject | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Custom) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla Backend utils | ||
# Copyright (C) 2011-2024 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
@@ -28,7 +14,11 @@ | |
POINTER | ||
) | ||
|
||
from sip import unwrapinstance | ||
try: | ||
from sip import unwrapinstance | ||
except ImportError: | ||
def unwrapinstance(_): | ||
return None | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Custom) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Carla host code | ||
# Copyright (C) 2011-2022 Filipe Coelho <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of | ||
# the License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <[email protected]> | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Global) | ||
|
@@ -29,23 +15,78 @@ | |
) | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (PyQt5) | ||
# Imports (PyQt) | ||
|
||
# This fails in some configurations, assume >= 5.6.0 in that case | ||
try: | ||
from PyQt5.Qt import PYQT_VERSION | ||
except ImportError: | ||
PYQT_VERSION = 0x50600 | ||
from qt_compat import qt_config | ||
|
||
from PyQt5.QtCore import ( | ||
QT_VERSION, qCritical, QBuffer, QEventLoop, QFileInfo, QIODevice, QMimeData, QModelIndex, QPointF, QTimer, QEvent | ||
) | ||
from PyQt5.QtGui import ( | ||
QImage, QImageWriter, QPainter, QPalette, QBrush | ||
) | ||
from PyQt5.QtWidgets import ( | ||
QAction, QApplication, QInputDialog, QFileSystemModel, QListWidgetItem, QGraphicsView, QMainWindow | ||
) | ||
if qt_config == 5: | ||
# This fails in some configurations, assume >= 5.6.0 in that case | ||
try: | ||
from PyQt5.Qt import PYQT_VERSION | ||
except ImportError: | ||
PYQT_VERSION = 0x50600 | ||
|
||
from PyQt5.QtCore import ( | ||
QT_VERSION, | ||
qCritical, | ||
QBuffer, | ||
QEvent, | ||
QEventLoop, | ||
QFileInfo, | ||
QIODevice, | ||
QMimeData, | ||
QModelIndex, | ||
QPointF, | ||
QTimer, | ||
) | ||
from PyQt5.QtGui import ( | ||
QBrush, | ||
QImage, | ||
QImageWriter, | ||
QPainter, | ||
QPalette, | ||
) | ||
from PyQt5.QtWidgets import ( | ||
QAction, | ||
QApplication, | ||
QInputDialog, | ||
QFileSystemModel, | ||
QListWidgetItem, | ||
QGraphicsView, | ||
QMainWindow, | ||
) | ||
|
||
elif qt_config == 6: | ||
from PyQt6.QtCore import ( | ||
PYQT_VERSION, | ||
QT_VERSION, | ||
qCritical, | ||
QBuffer, | ||
QEvent, | ||
QEventLoop, | ||
QFileInfo, | ||
QIODevice, | ||
QMimeData, | ||
QModelIndex, | ||
QPointF, | ||
QTimer, | ||
) | ||
from PyQt6.QtGui import ( | ||
QAction, | ||
QBrush, | ||
QFileSystemModel, | ||
QImage, | ||
QImageWriter, | ||
QPainter, | ||
QPalette, | ||
) | ||
from PyQt6.QtWidgets import ( | ||
QApplication, | ||
QInputDialog, | ||
QListWidgetItem, | ||
QGraphicsView, | ||
QMainWindow, | ||
) | ||
|
||
# ------------------------------------------------------------------------------------------------------------ | ||
# Imports (Custom) | ||
|
@@ -1595,7 +1636,7 @@ def setupCanvas(self): | |
self.ui.graphicsView.setRenderHint(QPainter.SmoothPixmapTransform, fullAA) | ||
self.ui.graphicsView.setRenderHint(QPainter.TextAntialiasing, fullAA) | ||
|
||
if self.fSavedSettings[CARLA_KEY_CANVAS_USE_OPENGL] and hasGL: | ||
if self.fSavedSettings[CARLA_KEY_CANVAS_USE_OPENGL] and hasGL and QPainter.HighQualityAntialiasing is not None: | ||
self.ui.graphicsView.setRenderHint(QPainter.HighQualityAntialiasing, self.fSavedSettings[CARLA_KEY_CANVAS_HQ_ANTIALIASING]) | ||
|
||
else: | ||
|
Oops, something went wrong.