本文整理汇总了C++中Hydrogen::getNewBpmJTM方法的典型用法代码示例。如果您正苦于以下问题:C++ Hydrogen::getNewBpmJTM方法的具体用法?C++ Hydrogen::getNewBpmJTM怎么用?C++ Hydrogen::getNewBpmJTM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hydrogen
的用法示例。
在下文中一共展示了Hydrogen::getNewBpmJTM方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
SongEditorPanelBpmWidget::SongEditorPanelBpmWidget( QWidget* pParent, int beat )
: QDialog( pParent )
, Object( __class_name )
, m_stimelineposition ( beat )
{
setupUi( this );
INFOLOG( "INIT" );
setWindowTitle( trUtf8( "BPM" ) );
setFixedSize( width(), height() );
lineEditBeat->setText(QString("%1").arg( m_stimelineposition + 1) );
deleteBtn->setEnabled ( false );
Hydrogen* engine = Hydrogen::get_instance();
Timeline* pTimeline = engine->getTimeline();
std::vector<Timeline::HTimelineVector> timelineVector = pTimeline->m_timelinevector;
//restore the bpm value
if( timelineVector.size() > 0 ){
for ( int t = 0; t < timelineVector.size(); t++ ){
// ERRORLOG(QString("%1 %2").arg(Hydrogen::get_instance()->m_timelinevector[t].m_htimelinebeat).arg(m_stimelineposition));
if ( timelineVector[t].m_htimelinebeat == m_stimelineposition ) {
lineEditBpm->setText( QString("%1").arg( timelineVector[t].m_htimelinebpm ) );
deleteBtn->setEnabled ( true );
return;
}
else
{
lineEditBpm->setText( QString("%1").arg( engine->getNewBpmJTM()) );
}
}
}else
{
lineEditBpm->setText( QString("%1").arg( engine->getNewBpmJTM() ) );
}
}