Signed-off-by: falkTX <falktx@gmail.com>tags/v2.1-alpha1-winvst
| @@ -21,10 +21,12 @@ $ make install PREFIX=/usr DESTDIR=./test-dir | |||||
| There are no required build dependencies. | There are no required build dependencies. | ||||
| But if you want the frontend (which is likely), you will need PyQt4/5 (python3 version) | |||||
| But if you want the frontend (which is likely), you will need PyQt5 (python3 version). | |||||
| You likely will also want: | |||||
| - libmagic (for auto-detection of binary types, needed for plugin-bridges) | - libmagic (for auto-detection of binary types, needed for plugin-bridges) | ||||
| - liblo (for OSC support) | |||||
| - liblo (for OSC support, also a requirement for DSSI UIs) | |||||
| Optional for extra Linux-only engine features: | Optional for extra Linux-only engine features: | ||||
| @@ -323,6 +323,7 @@ ifeq ($(HAVE_PYQT),true) | |||||
| install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps | install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps | ||||
| install -d $(DESTDIR)$(DATADIR)/mime/packages | install -d $(DESTDIR)$(DATADIR)/mime/packages | ||||
| install -d $(DESTDIR)$(DATADIR)/carla/resources | install -d $(DESTDIR)$(DATADIR)/carla/resources | ||||
| install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas | |||||
| install -d $(DESTDIR)$(DATADIR)/carla/widgets | install -d $(DESTDIR)$(DATADIR)/carla/widgets | ||||
| endif | endif | ||||
| @@ -437,6 +438,10 @@ endif | |||||
| source/frontend/*.py \ | source/frontend/*.py \ | ||||
| $(DESTDIR)$(DATADIR)/carla/ | $(DESTDIR)$(DATADIR)/carla/ | ||||
| install -m 644 \ | |||||
| source/frontend/patchcanvas/*.py \ | |||||
| $(DESTDIR)$(DATADIR)/carla/patchcanvas/ | |||||
| install -m 644 \ | install -m 644 \ | ||||
| source/frontend/widgets/*.py \ | source/frontend/widgets/*.py \ | ||||
| $(DESTDIR)$(DATADIR)/carla/widgets/ | $(DESTDIR)$(DATADIR)/carla/widgets/ | ||||
| @@ -492,11 +497,11 @@ endif | |||||
| install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps | install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps | ||||
| # Install resources (re-use python files) | # Install resources (re-use python files) | ||||
| $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources | |||||
| $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_config.py $(DESTDIR)$(DATADIR)/carla/resources | |||||
| $(LINK) ../carla_control.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_control.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_database.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| @@ -506,8 +511,6 @@ endif | |||||
| $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../patchcanvas.py $(DESTDIR)$(DATADIR)/carla/resources | |||||
| $(LINK) ../patchcanvas_theme.py $(DESTDIR)$(DATADIR)/carla/resources | |||||
| $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources | $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources | ||||
| @@ -636,16 +639,10 @@ mZ=[ | |||||
| mE=] | mE=] | ||||
| endif | endif | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| FEV="Qt4" | |||||
| else | |||||
| FEV="Qt5" | |||||
| endif | |||||
| features_print_main: | features_print_main: | ||||
| @printf -- "$(tS)---> Main features $(tE)\n" | @printf -- "$(tS)---> Main features $(tE)\n" | ||||
| ifeq ($(HAVE_PYQT),true) | ifeq ($(HAVE_PYQT),true) | ||||
| @printf -- "Front-End: $(ANS_YES) (Using $(FEV))\n" | |||||
| @printf -- "Front-End: $(ANS_YES)\n" | |||||
| ifneq ($(WIN32),true) | ifneq ($(WIN32),true) | ||||
| @printf -- "LV2 plugin: $(ANS_YES)\n" | @printf -- "LV2 plugin: $(ANS_YES)\n" | ||||
| else | else | ||||
| @@ -174,12 +174,8 @@ CXXFLAGS += -isystem /usr/include/glib-2.0 | |||||
| CXXFLAGS += -isystem /usr/include/glib-2.0/glib | CXXFLAGS += -isystem /usr/include/glib-2.0/glib | ||||
| CXXFLAGS += -isystem /usr/include/gtk-2.0 | CXXFLAGS += -isystem /usr/include/gtk-2.0 | ||||
| CXXFLAGS += -isystem /usr/include/gtk-2.0/gio | CXXFLAGS += -isystem /usr/include/gtk-2.0/gio | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| CXXFLAGS += -isystem /usr/include/qt4 | |||||
| else | |||||
| CXXFLAGS += -isystem /usr/include/qt5 | CXXFLAGS += -isystem /usr/include/qt5 | ||||
| endif | endif | ||||
| endif | |||||
| ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
| BASE_FLAGS += -isystem /opt/kxstudio/include | BASE_FLAGS += -isystem /opt/kxstudio/include | ||||
| CXXFLAGS += -isystem /System/Library/Frameworks | CXXFLAGS += -isystem /System/Library/Frameworks | ||||
| @@ -280,54 +276,23 @@ endif | |||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Set PyQt tools | # Set PyQt tools | ||||
| PYRCC4 ?= $(shell which pyrcc4 2>/dev/null) | |||||
| PYUIC4 ?= $(shell which pyuic4 2>/dev/null) | |||||
| PYRCC5 ?= $(shell which pyrcc5 2>/dev/null) | PYRCC5 ?= $(shell which pyrcc5 2>/dev/null) | ||||
| PYUIC5 ?= $(shell which pyuic5 2>/dev/null) | PYUIC5 ?= $(shell which pyuic5 2>/dev/null) | ||||
| HAVE_PYQT4=false | |||||
| HAVE_PYQT5=false | |||||
| ifneq ($(PYUIC4),) | |||||
| ifneq ($(PYRCC4),) | |||||
| HAVE_PYQT=true | |||||
| HAVE_PYQT4=true | |||||
| endif | |||||
| endif | |||||
| ifneq ($(PYUIC5),) | ifneq ($(PYUIC5),) | ||||
| ifneq ($(PYRCC5),) | ifneq ($(PYRCC5),) | ||||
| HAVE_PYQT=true | HAVE_PYQT=true | ||||
| HAVE_PYQT5=true | |||||
| endif | |||||
| endif | endif | ||||
| # --------------------------------------------------------------------------------------------------------------------- | |||||
| # Set default Qt used in frontend | |||||
| ifeq ($(HAVE_PYQT5),true) | |||||
| DEFAULT_QT ?= 5 | |||||
| else | |||||
| DEFAULT_QT ?= 4 | |||||
| endif | endif | ||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Set PyQt tools, part2 | # Set PyQt tools, part2 | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| PYUIC ?= pyuic4 -w | |||||
| PYRCC ?= pyrcc4 -py3 | |||||
| ifeq ($(HAVE_QT4),true) | |||||
| HAVE_THEME = true | |||||
| endif | |||||
| else | |||||
| PYUIC ?= pyuic5 | PYUIC ?= pyuic5 | ||||
| PYRCC ?= pyrcc5 | PYRCC ?= pyrcc5 | ||||
| ifeq ($(HAVE_QT5),true) | ifeq ($(HAVE_QT5),true) | ||||
| HAVE_THEME = true | HAVE_THEME = true | ||||
| endif | endif | ||||
| endif | |||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Set base defines | # Set base defines | ||||
| @@ -45,13 +45,12 @@ UIs = \ | |||||
| # Resources | # Resources | ||||
| RES = \ | RES = \ | ||||
| carla_config.py \ | |||||
| resources_rc.py \ | resources_rc.py \ | ||||
| $(BINDIR)/resources/patchcanvas \ | |||||
| $(BINDIR)/resources/widgets \ | $(BINDIR)/resources/widgets \ | ||||
| $(BINDIR)/resources/carla_app.py \ | $(BINDIR)/resources/carla_app.py \ | ||||
| $(BINDIR)/resources/carla_backend.py \ | $(BINDIR)/resources/carla_backend.py \ | ||||
| $(BINDIR)/resources/carla_backend_qt.py \ | $(BINDIR)/resources/carla_backend_qt.py \ | ||||
| $(BINDIR)/resources/carla_config.py \ | |||||
| $(BINDIR)/resources/carla_control.py \ | $(BINDIR)/resources/carla_control.py \ | ||||
| $(BINDIR)/resources/carla_database.py \ | $(BINDIR)/resources/carla_database.py \ | ||||
| $(BINDIR)/resources/carla_host.py \ | $(BINDIR)/resources/carla_host.py \ | ||||
| @@ -61,8 +60,6 @@ RES = \ | |||||
| $(BINDIR)/resources/carla_utils.py \ | $(BINDIR)/resources/carla_utils.py \ | ||||
| $(BINDIR)/resources/carla_widgets.py \ | $(BINDIR)/resources/carla_widgets.py \ | ||||
| $(BINDIR)/resources/externalui.py \ | $(BINDIR)/resources/externalui.py \ | ||||
| $(BINDIR)/resources/patchcanvas.py \ | |||||
| $(BINDIR)/resources/patchcanvas_theme.py \ | |||||
| $(BINDIR)/resources/resources_rc.py \ | $(BINDIR)/resources/resources_rc.py \ | ||||
| $(BINDIR)/resources/ui_carla_about.py \ | $(BINDIR)/resources/ui_carla_about.py \ | ||||
| $(BINDIR)/resources/ui_carla_add_jack.py \ | $(BINDIR)/resources/ui_carla_add_jack.py \ | ||||
| @@ -90,15 +87,6 @@ all: $(UIs) $(RES) | |||||
| ui_%.py: $(RESDIR)/ui/%.ui | ui_%.py: $(RESDIR)/ui/%.ui | ||||
| $(PYUIC) $< -o $@ | $(PYUIC) $< -o $@ | ||||
| carla_config.py: | |||||
| @echo "#!/usr/bin/env python3" > $@ | |||||
| @echo "# -*- coding: utf-8 -*-" >> $@ | |||||
| ifeq ($(DEFAULT_QT),4) | |||||
| @echo "config_UseQt5 = False" >> $@ | |||||
| else | |||||
| @echo "config_UseQt5 = True" >> $@ | |||||
| endif | |||||
| resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg | resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg | ||||
| $(PYRCC) $< -o $@ | $(PYRCC) $< -o $@ | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla application | # Carla application | ||||
| # Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,21 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt, QCoreApplication, QSettings | |||||
| from PyQt5.QtGui import QColor, QPalette | |||||
| from PyQt5.QtWidgets import QApplication | |||||
| else: | |||||
| from PyQt4.QtCore import Qt, QCoreApplication, QSettings | |||||
| from PyQt4.QtGui import QApplication, QColor, QPalette | |||||
| from PyQt5.QtCore import Qt, QCoreApplication, QSettings | |||||
| from PyQt5.QtGui import QColor, QPalette | |||||
| from PyQt5.QtWidgets import QApplication | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -58,19 +49,13 @@ class CarlaApplication(object): | |||||
| QApplication.addLibraryPath(pathBinaries) | QApplication.addLibraryPath(pathBinaries) | ||||
| stylesDir = pathBinaries | stylesDir = pathBinaries | ||||
| # If style is not available we can still fake it in Qt5 | |||||
| elif config_UseQt5: | |||||
| stylesDir = "" | |||||
| # If style is not available we can still fake it | |||||
| else: | else: | ||||
| self.createApp(appName) | |||||
| return | |||||
| forceTheme = MACOS or (WINDOWS and not config_UseQt5) | |||||
| stylesDir = "" | |||||
| # base settings | # base settings | ||||
| settings = QSettings("falkTX", appName) | settings = QSettings("falkTX", appName) | ||||
| useProTheme = forceTheme or settings.value(CARLA_KEY_MAIN_USE_PRO_THEME, CARLA_DEFAULT_MAIN_USE_PRO_THEME, type=bool) | |||||
| useProTheme = MACOS or settings.value(CARLA_KEY_MAIN_USE_PRO_THEME, CARLA_DEFAULT_MAIN_USE_PRO_THEME, type=bool) | |||||
| if not useProTheme: | if not useProTheme: | ||||
| self.createApp(appName) | self.createApp(appName) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla Backend code (Qt stuff) | # Carla Backend code (Qt stuff) | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,18 +16,10 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, QObject | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, QObject | |||||
| from PyQt5.QtCore import pyqtSignal, QObject | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla plugin database code | # Carla plugin database code | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,23 +16,14 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ---------------------------------------------------------------------------------------------------------------------- | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ---------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------- | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from copy import deepcopy | from copy import deepcopy | ||||
| from subprocess import Popen, PIPE | from subprocess import Popen, PIPE | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEventLoop, QThread, QSettings | |||||
| from PyQt5.QtWidgets import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QEventLoop, QThread, QSettings | |||||
| from PyQt4.QtGui import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEventLoop, QThread, QSettings | |||||
| from PyQt5.QtWidgets import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem | |||||
| # ---------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------- | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -1338,7 +1329,7 @@ class PluginDatabaseW(QDialog): | |||||
| def slot_saveSettings(self): | def slot_saveSettings(self): | ||||
| settings = QSettings("falkTX", "CarlaDatabase2") | settings = QSettings("falkTX", "CarlaDatabase2") | ||||
| settings.setValue("PluginDatabase/Geometry", self.saveGeometry()) | settings.setValue("PluginDatabase/Geometry", self.saveGeometry()) | ||||
| settings.setValue("PluginDatabase/TableGeometry%s" % ("_5" if config_UseQt5 else "_4"), self.ui.tableWidget.horizontalHeader().saveState()) | |||||
| settings.setValue("PluginDatabase/TableGeometry_5", self.ui.tableWidget.horizontalHeader().saveState()) | |||||
| settings.setValue("PluginDatabase/ShowFilters", (self.ui.tb_filters.arrowType() == Qt.UpArrow)) | settings.setValue("PluginDatabase/ShowFilters", (self.ui.tb_filters.arrowType() == Qt.UpArrow)) | ||||
| settings.setValue("PluginDatabase/ShowEffects", self.ui.ch_effects.isChecked()) | settings.setValue("PluginDatabase/ShowEffects", self.ui.ch_effects.isChecked()) | ||||
| settings.setValue("PluginDatabase/ShowInstruments", self.ui.ch_instruments.isChecked()) | settings.setValue("PluginDatabase/ShowInstruments", self.ui.ch_instruments.isChecked()) | ||||
| @@ -1381,7 +1372,7 @@ class PluginDatabaseW(QDialog): | |||||
| self.ui.ch_stereo.setChecked(settings.value("PluginDatabase/ShowStereoOnly", False, type=bool)) | self.ui.ch_stereo.setChecked(settings.value("PluginDatabase/ShowStereoOnly", False, type=bool)) | ||||
| self.ui.lineEdit.setText(settings.value("PluginDatabase/SearchText", "", type=str)) | self.ui.lineEdit.setText(settings.value("PluginDatabase/SearchText", "", type=str)) | ||||
| tableGeometry = settings.value("PluginDatabase/TableGeometry%s" % ("_5" if config_UseQt5 else "_4")) | |||||
| tableGeometry = settings.value("PluginDatabase/TableGeometry_5") | |||||
| if tableGeometry: | if tableGeometry: | ||||
| self.ui.tableWidget.horizontalHeader().restoreState(tableGeometry) | self.ui.tableWidget.horizontalHeader().restoreState(tableGeometry) | ||||
| else: | else: | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla host code | # Carla host code | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,24 +16,14 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| import json | import json | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import qCritical, QEventLoop, QFileInfo, QModelIndex, QPointF, QTimer, QEvent | |||||
| from PyQt5.QtGui import QImage, QPalette, QBrush | |||||
| from PyQt5.QtWidgets import QAction, QApplication, QInputDialog, QFileSystemModel, QListWidgetItem, QMainWindow | |||||
| else: | |||||
| from PyQt4.QtCore import qCritical, QEventLoop, QFileInfo, QModelIndex, QPointF, QTimer, QEvent | |||||
| from PyQt4.QtGui import QImage, QPalette, QBrush | |||||
| from PyQt4.QtGui import QAction, QApplication, QInputDialog, QFileSystemModel, QListWidgetItem, QMainWindow | |||||
| from PyQt5.QtCore import qCritical, QEventLoop, QFileInfo, QModelIndex, QPointF, QTimer, QEvent | |||||
| from PyQt5.QtGui import QImage, QPalette, QBrush | |||||
| from PyQt5.QtWidgets import QAction, QApplication, QInputDialog, QFileSystemModel, QListWidgetItem, QMainWindow | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -54,10 +44,7 @@ from widgets.pixmapkeyboard import PixmapKeyboardHArea | |||||
| # Try Import OpenGL | # Try Import OpenGL | ||||
| try: | try: | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtOpenGL import QGLWidget | |||||
| else: | |||||
| from PyQt4.QtOpenGL import QGLWidget | |||||
| from PyQt5.QtOpenGL import QGLWidget | |||||
| hasGL = True | hasGL = True | ||||
| except: | except: | ||||
| hasGL = False | hasGL = False | ||||
| @@ -724,10 +711,9 @@ class HostWindow(QMainWindow): | |||||
| @pyqtSlot() | @pyqtSlot() | ||||
| def slot_fileOpen(self): | def slot_fileOpen(self): | ||||
| fileFilter = self.tr("Carla Project File (*.carxp);;Carla Preset File (*.carxs)") | fileFilter = self.tr("Carla Project File (*.carxp);;Carla Preset File (*.carxs)") | ||||
| filename = QFileDialog.getOpenFileName(self, self.tr("Open Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) | |||||
| filename, ok = QFileDialog.getOpenFileName(self, self.tr("Open Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) | |||||
| if config_UseQt5: | |||||
| filename = filename[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not filename: | if not filename: | ||||
| return | return | ||||
| @@ -755,10 +741,9 @@ class HostWindow(QMainWindow): | |||||
| return self.saveProjectNow() | return self.saveProjectNow() | ||||
| fileFilter = self.tr("Carla Project File (*.carxp)") | fileFilter = self.tr("Carla Project File (*.carxp)") | ||||
| filename = QFileDialog.getSaveFileName(self, self.tr("Save Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) | |||||
| filename, ok = QFileDialog.getSaveFileName(self, self.tr("Save Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) | |||||
| if config_UseQt5: | |||||
| filename = filename[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not filename: | if not filename: | ||||
| return | return | ||||
| @@ -1010,38 +995,11 @@ class HostWindow(QMainWindow): | |||||
| def showPluginActionsMenu(self): | def showPluginActionsMenu(self): | ||||
| menu = QMenu(self) | menu = QMenu(self) | ||||
| if config_UseQt5: | |||||
| menu.addSection("Plugins") | |||||
| else: | |||||
| # fake section | |||||
| act = menu.addAction(" Plugins") | |||||
| font = act.font() | |||||
| font.setBold(True) | |||||
| act.setFont(font) | |||||
| act.setEnabled(False) | |||||
| menu.addSeparator() | |||||
| menu.addSection("Plugins") | |||||
| menu.addAction(self.ui.act_plugin_add) | menu.addAction(self.ui.act_plugin_add) | ||||
| menu.addAction(self.ui.act_plugin_remove_all) | menu.addAction(self.ui.act_plugin_remove_all) | ||||
| if config_UseQt5: | |||||
| menu.addSection("All plugins (macros)") | |||||
| else: | |||||
| # fake space | |||||
| act = menu.addAction(" ") | |||||
| font = act.font() | |||||
| font.setBold(True) | |||||
| font.setPointSize(font.pointSize()/2) | |||||
| act.setEnabled(False) | |||||
| # fake section | |||||
| act = menu.addAction(" All plugins (macros)") | |||||
| font = act.font() | |||||
| font.setBold(True) | |||||
| act.setFont(font) | |||||
| act.setEnabled(False) | |||||
| menu.addSeparator() | |||||
| menu.addSection("All plugins (macros)") | |||||
| menu.addAction(self.ui.act_plugins_enable) | menu.addAction(self.ui.act_plugins_enable) | ||||
| menu.addAction(self.ui.act_plugins_disable) | menu.addAction(self.ui.act_plugins_disable) | ||||
| menu.addSeparator() | menu.addSeparator() | ||||
| @@ -1389,10 +1347,9 @@ class HostWindow(QMainWindow): | |||||
| @pyqtSlot() | @pyqtSlot() | ||||
| def slot_canvasSaveImage(self): | def slot_canvasSaveImage(self): | ||||
| newPath = QFileDialog.getSaveFileName(self, self.tr("Save Image"), filter=self.tr("PNG Image (*.png);;JPEG Image (*.jpg)")) | |||||
| newPath, ok = QFileDialog.getSaveFileName(self, self.tr("Save Image"), filter=self.tr("PNG Image (*.png);;JPEG Image (*.jpg)")) | |||||
| if config_UseQt5: | |||||
| newPath = newPath[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not newPath: | if not newPath: | ||||
| return | return | ||||
| @@ -2613,18 +2570,17 @@ def engineCallback(host, action, pluginId, value1, value2, value3, valueStr): | |||||
| # File callback | # File callback | ||||
| def fileCallback(ptr, action, isDir, title, filter): | def fileCallback(ptr, action, isDir, title, filter): | ||||
| ret = ("", "") if config_UseQt5 else "" | |||||
| title = charPtrToString(title) | title = charPtrToString(title) | ||||
| filter = charPtrToString(filter) | filter = charPtrToString(filter) | ||||
| if action == FILE_CALLBACK_OPEN: | if action == FILE_CALLBACK_OPEN: | ||||
| ret = QFileDialog.getOpenFileName(gCarla.gui, title, "", filter) #, QFileDialog.ShowDirsOnly if isDir else 0x0) | |||||
| ret, ok = QFileDialog.getOpenFileName(gCarla.gui, title, "", filter) #, QFileDialog.ShowDirsOnly if isDir else 0x0) | |||||
| elif action == FILE_CALLBACK_SAVE: | elif action == FILE_CALLBACK_SAVE: | ||||
| ret = QFileDialog.getSaveFileName(gCarla.gui, title, "", filter, QFileDialog.ShowDirsOnly if isDir else 0x0) | |||||
| ret, ok = QFileDialog.getSaveFileName(gCarla.gui, title, "", filter, QFileDialog.ShowDirsOnly if isDir else 0x0) | |||||
| else: | |||||
| ret, ok = ("", "") | |||||
| if config_UseQt5: | |||||
| ret = ret[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not ret: | if not ret: | ||||
| return None | return None | ||||
| @@ -2717,9 +2673,7 @@ def initHost(initName, libPrefix, isControl, isPlugin, failError, HostClass = No | |||||
| sys.stdout = CarlaPrint(False) | sys.stdout = CarlaPrint(False) | ||||
| sys.stderr = CarlaPrint(True) | sys.stderr = CarlaPrint(True) | ||||
| if config_UseQt5: | |||||
| sys.excepthook = sys_excepthook | |||||
| sys.excepthook = sys_excepthook | |||||
| # -------------------------------------------------------------------------------------------------------- | # -------------------------------------------------------------------------------------------------------- | ||||
| # Done | # Done | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla settings code | # Carla settings code | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,22 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSlot, QByteArray, QDir, QSettings | |||||
| from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, QByteArray, QDir, QSettings | |||||
| from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath | |||||
| from PyQt4.QtGui import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| from PyQt5.QtCore import pyqtSlot, QByteArray, QDir, QSettings | |||||
| from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath | |||||
| from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -249,7 +239,7 @@ class CarlaSettingsW(QDialog): | |||||
| for i in range(Theme.THEME_MAX): | for i in range(Theme.THEME_MAX): | ||||
| self.ui.cb_canvas_theme.addItem(getThemeName(i)) | self.ui.cb_canvas_theme.addItem(getThemeName(i)) | ||||
| if MACOS or (WINDOWS and not config_UseQt5): | |||||
| if MACOS: | |||||
| self.ui.group_main_theme.setEnabled(False) | self.ui.group_main_theme.setEnabled(False) | ||||
| self.ui.group_main_theme.setVisible(False) | self.ui.group_main_theme.setVisible(False) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Common Carla code | # Common Carla code | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -17,9 +17,7 @@ | |||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # Config | |||||
| # These will be modified during install | # These will be modified during install | ||||
| X_LIBDIR_X = None | X_LIBDIR_X = None | ||||
| @@ -31,15 +29,10 @@ X_DATADIR_X = None | |||||
| import os | import os | ||||
| import sys | import sys | ||||
| if config_UseQt5: | |||||
| from PyQt5.Qt import PYQT_VERSION_STR | |||||
| from PyQt5.QtCore import qFatal, qVersion, qWarning, QDir | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QFileDialog, QMessageBox | |||||
| else: | |||||
| from PyQt4.Qt import PYQT_VERSION_STR | |||||
| from PyQt4.QtCore import qFatal, qVersion, qWarning, QDir | |||||
| from PyQt4.QtGui import QFileDialog, QIcon, QMessageBox | |||||
| from PyQt5.Qt import PYQT_VERSION_STR | |||||
| from PyQt5.QtCore import qFatal, qVersion, qWarning, QDir | |||||
| from PyQt5.QtGui import QIcon | |||||
| from PyQt5.QtWidgets import QFileDialog, QMessageBox | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Import Signal | # Import Signal | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla plugin/slot skin code | # Carla plugin/slot skin code | ||||
| # Copyright (C) 2013-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,22 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt, QRectF, QLineF | |||||
| from PyQt5.QtGui import QFont, QFontDatabase, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QColorDialog, QFrame, QPushButton | |||||
| else: | |||||
| from PyQt4.QtCore import Qt, QRectF, QLineF | |||||
| from PyQt4.QtGui import QFont, QFontDatabase, QPen, QPixmap | |||||
| from PyQt4.QtGui import QColorDialog, QFrame, QPushButton | |||||
| from PyQt5.QtCore import Qt, QRectF, QLineF | |||||
| from PyQt5.QtGui import QFont, QFontDatabase, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QColorDialog, QFrame, QPushButton | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla widgets code | # Carla widgets code | ||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,22 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings, QTimer | |||||
| from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath, QPalette, QPixmap | |||||
| from PyQt5.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings, QTimer | |||||
| from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath, QPalette, QPixmap | |||||
| from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QByteArray, QSettings, QTimer | |||||
| from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath, QPalette, QPixmap | |||||
| from PyQt5.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -76,7 +66,7 @@ class CarlaAboutW(QDialog): | |||||
| self.ui.l_about.setText(self.tr("" | self.ui.l_about.setText(self.tr("" | ||||
| "<br>Version %s" | "<br>Version %s" | ||||
| "<br>Carla is a fully-featured audio plugin host%s.<br>" | "<br>Carla is a fully-featured audio plugin host%s.<br>" | ||||
| "<br>Copyright (C) 2011-2018 falkTX<br>" | |||||
| "<br>Copyright (C) 2011-2019 falkTX<br>" | |||||
| "" % (VERSION, extraInfo))) | "" % (VERSION, extraInfo))) | ||||
| if self.ui.about.palette().color(QPalette.Background).blackF() < 0.5: | if self.ui.about.palette().color(QPalette.Background).blackF() < 0.5: | ||||
| @@ -686,6 +676,7 @@ class PluginEdit(QDialog): | |||||
| if not self.ui.scrollArea.isEnabled(): | if not self.ui.scrollArea.isEnabled(): | ||||
| self.resize(self.width(), self.height()-self.ui.scrollArea.height()) | self.resize(self.width(), self.height()-self.ui.scrollArea.height()) | ||||
| # FIXME: See if this is still needed | |||||
| # Workaround for a Qt4 bug, see https://bugreports.qt-project.org/browse/QTBUG-7792 | # Workaround for a Qt4 bug, see https://bugreports.qt-project.org/browse/QTBUG-7792 | ||||
| if LINUX: QTimer.singleShot(0, self.slot_fixNameWordWrap) | if LINUX: QTimer.singleShot(0, self.slot_fixNameWordWrap) | ||||
| @@ -1150,10 +1141,9 @@ class PluginEdit(QDialog): | |||||
| self.fCurrentStateFilename = None | self.fCurrentStateFilename = None | ||||
| fileFilter = self.tr("Carla State File (*.carxs)") | fileFilter = self.tr("Carla State File (*.carxs)") | ||||
| filename = QFileDialog.getSaveFileName(self, self.tr("Save Plugin State File"), filter=fileFilter) | |||||
| filename, ok = QFileDialog.getSaveFileName(self, self.tr("Save Plugin State File"), filter=fileFilter) | |||||
| if config_UseQt5: | |||||
| filename = filename[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not filename: | if not filename: | ||||
| return | return | ||||
| @@ -1181,10 +1171,9 @@ class PluginEdit(QDialog): | |||||
| return | return | ||||
| fileFilter = self.tr("Carla State File (*.carxs)") | fileFilter = self.tr("Carla State File (*.carxs)") | ||||
| filename = QFileDialog.getOpenFileName(self, self.tr("Open Plugin State File"), filter=fileFilter) | |||||
| filename, ok = QFileDialog.getOpenFileName(self, self.tr("Open Plugin State File"), filter=fileFilter) | |||||
| if config_UseQt5: | |||||
| filename = filename[0] | |||||
| # FIXME use ok value, test if it works as expected | |||||
| if not filename: | if not filename: | ||||
| return | return | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Custom Mini Canvas Preview, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Custom Mini Canvas Preview, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,24 +16,14 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from math import floor, ceil | from math import floor, ceil | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, Qt, QRectF, QTimer, QEvent, QPoint | |||||
| from PyQt5.QtGui import QBrush, QColor, QCursor, QPainter, QPainterPath, QPen, QCursor, QPixmap | |||||
| from PyQt5.QtWidgets import QFrame, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, Qt, QRectF, QTimer, QEvent, QPoint | |||||
| from PyQt4.QtGui import QBrush, QColor, QCursor, QPainter, QPainterPath, QPen, QCursor, QPixmap | |||||
| from PyQt5.QtGui import QFrame, QWidget | |||||
| from PyQt5.QtCore import pyqtSignal, Qt, QRectF, QTimer, QEvent, QPoint | |||||
| from PyQt5.QtGui import QBrush, QColor, QCursor, QPainter, QPainterPath, QPen, QCursor, QPixmap | |||||
| from PyQt5.QtWidgets import QFrame, QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Antialiasing settings | # Antialiasing settings | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Digital Peak Meter, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2015 Filipe Coelho <falktx@falktx.com> | |||||
| # Digital Peak Meter, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,23 +16,14 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from math import sqrt | from math import sqrt | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import qCritical, Qt, QTimer, QSize | |||||
| from PyQt5.QtGui import QColor, QLinearGradient, QPainter, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import qCritical, Qt, QTimer, QSize | |||||
| from PyQt4.QtGui import QColor, QLinearGradient, QPainter, QPen, QPixmap, QWidget | |||||
| from PyQt5.QtCore import qCritical, Qt, QTimer, QSize | |||||
| from PyQt5.QtGui import QColor, QLinearGradient, QPainter, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -461,11 +452,7 @@ class DigitalPeakMeter(QWidget): | |||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||
| import sys | import sys | ||||
| import resources_rc | import resources_rc | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtWidgets import QApplication | |||||
| else: | |||||
| from PyQt4.QtGui import QApplication | |||||
| from PyQt5.QtWidgets import QApplication | |||||
| app = QApplication(sys.argv) | app = QApplication(sys.argv) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Middle-click draggable QGraphicsView | # Middle-click draggable QGraphicsView | ||||
| # Copyright (C) 2016 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2016-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,21 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt | |||||
| from PyQt5.QtGui import QCursor, QMouseEvent | |||||
| from PyQt5.QtWidgets import QGraphicsView | |||||
| else: | |||||
| from PyQt4.QtCore import Qt | |||||
| from PyQt4.QtGui import QCursor, QGraphicsView, QMouseEvent | |||||
| from PyQt5.QtCore import Qt | |||||
| from PyQt5.QtGui import QCursor, QMouseEvent | |||||
| from PyQt5.QtWidgets import QGraphicsView | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # LED Button, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # LED Button, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,21 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import QRectF | |||||
| from PyQt5.QtGui import QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QPushButton | |||||
| else: | |||||
| from PyQt4.QtCore import QRectF | |||||
| from PyQt4.QtGui import QPainter, QPixmap, QPushButton | |||||
| from PyQt5.QtCore import QRectF | |||||
| from PyQt5.QtGui import QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QPushButton | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python | #!/usr/bin/env python | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Parameter SpinBox, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Parameter SpinBox, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,24 +16,15 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from math import isnan, modf | from math import isnan, modf | ||||
| from random import random | from random import random | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt5.QtGui import QCursor, QPalette | |||||
| from PyQt5.QtWidgets import QAbstractSpinBox, QApplication, QComboBox, QDialog, QMenu, QProgressBar | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt4.QtGui import QAbstractSpinBox, QApplication, QComboBox, QCursor, QDialog, QMenu, QProgressBar, QPalette | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer | |||||
| from PyQt5.QtGui import QCursor, QPalette | |||||
| from PyQt5.QtWidgets import QAbstractSpinBox, QApplication, QComboBox, QDialog, QMenu, QProgressBar | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # A piano roll viewer/editor | # A piano roll viewer/editor | ||||
| # Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2014-2015 Perry Nguyen | # Copyright (C) 2014-2015 Perry Nguyen | ||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| @@ -17,26 +17,14 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt, QRectF, QPointF, pyqtSignal | |||||
| from PyQt5.QtGui import QColor, QFont, QPen, QPainter | |||||
| from PyQt5.QtWidgets import QGraphicsItem, QGraphicsLineItem, QGraphicsOpacityEffect, QGraphicsRectItem, QGraphicsSimpleTextItem | |||||
| from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView | |||||
| from PyQt5.QtWidgets import QWidget, QLabel, QComboBox, QHBoxLayout, QVBoxLayout, QStyle | |||||
| else: | |||||
| from PyQt4.QtCore import Qt, QRectF, QPointF, pyqtSignal | |||||
| from PyQt4.QtGui import QColor, QFont, QPen, QPainter | |||||
| from PyQt4.QtGui import QGraphicsItem, QGraphicsLineItem, QGraphicsOpacityEffect, QGraphicsRectItem, QGraphicsSimpleTextItem | |||||
| from PyQt4.QtGui import QGraphicsScene, QGraphicsView | |||||
| from PyQt4.QtGui import QWidget, QLabel, QComboBox, QSlider, QHBoxLayout, QVBoxLayout, QStyle | |||||
| from PyQt5.QtCore import Qt, QRectF, QPointF, pyqtSignal | |||||
| from PyQt5.QtGui import QColor, QFont, QPen, QPainter | |||||
| from PyQt5.QtWidgets import QGraphicsItem, QGraphicsLineItem, QGraphicsOpacityEffect, QGraphicsRectItem, QGraphicsSimpleTextItem | |||||
| from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView | |||||
| from PyQt5.QtWidgets import QWidget, QLabel, QComboBox, QHBoxLayout, QVBoxLayout, QStyle | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Pixmap Button, a custom Qt4 widget | |||||
| # Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Pixmap Button, a custom Qt widget | |||||
| # Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,21 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import QPointF, QRectF | |||||
| from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QPushButton | |||||
| else: | |||||
| from PyQt4.QtCore import QPointF, QRectF | |||||
| from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap, QPushButton | |||||
| from PyQt5.QtCore import QPointF, QRectF | |||||
| from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QPushButton | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Pixmap Dial, a custom Qt widget | # Pixmap Dial, a custom Qt widget | ||||
| # Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,25 +16,15 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| from math import cos, floor, pi, sin | from math import cos, floor, pi, sin | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEvent, QPointF, QRectF, QTimer, QSize | |||||
| from PyQt5.QtGui import QColor, QConicalGradient, QFont, QFontMetrics | |||||
| from PyQt5.QtGui import QLinearGradient, QPainter, QPainterPath, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QDial | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QEvent, QPointF, QRectF, QTimer, QSize | |||||
| from PyQt4.QtGui import QColor, QConicalGradient, QFont, QFontMetrics | |||||
| from PyQt4.QtGui import QDial, QLinearGradient, QPainter, QPainterPath, QPen, QPixmap | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEvent, QPointF, QRectF, QTimer, QSize | |||||
| from PyQt5.QtGui import QColor, QConicalGradient, QFont, QFontMetrics | |||||
| from PyQt5.QtGui import QLinearGradient, QPainter, QPainterPath, QPen, QPixmap | |||||
| from PyQt5.QtWidgets import QDial | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Widget Class | # Widget Class | ||||
| @@ -512,11 +502,10 @@ class PixmapDial(QDial): | |||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||
| import sys | import sys | ||||
| from PyQt4.QtGui import QApplication | |||||
| from PyQt5.QtWidgets import QApplication | |||||
| import resources_rc | import resources_rc | ||||
| app = QApplication(sys.argv) | app = QApplication(sys.argv) | ||||
| gui = PixmapDial(None) | gui = PixmapDial(None) | ||||
| #gui.setEnabled(True) | #gui.setEnabled(True) | ||||
| #gui.setEnabled(False) | #gui.setEnabled(False) | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Pixmap Keyboard, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||||
| # Pixmap Keyboard, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,22 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSettings, QSize | |||||
| from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QMenu, QScrollArea, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSettings, QSize | |||||
| from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap | |||||
| from PyQt4.QtGui import QMenu, QScrollArea, QWidget | |||||
| from PyQt5.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSettings, QSize | |||||
| from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QMenu, QScrollArea, QWidget | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| @@ -1,8 +1,8 @@ | |||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Rack List Widget, a custom Qt4 widget | |||||
| # Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Rack List Widget, a custom Qt widget | |||||
| # Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,21 +16,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt, QSize, QRect, QEvent | |||||
| from PyQt5.QtGui import QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QAbstractItemView, QFrame, QListWidget, QListWidgetItem | |||||
| else: | |||||
| from PyQt4.QtCore import Qt, QSize, QRect, QEvent | |||||
| from PyQt4.QtGui import QAbstractItemView, QFrame, QListWidget, QListWidgetItem, QPainter, QPixmap | |||||
| from PyQt5.QtCore import Qt, QSize, QRect, QEvent | |||||
| from PyQt5.QtGui import QPainter, QPixmap | |||||
| from PyQt5.QtWidgets import QAbstractItemView, QFrame, QListWidget, QListWidgetItem | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla Native Plugins | # Carla Native Plugins | ||||
| # Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,18 +16,10 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import Qt | |||||
| else: | |||||
| from PyQt4.QtCore import Qt | |||||
| from PyQt5.QtCore import Qt | |||||
| # ----------------------------------------------------------------------- | # ----------------------------------------------------------------------- | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla plugin host (plugin UI) | # Carla plugin host (plugin UI) | ||||
| # Copyright (C) 2013-2016 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,19 +16,11 @@ | |||||
| # | # | ||||
| # 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 (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtGui import QKeySequence | |||||
| from PyQt5.QtWidgets import QHBoxLayout | |||||
| else: | |||||
| from PyQt4.QtGui import QHBoxLayout, QKeySequence | |||||
| from PyQt5.QtGui import QKeySequence | |||||
| from PyQt5.QtWidgets import QHBoxLayout | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom Stuff) | # Imports (Custom Stuff) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # A piano roll viewer/editor | # A piano roll viewer/editor | ||||
| # Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2014-2015 Perry Nguyen | # Copyright (C) 2014-2015 Perry Nguyen | ||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| @@ -17,21 +17,12 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSlot, Qt, QEvent | |||||
| from PyQt5.QtGui import QKeyEvent | |||||
| from PyQt5.QtWidgets import QMainWindow | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, Qt, QEvent | |||||
| from PyQt4.QtGui import QKeyEvent, QMainWindow | |||||
| from PyQt5.QtCore import pyqtSlot, Qt, QEvent | |||||
| from PyQt5.QtGui import QKeyEvent | |||||
| from PyQt5.QtWidgets import QMainWindow | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -2,7 +2,7 @@ | |||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
| # Carla Native Plugins | # Carla Native Plugins | ||||
| # Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||||
| # Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com> | |||||
| # | # | ||||
| # This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
| # modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
| @@ -16,20 +16,11 @@ | |||||
| # | # | ||||
| # For a full copy of the GNU General Public License see the doc/GPL.txt file. | # For a full copy of the GNU General Public License see the doc/GPL.txt file. | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Imports (Config) | |||||
| from carla_config import * | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Imports (Global) | # Imports (Global) | ||||
| if config_UseQt5: | |||||
| from PyQt5.QtCore import pyqtSlot, Qt | |||||
| from PyQt5.QtWidgets import QGridLayout, QLabel, QPushButton, QTextEdit, QWidget | |||||
| else: | |||||
| from PyQt4.QtCore import pyqtSlot, Qt | |||||
| from PyQt4.QtGui import QGridLayout, QLabel, QPushButton, QTextEdit, QWidget | |||||
| from PyQt5.QtCore import pyqtSlot, Qt | |||||
| from PyQt5.QtWidgets import QGridLayout, QLabel, QPushButton, QTextEdit, QWidget | |||||
| # ----------------------------------------------------------------------- | # ----------------------------------------------------------------------- | ||||
| # Imports (Custom) | # Imports (Custom) | ||||
| @@ -22,14 +22,6 @@ QT5_LINK_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widge | |||||
| QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles | QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles | ||||
| endif | endif | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| QT_STYLES_DIR = $(QT4_STYLES_DIR) | |||||
| SHARED_LINK_FLAGS = $(QT4_LINK_FLAGS) | |||||
| else | |||||
| QT_STYLES_DIR = $(QT5_STYLES_DIR) | |||||
| SHARED_LINK_FLAGS = $(QT5_LINK_FLAGS) | |||||
| endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
| @@ -50,12 +42,6 @@ FILES_qt5 = \ | |||||
| $(OBJDIR)/resources.qt5.cpp | $(OBJDIR)/resources.qt5.cpp | ||||
| endif | endif | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| FILES_shared = $(FILES_qt4) | |||||
| else | |||||
| FILES_shared = $(FILES_qt5) | |||||
| endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
| @@ -84,24 +70,12 @@ OBJS_qt5_shared = $(OBJS_qt5) \ | |||||
| $(OBJDIR)/moc_CarlaStylePlugin.qt5.cpp.o | $(OBJDIR)/moc_CarlaStylePlugin.qt5.cpp.o | ||||
| endif | endif | ||||
| ifeq ($(DEFAULT_QT),4) | |||||
| OBJS_shared = $(OBJS_qt4_shared) | |||||
| else | |||||
| OBJS_shared = $(OBJS_qt5_shared) | |||||
| endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| all: | |||||
| ifeq ($(DEFAULT_QT),4) | |||||
| ifeq ($(HAVE_QT4),true) | |||||
| all: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | |||||
| endif | |||||
| else # DEFAULT_QT | |||||
| ifeq ($(HAVE_QT5),true) | ifeq ($(HAVE_QT5),true) | ||||
| all: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | all: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | ||||
| endif | |||||
| else | |||||
| all: | |||||
| endif | endif | ||||
| qt4: $(MODULEDIR)/$(MODULENAME).qt4.a | qt4: $(MODULEDIR)/$(MODULENAME).qt4.a | ||||
| @@ -116,12 +90,8 @@ debug: | |||||
| $(MAKE) DEBUG=true | $(MAKE) DEBUG=true | ||||
| install: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | install: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | ||||
| install -d $(QT_STYLES_DIR) | |||||
| install -m 644 $^ $(QT_STYLES_DIR) | |||||
| install-main: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json | |||||
| install -d $(STYLES_DIR) | |||||
| install -m 644 $^ $(STYLES_DIR) | |||||
| install -d $(QT5_STYLES_DIR) | |||||
| install -m 644 $^ $(QT5_STYLES_DIR) | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -139,20 +109,20 @@ $(MODULEDIR)/$(MODULENAME).qt5.a: $(FILES_qt5) $(OBJS_qt5) | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| $(BINDIR)/styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared) | |||||
| $(BINDIR)/styles/carlastyle.dll: $(FILES_qt5) $(OBJS_qt5_shared) | |||||
| -@mkdir -p $(BINDIR)/styles | -@mkdir -p $(BINDIR)/styles | ||||
| @echo "Linking carlastyle.dll" | @echo "Linking carlastyle.dll" | ||||
| @$(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -luuid -lwinspool -lgdi32 -limm32 -lole32 -lshell32 -lws2_32 -shared -o $@ | |||||
| @$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -luuid -lwinspool -lgdi32 -limm32 -lole32 -lshell32 -lws2_32 -shared -o $@ | |||||
| $(BINDIR)/styles/carlastyle.dylib: $(FILES_shared) $(OBJS_shared) | |||||
| $(BINDIR)/styles/carlastyle.dylib: $(FILES_qt5) $(OBJS_qt5_shared) | |||||
| -@mkdir -p $(BINDIR)/styles | -@mkdir -p $(BINDIR)/styles | ||||
| @echo "Linking carlastyle.dylib" | @echo "Linking carlastyle.dylib" | ||||
| @$(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@ | |||||
| @$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -dynamiclib -o $@ | |||||
| $(BINDIR)/styles/carlastyle.so: $(FILES_shared) $(OBJS_shared) | |||||
| $(BINDIR)/styles/carlastyle.so: $(FILES_qt5) $(OBJS_qt5_shared) | |||||
| -@mkdir -p $(BINDIR)/styles | -@mkdir -p $(BINDIR)/styles | ||||
| @echo "Linking carlastyle.so" | @echo "Linking carlastyle.so" | ||||
| @$(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@ | |||||
| @$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -shared -o $@ | |||||
| $(BINDIR)/styles/carlastyle.json: styles/carlastyle.json | $(BINDIR)/styles/carlastyle.json: styles/carlastyle.json | ||||
| -@mkdir -p $(BINDIR)/styles | -@mkdir -p $(BINDIR)/styles | ||||