From 2f4d9c6c66b220270fdb102da48ee2b1c1e2f06d Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 23 Mar 2014 23:52:04 +0100 Subject: [PATCH] InstrumentSoundShapingView: display info about single-streamed instruments Until we have a solution for hiding the ENV/LFO tab, display a sensible message at least. --- include/InstrumentSoundShapingView.h | 6 +++++- src/gui/widgets/InstrumentSoundShapingView.cpp | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/InstrumentSoundShapingView.h b/include/InstrumentSoundShapingView.h index 587b574c2..ff0152d5b 100644 --- a/include/InstrumentSoundShapingView.h +++ b/include/InstrumentSoundShapingView.h @@ -1,7 +1,7 @@ /* * InstrumentSoundShapingView.h - view for InstrumentSoundShaping class * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -30,6 +30,8 @@ #include "InstrumentSoundShaping.h" #include "ModelView.h" +class QLabel; + class EnvelopeAndLfoView; class comboBox; class groupBox; @@ -61,6 +63,8 @@ private: knob * m_filterCutKnob; knob * m_filterResKnob; + QLabel* m_singleStreamInfoLabel; + } ; #endif diff --git a/src/gui/widgets/InstrumentSoundShapingView.cpp b/src/gui/widgets/InstrumentSoundShapingView.cpp index 0ee39c29b..8bd9b2d04 100644 --- a/src/gui/widgets/InstrumentSoundShapingView.cpp +++ b/src/gui/widgets/InstrumentSoundShapingView.cpp @@ -1,7 +1,7 @@ /* * InstrumentSoundShapingView.cpp - view for InstrumentSoundShaping class * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -22,6 +22,8 @@ * */ +#include + #include "InstrumentSoundShapingView.h" #include "EnvelopeAndLfoParameters.h" #include "EnvelopeAndLfoView.h" @@ -115,6 +117,16 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) : tr( "Use this knob for setting Q/Resonance for the selected " "filter. Q/Resonance tells the filter how much it " "should amplify frequencies near Cutoff-frequency." ) ); + + + m_singleStreamInfoLabel = new QLabel( tr( "Envelopes, LFOs and filters are not supported by the current instrument." ), this ); + m_singleStreamInfoLabel->setWordWrap( true ); + m_singleStreamInfoLabel->setFont( pointSize<8>( m_singleStreamInfoLabel->font() ) ); + + m_singleStreamInfoLabel->setGeometry( TARGETS_TABWIDGET_X, + TARGETS_TABWIDGET_Y, + TARGETS_TABWIDGET_WIDTH, + TARGETS_TABWIDGET_HEIGTH ); } @@ -131,6 +143,7 @@ void InstrumentSoundShapingView::setFunctionsHidden( bool hidden ) { m_targetsTabWidget->setHidden( hidden ); m_filterGroupBox->setHidden( hidden ); + m_singleStreamInfoLabel->setHidden( !hidden ); }