From e40fc849149dd97c248866a4a1d026dda5e57b62 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Mon, 7 Mar 2011 19:01:11 +0000 Subject: clean3 --- .../midiplugins/drumglue/outputinstrumentview.cpp | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 attic/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp (limited to 'attic/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp') diff --git a/attic/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp b/attic/muse_qt4_evolution/midiplugins/drumglue/outputinstrumentview.cpp new file mode 100644 index 00000000..2e4c97ce --- /dev/null +++ b/attic/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 +//--------------------------------------------------------- +// 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(); + +} -- cgit v1.2.3