コード例 #1
0
ファイル: setup_dialog.cpp プロジェクト: asmw/lmms
void setupDialog::audioInterfaceChanged( const QString & _iface )
{
	for( AswMap::iterator it = m_audioIfaceSetupWidgets.begin();
				it != m_audioIfaceSetupWidgets.end(); ++it )
	{
		it.value()->hide();
	}

	m_audioIfaceSetupWidgets[m_audioIfaceNames[_iface]]->show();
}
コード例 #2
0
ファイル: setup_dialog.cpp プロジェクト: asmw/lmms
void setupDialog::accept()
{
	configManager::inst()->setValue( "mixer", "framesperaudiobuffer",
					QString::number( m_bufferSize ) );
	configManager::inst()->setValue( "mixer", "audiodev",
			m_audioIfaceNames[m_audioInterfaces->currentText()] );
	configManager::inst()->setValue( "mixer", "mididev",
			m_midiIfaceNames[m_midiInterfaces->currentText()] );
	configManager::inst()->setValue( "tooltips", "disabled",
					QString::number( !m_toolTips ) );
	configManager::inst()->setValue( "app", "nomsgaftersetup",
					QString::number( !m_warnAfterSetup ) );
	configManager::inst()->setValue( "app", "displaydbv",
					QString::number( m_displaydBV ) );
	configManager::inst()->setValue( "app", "nommpz",
						QString::number( !m_MMPZ ) );
	configManager::inst()->setValue( "mixer", "hqaudio",
					QString::number( m_hqAudioDev ) );
	configManager::inst()->setValue( "ui", "smoothscroll",
					QString::number( m_smoothScroll ) );
	configManager::inst()->setValue( "ui", "enableautosave",
					QString::number( m_enableAutoSave ) );
	configManager::inst()->setValue( "ui", "oneinstrumenttrackwindow",
					QString::number( m_oneInstrumentTrackWindow ) );
	configManager::inst()->setValue( "ui", "compacttrackbuttons",
					QString::number( m_compactTrackButtons ) );
	configManager::inst()->setValue( "ui", "syncvstplugins",
					QString::number( m_syncVSTPlugins ) );
	configManager::inst()->setValue( "ui", "animateafp",
					QString::number( m_animateAFP ) );
	configManager::inst()->setValue( "ui", "printnotelabels",
					QString::number( m_printNoteLabels ) );
	configManager::inst()->setValue( "ui", "displaywaveform",
					QString::number( m_displayWaveform ) );
	configManager::inst()->setValue( "ui", "disableautoquit",
					QString::number( configManager::inst()->isAutoquitDisabled() ) );


	configManager::inst()->setWorkingDir( m_workingDir );
	configManager::inst()->setVSTDir( m_vstDir );
	configManager::inst()->setArtworkDir( m_artworkDir );
	configManager::inst()->setFLDir( m_flDir );
	configManager::inst()->setLADSPADir( m_ladDir );
#ifdef LMMS_HAVE_FLUIDSYNTH
	configManager::inst()->setDefaultSoundfont( m_defaultSoundfont );
#endif
#ifdef LMMS_HAVE_STK
	configManager::inst()->setSTKDir( m_stkDir );
#endif	
	configManager::inst()->setBackgroundArtwork( m_backgroundArtwork );

	// tell all audio-settings-widget to save their settings
	for( AswMap::iterator it = m_audioIfaceSetupWidgets.begin();
				it != m_audioIfaceSetupWidgets.end(); ++it )
	{
		it.value()->saveSettings();
	}
	// tell all MIDI-settings-widget to save their settings
	for( MswMap::iterator it = m_midiIfaceSetupWidgets.begin();
				it != m_midiIfaceSetupWidgets.end(); ++it )
	{
		it.value()->saveSettings();
	}

	configManager::inst()->saveConfigFile();

	QDialog::accept();
	if( m_warnAfterSetup )
	{
		QMessageBox::information( NULL, tr( "Restart LMMS" ),
					tr( "Please note that most changes "
						"won't take effect until "
						"you restart LMMS!" ),
					QMessageBox::Ok );
	}
}