Browse Source

Plugin skin work, start of style merging and compact mode

tags/1.9.6
falkTX 10 years ago
parent
commit
3f9d4f8096
12 changed files with 1487 additions and 1106 deletions
  1. +3
    -0
      Makefile
  2. BIN
      resources/bitmaps/dial_14.png
  3. BIN
      resources/bitmaps/dial_14d.png
  4. +2
    -0
      resources/resources.qrc
  5. +220
    -239
      resources/ui/carla_plugin_basic_fx.ui
  6. +417
    -0
      resources/ui/carla_plugin_compact.ui
  7. +3
    -0
      resources/ui/carla_plugin_default.ui
  8. +290
    -314
      resources/ui/carla_plugin_zynfx.ui
  9. +12
    -30
      source/carla_host.py
  10. +467
    -483
      source/carla_skin.py
  11. +11
    -16
      source/widgets/digitalpeakmeter.py
  12. +62
    -24
      source/widgets/racklistwidget.py

+ 3
- 0
Makefile View File

@@ -282,6 +282,7 @@ RES = \
bin/resources/ui_carla_parameter.py \
bin/resources/ui_carla_plugin_basic_fx.py \
bin/resources/ui_carla_plugin_calf.py \
bin/resources/ui_carla_plugin_compact.py \
bin/resources/ui_carla_plugin_default.py \
bin/resources/ui_carla_plugin_sf2.py \
bin/resources/ui_carla_plugin_zynfx.py \
@@ -327,6 +328,7 @@ UIs = \
source/ui_carla_parameter.py \
source/ui_carla_plugin_basic_fx.py \
source/ui_carla_plugin_calf.py \
source/ui_carla_plugin_compact.py \
source/ui_carla_plugin_default.py \
source/ui_carla_plugin_sf2.py \
source/ui_carla_plugin_zynfx.py \
@@ -573,6 +575,7 @@ endif
$(LINK) $(PREFIX)/share/carla/ui_carla_parameter.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_basic_fx.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_calf.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_compact.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_default.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_sf2.py $(DESTDIR)$(PREFIX)/share/carla/resources/
$(LINK) $(PREFIX)/share/carla/ui_carla_plugin_zynfx.py $(DESTDIR)$(PREFIX)/share/carla/resources/


BIN
resources/bitmaps/dial_14.png View File

Before After
Width: 2600  |  Height: 40  |  Size: 82KB

BIN
resources/bitmaps/dial_14d.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.7KB

+ 2
- 0
resources/resources.qrc View File

@@ -106,6 +106,8 @@
<file>bitmaps/dial_12d.png</file>
<file>bitmaps/dial_13.png</file>
<file>bitmaps/dial_13d.png</file>
<file>bitmaps/dial_14.png</file>
<file>bitmaps/dial_14d.png</file>

<file>bitmaps/kbd_h_dark.png</file>
<file>bitmaps/kbd_v_dark.png</file>


+ 220
- 239
resources/ui/carla_plugin_basic_fx.ui View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>338</width>
<height>71</height>
<width>552</width>
<height>60</height>
</rect>
</property>
<property name="contextMenuPolicy">
@@ -16,157 +16,212 @@
<property name="windowTitle">
<string>Frame</string>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>1</number>
<number>0</number>
</property>
<property name="leftMargin">
<number>2</number>
<number>4</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>2</number>
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
<number>3</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<layout class="QHBoxLayout" name="layout_top">
<property name="spacing">
<number>1</number>
</property>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="PixmapButton" name="b_enable">
<widget class="QWidget" name="w_buttons" native="true">
<property name="minimumSize">
<size>
<width>24</width>
<width>72</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<width>72</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="PixmapButton" name="b_enable">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_gui">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_gui.png</normaloff>:/bitmaps/button_gui.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_gui">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
<spacer name="spacer_namesep1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_gui.png</normaloff>:/bitmaps/button_gui.png</iconset>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="iconSize">
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>24</height>
<width>6</width>
<height>1</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</spacer>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<widget class="Line" name="line_sep">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
<property name="lineWidth">
<number>0</number>
</property>
<property name="checkable">
<bool>true</bool>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="flat">
<bool>true</bool>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="spacer_namesep2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>8</width>
<height>1</height>
</size>
</property>
</spacer>
@@ -177,23 +232,74 @@
<string>PluginName</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="spacer_namesep3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="layout_peaks">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="DigitalPeakMeter" name="peak_in" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="DigitalPeakMeter" name="peak_out" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_leds">
<property name="spacing">
@@ -289,22 +395,6 @@
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
@@ -321,36 +411,26 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="layout_bottom">
<property name="spacing">
<number>10</number>
<number>1</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>2</number>
<number>4</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<item>
<widget class="QWidget" name="w_screws_left" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="w_knobs" native="true">
<widget class="QWidget" name="w_knobs_left" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="spacer_knobs">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -363,102 +443,8 @@
</spacer>
</item>
<item>
<widget class="PixmapDial" name="dial_drywet">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="PixmapDial" name="dial_vol">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="DigitalPeakMeter" name="peak_in" native="true">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="DigitalPeakMeter" name="peak_out" native="true">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="w_screws_right" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<widget class="QWidget" name="w_knobs_right" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
</widget>
</item>
</layout>
@@ -482,11 +468,6 @@
<extends>QPushButton</extends>
<header>pixmapbutton.h</header>
</customwidget>
<customwidget>
<class>PixmapDial</class>
<extends>QDial</extends>
<header>pixmapdial.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../resources.qrc"/>


+ 417
- 0
resources/ui/carla_plugin_compact.ui View File

@@ -0,0 +1,417 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PluginWidget</class>
<widget class="QFrame" name="PluginWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>30</height>
</rect>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="windowTitle">
<string>Frame</string>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>1</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QWidget" name="w_buttons" native="true">
<property name="minimumSize">
<size>
<width>72</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>72</width>
<height>24</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="PixmapButton" name="b_enable">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_gui">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_gui.png</normaloff>:/bitmaps/button_gui.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="spacer_namesep1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line_name_sep">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="spacer_namesep2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_name">
<property name="text">
<string>PluginName</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="spacer_namesep3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>19</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="layout_peaks">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="DigitalPeakMeter" name="peak_in" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="DigitalPeakMeter" name="peak_out" native="true">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_leds">
<property name="spacing">
<number>1</number>
</property>
<item>
<widget class="LEDButton" name="led_control">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_midi">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_in">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_out">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>DigitalPeakMeter</class>
<extends>QWidget</extends>
<header>digitalpeakmeter.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LEDButton</class>
<extends>QPushButton</extends>
<header>ledbutton.h</header>
</customwidget>
<customwidget>
<class>PixmapButton</class>
<extends>QPushButton</extends>
<header>pixmapbutton.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../resources.qrc"/>
</resources>
<connections/>
</ui>

+ 3
- 0
resources/ui/carla_plugin_default.ui View File

@@ -16,6 +16,9 @@
<property name="windowTitle">
<string>Frame</string>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>2</number>


+ 290
- 314
resources/ui/carla_plugin_zynfx.ui View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>559</width>
<height>75</height>
<width>484</width>
<height>65</height>
</rect>
</property>
<property name="contextMenuPolicy">
@@ -24,116 +24,156 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>1</number>
<number>0</number>
</property>
<property name="leftMargin">
<number>2</number>
<number>4</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>2</number>
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
<number>3</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="layout_top">
<property name="spacing">
<number>1</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="PixmapButton" name="b_enable">
<widget class="QWidget" name="w_buttons" native="true">
<property name="minimumSize">
<size>
<width>24</width>
<width>72</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<width>72</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="PixmapButton" name="b_enable">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_gui">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_gui.png</normaloff>:/bitmaps/button_gui.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="PixmapButton" name="b_edit">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/bitmaps/button_edit.png</normaloff>:/bitmaps/button_edit.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="spacer_namesep1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -142,57 +182,49 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
<width>6</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_presets">
<property name="text">
<string>Preset:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<widget class="Line" name="line_2">
<property name="minimumSize">
<size>
<width>3</width>
<height>10</height>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="cb_presets">
<property name="minimumSize">
<property name="maximumSize">
<size>
<width>125</width>
<height>0</height>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<spacer name="spacer_namesep2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>8</width>
<height>1</height>
</size>
</property>
</spacer>
@@ -211,143 +243,145 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="spacer_namesep3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="spacer_counter">
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>160</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_control">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_midi">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_in">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_out">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
<layout class="QHBoxLayout" name="layout_presets">
<property name="spacing">
<number>4</number>
</property>
<property name="text">
<string/>
<property name="leftMargin">
<number>4</number>
</property>
<property name="checkable">
<bool>true</bool>
<property name="rightMargin">
<number>4</number>
</property>
</widget>
<item>
<widget class="QLabel" name="label_presets">
<property name="text">
<string>Preset:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_presets">
<property name="minimumSize">
<size>
<width>125</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
<layout class="QHBoxLayout" name="layout_leds">
<property name="spacing">
<number>1</number>
</property>
</spacer>
<item>
<widget class="LEDButton" name="led_control">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_midi">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_in">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LEDButton" name="led_audio_out">
<property name="minimumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>14</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
@@ -365,36 +399,26 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="layout_bottom">
<property name="spacing">
<number>10</number>
<number>1</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>2</number>
<number>4</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<item>
<widget class="QWidget" name="w_screws_left" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="w_knobs" native="true">
<widget class="QWidget" name="w_knobs_left" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_4"/>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -407,53 +431,26 @@
</spacer>
</item>
<item>
<widget class="PixmapDial" name="dial_drywet">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="PixmapDial" name="dial_vol">
<property name="minimumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<widget class="QWidget" name="w_knobs_right" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="layout_peaks">
<property name="spacing">
<number>1</number>
<number>4</number>
</property>
<property name="leftMargin">
<number>0</number>
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
<number>2</number>
</property>
<item>
<widget class="DigitalPeakMeter" name="peak_in" native="true">
@@ -489,22 +486,6 @@
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="w_screws_right" native="true">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -526,11 +507,6 @@
<extends>QPushButton</extends>
<header>pixmapbutton.h</header>
</customwidget>
<customwidget>
<class>PixmapDial</class>
<extends>QDial</extends>
<header>pixmapdial.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../resources.qrc"/>


+ 12
- 30
source/carla_host.py View File

@@ -128,12 +128,6 @@ class HostWindow(QMainWindow):
self.fClientName = CARLA_CLIENT_NAME or "Carla"
self.fSessionManagerName = ""

# ----------------------------------------------------------------------------------------------------
# Internal stuff (rack)

self.fCurrentRow = -1
self.fLastSelectedItem = None

# ----------------------------------------------------------------------------------------------------
# Internal stuff (patchbay)

@@ -239,8 +233,6 @@ class HostWindow(QMainWindow):
self.ui.rackScrollBar.rangeChanged.connect(sb.setRange)
self.ui.rackScrollBar.valueChanged.connect(sb.setValue)

self.ui.listWidget.currentRowChanged.connect(self.slot_currentRowChanged)

self.ui.rack.setStyleSheet("""
QLabel#pad_left {
background-image: url(:/bitmaps/rack_padding_left.png);
@@ -420,6 +412,17 @@ class HostWindow(QMainWindow):
# --------------------------------------------------------------------------------------------------------
# Setup

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

pitem = self.fPluginList[pluginId]

if pitem is None:
return

pitem.recreateWidget(True)

def setLoadRDFsNeeded(self):
self.fLadspaRdfNeedsUpdate = True

@@ -1505,24 +1508,6 @@ class HostWindow(QMainWindow):
vsb.setValue(yp * vsb.maximum())
self.updateCanvasInitialPos()

# --------------------------------------------------------------------------------------------------------
# Rack stuff

@pyqtSlot(int)
def slot_currentRowChanged(self, row):
self.fCurrentRow = row

if self.fLastSelectedItem is not None:
self.fLastSelectedItem.setSelected(False)

if row < 0 or row >= self.fPluginCount or self.fPluginList[row] is None:
self.fLastSelectedItem = None
return

pitem = self.fPluginList[row]
pitem.getWidget().setSelected(True)
self.fLastSelectedItem = pitem.getWidget()

# --------------------------------------------------------------------------------------------------------
# Timers

@@ -1574,10 +1559,7 @@ class HostWindow(QMainWindow):
if pitem is None:
return

self.ui.listWidget.setCurrentRow(-1)
self.fCurrentRow = -1
self.fLastSelectedItem = None

self.ui.listWidget.customClearSelection()
pitem.recreateWidget()

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


+ 467
- 483
source/carla_skin.py
File diff suppressed because it is too large
View File


+ 11
- 16
source/widgets/digitalpeakmeter.py View File

@@ -24,6 +24,8 @@ from carla_config import *
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

from math import sqrt

if config_UseQt5:
from PyQt5.QtCore import qCritical, Qt, QTimer, QSize
from PyQt5.QtGui import QColor, QLinearGradient, QPainter, QPen, QPixmap
@@ -323,13 +325,9 @@ class DigitalPeakMeter(QWidget):

# draw levels
for level in self.fChannelData:
if level == 0.0:
meterPos += meterSize
continue

blevel = int(level*26.0)*3

painter.drawPixmap(5, meterPos, blevel, 4, self.fMeterPixmaps[1], 0, 0, blevel, 4)
if level != 0.0:
blevel = int(sqrt(level)*26.0)*3
painter.drawPixmap(5, meterPos, blevel, 4, self.fMeterPixmaps[1], 0, 0, blevel, 4)
meterPos += meterSize

def paintEvent(self, event):
@@ -371,16 +369,13 @@ class DigitalPeakMeter(QWidget):
# draw levels
for level in self.fChannelData:
if level == 0.0:
meterPos += meterSize+meterPad
continue

if self.fMeterOrientation == self.HORIZONTAL:
painter.drawRect(0, meterPos, int(level * float(width)), meterSize)
meterPos += meterSize+meterPad

pass
elif self.fMeterOrientation == self.HORIZONTAL:
painter.drawRect(0, meterPos, int(sqrt(level) * float(width)), meterSize)
elif self.fMeterOrientation == self.VERTICAL:
painter.drawRect(meterPos, height - int(level * float(height)), meterSize, height)
meterPos += meterSize+meterPad
painter.drawRect(meterPos, height - int(sqrt(level) * float(height)), meterSize, height)

meterPos += meterSize+meterPad

if not self.fMeterLinesEnabled:
return


+ 62
- 24
source/widgets/racklistwidget.py View File

@@ -42,6 +42,7 @@ from carla_skin import *

class RackListItem(QListWidgetItem):
kRackItemType = QListWidgetItem.UserType + 1
kMinimumWidth = 620

def __init__(self, parent, pluginId, useSkins):
QListWidgetItem.__init__(self, parent, self.kRackItemType)
@@ -59,11 +60,15 @@ class RackListItem(QListWidgetItem):

self.fParent = parent
self.fPluginId = pluginId
self.fUseSkins = useSkins
self.fWidget = None

self.fOptions = {
'compact': False,
'useSkins': useSkins
}

self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
#self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled|Qt.ItemIsDragEnabled|Qt.ItemIsDropEnabled)
#self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled|Qt.ItemIsDragEnabled)

# ----------------------------------------------------------------------------------------------------
# Set-up GUI
@@ -76,17 +81,21 @@ class RackListItem(QListWidgetItem):
if self.fWidget is None:
return

self.fWidget.fEditDialog.close()
self.fWidget.fEditDialog.setParent(None)
self.fWidget.fEditDialog.deleteLater()
del self.fWidget.fEditDialog
widget = self.fWidget
self.fWidget = None

self.fWidget.close()
self.fWidget.setParent(None)
self.fWidget.deleteLater()
del self.fWidget
self.fParent.customClearSelection()
self.fParent.setItemWidget(self, None)

self.fWidget = None
widget.fEditDialog.close()
widget.fEditDialog.setParent(None)
widget.fEditDialog.deleteLater()
del widget.fEditDialog

widget.close()
widget.setParent(None)
widget.deleteLater()
del widget

def getEditDialog(self):
if self.fWidget is None:
@@ -108,15 +117,24 @@ class RackListItem(QListWidgetItem):
if self.fWidget is not None:
self.fWidget.setPluginId(pluginId)

def setSelected(self, select):
if self.fWidget is not None:
self.fWidget.setSelected(select)

QListWidgetItem.setSelected(self, select)

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

def recreateWidget(self):
def recreateWidget(self, invertCompactOption = False):
if invertCompactOption:
self.fOptions['compact'] = not self.fOptions['compact']

self.close()

self.fWidget = createPluginSlot(self.fParent, self.host, self.fPluginId, self.fUseSkins)
self.fWidget = createPluginSlot(self.fParent, self.host, self.fPluginId, self.fOptions)
self.fWidget.setFixedHeight(self.fWidget.getFixedHeight())

self.setSizeHint(QSize(620, self.fWidget.getFixedHeight()))
self.setSizeHint(QSize(self.kMinimumWidth, self.fWidget.getFixedHeight()))

self.fParent.setItemWidget(self, self.fWidget)

@@ -143,10 +161,15 @@ class RackListWidget(QListWidget):
if not WINDOWS:
exts.append(".so")

self.fSupportedExtensions = tuple(i.replace("*","") for i in exts)
self.fSupportedExtensions = tuple(i.replace("*","").lower() for i in exts)
self.fLastSelectedItem = None
self.fWasLastDragValid = False

self.setMinimumWidth(640)
self.fPixmapL = QPixmap(":/bitmaps/rack_interior_left.png")
self.fPixmapR = QPixmap(":/bitmaps/rack_interior_right.png")
self.fPixmapWidth = self.fPixmapL.width()

self.setMinimumWidth(RackListItem.kMinimumWidth)
self.setSelectionMode(QAbstractItemView.SingleSelection)
self.setSortingEnabled(False)

@@ -158,11 +181,6 @@ class RackListWidget(QListWidget):
self.setFrameShape(QFrame.NoFrame)
self.setFrameShadow(QFrame.Plain)

self.fPixmapL = QPixmap(":/bitmaps/rack_interior_left.png")
self.fPixmapR = QPixmap(":/bitmaps/rack_interior_right.png")

self.fPixmapWidth = self.fPixmapL.width()

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

def createItem(self, pluginId, useSkins):
@@ -173,13 +191,18 @@ class RackListWidget(QListWidget):

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

def customClearSelection(self):
self.setCurrentRow(-1)
self.clearSelection()
self.clearFocus()

def isDragUrlValid(self, url):
filename = url.toLocalFile()

if os.path.isdir(filename):
if os.path.exists(os.path.join(filename, "manifest.ttl")):
return True
if filename.lower().endswith((".vst", ".vst3")):
if MACOS and filename.lower().endswith((".vst", ".vst3")):
return True

elif os.path.isfile(filename):
@@ -264,9 +287,9 @@ class RackListWidget(QListWidget):
# --------------------------------------------------------------------------------------------------------

def mousePressEvent(self, event):
if self.itemAt(event.pos()) is None:
if self.itemAt(event.pos()) is None and self.currentRow() != -1:
event.accept()
self.setCurrentRow(-1)
self.customClearSelection()
return

QListWidget.mousePressEvent(self, event)
@@ -277,4 +300,19 @@ class RackListWidget(QListWidget):
painter.drawTiledPixmap(self.width()-self.fPixmapWidth-2, 0, self.fPixmapWidth, self.height(), self.fPixmapR)
QListWidget.paintEvent(self, event)

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

def selectionChanged(self, selected, deselected):
for index in deselected.indexes():
item = self.itemFromIndex(index)
if item is not None:
item.setSelected(False)

for index in selected.indexes():
item = self.itemFromIndex(index)
if item is not None:
item.setSelected(True)

QListWidget.selectionChanged(self, selected, deselected)

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

Loading…
Cancel
Save