@@ -49,7 +49,8 @@ | |||||
<file>bitmaps/carla_about.png</file> | <file>bitmaps/carla_about.png</file> | ||||
<file>bitmaps/background_3bandeq.png</file> | <file>bitmaps/background_3bandeq.png</file> | ||||
<file>bitmaps/background_calf.png</file> | |||||
<file>bitmaps/background_calf_black.png</file> | |||||
<file>bitmaps/background_calf_blue.png</file> | |||||
<file>bitmaps/background_nekobi.png</file> | <file>bitmaps/background_nekobi.png</file> | ||||
<file>bitmaps/background_nekobi_left.png</file> | <file>bitmaps/background_nekobi_left.png</file> | ||||
<file>bitmaps/background_nekobi_right.png</file> | <file>bitmaps/background_nekobi_right.png</file> | ||||
@@ -89,6 +90,14 @@ | |||||
<file>bitmaps/dial_05d.png</file> | <file>bitmaps/dial_05d.png</file> | ||||
<file>bitmaps/dial_06.png</file> | <file>bitmaps/dial_06.png</file> | ||||
<file>bitmaps/dial_06d.png</file> | <file>bitmaps/dial_06d.png</file> | ||||
<file>bitmaps/dial_07.png</file> | |||||
<file>bitmaps/dial_07d.png</file> | |||||
<file>bitmaps/dial_08.png</file> | |||||
<file>bitmaps/dial_08d.png</file> | |||||
<file>bitmaps/dial_09.png</file> | |||||
<file>bitmaps/dial_09d.png</file> | |||||
<file>bitmaps/dial_10.png</file> | |||||
<file>bitmaps/dial_10d.png</file> | |||||
<file>bitmaps/kbd_h_dark.png</file> | <file>bitmaps/kbd_h_dark.png</file> | ||||
<file>bitmaps/kbd_v_dark.png</file> | <file>bitmaps/kbd_v_dark.png</file> | ||||
@@ -6,8 +6,8 @@ | |||||
<rect> | <rect> | ||||
<x>0</x> | <x>0</x> | ||||
<y>0</y> | <y>0</y> | ||||
<width>637</width> | |||||
<height>64</height> | |||||
<width>643</width> | |||||
<height>68</height> | |||||
</rect> | </rect> | ||||
</property> | </property> | ||||
<property name="contextMenuPolicy"> | <property name="contextMenuPolicy"> | ||||
@@ -27,81 +27,23 @@ | |||||
<number>8</number> | <number>8</number> | ||||
</property> | </property> | ||||
<property name="topMargin"> | <property name="topMargin"> | ||||
<number>0</number> | |||||
<number>3</number> | |||||
</property> | </property> | ||||
<property name="rightMargin"> | <property name="rightMargin"> | ||||
<number>8</number> | <number>8</number> | ||||
</property> | </property> | ||||
<property name="bottomMargin"> | <property name="bottomMargin"> | ||||
<number>8</number> | |||||
<number>3</number> | |||||
</property> | </property> | ||||
<item row="1" column="4" colspan="2"> | |||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | |||||
<property name="spacing"> | |||||
<number>0</number> | |||||
</property> | |||||
<item> | |||||
<spacer name="horizontalSpacer"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>40</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item> | |||||
<widget class="QLabel" name="label_logo"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>71</width> | |||||
<height>30</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>71</width> | |||||
<height>30</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="pixmap"> | |||||
<pixmap resource="../resources.qrc">:/bitmaps/logo_calf.png</pixmap> | |||||
</property> | |||||
<property name="alignment"> | |||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
</item> | |||||
<item row="0" column="1" rowspan="2"> | |||||
<spacer name="horizontalSpacer_2"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>40</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item row="0" column="5"> | <item row="0" column="5"> | ||||
<layout class="QVBoxLayout" name="verticalLayout_3"> | |||||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||||
<property name="spacing"> | <property name="spacing"> | ||||
<number>0</number> | <number>0</number> | ||||
</property> | </property> | ||||
<item> | <item> | ||||
<widget class="QLabel" name="label_audio_out"> | |||||
<widget class="QLabel" name="label_audio_in"> | |||||
<property name="text"> | <property name="text"> | ||||
<string>audio out</string> | |||||
<string>AUDIO IN</string> | |||||
</property> | </property> | ||||
<property name="alignment"> | <property name="alignment"> | ||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set> | <set>Qt::AlignBottom|Qt::AlignHCenter</set> | ||||
@@ -109,7 +51,7 @@ | |||||
</widget> | </widget> | ||||
</item> | </item> | ||||
<item> | <item> | ||||
<widget class="DigitalPeakMeter" name="peak_out" native="true"> | |||||
<widget class="DigitalPeakMeter" name="peak_in" native="true"> | |||||
<property name="minimumSize"> | <property name="minimumSize"> | ||||
<size> | <size> | ||||
<width>150</width> | <width>150</width> | ||||
@@ -120,33 +62,73 @@ | |||||
</item> | </item> | ||||
</layout> | </layout> | ||||
</item> | </item> | ||||
<item row="0" column="4"> | |||||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||||
<property name="spacing"> | |||||
<number>0</number> | |||||
</property> | |||||
<item row="0" column="0" rowspan="2"> | |||||
<layout class="QVBoxLayout" name="verticalLayout"> | |||||
<item> | <item> | ||||
<widget class="QLabel" name="label_audio_in"> | |||||
<widget class="QLabel" name="label_name"> | |||||
<property name="font"> | |||||
<font> | |||||
<weight>75</weight> | |||||
<bold>true</bold> | |||||
</font> | |||||
</property> | |||||
<property name="text"> | <property name="text"> | ||||
<string>audio in</string> | |||||
<string>TextLabel</string> | |||||
</property> | </property> | ||||
<property name="alignment"> | <property name="alignment"> | ||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set> | |||||
<set>Qt::AlignCenter</set> | |||||
</property> | </property> | ||||
</widget> | </widget> | ||||
</item> | </item> | ||||
<item> | <item> | ||||
<widget class="DigitalPeakMeter" name="peak_in" native="true"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>150</width> | |||||
<height>0</height> | |||||
</size> | |||||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||||
<property name="bottomMargin"> | |||||
<number>3</number> | |||||
</property> | </property> | ||||
</widget> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_gui"> | |||||
<property name="text"> | |||||
<string>GUI</string> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_edit"> | |||||
<property name="text"> | |||||
<string>Edit</string> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_remove"> | |||||
<property name="text"> | |||||
<string>Remove</string> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
</item> | </item> | ||||
</layout> | </layout> | ||||
</item> | </item> | ||||
<item row="0" column="3" rowspan="2"> | |||||
<spacer name="horizontalSpacer_3"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>1</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item row="0" column="2" rowspan="2"> | <item row="0" column="2" rowspan="2"> | ||||
<layout class="QVBoxLayout" name="verticalLayout_4"> | <layout class="QVBoxLayout" name="verticalLayout_4"> | ||||
<property name="spacing"> | <property name="spacing"> | ||||
@@ -197,7 +179,7 @@ | |||||
</property> | </property> | ||||
<property name="sizeHint" stdset="0"> | <property name="sizeHint" stdset="0"> | ||||
<size> | <size> | ||||
<width>20</width> | |||||
<width>1</width> | |||||
<height>40</height> | <height>40</height> | ||||
</size> | </size> | ||||
</property> | </property> | ||||
@@ -205,59 +187,48 @@ | |||||
</item> | </item> | ||||
</layout> | </layout> | ||||
</item> | </item> | ||||
<item row="0" column="0" rowspan="2"> | |||||
<layout class="QVBoxLayout" name="verticalLayout"> | |||||
<item row="0" column="6"> | |||||
<layout class="QVBoxLayout" name="verticalLayout_3"> | |||||
<property name="spacing"> | |||||
<number>0</number> | |||||
</property> | |||||
<item> | <item> | ||||
<widget class="QLabel" name="label_name"> | |||||
<property name="font"> | |||||
<font> | |||||
<weight>75</weight> | |||||
<bold>true</bold> | |||||
</font> | |||||
</property> | |||||
<widget class="QLabel" name="label_audio_out"> | |||||
<property name="text"> | <property name="text"> | ||||
<string>TextLabel</string> | |||||
<string>AUDIO OUT</string> | |||||
</property> | </property> | ||||
<property name="alignment"> | <property name="alignment"> | ||||
<set>Qt::AlignCenter</set> | |||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set> | |||||
</property> | </property> | ||||
</widget> | </widget> | ||||
</item> | </item> | ||||
<item> | <item> | ||||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_gui"> | |||||
<property name="text"> | |||||
<string>GUI</string> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_edit"> | |||||
<property name="text"> | |||||
<string>Edit</string> | |||||
</property> | |||||
<property name="checkable"> | |||||
<bool>true</bool> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
<item> | |||||
<widget class="PixmapButton" name="b_remove"> | |||||
<property name="text"> | |||||
<string>Remove</string> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
<widget class="DigitalPeakMeter" name="peak_out" native="true"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>150</width> | |||||
<height>0</height> | |||||
</size> | |||||
</property> | |||||
</widget> | |||||
</item> | </item> | ||||
</layout> | </layout> | ||||
</item> | </item> | ||||
<item row="0" column="3" rowspan="2"> | |||||
<spacer name="horizontalSpacer_3"> | |||||
<item row="0" column="1" rowspan="2"> | |||||
<spacer name="horizontalSpacer_2"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>1</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item row="0" column="4"> | |||||
<spacer name="horizontalSpacer_4"> | |||||
<property name="orientation"> | <property name="orientation"> | ||||
<enum>Qt::Horizontal</enum> | <enum>Qt::Horizontal</enum> | ||||
</property> | </property> | ||||
@@ -269,6 +240,72 @@ | |||||
</property> | </property> | ||||
</spacer> | </spacer> | ||||
</item> | </item> | ||||
<item row="1" column="4" colspan="3"> | |||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | |||||
<property name="spacing"> | |||||
<number>0</number> | |||||
</property> | |||||
<item> | |||||
<spacer name="horizontalSpacer"> | |||||
<property name="orientation"> | |||||
<enum>Qt::Horizontal</enum> | |||||
</property> | |||||
<property name="sizeHint" stdset="0"> | |||||
<size> | |||||
<width>40</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item> | |||||
<widget class="QWidget" name="w_knobs" native="true"> | |||||
<layout class="QHBoxLayout" name="horizontalLayout_4"/> | |||||
</widget> | |||||
</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>10</width> | |||||
<height>20</height> | |||||
</size> | |||||
</property> | |||||
</spacer> | |||||
</item> | |||||
<item> | |||||
<widget class="QLabel" name="label_logo"> | |||||
<property name="minimumSize"> | |||||
<size> | |||||
<width>71</width> | |||||
<height>30</height> | |||||
</size> | |||||
</property> | |||||
<property name="maximumSize"> | |||||
<size> | |||||
<width>71</width> | |||||
<height>30</height> | |||||
</size> | |||||
</property> | |||||
<property name="text"> | |||||
<string/> | |||||
</property> | |||||
<property name="pixmap"> | |||||
<pixmap resource="../resources.qrc">:/bitmaps/logo_calf.png</pixmap> | |||||
</property> | |||||
<property name="alignment"> | |||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |||||
</property> | |||||
</widget> | |||||
</item> | |||||
</layout> | |||||
</item> | |||||
</layout> | </layout> | ||||
</widget> | </widget> | ||||
<customwidgets> | <customwidgets> | ||||
@@ -988,71 +988,25 @@ class PluginSlot_BasicFX(AbstractPluginSlot): | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
class PluginSlot_Nekobi(AbstractPluginSlot): | |||||
def __init__(self, parent, pluginId): | |||||
AbstractPluginSlot.__init__(self, parent, pluginId) | |||||
#self.ui = ui_carla_plugin_basic_fx.Ui_PluginWidget() | |||||
#self.ui.setupUi(self) | |||||
# ------------------------------------------------------------- | |||||
# Set-up GUI | |||||
self.fPixmapCenter = QPixmap(":/bitmaps/background_nekobi.png") | |||||
self.fPixmapLeft = QPixmap(":/bitmaps/background_nekobi_left.png") | |||||
self.fPixmapLeftRect = QRectF(0, 0, self.fPixmapLeft.width(), self.fPixmapLeft.height()) | |||||
self.fPixmapRight = QPixmap(":/bitmaps/background_nekobi_right.png") | |||||
self.fPixmapRightRect = QRectF(0, 0, self.fPixmapRight.width(), self.fPixmapRight.height()) | |||||
#self.setStyleSheet(""" | |||||
#PluginSlot_Nekobi#PluginWidget { | |||||
#background-image: url(:/bitmaps/background_nekobi.png); | |||||
#background-repeat: repeat-xy; | |||||
#} | |||||
#QLabel#label_name { | |||||
#color: #BBB; | |||||
#} | |||||
#""") | |||||
#------------------------------------------------------------------ | |||||
def getFixedHeight(self): | |||||
return 108 | |||||
#------------------------------------------------------------------ | |||||
def paintEvent(self, event): | |||||
painter = QPainter(self) | |||||
# main bg (center) | |||||
painter.drawTiledPixmap(0, 0, self.width(), self.height(), self.fPixmapCenter) | |||||
# left side | |||||
painter.drawPixmap(self.fPixmapLeftRect, self.fPixmapLeft, self.fPixmapLeftRect) | |||||
# right side | |||||
rightTarget = QRectF(self.fPixmapRightRect) | |||||
rightTarget.moveLeft(self.width()-rightTarget.width()) | |||||
painter.drawPixmap(rightTarget, self.fPixmapRight, self.fPixmapRightRect) | |||||
AbstractPluginSlot.paintEvent(self, event) | |||||
# ------------------------------------------------------------------------------------------------------------ | |||||
class PluginSlot_Calf(AbstractPluginSlot): | class PluginSlot_Calf(AbstractPluginSlot): | ||||
def __init__(self, parent, pluginId): | def __init__(self, parent, pluginId): | ||||
AbstractPluginSlot.__init__(self, parent, pluginId) | AbstractPluginSlot.__init__(self, parent, pluginId) | ||||
self.ui = ui_carla_plugin_calf.Ui_PluginWidget() | self.ui = ui_carla_plugin_calf.Ui_PluginWidget() | ||||
self.ui.setupUi(self) | self.ui.setupUi(self) | ||||
audioCount = gCarla.host.get_audio_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 2, 'outs': 2 } | |||||
midiCount = gCarla.host.get_midi_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 1, 'outs': 0 } | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Internal stuff | # Internal stuff | ||||
self.fButtonFont = QFont() | |||||
#self.fButtonFont.setBold(False) | |||||
self.fButtonFont = self.ui.b_gui.font() | |||||
self.fButtonFont.setBold(False) | |||||
self.fButtonFont.setPointSize(8) | self.fButtonFont.setPointSize(8) | ||||
# Use black for mono plugins | |||||
self.fBackgroundBlack = audioCount['ins'] == 1 | |||||
self.fButtonColorOn = QColor( 18, 41, 87) | self.fButtonColorOn = QColor( 18, 41, 87) | ||||
self.fButtonColorOff = QColor(150, 150, 150) | self.fButtonColorOff = QColor(150, 150, 150) | ||||
@@ -1060,15 +1014,15 @@ class PluginSlot_Calf(AbstractPluginSlot): | |||||
# Set-up GUI | # Set-up GUI | ||||
self.setStyleSheet(""" | self.setStyleSheet(""" | ||||
QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi { | |||||
color: black; | |||||
QLabel#label_name, QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi { | |||||
color: #BBB; | |||||
} | } | ||||
PluginSlot_Calf#PluginWidget { | PluginSlot_Calf#PluginWidget { | ||||
background-image: url(:/bitmaps/background_calf.png); | |||||
background-image: url(:/bitmaps/background_calf_%s.png); | |||||
background-repeat: repeat-xy; | background-repeat: repeat-xy; | ||||
border: 2px; | border: 2px; | ||||
} | } | ||||
""") | |||||
""" % ("black" if self.fBackgroundBlack else "blue")) | |||||
self.ui.b_gui.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") | self.ui.b_gui.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") | ||||
self.ui.b_edit.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") | self.ui.b_edit.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") | ||||
@@ -1084,12 +1038,9 @@ class PluginSlot_Calf(AbstractPluginSlot): | |||||
labelFont = self.ui.label_name.font() | labelFont = self.ui.label_name.font() | ||||
labelFont.setBold(True) | labelFont.setBold(True) | ||||
labelFont.setPointSize(labelFont.pointSize()+3) | |||||
labelFont.setPointSize(10) | |||||
self.ui.label_name.setFont(labelFont) | self.ui.label_name.setFont(labelFont) | ||||
audioCount = gCarla.host.get_audio_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 2, 'outs': 2 } | |||||
midiCount = gCarla.host.get_midi_port_count_info(self.fPluginId) if gCarla.host is not None else {'ins': 1, 'outs': 0 } | |||||
if audioCount['ins'] == 0: | if audioCount['ins'] == 0: | ||||
self.ui.label_audio_in.hide() | self.ui.label_audio_in.hide() | ||||
self.ui.peak_in.hide() | self.ui.peak_in.hide() | ||||
@@ -1105,6 +1056,45 @@ class PluginSlot_Calf(AbstractPluginSlot): | |||||
self.ui.label_midi.hide() | self.ui.label_midi.hide() | ||||
self.ui.led_midi.hide() | self.ui.led_midi.hide() | ||||
# ------------------------------------------------------------- | |||||
# Set-up parameters | |||||
parameterCount = gCarla.host.get_parameter_count(self.fPluginId) if gCarla.host is not None else 0 | |||||
index = 0 | |||||
limit = 7 if midiCount['ins'] == 0 else 6 | |||||
for i in range(parameterCount): | |||||
if index >= limit: | |||||
break | |||||
paramInfo = gCarla.host.get_parameter_info(self.fPluginId, i) | |||||
paramData = gCarla.host.get_parameter_data(self.fPluginId, i) | |||||
paramRanges = gCarla.host.get_parameter_ranges(self.fPluginId, i) | |||||
if paramData['type'] != PARAMETER_INPUT: | |||||
continue | |||||
if paramData['hints'] & PARAMETER_IS_BOOLEAN: | |||||
continue | |||||
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: | |||||
continue | |||||
paramName = getParameterShortName(paramInfo['name']) | |||||
widget = PixmapDial(self, i) | |||||
widget.setPixmap(7) | |||||
widget.setLabel(paramName) | |||||
widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT) | |||||
widget.setMinimum(paramRanges['min']) | |||||
widget.setMaximum(paramRanges['max']) | |||||
if (paramData['hints'] & PARAMETER_IS_ENABLED) == 0: | |||||
widget.setEnabled(False) | |||||
self.ui.w_knobs.layout().insertWidget(index, widget) | |||||
index += 1 | |||||
self.fParameterList.append([i, widget]) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
self.b_gui = self.ui.b_gui | self.b_gui = self.ui.b_gui | ||||
@@ -1126,7 +1116,7 @@ class PluginSlot_Calf(AbstractPluginSlot): | |||||
#------------------------------------------------------------------ | #------------------------------------------------------------------ | ||||
def getFixedHeight(self): | def getFixedHeight(self): | ||||
return 70 | |||||
return 88 | |||||
#------------------------------------------------------------------ | #------------------------------------------------------------------ | ||||
@@ -1138,6 +1128,72 @@ class PluginSlot_Calf(AbstractPluginSlot): | |||||
AbstractPluginSlot.pluginHintsChanged(self, hints) | AbstractPluginSlot.pluginHintsChanged(self, hints) | ||||
#------------------------------------------------------------------ | |||||
def paintEvent(self, event): | |||||
painter = QPainter(self) | |||||
painter.setBrush(Qt.transparent) | |||||
painter.setPen(QPen(QColor(20, 20, 20) if self.fBackgroundBlack else QColor(75, 86, 99), 1)) | |||||
painter.drawRect(0, 1, self.width()-1, 88-3) | |||||
painter.setPen(QPen(QColor(45, 45, 45) if self.fBackgroundBlack else QColor(86, 99, 114), 1)) | |||||
painter.drawLine(0, 0, self.width(), 0) | |||||
AbstractPluginSlot.paintEvent(self, event) | |||||
# ------------------------------------------------------------------------------------------------------------ | |||||
class PluginSlot_Nekobi(AbstractPluginSlot): | |||||
def __init__(self, parent, pluginId): | |||||
AbstractPluginSlot.__init__(self, parent, pluginId) | |||||
#self.ui = ui_carla_plugin_basic_fx.Ui_PluginWidget() | |||||
#self.ui.setupUi(self) | |||||
# ------------------------------------------------------------- | |||||
# Set-up GUI | |||||
self.fPixmapCenter = QPixmap(":/bitmaps/background_nekobi.png") | |||||
self.fPixmapLeft = QPixmap(":/bitmaps/background_nekobi_left.png") | |||||
self.fPixmapLeftRect = QRectF(0, 0, self.fPixmapLeft.width(), self.fPixmapLeft.height()) | |||||
self.fPixmapRight = QPixmap(":/bitmaps/background_nekobi_right.png") | |||||
self.fPixmapRightRect = QRectF(0, 0, self.fPixmapRight.width(), self.fPixmapRight.height()) | |||||
#self.setStyleSheet(""" | |||||
#PluginSlot_Nekobi#PluginWidget { | |||||
#background-image: url(:/bitmaps/background_nekobi.png); | |||||
#background-repeat: repeat-xy; | |||||
#} | |||||
#QLabel#label_name { | |||||
#color: #BBB; | |||||
#} | |||||
#""") | |||||
#------------------------------------------------------------------ | |||||
def getFixedHeight(self): | |||||
return 108 | |||||
#------------------------------------------------------------------ | |||||
def paintEvent(self, event): | |||||
painter = QPainter(self) | |||||
# main bg (center) | |||||
painter.drawTiledPixmap(0, 0, self.width(), self.height(), self.fPixmapCenter) | |||||
# left side | |||||
painter.drawPixmap(self.fPixmapLeftRect, self.fPixmapLeft, self.fPixmapLeftRect) | |||||
# right side | |||||
rightTarget = QRectF(self.fPixmapRightRect) | |||||
rightTarget.moveLeft(self.width()-rightTarget.width()) | |||||
painter.drawPixmap(rightTarget, self.fPixmapRight, self.fPixmapRightRect) | |||||
AbstractPluginSlot.paintEvent(self, event) | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
class PluginSlot_ZitaRev(AbstractPluginSlot): | class PluginSlot_ZitaRev(AbstractPluginSlot): | ||||
@@ -159,7 +159,7 @@ class PixmapDial(QDial): | |||||
self.fLabelPos.setX(float(self.fPixmapBaseSize)/2.0 - float(self.fLabelWidth)/2.0) | self.fLabelPos.setX(float(self.fPixmapBaseSize)/2.0 - float(self.fLabelWidth)/2.0) | ||||
if self.fPixmapNum in ("01", "02"): | |||||
if self.fPixmapNum in ("01", "02", "07", "08", "09", "10"): | |||||
self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight) | self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight) | ||||
else: | else: | ||||
self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight/2) | self.fLabelPos.setY(self.fPixmapBaseSize + self.fLabelHeight/2) | ||||