本文整理汇总了C++中GroupBox::ledButton方法的典型用法代码示例。如果您正苦于以下问题:C++ GroupBox::ledButton方法的具体用法?C++ GroupBox::ledButton怎么用?C++ GroupBox::ledButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GroupBox
的用法示例。
在下文中一共展示了GroupBox::ledButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QVBoxLayout
InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) :
QWidget( parent ),
ModelView( NULL, this ),
m_rpBtn( NULL ),
m_wpBtn( NULL )
{
QVBoxLayout* layout = new QVBoxLayout( this );
layout->setMargin( 5 );
m_midiInputGroupBox = new GroupBox( tr( "ENABLE MIDI INPUT" ) );
layout->addWidget( m_midiInputGroupBox );
QHBoxLayout* midiInputLayout = new QHBoxLayout( m_midiInputGroupBox );
midiInputLayout->setContentsMargins( 8, 18, 8, 8 );
midiInputLayout->setSpacing( 6 );
m_inputChannelSpinBox = new LcdSpinBox( 2, m_midiInputGroupBox );
m_inputChannelSpinBox->addTextForValue( 0, "--" );
m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_inputChannelSpinBox->setEnabled( false );
midiInputLayout->addWidget( m_inputChannelSpinBox );
m_fixedInputVelocitySpinBox = new LcdSpinBox( 3, m_midiInputGroupBox );
m_fixedInputVelocitySpinBox->setDisplayOffset( 1 );
m_fixedInputVelocitySpinBox->addTextForValue( 0, "---" );
m_fixedInputVelocitySpinBox->setLabel( tr( "VELOCITY" ) );
m_fixedInputVelocitySpinBox->setEnabled( false );
midiInputLayout->addWidget( m_fixedInputVelocitySpinBox );
midiInputLayout->addStretch();
connect( m_midiInputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_inputChannelSpinBox, SLOT( setEnabled( bool ) ) );
connect( m_midiInputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_fixedInputVelocitySpinBox, SLOT( setEnabled( bool ) ) );
m_midiOutputGroupBox = new GroupBox( tr( "ENABLE MIDI OUTPUT" ) );
layout->addWidget( m_midiOutputGroupBox );
QHBoxLayout* midiOutputLayout = new QHBoxLayout( m_midiOutputGroupBox );
midiOutputLayout->setContentsMargins( 8, 18, 8, 8 );
midiOutputLayout->setSpacing( 6 );
m_outputChannelSpinBox = new LcdSpinBox( 2, m_midiOutputGroupBox );
m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_outputChannelSpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_outputChannelSpinBox );
m_fixedOutputVelocitySpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputVelocitySpinBox->setDisplayOffset( 1 );
m_fixedOutputVelocitySpinBox->addTextForValue( 0, "---" );
m_fixedOutputVelocitySpinBox->setLabel( tr( "VELOCITY" ) );
m_fixedOutputVelocitySpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_fixedOutputVelocitySpinBox );
m_outputProgramSpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_outputProgramSpinBox->setLabel( tr( "PROGRAM" ) );
m_outputProgramSpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_outputProgramSpinBox );
m_fixedOutputNoteSpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputNoteSpinBox->setDisplayOffset( 1 );
m_fixedOutputNoteSpinBox->addTextForValue( 0, "---" );
m_fixedOutputNoteSpinBox->setLabel( tr( "NOTE" ) );
m_fixedOutputNoteSpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_fixedOutputNoteSpinBox );
midiOutputLayout->addStretch();
connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_outputChannelSpinBox, SLOT( setEnabled( bool ) ) );
connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_fixedOutputVelocitySpinBox, SLOT( setEnabled( bool ) ) );
connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_outputProgramSpinBox, SLOT( setEnabled( bool ) ) );
connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ),
m_fixedOutputNoteSpinBox, SLOT( setEnabled( bool ) ) );
if( !Engine::mixer()->midiClient()->isRaw() )
{
m_rpBtn = new QToolButton;
m_rpBtn->setMinimumSize( 32, 32 );
m_rpBtn->setText( tr( "MIDI devices to receive MIDI events from" ) );
m_rpBtn->setIcon( embed::getIconPixmap( "piano" ) );
m_rpBtn->setPopupMode( QToolButton::InstantPopup );
midiInputLayout->insertSpacing( 0, 4 );
midiInputLayout->insertWidget( 0, m_rpBtn );
m_wpBtn = new QToolButton;
m_wpBtn->setMinimumSize( 32, 32 );
m_wpBtn->setText( tr( "MIDI devices to send MIDI events to" ) );
m_wpBtn->setIcon( embed::getIconPixmap( "piano" ) );
m_wpBtn->setPopupMode( QToolButton::InstantPopup );
midiOutputLayout->insertSpacing( 0, 4 );
midiOutputLayout->insertWidget( 0, m_wpBtn );
}
#define PROVIDE_CUSTOM_BASE_VELOCITY_UI
#ifdef PROVIDE_CUSTOM_BASE_VELOCITY_UI
GroupBox* baseVelocityGroupBox = new GroupBox( tr( "CUSTOM BASE VELOCITY" ) );
layout->addWidget( baseVelocityGroupBox );
//.........这里部分代码省略.........