@@ -11,7 +11,7 @@ all: build | |||
build: UI RES LANG | |||
UI: catarina catia tools | |||
UI: catarina catia claudia tools | |||
catarina: src/ui_catarina.py \ | |||
src/ui_catarina_addgroup.py src/ui_catarina_removegroup.py src/ui_catarina_renamegroup.py \ | |||
@@ -20,6 +20,12 @@ catarina: src/ui_catarina.py \ | |||
catia: src/ui_catia.py | |||
claudia: src/ui_claudia.py \ | |||
src/ui_claudia_studioname.py src/ui_claudia_studiolist.py | |||
# src/ui_claudia_createroom.py src/ui_claudia_addnew.py src/ui_claudia_addnew_klaudia.py \ | |||
# src/ui_claudia_runcustom.py src/ui_claudia_saveproject.py src/ui_claudia_projectproperties.py \ | |||
# src/ui_claudia_studiolist.py src/ui_claudia_studioname.py | |||
tools: \ | |||
src/ui_logs.py src/ui_render.py src/ui_xycontroller.py \ | |||
src/ui_settings_app.py src/ui_settings_jack.py | |||
@@ -54,6 +60,15 @@ src/ui_catarina_disconnectports.py: src/ui/catarina_disconnectports.ui | |||
src/ui_catia.py: src/ui/catia.ui | |||
$(PYUIC) -o src/ui_catia.py $< | |||
src/ui_claudia.py: src/ui/claudia.ui | |||
$(PYUIC) -o src/ui_claudia.py $< | |||
src/ui_claudia_studioname.py: src/ui/claudia_studioname.ui | |||
$(PYUIC) -o src/ui_claudia_studioname.py $< | |||
src/ui_claudia_studiolist.py: src/ui/claudia_studiolist.ui | |||
$(PYUIC) -o src/ui_claudia_studiolist.py $< | |||
src/ui_logs.py: src/ui/logs.ui | |||
$(PYUIC) -o src/ui_logs.py $< | |||
@@ -0,0 +1,137 @@ | |||
#!/usr/bin/env python | |||
# -*- coding: utf-8 -*- | |||
# Imports (Global) | |||
from PyQt4.QtCore import Qt, QRectF, QTimer, SIGNAL, SLOT | |||
from PyQt4.QtGui import QBrush, QColor, QCursor, QFrame, QPainter, QPen | |||
iX = 0 | |||
iY = 1 | |||
iWidth = 2 | |||
iHeight = 3 | |||
# Custom Mini Canvas Preview, using a QFrame | |||
class CanvasPreviewFrame(QFrame): | |||
def __init__(self, parent): | |||
super(CanvasPreviewFrame, self).__init__(parent) | |||
self.m_mouseDown = False | |||
self.scale = 1.0 | |||
self.scene = None | |||
self.real_parent = None | |||
self.fake_width = 0 | |||
self.fake_height = 0 | |||
self.render_source = self.getRenderSource() | |||
self.render_target = QRectF(0, 0, 0, 0) | |||
self.view_pad_x = 0.0 | |||
self.view_pad_y = 0.0 | |||
self.view_rect = [0.0, 0.0, 10.0, 10.0] | |||
def init(self, scene, real_width, real_height): | |||
self.scene = scene | |||
self.fake_width = float(real_width)/15 | |||
self.fake_height = float(real_height)/15 | |||
self.setMinimumSize(self.fake_width/2, self.fake_height) | |||
self.setMaximumSize(self.fake_width*4, self.fake_height) | |||
self.render_target.setWidth(real_width) | |||
self.render_target.setHeight(real_height) | |||
def getRenderSource(self): | |||
x_pad = (self.width()-self.fake_width)/2 | |||
y_pad = (self.height()-self.fake_height)/2 | |||
return QRectF(x_pad, y_pad, self.fake_width, self.fake_height) | |||
def setViewPosX(self, xp): | |||
x = xp*self.fake_width | |||
x_ratio = (x/self.fake_width)*self.view_rect[iWidth]/self.scale | |||
self.view_rect[iX] = x-x_ratio+self.render_source.x() | |||
self.update() | |||
def setViewPosY(self, yp): | |||
y = yp*self.fake_height | |||
y_ratio = (y/self.fake_height)*self.view_rect[iHeight]/self.scale | |||
self.view_rect[iY] = y-y_ratio+self.render_source.y() | |||
self.update() | |||
def setViewScale(self, scale): | |||
self.scale = scale | |||
QTimer.singleShot(0, self.real_parent, SLOT("slot_miniCanvasCheckAll()")) | |||
def setViewSize(self, width_p, height_p): | |||
width = width_p*self.fake_width | |||
height = height_p*self.fake_height | |||
self.view_rect[iWidth] = width | |||
self.view_rect[iHeight] = height | |||
self.update() | |||
def setRealParent(self, parent): | |||
self.real_parent = parent | |||
def handleMouseEvent(self, event_x, event_y): | |||
x = float(event_x) - self.render_source.x() - (self.view_rect[iWidth]/self.scale/2) | |||
y = float(event_y) - self.render_source.y() - (self.view_rect[iHeight]/self.scale/2) | |||
max_width = self.view_rect[iWidth]/self.scale | |||
max_height = self.view_rect[iHeight]/self.scale | |||
if (max_width > self.fake_width): max_width = self.fake_width | |||
if (max_height > self.fake_height): max_height = self.fake_height | |||
if (x < 0.0): x = 0.0 | |||
elif (x > self.fake_width-max_width): x = self.fake_width-max_width | |||
if (y < 0.0): y = 0.0 | |||
elif (y > self.fake_height-max_height): y = self.fake_height-max_height | |||
self.view_rect[iX] = x+self.render_source.x() | |||
self.view_rect[iY] = y+self.render_source.y() | |||
self.update() | |||
self.emit(SIGNAL("miniCanvasMoved(double, double)"), x*self.scale/self.fake_width, y*self.scale/self.fake_height) | |||
def mousePressEvent(self, event): | |||
if (event.button() == Qt.LeftButton): | |||
self.m_mouseDown = True | |||
self.setCursor(QCursor(Qt.SizeAllCursor)) | |||
self.handleMouseEvent(event.x(), event.y()) | |||
event.accept() | |||
def mouseMoveEvent(self, event): | |||
if (self.m_mouseDown): | |||
self.handleMouseEvent(event.x(), event.y()) | |||
event.accept() | |||
def mouseReleaseEvent(self, event): | |||
if (self.m_mouseDown): | |||
self.setCursor(QCursor(Qt.ArrowCursor)) | |||
self.m_mouseDown = False | |||
QFrame.mouseReleaseEvent(self, event) | |||
def paintEvent(self, event): | |||
painter = QPainter(self) | |||
painter.setBrush(QBrush(Qt.darkBlue, Qt.DiagCrossPattern)) | |||
painter.drawRect(0, 0, self.width(), self.height()) | |||
self.scene.render(painter, self.render_source, self.render_target, Qt.KeepAspectRatio) | |||
max_width = self.view_rect[iWidth]/self.scale | |||
max_height = self.view_rect[iHeight]/self.scale | |||
if (max_width > self.fake_width): max_width = self.fake_width | |||
if (max_height > self.fake_height): max_height = self.fake_height | |||
painter.setBrush(QBrush(QColor(75,75,255,30))) | |||
painter.setPen(QPen(Qt.blue, 2)) | |||
painter.drawRect(self.view_rect[iX], self.view_rect[iY], max_width, max_height) | |||
QFrame.paintEvent(self, event) | |||
def resizeEvent(self, event): | |||
self.render_source = self.getRenderSource() | |||
if (self.real_parent): | |||
QTimer.singleShot(0, self.real_parent, SLOT("slot_miniCanvasCheckAll()")) | |||
QFrame.resizeEvent(self, event) |
@@ -118,7 +118,8 @@ class CatarinaRemoveGroupW(QDialog, ui_catarina_removegroup.Ui_CatarinaRemoveGro | |||
@pyqtSlot() | |||
def slot_setReturn(self): | |||
self.ret_group_id = int(self.tw_group_list.item(self.tw_group_list.currentRow(), 0).text()) | |||
if (self.tw_group_list.rowCount() >= 0): | |||
self.ret_group_id = int(self.tw_group_list.item(self.tw_group_list.currentRow(), 0).text()) | |||
# Rename Group Dialog | |||
class CatarinaRenameGroupW(QDialog, ui_catarina_renamegroup.Ui_CatarinaRenameGroupW): | |||
@@ -759,9 +760,6 @@ class CatarinaMainW(QMainWindow, ui_catarina.Ui_CatarinaMainW): | |||
self.m_connection_list.remove(connection) | |||
break | |||
def init_ports_prepare(self): | |||
pass | |||
def init_ports(self): | |||
for group in self.m_group_list: | |||
patchcanvas.addGroup(group[iGroupId], group[iGroupName], patchcanvas.SPLIT_YES if (group[iGroupSplit]) else patchcanvas.SPLIT_NO, group[iGroupIcon]) | |||
@@ -1209,6 +1207,7 @@ class CatarinaMainW(QMainWindow, ui_catarina.Ui_CatarinaMainW): | |||
def closeEvent(self, event): | |||
self.saveSettings() | |||
patchcanvas.clear() | |||
QMainWindow.closeEvent(self, event) | |||
#--------------- main ------------------ | |||
@@ -119,17 +119,18 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
patchcanvas.setFeatures(p_features) | |||
patchcanvas.init(self.scene, self.canvasCallback, DEBUG) | |||
# DBus Stuff | |||
# Try to connect to jack | |||
self.jackStarted() | |||
# DBus checks | |||
if (haveDBus): | |||
if (DBus.jack and DBus.jack.IsStarted()): | |||
self.jackStarted() | |||
if (DBus.jack): | |||
pass | |||
else: | |||
self.jackStarted(autoStop=True) | |||
if (jack.client): | |||
self.act_tools_jack_start.setEnabled(False) | |||
self.act_tools_jack_stop.setEnabled(False) | |||
self.act_jack_configure.setEnabled(False) | |||
self.b_jack_configure.setEnabled(False) | |||
self.act_tools_jack_start.setEnabled(False) | |||
self.act_tools_jack_stop.setEnabled(False) | |||
self.act_jack_configure.setEnabled(False) | |||
self.b_jack_configure.setEnabled(False) | |||
if (DBus.a2j): | |||
if (DBus.a2j.is_started()): | |||
@@ -142,7 +143,8 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.act_tools_a2j_export_hw.setEnabled(False) | |||
self.menu_A2J_Bridge.setEnabled(False) | |||
else: #No DBus | |||
else: | |||
# No DBus | |||
self.act_tools_jack_start.setEnabled(False) | |||
self.act_tools_jack_stop.setEnabled(False) | |||
self.act_jack_configure.setEnabled(False) | |||
@@ -152,10 +154,6 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.act_tools_a2j_export_hw.setEnabled(False) | |||
self.menu_A2J_Bridge.setEnabled(False) | |||
self.jackStarted(autoStop=True) | |||
self.cb_sample_rate.setEnabled(bool(DBus.jack != None)) | |||
self.m_timer120 = self.startTimer(self.m_savedSettings["Main/RefreshInterval"]) | |||
self.m_timer600 = self.startTimer(self.m_savedSettings["Main/RefreshInterval"]*5) | |||
@@ -353,12 +351,9 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
jacklib.disconnect(jack.client, port_a_nameR, port_b_nameR) | |||
def init_jack(self): | |||
if (not jack.client): # Jack Crash/Bug ? | |||
self.menu_Transport.setEnabled(False) | |||
self.group_transport.setEnabled(False) | |||
return | |||
self.m_xruns = 0 | |||
self.m_next_sample_rate = 0 | |||
self.m_last_bpm = None | |||
self.m_last_transport_state = None | |||
@@ -367,8 +362,8 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
realtime = bool(int(jacklib.is_realtime(jack.client))) | |||
setBufferSize(self, buffer_size) | |||
setRealTime(self, realtime) | |||
setSampleRate(self, sample_rate) | |||
setRealTime(self, realtime) | |||
setXruns(self, 0) | |||
refreshDSPLoad(self) | |||
@@ -376,15 +371,13 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.init_callbacks() | |||
self.init_ports() | |||
self.scene.zoom_fit() | |||
self.scene.zoom_reset() | |||
jacklib.activate(jack.client) | |||
def init_callbacks(self): | |||
if (not jack.client): | |||
return | |||
jacklib.set_buffer_size_callback(jack.client, self.JackBufferSizeCallback, None) | |||
jacklib.set_sample_rate_callback(jack.client, self.JackSampleRateCallback, None) | |||
jacklib.set_xrun_callback(jack.client, self.JackXRunCallback, None) | |||
@@ -396,9 +389,6 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
if (JACK2): | |||
jacklib.set_port_rename_callback(jack.client, self.JackPortRenameCallback, None) | |||
def init_ports_prepare(self): | |||
pass | |||
def init_ports(self): | |||
if (not jack.client): | |||
return | |||
@@ -536,9 +526,9 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.m_last_port_id += 1 | |||
if (group_id not in self.m_group_split_list and port_flags & jacklib.JackPortIsPhysical): | |||
patchcanvas.splitGroup(group_id) | |||
patchcanvas.setGroupIcon(group_id, patchcanvas.ICON_HARDWARE) | |||
self.m_group_split_list.append(group_id) | |||
patchcanvas.splitGroup(group_id) | |||
patchcanvas.setGroupIcon(group_id, patchcanvas.ICON_HARDWARE) | |||
self.m_group_split_list.append(group_id) | |||
return port_id | |||
@@ -610,12 +600,11 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.m_connection_list.remove(connection) | |||
break | |||
def jackStarted(self, autoStop=False): | |||
def jackStarted(self): | |||
if (not jack.client): | |||
jack.client = jacklib.client_open_uuid("catia", jacklib.JackNoStartServer, None, "") | |||
if (autoStop and not jack.client): | |||
self.jackStopped() | |||
return | |||
jack.client = jacklib.client_open_uuid("catia", jacklib.JackNoStartServer|jacklib.JackSessionID, None, "") | |||
if (not jack.client): | |||
return self.jackStopped() | |||
self.act_jack_render.setEnabled(canRender) | |||
self.b_jack_render.setEnabled(canRender) | |||
@@ -623,8 +612,9 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.group_transport.setEnabled(True) | |||
self.menuJackServer(True) | |||
if (DBus.jack): | |||
self.cb_sample_rate.setEnabled(True) | |||
self.cb_buffer_size.setEnabled(True) | |||
self.cb_sample_rate.setEnabled(True) # DBus.jack and jacksettings.getSampleRate() != -1 | |||
self.menu_Jack_Buffer_Size.setEnabled(True) | |||
self.pb_dsp_load.setMaximum(100) | |||
self.pb_dsp_load.setValue(0) | |||
@@ -633,19 +623,34 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.init_jack() | |||
def jackStopped(self): | |||
if (haveDBus): | |||
self.DBusReconnect() | |||
#if (haveDBus): | |||
#self.DBusReconnect() | |||
# client already closed | |||
jack.client = None | |||
if (self.m_next_sample_rate): | |||
jack_sample_rate(self, self.m_next_sample_rate) | |||
if (DBus.jack): | |||
if (self.cb_buffer_size.isEnabled()): | |||
setBufferSize(self, jacksettings.getBufferSize()) | |||
if (self.cb_sample_rate.isEnabled()): | |||
setSampleRate(self, jacksettings.getSampleRate()) | |||
buffer_size = jacksettings.getBufferSize() | |||
sample_rate = jacksettings.getSampleRate() | |||
buffer_size_test = bool(buffer_size != -1) | |||
sample_rate_test = bool(sample_rate != -1) | |||
if (buffer_size_test): | |||
setBufferSize(self, buffer_size) | |||
if (sample_rate_test): | |||
setSampleRate(self, sample_rate) | |||
setRealTime(self, jacksettings.isRealtime()) | |||
setXruns(self, -1) | |||
self.cb_buffer_size.setEnabled(buffer_size_test) | |||
self.cb_sample_rate.setEnabled(sample_rate_test) | |||
self.menu_Jack_Buffer_Size.setEnabled(buffer_size_test) | |||
else: | |||
self.cb_buffer_size.setEnabled(False) | |||
self.cb_sample_rate.setEnabled(False) | |||
@@ -668,9 +673,6 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.pb_dsp_load.setMaximum(0) | |||
self.pb_dsp_load.update() | |||
if (self.m_next_sample_rate): | |||
jack_sample_rate(self, self.m_next_sample_rate) | |||
patchcanvas.clear() | |||
def a2jStarted(self): | |||
@@ -719,6 +721,11 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
DBus.a2j = None | |||
a2j_client_name = None | |||
def JackXRunCallback(self, arg): | |||
if (DEBUG): print("JackXRunCallback()") | |||
self.emit(SIGNAL("XRunCallback()")) | |||
return 0 | |||
def JackBufferSizeCallback(self, buffer_size, arg): | |||
if (DEBUG): print("JackBufferSizeCallback(%i)" % (buffer_size)) | |||
self.emit(SIGNAL("BufferSizeCallback(int)"), buffer_size) | |||
@@ -729,11 +736,6 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.emit(SIGNAL("SampleRateCallback(int)"), sample_rate) | |||
return 0 | |||
def JackXRunCallback(self, arg): | |||
if (DEBUG): print("JackXRunCallback()") | |||
self.emit(SIGNAL("XRunCallback()")) | |||
return 0 | |||
def JackPortRegistrationCallback(self, port_id, register_yesno, arg): | |||
if (DEBUG): print("JackPortRegistrationCallback(%i, %i)" % (port_id, register_yesno)) | |||
self.emit(SIGNAL("PortRegistrationCallback(int, bool)"), port_id, bool(register_yesno)) | |||
@@ -744,7 +746,7 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
self.emit(SIGNAL("PortConnectCallback(int, int, bool)"), port_a, port_b, bool(connect_yesno)) | |||
return 0 | |||
def JackPortRenameCallback(self, port_id, old_name, new_name, arg=None): | |||
def JackPortRenameCallback(self, port_id, old_name, new_name, arg): | |||
if (DEBUG): print("JackPortRenameCallback(%i, %s, %s)" % (port_id, old_name, new_name)) | |||
self.emit(SIGNAL("PortRenameCallback(int, QString, QString)"), port_id, str(old_name, encoding="ascii"), str(new_name, encoding="ascii")) | |||
return 0 | |||
@@ -766,7 +768,7 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
#jacklib.session_event_free(event) | |||
def JackShutdownCallback(self, arg=None): | |||
def JackShutdownCallback(self, arg): | |||
if (DEBUG): print("JackShutdownCallback()") | |||
self.emit(SIGNAL("ShutdownCallback()")) | |||
return 0 | |||
@@ -774,9 +776,13 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
@pyqtSlot() | |||
def slot_JackServerStart(self): | |||
if (DBus.jack): | |||
return DBus.jack.StartServer() | |||
else: | |||
return False | |||
try: | |||
ret = bool(DBus.jack.StartServer()) | |||
return ret | |||
except: | |||
QMessageBox.warning(self, self.tr("Warning"), self.tr("Failed to start JACK, please check the logs for more information.")) | |||
self.jackStopped() | |||
return False | |||
@pyqtSlot() | |||
def slot_JackServerStop(self): | |||
@@ -787,8 +793,9 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
@pyqtSlot() | |||
def slot_JackClearXruns(self): | |||
self.m_xruns = 0 | |||
setXruns(self, 0) | |||
if (jack.client): | |||
self.m_xruns = 0 | |||
setXruns(self, 0) | |||
@pyqtSlot() | |||
def slot_A2JBridgeStart(self): | |||
@@ -881,7 +888,6 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
@pyqtSlot() | |||
def slot_ShutdownCallback(self): | |||
self.jackStopped() | |||
jack.client = None | |||
@pyqtSlot() | |||
def slot_configureCatia(self): | |||
@@ -938,7 +944,7 @@ class CatiaMainW(QMainWindow, ui_catia.Ui_CatiaMainW): | |||
setTransportView(self, self.settings.value("TransportView", TRANSPORT_VIEW_HMS, type=int)) | |||
self.m_savedSettings = { | |||
"Main/RefreshInterval": self.settings.value("Main/RefreshInterval", 100, type=int), | |||
"Main/RefreshInterval": self.settings.value("Main/RefreshInterval", 120, type=int), | |||
"Main/JackPortAlias": self.settings.value("Main/JackPortAlias", 2, type=int), | |||
"Canvas/Theme": self.settings.value("Canvas/Theme", patchcanvas.getDefaultThemeName(), type=str), | |||
"Canvas/AutoHideGroups": self.settings.value("Canvas/AutoHideGroups", False, type=bool), | |||
@@ -20,6 +20,7 @@ | |||
<file>16x16/media-seek-forward.png</file> | |||
<file>16x16/network-connect.png</file> | |||
<file>16x16/network-disconnect.png</file> | |||
<file>16x16/system-run.png</file> | |||
<file>16x16/user-trash.png</file> | |||
<file>16x16/view-refresh.png</file> | |||
<file>16x16/view-sort-ascending.png</file> | |||
@@ -31,6 +32,7 @@ | |||
<file>48x48/catarina.png</file> | |||
<file>48x48/catia.png</file> | |||
<file>48x48/claudia.png</file> | |||
<file>48x48/canvas.png</file> | |||
<file>48x48/exec.png</file> | |||
<file>48x48/jack.png</file> | |||
@@ -39,6 +41,7 @@ | |||
<file>scalable/catarina.svg</file> | |||
<file>scalable/catia.svg</file> | |||
<file>scalable/claudia.svg</file> | |||
<file>scalable/jack.svg</file> | |||
<file>scalable/pb_generic.svg</file> | |||
<file>scalable/pb_hardware.svg</file> | |||
@@ -0,0 +1,325 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
<!-- Created with Inkscape (http://www.inkscape.org/) --> | |||
<svg | |||
xmlns:dc="http://purl.org/dc/elements/1.1/" | |||
xmlns:cc="http://creativecommons.org/ns#" | |||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |||
xmlns:svg="http://www.w3.org/2000/svg" | |||
xmlns="http://www.w3.org/2000/svg" | |||
xmlns:xlink="http://www.w3.org/1999/xlink" | |||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |||
width="256" | |||
height="256" | |||
id="svg6140" | |||
version="1.1" | |||
inkscape:version="0.48.2 r9819" | |||
sodipodi:docname="New document 6"> | |||
<defs | |||
id="defs6142"> | |||
<filter | |||
color-interpolation-filters="sRGB" | |||
inkscape:collect="always" | |||
id="filter7476"> | |||
<feGaussianBlur | |||
inkscape:collect="always" | |||
stdDeviation="5.2386819" | |||
id="feGaussianBlur7478" /> | |||
</filter> | |||
<filter | |||
color-interpolation-filters="sRGB" | |||
inkscape:collect="always" | |||
id="filter6286-7-6" | |||
x="-0.13600001" | |||
width="1.272" | |||
y="-0.153" | |||
height="1.306"> | |||
<feGaussianBlur | |||
inkscape:collect="always" | |||
stdDeviation="4.08" | |||
id="feGaussianBlur6288-2-1" /> | |||
</filter> | |||
<radialGradient | |||
inkscape:collect="always" | |||
xlink:href="#linearGradient10261" | |||
id="radialGradient4872" | |||
gradientUnits="userSpaceOnUse" | |||
gradientTransform="matrix(1,0,0,0.77330692,0,-17.992775)" | |||
cx="620.23364" | |||
cy="-79.370644" | |||
fx="620.23364" | |||
fy="-79.370644" | |||
r="30.274588" /> | |||
<linearGradient | |||
id="linearGradient10261"> | |||
<stop | |||
style="stop-color:#677b94;stop-opacity:0.63846153;" | |||
offset="0" | |||
id="stop10263" /> | |||
<stop | |||
style="stop-color:#677b94;stop-opacity:0;" | |||
offset="1" | |||
id="stop10265" /> | |||
</linearGradient> | |||
<filter | |||
color-interpolation-filters="sRGB" | |||
inkscape:collect="always" | |||
id="filter10233-5"> | |||
<feGaussianBlur | |||
inkscape:collect="always" | |||
stdDeviation="1.6710923" | |||
id="feGaussianBlur10235-2" /> | |||
</filter> | |||
<filter | |||
color-interpolation-filters="sRGB" | |||
inkscape:collect="always" | |||
id="filter8786-73"> | |||
<feGaussianBlur | |||
inkscape:collect="always" | |||
stdDeviation="8.96" | |||
id="feGaussianBlur8788-2" /> | |||
</filter> | |||
<linearGradient | |||
inkscape:collect="always" | |||
xlink:href="#linearGradient4657-1" | |||
id="linearGradient4868" | |||
gradientUnits="userSpaceOnUse" | |||
gradientTransform="matrix(0.83385449,0,0,0.83385449,-12.083733,130.8065)" | |||
x1="241.21584" | |||
y1="795.42145" | |||
x2="-21.002575" | |||
y2="516.61938" /> | |||
<linearGradient | |||
id="linearGradient4657-1"> | |||
<stop | |||
style="stop-color:#000000;stop-opacity:1" | |||
offset="0" | |||
id="stop4659-5" /> | |||
<stop | |||
id="stop4661-33" | |||
offset="0.29307336" | |||
style="stop-color:#500000;stop-opacity:1" /> | |||
<stop | |||
id="stop4663-82" | |||
offset="0.80562556" | |||
style="stop-color:#a00000;stop-opacity:1" /> | |||
<stop | |||
style="stop-color:#d40000;stop-opacity:1" | |||
offset="1" | |||
id="stop4665-8" /> | |||
</linearGradient> | |||
<linearGradient | |||
inkscape:collect="always" | |||
xlink:href="#linearGradient3902-8" | |||
id="linearGradient4870" | |||
gradientUnits="userSpaceOnUse" | |||
gradientTransform="matrix(0.83385449,0,0,0.83385449,-12.083733,130.8065)" | |||
x1="320.00772" | |||
y1="662.08124" | |||
x2="-128.07874" | |||
y2="629.75647" /> | |||
<linearGradient | |||
id="linearGradient3902-8"> | |||
<stop | |||
style="stop-color:#783c00;stop-opacity:1" | |||
offset="0" | |||
id="stop3904-0" /> | |||
<stop | |||
id="stop3936-8" | |||
offset="0.07563529" | |||
style="stop-color:#d4a41c;stop-opacity:1" /> | |||
<stop | |||
id="stop3934-6" | |||
offset="0.14044002" | |||
style="stop-color:#743800;stop-opacity:1" /> | |||
<stop | |||
id="stop3932-9" | |||
offset="0.20430526" | |||
style="stop-color:#fcf87c;stop-opacity:1" /> | |||
<stop | |||
id="stop3930-33" | |||
offset="0.26901498" | |||
style="stop-color:#a86c00;stop-opacity:1" /> | |||
<stop | |||
id="stop3928-743" | |||
offset="0.3417097" | |||
style="stop-color:#9c6000;stop-opacity:1" /> | |||
<stop | |||
id="stop3926-71" | |||
offset="0.41261438" | |||
style="stop-color:#fcfc80;stop-opacity:1" /> | |||
<stop | |||
id="stop3924-3" | |||
offset="0.48499879" | |||
style="stop-color:#8c5000;stop-opacity:1" /> | |||
<stop | |||
id="stop3922-9" | |||
offset="0.54586536" | |||
style="stop-color:#fcfc80;stop-opacity:1" /> | |||
<stop | |||
id="stop3920-6" | |||
offset="0.62692177" | |||
style="stop-color:#d09c14;stop-opacity:1" /> | |||
<stop | |||
id="stop3918-42" | |||
offset="0.68774176" | |||
style="stop-color:#804400;stop-opacity:1" /> | |||
<stop | |||
id="stop3916-02" | |||
offset="0.75042593" | |||
style="stop-color:#d0a014;stop-opacity:0.9372549;" /> | |||
<stop | |||
id="stop3914-9" | |||
offset="0.81777459" | |||
style="stop-color:#743800;stop-opacity:1" /> | |||
<stop | |||
id="stop3912-5" | |||
offset="0.87812954" | |||
style="stop-color:#d0a014;stop-opacity:0.74901961;" /> | |||
<stop | |||
id="stop3910-7" | |||
offset="0.94099933" | |||
style="stop-color:#743800;stop-opacity:1" /> | |||
<stop | |||
style="stop-color:#fcfc80;stop-opacity:1" | |||
offset="1" | |||
id="stop3906-4" /> | |||
</linearGradient> | |||
<linearGradient | |||
y2="516.61938" | |||
x2="-21.002575" | |||
y1="795.42145" | |||
x1="241.21584" | |||
gradientTransform="matrix(0.83385449,0,0,0.83385449,-12.083733,130.8065)" | |||
gradientUnits="userSpaceOnUse" | |||
id="linearGradient6136" | |||
xlink:href="#linearGradient4657-1" | |||
inkscape:collect="always" /> | |||
<linearGradient | |||
y2="629.75647" | |||
x2="-128.07874" | |||
y1="662.08124" | |||
x1="320.00772" | |||
gradientTransform="matrix(0.83385449,0,0,0.83385449,-12.083733,130.8065)" | |||
gradientUnits="userSpaceOnUse" | |||
id="linearGradient6138" | |||
xlink:href="#linearGradient3902-8" | |||
inkscape:collect="always" /> | |||
</defs> | |||
<sodipodi:namedview | |||
id="base" | |||
pagecolor="#ffffff" | |||
bordercolor="#666666" | |||
borderopacity="1.0" | |||
inkscape:pageopacity="0.0" | |||
inkscape:pageshadow="2" | |||
inkscape:zoom="0.35" | |||
inkscape:cx="303.02687" | |||
inkscape:cy="56.571424" | |||
inkscape:document-units="px" | |||
inkscape:current-layer="layer1" | |||
showgrid="false" | |||
fit-margin-top="0" | |||
fit-margin-left="0" | |||
fit-margin-right="0" | |||
fit-margin-bottom="0" | |||
inkscape:window-width="483" | |||
inkscape:window-height="423" | |||
inkscape:window-x="877" | |||
inkscape:window-y="0" | |||
inkscape:window-maximized="0" /> | |||
<metadata | |||
id="metadata6145"> | |||
<rdf:RDF> | |||
<cc:Work | |||
rdf:about=""> | |||
<dc:format>image/svg+xml</dc:format> | |||
<dc:type | |||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |||
<dc:title></dc:title> | |||
</cc:Work> | |||
</rdf:RDF> | |||
</metadata> | |||
<g | |||
inkscape:label="Layer 1" | |||
inkscape:groupmode="layer" | |||
id="layer1" | |||
transform="translate(142.28571,-332.93361)"> | |||
<g | |||
transform="translate(-79.695445,-198.36742)" | |||
style="display:inline" | |||
id="g8790-9" | |||
inkscape:export-filename="/home/pj/Documents/svg/path10192-9.png" | |||
inkscape:export-xdpi="89.989967" | |||
inkscape:export-ydpi="89.989967"> | |||
<rect | |||
transform="matrix(0.83385449,0,0,0.83385449,-10.399092,130.80653)" | |||
ry="32" | |||
rx="32" | |||
y="505.79703" | |||
x="-37.086269" | |||
height="256" | |||
width="256" | |||
id="rect3756-4-1-0-1" | |||
style="opacity:0.93280634;fill:#1a1a1a;fill-opacity:1;stroke:#1a1a1a;stroke-width:8;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;filter:url(#filter8786-73)" /> | |||
<rect | |||
ry="26.683344" | |||
rx="26.683344" | |||
y="552.56763" | |||
x="-41.323643" | |||
height="213.46675" | |||
width="213.46675" | |||
id="rect3756-4-1-23" | |||
style="fill:url(#linearGradient6136);fill-opacity:1;stroke:url(#linearGradient6138);stroke-width:6.67083597;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> | |||
</g> | |||
<g | |||
style="display:inline" | |||
id="g6595" | |||
transform="translate(-718.28571,-467.67953)"> | |||
<path | |||
transform="matrix(1,0,0,-0.52854237,3.4921479e-6,1451.231)" | |||
id="path7634" | |||
d="m 701.5017,849.84619 c -18.84485,0.14924 -36.98433,7.54935 -50.6875,21.0625 -28.98716,28.58523 -29.34991,76.99794 -0.75,106 28.59991,29.00211 74.35659,29.33521 103.34376,0.75 23.8148,-23.48454 28.2687,-60.35424 13.25,-88.84375 l 12.5,-11.84375 c -15.9007,-4.62645 -35.2494,-10.60827 -49.625,-14.1875 l 15.5625,46.5 10.7812,-10.25 c 10.8194,21.79185 6.9041,48.25994 -11.6875,66.59375 -23.31944,22.99612 -61.76851,22.74209 -84.74996,-0.5625 -22.98144,-23.30459 -22.75698,-59.16012 0.5625,-82.15625 11.70695,-11.54462 27.96738,-17.85638 44.71875,-17.125 a 7.0168265,7.9572264 0 1 0 0.5625,-15.875 c -1.26147,-0.0551 -2.52493,-0.0725 -3.78125,-0.0625 z" | |||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.52569167;color:#000000;fill:#ff0000;fill-opacity:1;stroke:#ffff00;stroke-width:3.63681793;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter7476);enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" | |||
inkscape:connector-curvature="0" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path7632" | |||
d="m 701.50171,1002.0513 c -18.84485,-0.079 -36.98433,-3.99017 -50.6875,-11.13244 -28.98716,-15.10851 -29.34991,-40.69668 -0.75,-56.02549 28.59991,-15.32885 74.35659,-15.50491 103.34375,-0.39641 23.81476,12.41257 28.26869,31.89977 13.25,46.95769 l 12.5,6.25992 c -15.9007,2.44527 -35.24939,5.60692 -49.625,7.49869 l 15.5625,-24.57722 10.78125,5.41756 c 10.81931,-11.51791 6.9041,-25.50742 -11.6875,-35.19762 -23.31948,-12.15442 -61.76855,-12.02015 -84.75,0.29731 -22.98144,12.31746 -22.75698,31.26863 0.5625,43.42306 11.70695,6.10182 27.96738,9.43785 44.71875,9.05129 a 7.0168265,4.2057313 0 1 1 0.5625,8.39056 c -1.26147,0.029 -2.52493,0.038 -3.78125,0.033 z" | |||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:3.71435571;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> | |||
<path | |||
inkscape:export-ydpi="89.989967" | |||
inkscape:export-xdpi="89.989967" | |||
transform="matrix(0.97098472,-0.23914152,0.19131322,0.77678778,116.94726,1171.5074)" | |||
d="m 646.49761,-79.370644 c 0,11.157837 -11.75878,20.203051 -26.26397,20.203051 -14.50519,0 -26.26396,-9.045214 -26.26396,-20.203051 0,-11.157836 11.75877,-20.20305 26.26396,-20.20305 14.50519,0 26.26397,9.045214 26.26397,20.20305 z" | |||
sodipodi:ry="20.203051" | |||
sodipodi:rx="26.263966" | |||
sodipodi:cy="-79.370644" | |||
sodipodi:cx="620.23364" | |||
id="path10192" | |||
style="opacity:0.74703555;color:#000000;fill:none;stroke:#cccccc;stroke-width:4.64385748;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6286-7-6);enable-background:accumulate" | |||
sodipodi:type="arc" /> | |||
<path | |||
inkscape:export-ydpi="89.989967" | |||
inkscape:export-xdpi="89.989967" | |||
inkscape:export-filename="/home/pj/Documents/svg/path10192-9.png" | |||
inkscape:connector-curvature="0" | |||
id="path10192-2" | |||
d="m 724.98649,848.5283 c -2.51831,0 -4.5625,2.23 -4.5625,5 l 0,92.09372 c -5.48963,-2.1546 -12.88129,-2.548 -20.5625,-0.6562 -14.08432,3.4688 -23.79089,13.3015 -21.65625,21.9687 2.13464,8.6673 15.29068,12.8751 29.375,9.4063 13.44178,-3.3106 22.86633,-12.4224 21.84375,-20.7813 0.0499,-0.2977 0.0937,-0.5921 0.0937,-0.9062 l 0,-101.12502 c 0,-2.77 -2.01294,-5 -4.53125,-5 z" | |||
style="color:#000000;fill:#385680;fill-opacity:1;fill-rule:nonzero;stroke:#677b94;stroke-width:2.64400005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | |||
<path | |||
inkscape:export-ydpi="89.989967" | |||
inkscape:export-xdpi="89.989967" | |||
transform="matrix(0.97098472,-0.23914152,0.19131322,0.77678778,116.94727,1170.9216)" | |||
d="m 646.49761,-79.370644 c 0,11.157837 -11.75878,20.203051 -26.26397,20.203051 -14.50519,0 -26.26396,-9.045214 -26.26396,-20.203051 0,-11.157836 11.75877,-20.20305 26.26396,-20.20305 14.50519,0 26.26397,9.045214 26.26397,20.20305 z" | |||
sodipodi:ry="20.203051" | |||
sodipodi:rx="26.263966" | |||
sodipodi:cy="-79.370644" | |||
sodipodi:cx="620.23364" | |||
id="path10192-9" | |||
style="color:#000000;fill:url(#radialGradient4872);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.95608187;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter10233-5);enable-background:accumulate" | |||
sodipodi:type="arc" /> | |||
</g> | |||
</g> | |||
</svg> |
@@ -134,7 +134,7 @@ if __name__ == '__main__': | |||
client = jacklib.client_open_uuid("M", jacklib.JackSessionID, jacklib.pointer(jack_status), "") | |||
if not client: | |||
QMessageBox.critical(None, app.translate("XYControllerW", "Error"), app.translate("XYControllerW", "Could not connect to JACK, possible errors:\n%s" % (get_jack_status_error_string(jack_status)))) | |||
QMessageBox.critical(None, app.translate("MeterW", "Error"), app.translate("MeterW", "Could not connect to JACK, possible errors:\n%s" % (get_jack_status_error_string(jack_status)))) | |||
sys.exit(1) | |||
port_1 = jacklib.port_register(client, "in1", jacklib.JACK_DEFAULT_AUDIO_TYPE, jacklib.JackPortIsInput, 0) | |||
@@ -487,7 +487,7 @@ class JackSettingsW(QDialog, ui_settings_jack.Ui_JackSettingsW): | |||
setDriverParameter("snoop", value, True) | |||
if (self.obj_driver_channels.isEnabled()): | |||
value = dbus.UInt32(self.obj_driver_channels.value()) | |||
value = dbus.Int32(self.obj_driver_channels.value()) | |||
setDriverParameter("channels", value, True) | |||
def loadDriverSettings(self, reset=False, forceReset=False): | |||
@@ -28,7 +28,6 @@ def canvas_arrange(self): | |||
patchcanvas.arrange() | |||
def canvas_refresh(self): | |||
self.init_ports_prepare() | |||
patchcanvas.clear() | |||
self.init_ports() | |||
@@ -295,18 +295,18 @@ def setBufferSize(self, buffer_size, forced=False): | |||
elif (buffer_size == 8192): | |||
self.cb_buffer_size.setCurrentIndex(9) | |||
else: | |||
QMessageBox.warning(self, self.tr("Warning"), self.tr("Invalid JACK buffer-size requested")) | |||
#if ("act_jack_bf_list" in dir(self)): | |||
if (buffer_size): | |||
for act_bf in self.act_jack_bf_list: | |||
act_bf.setEnabled(True) | |||
if (act_bf.text().replace("&","") == str(buffer_size)): | |||
if (act_bf.isChecked() == False): | |||
act_bf.setChecked(True) | |||
else: | |||
if (act_bf.isChecked()): | |||
act_bf.setChecked(False) | |||
QMessageBox.warning(self, self.tr("Warning"), self.tr("Invalid JACK buffer-size requested: %i" % (buffer_size))) | |||
if ("act_jack_bf_list" in dir(self)): | |||
if (buffer_size): | |||
for act_bf in self.act_jack_bf_list: | |||
act_bf.setEnabled(True) | |||
if (act_bf.text().replace("&","") == str(buffer_size)): | |||
if (act_bf.isChecked() == False): | |||
act_bf.setChecked(True) | |||
else: | |||
if (act_bf.isChecked()): | |||
act_bf.setChecked(False) | |||
#else: | |||
#for i in range(len(self.act_jack_bf_list)): | |||
#self.act_jack_bf_list[i].setEnabled(False) | |||
@@ -358,6 +358,10 @@ def setXruns(self, xruns): | |||
def slot_showJackSettings(self): | |||
jacksettings.JackSettingsW(self).exec_() | |||
if (not jack.client): | |||
# Force update of gui widgets | |||
self.jackStopped() | |||
@pyqtSlot() | |||
def slot_showLogs(self): | |||
logs.LogsW(self).show() | |||
@@ -22,12 +22,34 @@ from PyQt4.QtGui import QDialog, QDialogButtonBox, QIcon, QPixmap | |||
# Imports (Custom Stuff) | |||
import ui_settings_app | |||
from shared import * | |||
from patchcanvas_theme import * | |||
# Define values here so we don't have to import fully patchcanvas here | |||
# Define values here so we don't have to import full patchcanvas here | |||
CANVAS_ANTIALIASING_SMALL = 1 | |||
CANVAS_EYECANDY_SMALL = 1 | |||
# ladish defines | |||
LADISH_CONF_KEY_DAEMON_NOTIFY = "/org/ladish/daemon/notify" | |||
LADISH_CONF_KEY_DAEMON_SHELL = "/org/ladish/daemon/shell" | |||
LADISH_CONF_KEY_DAEMON_TERMINAL = "/org/ladish/daemon/terminal" | |||
LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART = "/org/ladish/daemon/studio_autostart" | |||
LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY = "/org/ladish/daemon/js_save_delay" | |||
LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT = True | |||
LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT = "sh" | |||
LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT = "x-terminal-emulator" | |||
LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT = True | |||
LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT = 0 | |||
# Internal defines | |||
global SETTINGS_DEFAULT_PROJECT_FOLDER | |||
SETTINGS_DEFAULT_PROJECT_FOLDER = "/tmp" | |||
def setDefaultProjectFolder(folder): | |||
global SETTINGS_DEFAULT_PROJECT_FOLDER | |||
SETTINGS_DEFAULT_PROJECT_FOLDER = folder | |||
# Settings Dialog | |||
class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
def __init__(self, parent, appName, hasGL): | |||
@@ -36,6 +58,8 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
# Load app-specific settings | |||
self.ms_AutoHideGroups = True | |||
self.ms_UseSystemTray = True | |||
self.ms_CloseToTray = False | |||
if (appName == "catarina"): | |||
self.ms_AutoHideGroups = False | |||
@@ -45,11 +69,17 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
self.lw_page.setCurrentCell(1, 0) | |||
elif (appName == "catia"): | |||
self.ms_UseSystemTray = False | |||
self.group_main_paths.setVisible(False) | |||
self.lw_page.hideRow(2) | |||
self.lw_page.hideRow(3) | |||
self.lw_page.setCurrentCell(0, 0) | |||
elif (appName == "claudia"): | |||
self.cb_jack_port_alias.setVisible(False) | |||
self.label_jack_port_alias.setVisible(False) | |||
self.lw_page.setCurrentCell(0, 0) | |||
self.settings = self.parent().settings | |||
self.loadSettings() | |||
@@ -59,18 +89,25 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
self.label_icon.setPixmap(QPixmap(":/48x48/%s" % (appName))) | |||
self.lw_page.item(0, 0).setIcon(QIcon(":/48x48/%s" % (appName))) | |||
self.lw_page.item(3, 0).setIcon(QIcon.fromTheme("application-x-executable", QIcon(":/48x48/exec.png"))) | |||
self.connect(self.buttonBox.button(QDialogButtonBox.Reset), SIGNAL("clicked()"), SLOT("slot_resetSettings()")) | |||
self.connect(self, SIGNAL("accepted()"), SLOT("slot_saveSettings()")) | |||
self.connect(self.b_main_def_folder_open, SIGNAL("clicked()"), SLOT("slot_getAndSetPath()")) | |||
self.connect(self.buttonBox.button(QDialogButtonBox.Reset), SIGNAL("clicked()"), SLOT("slot_resetSettings()")) | |||
def loadSettings(self): | |||
# ------------------------ | |||
# Page 0 | |||
self.le_main_def_folder.setText(self.settings.value("Main/DefaultProjectFolder", SETTINGS_DEFAULT_PROJECT_FOLDER, type=str)) | |||
self.cb_tray_enable.setChecked(self.settings.value("Main/UseSystemTray", self.ms_UseSystemTray, type=bool)) | |||
self.cb_tray_close_to.setChecked(self.settings.value("Main/CloseToTray", self.ms_CloseToTray, type=bool)) | |||
self.sb_gui_refresh.setValue(self.settings.value("Main/RefreshInterval", 120, type=int)) | |||
self.cb_jack_port_alias.setCurrentIndex(self.settings.value("Main/JackPortAlias", 2, type=int)) | |||
# ------------------------ | |||
# Page 1 | |||
self.cb_canvas_hide_groups.setChecked(self.settings.value("Canvas/AutoHideGroups", self.ms_AutoHideGroups, type=bool)) | |||
self.cb_canvas_bezier_lines.setChecked(self.settings.value("Canvas/UseBezierLines", True, type=bool)) | |||
self.cb_canvas_eyecandy.setCheckState(self.settings.value("Canvas/EyeCandy", CANVAS_EYECANDY_SMALL, type=int)) | |||
@@ -87,15 +124,47 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
if (this_theme_name == theme_name): | |||
self.cb_canvas_theme.setCurrentIndex(i) | |||
# ------------------------ | |||
# Page 2 | |||
self.cb_ladish_notify.setChecked(self.settings.value(LADISH_CONF_KEY_DAEMON_NOTIFY, LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT, type=bool)) | |||
self.le_ladish_shell.setText(self.settings.value(LADISH_CONF_KEY_DAEMON_SHELL, LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT, type=str)) | |||
self.le_ladish_terminal.setText(self.settings.value(LADISH_CONF_KEY_DAEMON_TERMINAL, LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT, type=str)) | |||
self.cb_ladish_studio_autostart.setChecked(self.settings.value(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT, type=bool)) | |||
self.sb_ladish_jsdelay.setValue(self.settings.value(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT, type=int)) | |||
# ------------------------ | |||
# Page 3 | |||
database = self.settings.value("Apps/Database", "LADISH", type=str) | |||
if (database == "LADISH"): | |||
self.rb_database_ladish.setChecked(True) | |||
elif (database == "Klaudia"): | |||
self.rb_database_kxstudio.setChecked(True) | |||
@pyqtSlot() | |||
def slot_getAndSetPath(self): | |||
getAndSetPath(self, self.le_main_def_folder.text(), self.le_main_def_folder) | |||
@pyqtSlot() | |||
def slot_saveSettings(self): | |||
# TODO - check if page is visible | |||
# ------------------------ | |||
# Page 0 | |||
self.settings.setValue("Main/UseSystemTray", self.cb_tray_enable.isChecked()) | |||
self.settings.setValue("Main/CloseToTray", self.cb_tray_close_to.isChecked()) | |||
self.settings.setValue("Main/RefreshInterval", self.sb_gui_refresh.value()) | |||
self.settings.setValue("Main/JackPortAlias", self.cb_jack_port_alias.currentIndex()) | |||
if (self.group_main_paths.isVisible()): | |||
self.settings.setValue("Main/DefaultProjectFolder", self.le_main_def_folder.text()) | |||
if (self.cb_jack_port_alias.isVisible()): | |||
self.settings.setValue("Main/JackPortAlias", self.cb_jack_port_alias.currentIndex()) | |||
# ------------------------ | |||
# Page 1 | |||
self.settings.setValue("Canvas/Theme", self.cb_canvas_theme.currentText()) | |||
self.settings.setValue("Canvas/AutoHideGroups", self.cb_canvas_hide_groups.isChecked()) | |||
self.settings.setValue("Canvas/UseBezierLines", self.cb_canvas_bezier_lines.isChecked()) | |||
@@ -107,10 +176,31 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
self.settings.setValue("Canvas/EyeCandy", self.cb_canvas_eyecandy.checkState()) | |||
self.settings.setValue("Canvas/Antialiasing", self.cb_canvas_render_aa.checkState()) | |||
# ------------------------ | |||
# Page 2 | |||
self.settings.setValue(LADISH_CONF_KEY_DAEMON_NOTIFY, self.cb_ladish_notify.isChecked()) | |||
self.settings.setValue(LADISH_CONF_KEY_DAEMON_SHELL, self.le_ladish_shell.text()) | |||
self.settings.setValue(LADISH_CONF_KEY_DAEMON_TERMINAL, self.le_ladish_terminal.text()) | |||
self.settings.setValue(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, self.cb_ladish_studio_autostart.isChecked()) | |||
self.settings.setValue(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, self.sb_ladish_jsdelay.value()) | |||
# ------------------------ | |||
# Page 3 | |||
self.settings.setValue("Apps/Database", "LADISH" if self.rb_database_ladish.isChecked() else "Klaudia") | |||
@pyqtSlot() | |||
def slot_resetSettings(self): | |||
self.le_main_def_folder.setText(SETTINGS_DEFAULT_PROJECT_FOLDER) | |||
self.cb_tray_enable.setChecked(self.ms_UseSystemTray) | |||
self.cb_tray_close_to.setChecked(self.ms_CloseToTray) | |||
self.sb_gui_refresh.setValue(120) | |||
self.cb_jack_port_alias.setCurrentIndex(1) | |||
self.cb_ladish_notify.setChecked(LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT) | |||
self.cb_ladish_studio_autostart.setChecked(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT) | |||
self.le_ladish_shell.setText(LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT) | |||
self.le_ladish_terminal.setText(LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT) | |||
self.cb_canvas_theme.setCurrentIndex(0) | |||
self.cb_canvas_hide_groups.setChecked(self.ms_AutoHideGroups) | |||
self.cb_canvas_bezier_lines.setChecked(True) | |||
@@ -119,3 +209,4 @@ class SettingsW(QDialog, ui_settings_app.Ui_SettingsW): | |||
self.cb_canvas_render_aa.setCheckState(Qt.PartiallyChecked) | |||
self.cb_canvas_render_text_aa.setChecked(True) | |||
self.cb_canvas_render_hq_aa.setChecked(False) | |||
self.rb_database_ladish.setChecked(True) |
@@ -0,0 +1,111 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>StudioListW</class> | |||
<widget class="QDialog" name="StudioListW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>345</width> | |||
<height>362</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Load Studio</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Studio list</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QTableWidget" name="tableWidget"> | |||
<property name="editTriggers"> | |||
<set>QAbstractItemView::NoEditTriggers</set> | |||
</property> | |||
<property name="showDropIndicator" stdset="0"> | |||
<bool>false</bool> | |||
</property> | |||
<property name="dragDropOverwriteMode"> | |||
<bool>false</bool> | |||
</property> | |||
<property name="selectionMode"> | |||
<enum>QAbstractItemView::SingleSelection</enum> | |||
</property> | |||
<property name="selectionBehavior"> | |||
<enum>QAbstractItemView::SelectRows</enum> | |||
</property> | |||
<attribute name="horizontalHeaderStretchLastSection"> | |||
<bool>true</bool> | |||
</attribute> | |||
<attribute name="verticalHeaderVisible"> | |||
<bool>false</bool> | |||
</attribute> | |||
<attribute name="verticalHeaderDefaultSectionSize"> | |||
<number>22</number> | |||
</attribute> | |||
<column> | |||
<property name="text"> | |||
<string>Name</string> | |||
</property> | |||
</column> | |||
<column> | |||
<property name="text"> | |||
<string>Date</string> | |||
</property> | |||
</column> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>StudioListW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>StudioListW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -0,0 +1,76 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ui version="4.0"> | |||
<class>StudioNameW</class> | |||
<widget class="QDialog" name="StudioNameW"> | |||
<property name="geometry"> | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>312</width> | |||
<height>106</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Set name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<widget class="QGroupBox" name="groupBox"> | |||
<property name="title"> | |||
<string>Studio name</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout"> | |||
<item> | |||
<widget class="QLineEdit" name="le_name"/> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QDialogButtonBox" name="buttonBox"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="standardButtons"> | |||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
<resources/> | |||
<connections> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>accepted()</signal> | |||
<receiver>StudioNameW</receiver> | |||
<slot>accept()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>248</x> | |||
<y>254</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>157</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>buttonBox</sender> | |||
<signal>rejected()</signal> | |||
<receiver>StudioNameW</receiver> | |||
<slot>reject()</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>316</x> | |||
<y>260</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>286</x> | |||
<y>274</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -675,6 +675,29 @@ | |||
<item row="1" column="1"> | |||
<widget class="QLineEdit" name="le_ladish_terminal"/> | |||
</item> | |||
<item row="2" column="0"> | |||
<widget class="QLabel" name="label_2"> | |||
<property name="text"> | |||
<string>JS delay:</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="1"> | |||
<widget class="QSpinBox" name="sb_ladish_jsdelay"> | |||
<property name="suffix"> | |||
<string> seconds</string> | |||
</property> | |||
<property name="prefix"> | |||
<string/> | |||
</property> | |||
<property name="maximum"> | |||
<number>1000</number> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</item> | |||
<item> | |||
@@ -728,7 +751,7 @@ | |||
<string notr="true"/> | |||
</property> | |||
<property name="pixmap"> | |||
<pixmap>:/48x48/claudia.png</pixmap> | |||
<pixmap resource="../icons/icons.qrc">:/48x48/exec.png</pixmap> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignHCenter|Qt::AlignTop</set> | |||