[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/plugins LV2/LV2PluginPropertiesDia...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/plugins LV2/LV2PluginPropertiesDia... |
Date: |
Thu, 24 May 2007 23:44:00 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/05/24 23:44:00
Modified files:
src/plugins/LV2: LV2PluginPropertiesDialog.cpp
LV2PluginPropertiesDialog.h
src/plugins : PluginSlider.cpp PluginSlider.h
Log message:
added reset button
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.cpp?cvsroot=traverso&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.h?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/PluginSlider.cpp?cvsroot=traverso&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/PluginSlider.h?cvsroot=traverso&r1=1.3&r2=1.4
Patches:
Index: LV2/LV2PluginPropertiesDialog.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- LV2/LV2PluginPropertiesDialog.cpp 24 May 2007 23:24:03 -0000 1.7
+++ LV2/LV2PluginPropertiesDialog.cpp 24 May 2007 23:43:59 -0000 1.8
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006 Remon Sijrier
+Copyright (C) 2006-2007 Remon Sijrier
This file is part of Traverso
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: LV2PluginPropertiesDialog.cpp,v 1.7 2007/05/24 23:24:03 r_sijrier Exp $
*/
@@ -47,10 +46,11 @@
optionsWidget->setLayout(optionsLayout);
QPushButton* bypassButton = new QPushButton(tr("Bypass"),
optionsWidget);
QPushButton* closeButton = new QPushButton(tr("Close"), optionsWidget);
+ QPushButton* resetButton = new QPushButton(tr("Reset"), optionsWidget);
optionsLayout->addWidget(bypassButton);
+ optionsLayout->addWidget(resetButton);
optionsLayout->addStretch(10);
optionsLayout->addWidget(closeButton);
- optionsLayout->setSpacing(0);
QVBoxLayout* dialogLayout = new QVBoxLayout;
dialogLayout->addWidget(sliderWidget);
@@ -66,6 +66,7 @@
}
QWidget* widget = new QWidget(sliderWidget);
+ widget->setMaximumHeight(22);
QHBoxLayout* lay = new QHBoxLayout();
lay->setSpacing(12);
lay->setMargin(3);
@@ -73,6 +74,7 @@
PluginSlider* slider = new PluginSlider(port);
slider->setFixedWidth(200);
slider->update_slider_position();
+ m_sliders.append(slider);
connect(slider, SIGNAL(sliderValueChanged(float)), port,
SLOT(set_control_value(float)));
// in case the plugin has a slave 'map' the signal to the slave
port control slot too!
@@ -104,6 +106,7 @@
}
connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(resetButton, SIGNAL(clicked()), this,
SLOT(reset_button_clicked()));
connect(bypassButton, SIGNAL(clicked()), this,
SLOT(bypass_button_clicked()));
}
@@ -112,5 +115,12 @@
m_plugin->toggle_bypass();
}
+void LV2PluginPropertiesDialog::reset_button_clicked()
+{
+ foreach(PluginSlider* slider, m_sliders) {
+ slider->reset_default_value();
+ }
+}
+
//eof
Index: LV2/LV2PluginPropertiesDialog.h
===================================================================
RCS file:
/sources/traverso/traverso/src/plugins/LV2/LV2PluginPropertiesDialog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- LV2/LV2PluginPropertiesDialog.h 24 May 2007 23:24:03 -0000 1.4
+++ LV2/LV2PluginPropertiesDialog.h 24 May 2007 23:44:00 -0000 1.5
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006 Remon Sijrier
+Copyright (C) 2006-2007 Remon Sijrier
This file is part of Traverso
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: LV2PluginPropertiesDialog.h,v 1.4 2007/05/24 23:24:03 r_sijrier Exp $
*/
@@ -27,6 +26,7 @@
#include <QDialog>
class LV2Plugin;
+class PluginSlider;
class LV2PluginPropertiesDialog : public QDialog
{
@@ -39,9 +39,11 @@
private:
LV2Plugin* m_plugin;
+ QList<PluginSlider*> m_sliders;
private slots:
void bypass_button_clicked();
+ void reset_button_clicked();
};
#endif
Index: PluginSlider.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/PluginSlider.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- PluginSlider.cpp 24 May 2007 23:24:03 -0000 1.5
+++ PluginSlider.cpp 24 May 2007 23:44:00 -0000 1.6
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006 Remon Sijrier
+Copyright (C) 2006-2007 Remon Sijrier
This file is part of Traverso
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: PluginSlider.cpp,v 1.5 2007/05/24 23:24:03 r_sijrier Exp $
*/
#include "PluginSlider.h"
@@ -147,4 +146,12 @@
calculate_new_value(mouseX);
}
+void PluginSlider::reset_default_value()
+{
+ m_value = m_port->get_default_value();
+ update_slider_position();
+ update();
+}
+
//eof
+
Index: PluginSlider.h
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/PluginSlider.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- PluginSlider.h 24 May 2007 23:24:03 -0000 1.3
+++ PluginSlider.h 24 May 2007 23:44:00 -0000 1.4
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006 Remon Sijrier
+Copyright (C) 2006-2007 Remon Sijrier
This file is part of Traverso
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: PluginSlider.h,v 1.3 2007/05/24 23:24:03 r_sijrier Exp $
*/
@@ -39,6 +38,7 @@
~PluginSlider(){};
void paint(QPainter *);
+ void reset_default_value();
void update_slider_position();
protected:
- [Traverso-commit] traverso/src/plugins LV2/LV2PluginPropertiesDia...,
Remon Sijrier <=