1345 moved LedCheckBox to MISC tab

This commit is contained in:
Dave French
2015-01-10 19:05:40 +00:00
parent af22d39612
commit 83baea6605
4 changed files with 53 additions and 9 deletions

View File

@@ -34,6 +34,8 @@
class GroupBox;
class LcdSpinBox;
class QToolButton;
class LedCheckBox;
class InstrumentTrack;
class InstrumentMidiIOView : public QWidget, public ModelView
@@ -63,4 +65,16 @@ private:
} ;
class InstrumentMiscView : public QWidget
{
Q_OBJECT
public:
InstrumentMiscView( InstrumentTrack *it, QWidget* parent );
~InstrumentMiscView();
private:
LedCheckBox * m_useMasterPitchBox;
};
#endif

View File

@@ -49,6 +49,7 @@ class FadeButton;
class Instrument;
class InstrumentTrackWindow;
class InstrumentMidiIOView;
class InstrumentMiscView;
class Knob;
class LcdSpinBox;
class midiPortMenu;
@@ -268,6 +269,7 @@ private:
friend class InstrumentTrackWindow;
friend class NotePlayHandle;
friend class FlpImport;
friend class InstrumentMiscView;
} ;
@@ -416,7 +418,7 @@ private:
Knob * m_pitchKnob;
LcdSpinBox* m_pitchRangeSpinBox;
LcdSpinBox * m_effectChannelNumber;
LedCheckBox * m_useMasterPitchBox;
// tab-widget with all children
@@ -427,6 +429,8 @@ private:
InstrumentFunctionArpeggioView* m_arpeggioView;
InstrumentMidiIOView * m_midiView;
EffectRackView * m_effectView;
InstrumentMiscView *m_miscView;
// test-piano at the bottom of every instrument-settings-window
PianoView * m_pianoView;

View File

@@ -37,7 +37,9 @@
#include "MidiClient.h"
#include "Mixer.h"
#include "ToolTip.h"
#include "InstrumentTrack.h"
#include "LedCheckbox.h"
#include "QLabel"
InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) :
@@ -201,3 +203,29 @@ void InstrumentMidiIOView::modelChanged()
}
}
InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) :
QWidget( parent )
{
QVBoxLayout* layout = new QVBoxLayout( this );
layout->setMargin( 5 );
QHBoxLayout* masterPitchLayout = new QHBoxLayout( this );
//setup checkbox for use master pitch
m_useMasterPitchBox = new LedCheckBox( this, tr( "Use master pitch" ),LedCheckBox::Green );
m_useMasterPitchBox->setModel( &it->m_useMasterPitchModel );
m_useMasterPitchBox->setToolTip( "Master Pitch" );
masterPitchLayout->addWidget( m_useMasterPitchBox );
QLabel *label = new QLabel ( tr ("Use Master Pitch " ), this );
masterPitchLayout->addWidget( label );
layout->addLayout( masterPitchLayout );
layout->addStretch();
}
InstrumentMiscView::~InstrumentMiscView()
{
}

View File

@@ -1217,13 +1217,6 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
basicControlsLayout->addWidget( m_pitchRangeSpinBox );
basicControlsLayout->addStretch();
//setup checkbox for use master pitch
m_useMasterPitchBox = new LedCheckBox( this, tr( "Use master pitch" ),LedCheckBox::Green );
m_useMasterPitchBox->setModel( &m_track->m_useMasterPitchModel );
m_useMasterPitchBox->setToolTip( "Master Pitch" );
basicControlsLayout->addWidget( m_useMasterPitchBox );
basicControlsLayout->addStretch();
// setup spinbox for selecting FX-channel
m_effectChannelNumber = new fxLineLcdSpinBox( 2, NULL, tr( "FX channel" ) );
@@ -1273,10 +1266,15 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
// FX tab
m_effectView = new EffectRackView( m_track->m_audioPort.effects(), m_tabWidget );
// MISC tab
m_miscView = new InstrumentMiscView( m_track, m_tabWidget );
m_tabWidget->addTab( m_ssView, tr( "ENV/LFO" ), 1 );
m_tabWidget->addTab( instrumentFunctions, tr( "FUNC" ), 2 );
m_tabWidget->addTab( m_effectView, tr( "FX" ), 3 );
m_tabWidget->addTab( m_midiView, tr( "MIDI" ), 4 );
m_tabWidget->addTab( m_miscView, tr( "MISC" ), 5 );
// setup piano-widget
m_pianoView = new PianoView( this );