Browse Source

Finish porting to Qt5, please test

tags/v0.9.0
falkTX 6 years ago
parent
commit
006d09e77f
14 changed files with 181 additions and 197 deletions
  1. +1
    -11
      resources/ui/catarina.ui
  2. +1
    -11
      resources/ui/catia.ui
  3. +1
    -11
      resources/ui/claudia.ui
  4. +19
    -14
      src/cadence.py
  5. +1
    -1
      src/canvaspreviewframe.py
  6. +69
    -70
      src/catarina.py
  7. +3
    -3
      src/catia.py
  8. +68
    -42
      src/claudia.py
  9. +1
    -1
      src/clickablelabel.py
  10. +14
    -13
      src/jacksettings.py
  11. +2
    -2
      src/patchcanvas.py
  12. +0
    -1
      src/shared.py
  13. +0
    -15
      src/shared_canvasjack.py
  14. +1
    -2
      src/shared_settings.py

+ 1
- 11
resources/ui/catarina.ui View File

@@ -419,7 +419,7 @@
<x>0</x>
<y>0</y>
<width>651</width>
<height>19</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -483,7 +483,6 @@
<addaction name="separator"/>
<addaction name="menu_Zoom"/>
<addaction name="separator"/>
<addaction name="act_canvas_print"/>
<addaction name="act_canvas_save_image"/>
</widget>
<addaction name="menu_File"/>
@@ -677,15 +676,6 @@
<string>Ctrl+G</string>
</property>
</action>
<action name="act_canvas_print">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-print.png</normaloff>:/16x16/document-print.png</iconset>
</property>
<property name="text">
<string>Print...</string>
</property>
</action>
<action name="act_canvas_save_image">
<property name="text">
<string>Save Image...</string>


+ 1
- 11
resources/ui/catia.ui View File

@@ -458,7 +458,7 @@
<x>0</x>
<y>0</y>
<width>702</width>
<height>19</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -501,7 +501,6 @@
<addaction name="act_canvas_refresh"/>
<addaction name="menu_Canvas_Zoom"/>
<addaction name="separator"/>
<addaction name="act_canvas_print"/>
<addaction name="act_canvas_save_image"/>
</widget>
<widget class="QMenu" name="menu_Tools">
@@ -940,15 +939,6 @@
<string>Save As &amp;Template...</string>
</property>
</action>
<action name="act_canvas_print">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-print.png</normaloff>:/16x16/document-print.png</iconset>
</property>
<property name="text">
<string>&amp;Print...</string>
</property>
</action>
<action name="act_canvas_save_image">
<property name="text">
<string>Save &amp;Image...</string>


+ 1
- 11
resources/ui/claudia.ui View File

@@ -770,7 +770,7 @@
<x>0</x>
<y>0</y>
<width>877</width>
<height>19</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menu_Studio">
@@ -916,7 +916,6 @@
<addaction name="act_canvas_refresh"/>
<addaction name="menu_Canvas_Zoom"/>
<addaction name="separator"/>
<addaction name="act_canvas_print"/>
<addaction name="act_canvas_save_image"/>
</widget>
<addaction name="menu_Studio"/>
@@ -1346,15 +1345,6 @@
<string>Ctrl+1</string>
</property>
</action>
<action name="act_canvas_print">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-print.png</normaloff>:/16x16/document-print.png</iconset>
</property>
<property name="text">
<string>Print...</string>
</property>
</action>
<action name="act_canvas_save_image">
<property name="text">
<string>Save Image...</string>


+ 19
- 14
src/cadence.py View File

@@ -52,7 +52,7 @@ from subprocess import getoutput

try:
import dbus
from dbus.mainloop.qt import DBusQtMainLoop
from dbus.mainloop.pyqt5 import DBusQtMainLoop
haveDBus = True
except:
haveDBus = False
@@ -746,6 +746,13 @@ class ToolBarPADialog(QDialog, ui_cadence_tb_pa.Ui_Dialog):

# Main Window
class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):
DBusJackServerStartedCallback = pyqtSignal()
DBusJackServerStoppedCallback = pyqtSignal()
DBusJackClientAppearedCallback = pyqtSignal(int, str)
DBusJackClientDisappearedCallback = pyqtSignal(int)
DBusA2JBridgeStartedCallback = pyqtSignal()
DBusA2JBridgeStoppedCallback = pyqtSignal()

SIGTERM = pyqtSignal()
SIGUSR1 = pyqtSignal()
SIGUSR2 = pyqtSignal()
@@ -892,9 +899,8 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):
self.settings_changed_types = []
self.frame_tweaks_settings.setVisible(False)

# FIXME QT4
#for i in range(self.tw_tweaks.rowCount()):
#self.tw_tweaks.item(0, i).setTextAlignment(Qt.AlignCenter)
for i in range(self.tw_tweaks.rowCount()):
self.tw_tweaks.item(i, 0).setTextAlignment(Qt.AlignCenter)

self.tw_tweaks.setCurrentCell(0, 0)

@@ -1183,18 +1189,17 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):
self.cb_wineasio_fixed_bsize.clicked.connect(self.slot_tweaksSettingsChanged_wineasio)
self.cb_wineasio_bsizes.currentIndexChanged.connect(self.slot_tweaksSettingsChanged_wineasio)

# FIXME QT4
## org.jackaudio.JackControl
#self.DBusJackServerStartedCallback.connect(self.slot_DBusJackServerStartedCallback)
#self.DBusJackServerStoppedCallback.connect(self.slot_DBusJackServerStoppedCallback)
# org.jackaudio.JackControl
self.DBusJackServerStartedCallback.connect(self.slot_DBusJackServerStartedCallback)
self.DBusJackServerStoppedCallback.connect(self.slot_DBusJackServerStoppedCallback)

## org.jackaudio.JackPatchbay
#self.DBusJackClientAppearedCallback.connect(self.slot_DBusJackClientAppearedCallback)
#self.DBusJackClientDisappearedCallback.connect(self.slot_DBusJackClientDisappearedCallback)
# org.jackaudio.JackPatchbay
self.DBusJackClientAppearedCallback.connect(self.slot_DBusJackClientAppearedCallback)
self.DBusJackClientDisappearedCallback.connect(self.slot_DBusJackClientDisappearedCallback)

## org.gna.home.a2jmidid.control
#self.DBusA2JBridgeStartedCallback.connect(self.slot_DBusA2JBridgeStartedCallback)
#self.DBusA2JBridgeStoppedCallback.connect(self.slot_DBusA2JBridgeStoppedCallback)
# org.gna.home.a2jmidid.control
self.DBusA2JBridgeStartedCallback.connect(self.slot_DBusA2JBridgeStartedCallback)
self.DBusA2JBridgeStoppedCallback.connect(self.slot_DBusA2JBridgeStoppedCallback)

# -------------------------------------------------------------



+ 1
- 1
src/canvaspreviewframe.py View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Custom Mini Canvas Preview, a custom Qt4 widget
# Custom Mini Canvas Preview, a custom Qt widget
# Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or


+ 69
- 70
src/catarina.py View File

@@ -22,8 +22,7 @@
if True:
from PyQt5.QtCore import pyqtSlot, QSettings
from PyQt5.QtWidgets import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem
# FIXME QT4
#from PyQt5.QtXml import QDomDocument
from PyQt5.QtXml import QDomDocument
else:
from PyQt4.QtCore import pyqtSlot, QSettings
from PyQt4.QtGui import QApplication, QDialog, QDialogButtonBox, QTableWidgetItem
@@ -133,9 +132,9 @@ class CatarinaRemoveGroupW(QDialog, ui_catarina_removegroup.Ui_CatarinaRemoveGro
self.tw_group_list.setItem(index, 2, twi_group_split)
index += 1

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.tw_group_list, SIGNAL("cellDoubleClicked(int, int)"), SLOT("accept()"))
self.connect(self.tw_group_list, SIGNAL("currentCellChanged(int, int, int, int)"), SLOT("slot_checkCell(int)"))
self.accepted.connect(self.slot_setReturn)
self.tw_group_list.cellDoubleClicked.connect(self.accept)
self.tw_group_list.currentCellChanged.connect(self.slot_checkCell)

self.ret_group_id = -1

@@ -169,9 +168,9 @@ class CatarinaRenameGroupW(QDialog, ui_catarina_renamegroup.Ui_CatarinaRenameGro
self.cb_group_to_rename.addItem("%i - %s" % (group[iGroupId], group[iGroupName]))
self.m_group_list_names.append(group[iGroupName])

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.cb_group_to_rename, SIGNAL("currentIndexChanged(int)"), SLOT("slot_checkItem()"))
self.connect(self.le_new_group_name, SIGNAL("textChanged(QString)"), SLOT("slot_checkText(QString)"))
self.accepted.connect(self.slot_setReturn)
self.cb_group_to_rename.currentIndexChanged.connect(self.slot_checkItem)
self.le_new_group_name.textChanged.connect(self.slot_checkText)

self.ret_group_id = -1
self.ret_new_group_name = ""
@@ -210,8 +209,8 @@ class CatarinaAddPortW(QDialog, ui_catarina_addport.Ui_CatarinaAddPortW):
for group in group_list:
self.cb_group.addItem("%i - %s" % (group[iGroupId], group[iGroupName]))

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.le_port_name, SIGNAL("textChanged(QString)"), SLOT("slot_checkText(QString)"))
self.accepted.connect(self.slot_setReturn)
self.le_port_name.textChanged.connect(self.slot_checkText)

self.ret_group_id = -1
self.ret_port_name = ""
@@ -249,15 +248,15 @@ class CatarinaRemovePortW(QDialog, ui_catarina_removeport.Ui_CatarinaRemovePortW
self.m_group_list = group_list
self.m_port_list = port_list

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.tw_port_list, SIGNAL("cellDoubleClicked(int, int)"), SLOT("accept()"))
self.connect(self.tw_port_list, SIGNAL("currentCellChanged(int, int, int, int)"), SLOT("slot_checkCell(int)"))
self.connect(self.rb_input, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_output, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_audio_jack, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_jack, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_a2j, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_alsa, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.accepted.connect(self.slot_setReturn)
self.tw_port_list.cellDoubleClicked.connect(self.accept)
self.tw_port_list.currentCellChanged.connect(self.slot_checkCell)
self.rb_input.clicked.connect(self.slot_reAddPorts)
self.rb_output.clicked.connect(self.slot_reAddPorts)
self.rb_audio_jack.clicked.connect(self.slot_reAddPorts)
self.rb_midi_jack.clicked.connect(self.slot_reAddPorts)
self.rb_midi_a2j.clicked.connect(self.slot_reAddPorts)
self.rb_midi_alsa.clicked.connect(self.slot_reAddPorts)

self.ret_port_id = -1
self.reAddPorts()
@@ -331,16 +330,16 @@ class CatarinaRenamePortW(QDialog, ui_catarina_renameport.Ui_CatarinaRenamePortW
self.m_group_list = group_list
self.m_port_list = port_list

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.tw_port_list, SIGNAL("currentCellChanged(int, int, int, int)"), SLOT("slot_checkCell()"))
self.connect(self.le_new_name, SIGNAL("textChanged(QString)"), SLOT("slot_checkText(QString)"))
self.accepted.connect(self.slot_setReturn)
self.tw_port_list.currentCellChanged.connect(self.slot_checkCell)
self.le_new_name.textChanged.connect(self.slot_checkText)

self.connect(self.rb_input, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_output, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_audio_jack, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_jack, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_a2j, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.connect(self.rb_midi_alsa, SIGNAL("clicked()"), SLOT("slot_reAddPorts()"))
self.rb_input.clicked.connect(self.slot_reAddPorts)
self.rb_output.clicked.connect(self.slot_reAddPorts)
self.rb_audio_jack.clicked.connect(self.slot_reAddPorts)
self.rb_midi_jack.clicked.connect(self.slot_reAddPorts)
self.rb_midi_a2j.clicked.connect(self.slot_reAddPorts)
self.rb_midi_alsa.clicked.connect(self.slot_reAddPorts)

self.ret_port_id = -1
self.ret_new_port_name = ""
@@ -435,13 +434,13 @@ class CatarinaConnectPortsW(QDialog, ui_catarina_connectports.Ui_CatarinaConnect
elif port[iPortType] == patchcanvas.PORT_TYPE_MIDI_ALSA:
self.m_ports_midi_alsa.append(port)

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.rb_audio_jack, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_jack, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_a2j, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_alsa, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.lw_outputs, SIGNAL("currentRowChanged(int)"), SLOT("slot_checkOutSelection(int)"))
self.connect(self.lw_inputs, SIGNAL("currentRowChanged(int)"), SLOT("slot_checkInSelection(int)"))
self.accepted.connect(self.slot_setReturn)
self.rb_audio_jack.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_jack.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_a2j.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_alsa.clicked.connect(self.slot_portTypeChanged)
self.lw_outputs.currentRowChanged.connect(self.slot_checkOutSelection)
self.lw_inputs.currentRowChanged.connect(self.slot_checkInSelection)

self.ret_port_out_id = -1
self.ret_port_in_id = -1
@@ -516,13 +515,13 @@ class CatarinaDisconnectPortsW(QDialog, ui_catarina_disconnectports.Ui_CatarinaD
self.m_port_list = port_list
self.m_connection_list = connection_list

self.connect(self, SIGNAL("accepted()"), SLOT("slot_setReturn()"))
self.connect(self.tw_connections, SIGNAL("cellDoubleClicked(int, int)"), SLOT("accept()"))
self.connect(self.tw_connections, SIGNAL("currentCellChanged(int, int, int, int)"), SLOT("slot_checkSelection(int)"))
self.connect(self.rb_audio_jack, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_jack, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_a2j, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.connect(self.rb_midi_alsa, SIGNAL("clicked()"), SLOT("slot_portTypeChanged()"))
self.accepted.connect(self.slot_setReturn)
self.tw_connections.cellDoubleClicked.connect(self.accept)
self.tw_connections.currentCellChanged.connect(self.slot_checkSelection)
self.rb_audio_jack.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_jack.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_a2j.clicked.connect(self.slot_portTypeChanged)
self.rb_midi_alsa.clicked.connect(self.slot_portTypeChanged)

self.ret_port_out_id = -1
self.ret_port_in_id = -1
@@ -665,39 +664,39 @@ class CatarinaMainW(AbstractCanvasJackClass):
patchcanvas.setFeatures(p_features)
patchcanvas.init("Catarina", self.scene, self.canvasCallback, DEBUG)

self.connect(self.ui.act_project_new, SIGNAL("triggered()"), SLOT("slot_projectNew()"))
self.connect(self.ui.act_project_open, SIGNAL("triggered()"), SLOT("slot_projectOpen()"))
self.connect(self.ui.act_project_save, SIGNAL("triggered()"), SLOT("slot_projectSave()"))
self.connect(self.ui.act_project_save_as, SIGNAL("triggered()"), SLOT("slot_projectSaveAs()"))
self.connect(self.ui.b_project_new, SIGNAL("clicked()"), SLOT("slot_projectNew()"))
self.connect(self.ui.b_project_open, SIGNAL("clicked()"), SLOT("slot_projectOpen()"))
self.connect(self.ui.b_project_save, SIGNAL("clicked()"), SLOT("slot_projectSave()"))
self.connect(self.ui.b_project_save_as, SIGNAL("clicked()"), SLOT("slot_projectSaveAs()"))
self.connect(self.ui.act_patchbay_add_group, SIGNAL("triggered()"), SLOT("slot_groupAdd()"))
self.connect(self.ui.act_patchbay_remove_group, SIGNAL("triggered()"), SLOT("slot_groupRemove()"))
self.connect(self.ui.act_patchbay_rename_group, SIGNAL("triggered()"), SLOT("slot_groupRename()"))
self.connect(self.ui.act_patchbay_add_port, SIGNAL("triggered()"), SLOT("slot_portAdd()"))
self.connect(self.ui.act_patchbay_remove_port, SIGNAL("triggered()"), SLOT("slot_portRemove()"))
self.connect(self.ui.act_patchbay_rename_port, SIGNAL("triggered()"), SLOT("slot_portRename()"))
self.connect(self.ui.act_patchbay_connect_ports, SIGNAL("triggered()"), SLOT("slot_connectPorts()"))
self.connect(self.ui.act_patchbay_disconnect_ports, SIGNAL("triggered()"), SLOT("slot_disconnectPorts()"))
self.connect(self.ui.b_group_add, SIGNAL("clicked()"), SLOT("slot_groupAdd()"))
self.connect(self.ui.b_group_remove, SIGNAL("clicked()"), SLOT("slot_groupRemove()"))
self.connect(self.ui.b_group_rename, SIGNAL("clicked()"), SLOT("slot_groupRename()"))
self.connect(self.ui.b_port_add, SIGNAL("clicked()"), SLOT("slot_portAdd()"))
self.connect(self.ui.b_port_remove, SIGNAL("clicked()"), SLOT("slot_portRemove()"))
self.connect(self.ui.b_port_rename, SIGNAL("clicked()"), SLOT("slot_portRename()"))
self.connect(self.ui.b_ports_connect, SIGNAL("clicked()"), SLOT("slot_connectPorts()"))
self.connect(self.ui.b_ports_disconnect, SIGNAL("clicked()"), SLOT("slot_disconnectPorts()"))
self.ui.act_project_new.triggered.connect(self.slot_projectNew)
self.ui.act_project_open.triggered.connect(self.slot_projectOpen)
self.ui.act_project_save.triggered.connect(self.slot_projectSave)
self.ui.act_project_save_as.triggered.connect(self.slot_projectSaveAs)
self.ui.b_project_new.clicked.connect(self.slot_projectNew)
self.ui.b_project_open.clicked.connect(self.slot_projectOpen)
self.ui.b_project_save.clicked.connect(self.slot_projectSave)
self.ui.b_project_save_as.clicked.connect(self.slot_projectSaveAs)
self.ui.act_patchbay_add_group.triggered.connect(self.slot_groupAdd)
self.ui.act_patchbay_remove_group.triggered.connect(self.slot_groupRemove)
self.ui.act_patchbay_rename_group.triggered.connect(self.slot_groupRename)
self.ui.act_patchbay_add_port.triggered.connect(self.slot_portAdd)
self.ui.act_patchbay_remove_port.triggered.connect(self.slot_portRemove)
self.ui.act_patchbay_rename_port.triggered.connect(self.slot_portRename)
self.ui.act_patchbay_connect_ports.triggered.connect(self.slot_connectPorts)
self.ui.act_patchbay_disconnect_ports.triggered.connect(self.slot_disconnectPorts)
self.ui.b_group_add.clicked.connect(self.slot_groupAdd)
self.ui.b_group_remove.clicked.connect(self.slot_groupRemove)
self.ui.b_group_rename.clicked.connect(self.slot_groupRename)
self.ui.b_port_add.clicked.connect(self.slot_portAdd)
self.ui.b_port_remove.clicked.connect(self.slot_portRemove)
self.ui.b_port_rename.clicked.connect(self.slot_portRename)
self.ui.b_ports_connect.clicked.connect(self.slot_connectPorts)
self.ui.b_ports_disconnect.clicked.connect(self.slot_disconnectPorts)

self.setCanvasConnections()

self.connect(self.ui.act_settings_configure, SIGNAL("triggered()"), SLOT("slot_configureCatarina()"))
self.ui.act_settings_configure.triggered.connect(self.slot_configureCatarina)

self.connect(self.ui.act_help_about, SIGNAL("triggered()"), SLOT("slot_aboutCatarina()"))
self.connect(self.ui.act_help_about_qt, SIGNAL("triggered()"), app, SLOT("aboutQt()"))
self.ui.act_help_about.triggered.connect(self.slot_aboutCatarina)
self.ui.act_help_about_qt.triggered.connect(app.aboutQt)

self.connect(self, SIGNAL("SIGUSR1()"), SLOT("slot_projectSave()"))
self.SIGUSR1.connect(self.slot_projectSave)

# Dummy timer to keep events active
self.fUpdateTimer = self.startTimer(1000)


+ 3
- 3
src/catia.py View File

@@ -28,7 +28,7 @@ from shared_settings import *

try:
import dbus
from dbus.mainloop.qt import DBusQtMainLoop
from dbus.mainloop.pyqt5 import DBusQtMainLoop
haveDBus = True
except:
haveDBus = False
@@ -1022,9 +1022,9 @@ class CatiaMainW(AbstractCanvasJackClass):
if not newId:
# Something crashed
if appInterface == "org.gna.home.a2jmidid":
QTimer.singleShot(0, self, SLOT("slot_handleCrash_a2j()"))
QTimer.singleShot(0, self.slot_handleCrash_a2j)
elif appInterface == "org.jackaudio.service":
QTimer.singleShot(0, self, SLOT("slot_handleCrash_jack()"))
QTimer.singleShot(0, self.slot_handleCrash_jack)

elif kwds['interface'] == "org.jackaudio.JackControl":
if kwds['member'] == "ServerStarted":


+ 68
- 42
src/claudia.py View File

@@ -48,7 +48,7 @@ from shared_settings import *

try:
import dbus
from dbus.mainloop.qt import DBusQtMainLoop
from dbus.mainloop.pyqt5 import DBusQtMainLoop
haveDBus = True
except:
haveDBus = False
@@ -57,7 +57,7 @@ except:
# Try Import OpenGL

try:
from PyQt4.QtOpenGL import QGLWidget
from PyQt5.QtOpenGL import QGLWidget
hasGL = True
except:
hasGL = False
@@ -602,6 +602,33 @@ class ClaudiaLauncherW(QDialog):
# Claudia Main Window

class ClaudiaMainW(AbstractCanvasJackClass):
DBusCrashCallback = pyqtSignal(str)
DBusServerStartedCallback = pyqtSignal()
DBusServerStoppedCallback = pyqtSignal()
DBusClientAppearedCallback = pyqtSignal(int, str)
DBusClientDisappearedCallback = pyqtSignal(int)
DBusClientRenamedCallback = pyqtSignal(int, str)
DBusPortAppearedCallback = pyqtSignal(int, int, str, int, int)
DBusPortDisppearedCallback = pyqtSignal(int)
DBusPortRenamedCallback = pyqtSignal(int, str)
DBusPortsConnectedCallback = pyqtSignal(int, int, int)
DBusPortsDisconnectedCallback = pyqtSignal(int)
DBusStudioAppearedCallback = pyqtSignal()
DBusStudioDisappearedCallback = pyqtSignal()
DBusQueueExecutionHaltedCallback = pyqtSignal()
DBusCleanExitCallback = pyqtSignal()
DBusStudioStartedCallback = pyqtSignal()
DBusStudioStoppedCallback = pyqtSignal()
DBusStudioRenamedCallback = pyqtSignal(str)
DBusStudioCrashedCallback = pyqtSignal()
DBusRoomAppearedCallback = pyqtSignal(str, str)
DBusRoomDisappearedCallback = pyqtSignal(str)
DBusRoomChangedCallback = pyqtSignal()
DBusProjectPropertiesChanged = pyqtSignal(str, str)
DBusAppAdded2Callback = pyqtSignal(str, int, str, bool, bool, str)
DBusAppRemovedCallback = pyqtSignal(str, int)
DBusAppStateChanged2Callback = pyqtSignal(str, int, str, bool, bool, str)

def __init__(self, parent=None):
AbstractCanvasJackClass.__init__(self, "Claudia", ui_claudia.Ui_ClaudiaMainW, parent)

@@ -854,46 +881,45 @@ class ClaudiaMainW(AbstractCanvasJackClass):
self.ui.act_help_about.triggered.connect(self.slot_aboutClaudia)
self.ui.act_help_about_qt.triggered.connect(app.aboutQt)

# FIXME QT4
## org.freedesktop.DBus
#self.DBusCrashCallback.connect(self.slot_DBusCrashCallback)

## org.jackaudio.JackControl
#self.DBusServerStartedCallback.connect(self.slot_DBusServerStartedCallback)
#self.DBusServerStoppedCallback.connect(self.slot_DBusServerStoppedCallback)

## org.jackaudio.JackPatchbay
#self.DBusClientAppearedCallback.connect(self.slot_DBusClientAppearedCallback)
#self.DBusClientDisappearedCallback.connect(self.slot_DBusClientDisappearedCallback)
#self.DBusClientRenamedCallback.connect(self.slot_DBusClientRenamedCallback)
#self.DBusPortAppearedCallback.connect(self.slot_DBusPortAppearedCallback)
#self.DBusPortDisppearedCallback.connect(self.slot_DBusPortDisppearedCallback)
#self.DBusPortRenamedCallback.connect(self.slot_DBusPortRenamedCallback)
#self.DBusPortsConnectedCallback.connect(self.slot_DBusPortsConnectedCallback)
#self.DBusPortsDisconnectedCallback.connect(self.slot_DBusPortsDisconnectedCallback)

## org.ladish.Control
#self.DBusStudioAppearedCallback.connect(self.slot_DBusStudioAppearedCallback)
#self.DBusStudioDisappearedCallback.connect(self.slot_DBusStudioDisappearedCallback)
#self.DBusQueueExecutionHaltedCallback.connect(self.slot_DBusQueueExecutionHaltedCallback)
#self.DBusCleanExitCallback.connect(self.slot_DBusCleanExitCallback)

## org.ladish.Studio
#self.DBusStudioStartedCallback.connect(self.slot_DBusStudioStartedCallback)
#self.DBusStudioStoppedCallback.connect(self.slot_DBusStudioStoppedCallback)
#self.DBusStudioRenamedCallback.connect(self.slot_DBusStudioRenamedCallback)
#self.DBusStudioCrashedCallback.connect(self.slot_DBusStudioCrashedCallback)
#self.DBusRoomAppearedCallback.connect(self.slot_DBusRoomAppearedCallback)
#self.DBusRoomDisappearedCallback.connect(self.slot_DBusRoomDisappearedCallback)
##self.DBusRoomChangedCallback.connect(self.slot_DBusRoomChangedCallback)

## org.ladish.Room
#self.DBusProjectPropertiesChanged.connect(self.slot_DBusProjectPropertiesChanged)

## org.ladish.AppSupervisor
#self.DBusAppAdded2Callback.connect(self.slot_DBusAppAdded2Callback)
#self.DBusAppRemovedCallback.connect(self.slot_DBusAppRemovedCallback)
#self.DBusAppStateChanged2Callback.connect(self.slot_DBusAppStateChanged2Callback)
# org.freedesktop.DBus
self.DBusCrashCallback.connect(self.slot_DBusCrashCallback)

# org.jackaudio.JackControl
self.DBusServerStartedCallback.connect(self.slot_DBusServerStartedCallback)
self.DBusServerStoppedCallback.connect(self.slot_DBusServerStoppedCallback)

# org.jackaudio.JackPatchbay
self.DBusClientAppearedCallback.connect(self.slot_DBusClientAppearedCallback)
self.DBusClientDisappearedCallback.connect(self.slot_DBusClientDisappearedCallback)
self.DBusClientRenamedCallback.connect(self.slot_DBusClientRenamedCallback)
self.DBusPortAppearedCallback.connect(self.slot_DBusPortAppearedCallback)
self.DBusPortDisppearedCallback.connect(self.slot_DBusPortDisppearedCallback)
self.DBusPortRenamedCallback.connect(self.slot_DBusPortRenamedCallback)
self.DBusPortsConnectedCallback.connect(self.slot_DBusPortsConnectedCallback)
self.DBusPortsDisconnectedCallback.connect(self.slot_DBusPortsDisconnectedCallback)

# org.ladish.Control
self.DBusStudioAppearedCallback.connect(self.slot_DBusStudioAppearedCallback)
self.DBusStudioDisappearedCallback.connect(self.slot_DBusStudioDisappearedCallback)
self.DBusQueueExecutionHaltedCallback.connect(self.slot_DBusQueueExecutionHaltedCallback)
self.DBusCleanExitCallback.connect(self.slot_DBusCleanExitCallback)

# org.ladish.Studio
self.DBusStudioStartedCallback.connect(self.slot_DBusStudioStartedCallback)
self.DBusStudioStoppedCallback.connect(self.slot_DBusStudioStoppedCallback)
self.DBusStudioRenamedCallback.connect(self.slot_DBusStudioRenamedCallback)
self.DBusStudioCrashedCallback.connect(self.slot_DBusStudioCrashedCallback)
self.DBusRoomAppearedCallback.connect(self.slot_DBusRoomAppearedCallback)
self.DBusRoomDisappearedCallback.connect(self.slot_DBusRoomDisappearedCallback)
#self.DBusRoomChangedCallback.connect(self.slot_DBusRoomChangedCallback)

# org.ladish.Room
self.DBusProjectPropertiesChanged.connect(self.slot_DBusProjectPropertiesChanged)

# org.ladish.AppSupervisor
self.DBusAppAdded2Callback.connect(self.slot_DBusAppAdded2Callback)
self.DBusAppRemovedCallback.connect(self.slot_DBusAppRemovedCallback)
self.DBusAppStateChanged2Callback.connect(self.slot_DBusAppStateChanged2Callback)

# JACK
self.BufferSizeCallback.connect(self.slot_JackBufferSizeCallback)


+ 1
- 1
src/clickablelabel.py View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Clickable Label, a custom Qt4 widget
# Clickable Label, a custom Qt widget
# Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or modify


+ 14
- 13
src/jacksettings.py View File

@@ -203,20 +203,21 @@ class JackSettingsW(QDialog):
# Align driver text and hide non available ones

driverList = gJackctl.ReadContainer(["drivers"])[1]
fontMetris = QFontMetrics(self.ui.obj_server_driver.font())
maxWidth = 75

# FIXME QT4
#for i in range(self.ui.obj_server_driver.rowCount()):
#self.ui.obj_server_driver.item(0, i).setTextAlignment(Qt.AlignCenter)
for i in range(self.ui.obj_server_driver.rowCount()):
item = self.ui.obj_server_driver.item(i, 0)
item.setTextAlignment(Qt.AlignCenter)

#itexText = self.ui.obj_server_driver.item(0, i).text()
#itemWidth = QFontMetrics(self.ui.obj_server_driver.font()).width(itexText)+25
itexText = item.text()
itemWidth = fontMetris.width(itexText)+25

#if itemWidth > maxWidth:
#maxWidth = itemWidth
if itemWidth > maxWidth:
maxWidth = itemWidth

#if dbus.String(itexText.lower()) not in driverList:
#self.ui.obj_server_driver.hideRow(i)
if dbus.String(itexText.lower()) not in driverList:
self.ui.obj_server_driver.hideRow(i)

self.ui.obj_server_driver.setMinimumWidth(maxWidth)
self.ui.obj_server_driver.setMaximumWidth(maxWidth)
@@ -853,22 +854,22 @@ class JackSettingsW(QDialog):
self.ui.obj_driver_channels_label.setEnabled(driverHasFeature("channels"))

# Misc stuff
if self.ui.obj_server_driver.item(0, row).text() == "ALSA":
if self.ui.obj_server_driver.item(row, 0).text() == "ALSA":
self.ui.toolbox_driver_misc.setCurrentIndex(1)
self.ui.obj_driver_capture_label.setText(self.tr("Input Device:"))
self.ui.obj_driver_playback_label.setText(self.tr("Output Device:"))

elif self.ui.obj_server_driver.item(0, row).text() == "Dummy":
elif self.ui.obj_server_driver.item(row, 0).text() == "Dummy":
self.ui.toolbox_driver_misc.setCurrentIndex(2)
self.ui.obj_driver_capture_label.setText(self.tr("Input Ports:"))
self.ui.obj_driver_playback_label.setText(self.tr("Output Ports:"))

elif self.ui.obj_server_driver.item(0, row).text() == "FireWire":
elif self.ui.obj_server_driver.item(row, 0).text() == "FireWire":
self.ui.toolbox_driver_misc.setCurrentIndex(3)
self.ui.obj_driver_capture_label.setText(self.tr("Capture Ports:"))
self.ui.obj_driver_playback_label.setText(self.tr("Playback Ports:"))

elif self.ui.obj_server_driver.item(0, row).text() == "Loopback":
elif self.ui.obj_server_driver.item(row, 0).text() == "Loopback":
self.ui.toolbox_driver_misc.setCurrentIndex(4)

else:


+ 2
- 2
src/patchcanvas.py View File

@@ -25,6 +25,7 @@ if True:
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu
from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject
from PyQt4.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer
@@ -33,8 +34,7 @@ else:
from PyQt4.QtGui import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt4.QtGui import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt4.QtGui import QInputDialog, QLineEdit, QMenu

from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer
from PyQt4.QtSvg import QGraphicsSvgItem, QSvgRenderer

# Imports (Theme)
from patchcanvas_theme import *


+ 0
- 1
src/shared.py View File

@@ -278,7 +278,6 @@ def setIcons(self_, modes):
gGui.ui.act_canvas_zoom_in.setIcon(getIcon("zoom-in"))
gGui.ui.act_canvas_zoom_out.setIcon(getIcon("zoom-out"))
gGui.ui.act_canvas_zoom_100.setIcon(getIcon("zoom-original"))
gGui.ui.act_canvas_print.setIcon(getIcon("document-print"))
gGui.ui.b_canvas_zoom_fit.setIcon(getIcon("zoom-fit-best"))
gGui.ui.b_canvas_zoom_in.setIcon(getIcon("zoom-in"))
gGui.ui.b_canvas_zoom_out.setIcon(getIcon("zoom-out"))


+ 0
- 15
src/shared_canvasjack.py View File

@@ -496,20 +496,6 @@ class AbstractCanvasJackClass(QMainWindow):
def slot_canvasZoomReset(self):
self.scene.zoom_reset()

@pyqtSlot()
def slot_canvasPrint(self):
self.scene.clearSelection()
self.fExportPrinter = QPrinter()
dialog = QPrintDialog(self.fExportPrinter, self)

if dialog.exec_():
painter = QPainter(self.fExportPrinter)
painter.save()
painter.setRenderHint(QPainter.Antialiasing, True)
painter.setRenderHint(QPainter.TextAntialiasing, True)
self.scene.render(painter)
painter.restore()

@pyqtSlot()
def slot_canvasSaveImage(self):
newPath = QFileDialog.getSaveFileName(self, self.tr("Save Image"), filter=self.tr("PNG Image (*.png);;JPEG Image (*.jpg)"))
@@ -548,7 +534,6 @@ class AbstractCanvasJackClass(QMainWindow):
self.ui.act_canvas_zoom_in.triggered.connect(self.slot_canvasZoomIn)
self.ui.act_canvas_zoom_out.triggered.connect(self.slot_canvasZoomOut)
self.ui.act_canvas_zoom_100.triggered.connect(self.slot_canvasZoomReset)
self.ui.act_canvas_print.triggered.connect(self.slot_canvasPrint)
self.ui.act_canvas_save_image.triggered.connect(self.slot_canvasSaveImage)
self.ui.b_canvas_zoom_fit.clicked.connect(self.slot_canvasZoomFit)
self.ui.b_canvas_zoom_in.clicked.connect(self.slot_canvasZoomIn)


+ 1
- 2
src/shared_settings.py View File

@@ -138,8 +138,7 @@ class SettingsW(QDialog):
# -------------------------------------------------------------
# Set-up connections

# FIXME QT4
#self.accepted.connect(self.slot_saveSettings)
self.accepted.connect(self.slot_saveSettings)
self.ui.buttonBox.button(QDialogButtonBox.Reset).clicked.connect(self.slot_resetSettings)
self.ui.b_main_def_folder_open.clicked.connect(self.slot_getAndSetProjectPath)



Loading…
Cancel
Save