Browse Source

Place more parameters per tab in editor dialog

tags/1.9.8
falkTX 7 years ago
parent
commit
57dd6027bd
3 changed files with 122 additions and 61 deletions
  1. +109
    -55
      resources/ui/carla_edit.ui
  2. +5
    -2
      resources/ui/carla_parameter.ui
  3. +8
    -4
      source/carla_widgets.py

+ 109
- 55
resources/ui/carla_edit.ui View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>509</width>
<height>443</height>
<width>758</width>
<height>435</height>
</rect>
</property>
<property name="windowTitle">
@@ -440,12 +440,12 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
@@ -471,47 +471,19 @@ Plugin Name
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QPushButton" name="b_save_state">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Save State</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-save.png</normaloff>:/16x16/document-save.png</iconset>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="b_load_state">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Load State</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-open.png</normaloff>:/16x16/document-open.png</iconset>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<item row="0" column="1" colspan="2">
<widget class="QStackedWidget" name="sw_programs">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -527,6 +499,22 @@ Plugin Name
</property>
<widget class="QWidget" name="sww_programs">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="margin">
<number>2</number>
</property>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_programs">
<property name="sizePolicy">
@@ -554,6 +542,25 @@ Plugin Name
</widget>
<widget class="QWidget" name="sww_midiPrograms">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="margin">
<number>2</number>
</property>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_midi_programs">
<property name="sizePolicy">
@@ -581,6 +588,50 @@ Plugin Name
</widget>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="b_save_state">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Save State</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-save.png</normaloff>:/16x16/document-save.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="b_load_state">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Load State</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-open.png</normaloff>:/16x16/document-open.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
@@ -651,22 +702,6 @@ Plugin Name
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="le_label">
<property name="inputMask">
<string notr="true"/>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="le_type">
<property name="inputMask">
@@ -755,6 +790,22 @@ Plugin Name
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="le_label">
<property name="inputMask">
<string notr="true"/>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -765,10 +816,13 @@ Plugin Name
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>


+ 5
- 2
resources/ui/carla_parameter.ui View File

@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>452</width>
<height>34</height>
<width>369</width>
<height>22</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">


+ 8
- 4
source/carla_widgets.py View File

@@ -431,7 +431,7 @@ class PluginEditParentMeta():

class PluginEdit(QDialog):
# settings
kParamsPerPage = 8
kParamsPerPage = 17

# signals
SIGTERM = pyqtSignal()
@@ -720,7 +720,10 @@ class PluginEdit(QDialog):

@pyqtSlot()
def slot_fixNameWordWrap(self):
if self.ui.tabWidget.count() > 0:
self.ui.tabWidget.setCurrentIndex(1)
self.adjustSize()
self.ui.tabWidget.setCurrentIndex(0)
self.setMinimumSize(self.width(), self.height())

#------------------------------------------------------------------
@@ -874,7 +877,7 @@ class PluginEdit(QDialog):
#parameter['name'] = parameter['name'][:30] + (parameter['name'][30:] and "...")

# -----------------------------------------------------------------
# Get width values, in packs of 10
# Get width values, in packs of 20

if parameter['type'] == PARAMETER_INPUT:
paramInputWidthTMP = QFontMetrics(self.font()).width(parameter['name'])
@@ -905,10 +908,10 @@ class PluginEdit(QDialog):
# for i in range(parameterCount)
else:
# Final page width values
if 0 < len(paramInputList) < 10:
if 0 < len(paramInputList) < self.kParamsPerPage:
paramInputListFull.append((paramInputList, paramInputWidth))

if 0 < len(paramOutputList) < 10:
if 0 < len(paramOutputList) < self.kParamsPerPage:
paramOutputListFull.append((paramOutputList, paramOutputWidth))

# Create parameter tabs + widgets
@@ -1491,6 +1494,7 @@ class PluginEdit(QDialog):
tabIndex = self.ui.tabWidget.count()
tabPageContainer = QWidget(self.ui.tabWidget)
tabPageLayout = QVBoxLayout(tabPageContainer)
tabPageLayout.setSpacing(1)
tabPageContainer.setLayout(tabPageLayout)

for paramInfo in paramList:


Loading…
Cancel
Save