Browse Source

Implement showing built-in dialog via canvas

tags/1.9.4
falkTX 10 years ago
parent
commit
a959d83144
5 changed files with 31 additions and 5 deletions
  1. +3
    -0
      source/carla
  2. +3
    -0
      source/carla_host.py
  3. +11
    -1
      source/carla_patchbay.py
  4. +10
    -0
      source/carla_rack.py
  5. +4
    -4
      source/patchcanvas.py

+ 3
- 0
source/carla View File

@@ -147,6 +147,9 @@ class CarlaMultiW(QTabWidget):
self.fPatchbay.saveSettings(settings)
#self.fParent.saveSettings(settings)

def showEditDialog(self, pluginId):
self.fRack.showEditDialog(pluginId)

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

def fixCanvasPreviewSize(self):


+ 3
- 0
source/carla_host.py View File

@@ -97,6 +97,9 @@ class CarlaDummyW(object):
def saveSettings(self, settings):
pass

def showEditDialog(self, pluginId):
pass

# ------------------------------------------------------------------------------------------------------------
# Host Window



+ 11
- 1
source/carla_patchbay.py View File

@@ -264,6 +264,16 @@ class CarlaPatchbayW(QFrame):
settings.setValue("HorizontalScrollBarValue", self.fView.horizontalScrollBar().value())
settings.setValue("VerticalScrollBarValue", self.fView.verticalScrollBar().value())

def showEditDialog(self, pluginId):
if pluginId >= self.fPluginCount:
return

pitem = self.fPluginList[pluginId]
if pitem is None:
return

pitem.show()

# -----------------------------------------------------------------
# called by PluginEdit, ignored here

@@ -890,7 +900,7 @@ def canvasCallback(action, value1, value2, valueStr):
elif action == patchcanvas.ACTION_PLUGIN_EDIT:
pluginId = value1

# TODO
Carla.gui.fContainer.showEditDialog(pluginId)

elif action == patchcanvas.ACTION_PLUGIN_RENAME:
pluginId = value1


+ 10
- 0
source/carla_rack.py View File

@@ -232,6 +232,16 @@ class CarlaRackW(QListWidget):
def saveSettings(self, settings):
pass

def showEditDialog(self, pluginId):
if pluginId >= self.fPluginCount:
return

pitem = self.fPluginList[pluginId]
if pitem is None:
return

pitem.widget.slot_showEditDialog(True)

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

@pyqtSlot()


+ 4
- 4
source/patchcanvas.py View File

@@ -2451,9 +2451,6 @@ class CanvasBox(QGraphicsItem):
act_p_rename = menu.addAction("&Rename...")
act_p_remove = menu.addAction("Re&move")

# TODO
act_p_edit.setVisible(False)

if not self.m_plugin_ui:
act_p_ui.setVisible(False)

@@ -2475,7 +2472,10 @@ class CanvasBox(QGraphicsItem):

act_selected = menu.exec_(event.screenPos())

if act_selected == act_x_disc_all:
if act_selected is None:
pass

elif act_selected == act_x_disc_all:
for port_id in port_con_list:
canvas.callback(ACTION_PORTS_DISCONNECT, port_id, 0, "")



Loading…
Cancel
Save