本文整理汇总了C++中QSpinBox::cleanText方法的典型用法代码示例。如果您正苦于以下问题:C++ QSpinBox::cleanText方法的具体用法?C++ QSpinBox::cleanText怎么用?C++ QSpinBox::cleanText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSpinBox
的用法示例。
在下文中一共展示了QSpinBox::cleanText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveMidiTable
void MidiTable::saveMidiTable()
{
MidiMap *mM = MidiMap::get_instance();
for ( int row = 0; row < __row_count; row++ ) {
QComboBox * eventCombo = dynamic_cast <QComboBox *> ( cellWidget( row, 1 ) );
QSpinBox * eventSpinner = dynamic_cast <QSpinBox *> ( cellWidget( row, 2 ) );
QComboBox * actionCombo = dynamic_cast <QComboBox *> ( cellWidget( row, 3 ) );
QSpinBox * actionSpinner = dynamic_cast <QSpinBox *> ( cellWidget( row, 4 ) );
QString eventString;
QString actionString;
if( !eventCombo->currentText().isEmpty() && !actionCombo->currentText().isEmpty() ){
eventString = eventCombo->currentText();
actionString = actionCombo->currentText();
MidiAction* pAction = new MidiAction( actionString );
if( actionSpinner->cleanText() != ""){
pAction->setParameter1( actionSpinner->cleanText() );
}
if( eventString.left(2) == "CC" ){
mM->registerCCEvent( eventSpinner->cleanText().toInt() , pAction );
} else if( eventString.left(3) == "MMC" ){
mM->registerMMCEvent( eventString , pAction );
} else if( eventString.left(4) == "NOTE" ){
mM->registerNoteEvent( eventSpinner->cleanText().toInt() , pAction );
} else if( eventString.left(14) == "PROGRAM_CHANGE" ){
mM->registerPCEvent( pAction );
}
}
}
}