summaryrefslogtreecommitdiff
path: root/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2009-12-27 11:30:35 +0000
committerRobert Jonsson <spamatica@gmail.com>2009-12-27 11:30:35 +0000
commitb703eab295330e6f81564fbb39a10a1a2fdd2f54 (patch)
treee46b5c9a6bc22fd661c15d1d2123f5bf631cef80 /muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp
parent5d5fa0fdf913907edbc3d2d29a7548f0cb658c94 (diff)
moved old qt4 branch
Diffstat (limited to 'muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp')
-rw-r--r--muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp b/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp
new file mode 100644
index 00000000..2e4c97ce
--- /dev/null
+++ b/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp
@@ -0,0 +1,45 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: filtergui.cpp,v 1.4 2005/11/06 17:49:34 wschweer Exp $
+//
+// (C) Copyright 2005 Werner Schweer (ws@seh.de)
+//=========================================================
+
+#include "outputinstrumentview.h"
+#include "drumglue.h"
+#include <QtGui>
+//---------------------------------------------------------
+// OutputInstrumentView
+//---------------------------------------------------------
+
+OutputInstrumentView::OutputInstrumentView(DrumOutputInstrument* doi, QWidget* parent)
+ : QDialog(parent)
+ {
+ outputInstrument= doi;
+ setupUi(this);
+
+ midiOutputSpinBox->setValue(outputInstrument->outKey);
+ highRangeSlider->setValue(outputInstrument->highestVelocity);
+ lowRangeSlider->setValue(outputInstrument->lowestVelocity);
+ preferWhenFastCheckBox->setChecked(outputInstrument->preferFast);
+ highProbabiltyCheckBox->setChecked(outputInstrument->prefer);
+
+
+ connect(midiOutputSpinBox,SIGNAL(valueChanged(int)),this, SLOT(update()));
+ connect(highRangeSlider,SIGNAL(valueChanged(int)),this, SLOT(update()));
+ connect(lowRangeSlider,SIGNAL(valueChanged(int)),this, SLOT(update()));
+ connect(preferWhenFastCheckBox,SIGNAL(stateChanged(int)),this, SLOT(update()));
+ connect(highProbabiltyCheckBox,SIGNAL(stateChanged(int)),this, SLOT(update()));
+ }
+
+
+void OutputInstrumentView::update()
+{
+ outputInstrument->outKey = midiOutputSpinBox->value();
+ outputInstrument->highestVelocity = highRangeSlider->value();
+ outputInstrument->lowestVelocity = lowRangeSlider->value();
+ outputInstrument->preferFast = preferWhenFastCheckBox->isChecked();
+ outputInstrument->prefer = highProbabiltyCheckBox->isChecked();
+
+}