MCPcopy Create free account
hub / github.com/LMMS/lmms / accept

Method accept

src/gui/SetupDialog.cpp:1048–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046
1047
1048void SetupDialog::accept()
1049{
1050 if( m_warnAfterSetup )
1051 {
1052 QMessageBox::information( NULL, tr( "Restart LMMS" ),
1053 tr( "Please note that most changes "
1054 "won't take effect until "
1055 "you restart LMMS!" ),
1056 QMessageBox::Ok );
1057 }
1058
1059 // Hide dialog before setting values. This prevents an obscure bug
1060 // where non-embedded VST windows would steal focus and prevent LMMS
1061 // from taking mouse input, rendering the application unusable.
1062 QDialog::accept();
1063
1064 ConfigManager::inst()->setValue( "mixer", "framesperaudiobuffer",
1065 QString::number( m_bufferSize ) );
1066 ConfigManager::inst()->setValue( "mixer", "audiodev",
1067 m_audioIfaceNames[m_audioInterfaces->currentText()] );
1068 ConfigManager::inst()->setValue( "mixer", "mididev",
1069 m_midiIfaceNames[m_midiInterfaces->currentText()] );
1070 ConfigManager::inst()->setValue( "tooltips", "disabled",
1071 QString::number( !m_toolTips ) );
1072 ConfigManager::inst()->setValue( "app", "nomsgaftersetup",
1073 QString::number( !m_warnAfterSetup ) );
1074 ConfigManager::inst()->setValue( "app", "displaydbfs",
1075 QString::number( m_displaydBFS ) );
1076 ConfigManager::inst()->setValue( "app", "nommpz",
1077 QString::number( !m_MMPZ ) );
1078 ConfigManager::inst()->setValue( "app", "disablebackup",
1079 QString::number( !m_disableBackup ) );
1080 ConfigManager::inst()->setValue( "app", "openlastproject",
1081 QString::number( m_openLastProject ) );
1082 ConfigManager::inst()->setValue( "app", "nanhandler",
1083 QString::number( m_NaNHandler ) );
1084 ConfigManager::inst()->setValue( "mixer", "hqaudio",
1085 QString::number( m_hqAudioDev ) );
1086 ConfigManager::inst()->setValue( "ui", "smoothscroll",
1087 QString::number( m_smoothScroll ) );
1088 ConfigManager::inst()->setValue( "ui", "enableautosave",
1089 QString::number( m_enableAutoSave ) );
1090 ConfigManager::inst()->setValue( "ui", "saveinterval",
1091 QString::number( m_saveInterval ) );
1092 ConfigManager::inst()->setValue( "ui", "enablerunningautosave",
1093 QString::number( m_enableRunningAutoSave ) );
1094 ConfigManager::inst()->setValue( "ui", "oneinstrumenttrackwindow",
1095 QString::number( m_oneInstrumentTrackWindow ) );
1096 ConfigManager::inst()->setValue( "ui", "compacttrackbuttons",
1097 QString::number( m_compactTrackButtons ) );
1098 ConfigManager::inst()->setValue( "ui", "syncvstplugins",
1099 QString::number( m_syncVSTPlugins ) );
1100 ConfigManager::inst()->setValue( "ui", "animateafp",
1101 QString::number( m_animateAFP ) );
1102 ConfigManager::inst()->setValue( "ui", "printnotelabels",
1103 QString::number( m_printNoteLabels ) );
1104 ConfigManager::inst()->setValue( "ui", "displaywaveform",
1105 QString::number( m_displayWaveform ) );

Callers 15

dropEventMethod · 0.45
mousePressEventMethod · 0.45
wheelEventMethod · 0.45
dropEventMethod · 0.45
dropEventMethod · 0.45
closeEventMethod · 0.45
dropEventMethod · 0.45
mousePressEventMethod · 0.45
keyPressEventMethod · 0.45
keyReleaseEventMethod · 0.45
mousePressEventMethod · 0.45
wheelEventMethod · 0.45

Calls 15

saveConfigFileMethod · 0.80
instFunction · 0.50
setValueMethod · 0.45
setWorkingDirMethod · 0.45
setVSTDirMethod · 0.45
setGIGDirMethod · 0.45
setSF2DirMethod · 0.45
setArtworkDirMethod · 0.45
setLADSPADirMethod · 0.45
setDefaultSoundfontMethod · 0.45
setSTKDirMethod · 0.45
setBackgroundArtworkMethod · 0.45

Tested by

no test coverage detected