本文整理汇总了C++中Mixer::readableName方法的典型用法代码示例。如果您正苦于以下问题:C++ Mixer::readableName方法的具体用法?C++ Mixer::readableName怎么用?C++ Mixer::readableName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mixer
的用法示例。
在下文中一共展示了Mixer::readableName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createWidgets
/**
* Create basic widgets of the Dialog.
*/
void DialogSelectMaster::createWidgets(Mixer *ptr_mixer)
{
m_mainFrame = new QWidget( this );
setMainWidget( m_mainFrame );
_layout = new QVBoxLayout(m_mainFrame);
_layout->setMargin(0);
if ( Mixer::mixers().count() > 1 ) {
// More than one Mixer => show Combo-Box to select Mixer
// Mixer widget line
QHBoxLayout* mixerNameLayout = new QHBoxLayout();
_layout->addItem( mixerNameLayout );
mixerNameLayout->setMargin(0);
mixerNameLayout->setSpacing(KDialog::spacingHint());
QLabel *qlbl = new QLabel( i18n("Current mixer:"), m_mainFrame );
mixerNameLayout->addWidget(qlbl);
qlbl->setFixedHeight(qlbl->sizeHint().height());
m_cMixer = new KComboBox( false, m_mainFrame);
m_cMixer->setObjectName( QLatin1String( "mixerCombo" ) );
m_cMixer->setFixedHeight(m_cMixer->sizeHint().height());
connect( m_cMixer, SIGNAL(activated(int)), this, SLOT(createPageByID(int)) );
for( int i =0; i<Mixer::mixers().count(); i++ )
{
Mixer *mixer = (Mixer::mixers())[i];
m_cMixer->addItem( mixer->readableName(), mixer->id() );
} // end for all_Mixers
// Make the current Mixer the current item in the ComboBox
int findIndex = m_cMixer->findData( ptr_mixer->id() );
if ( findIndex != -1 ) m_cMixer->setCurrentIndex( findIndex );
m_cMixer->setToolTip( i18n("Current mixer" ) );
mixerNameLayout->addWidget(m_cMixer, 1);
_layout->addSpacing(KDialog::spacingHint());
} // end if (more_than_1_Mixer)