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

Method openProject

src/gui/MainWindow.cpp:871–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869
870
871void MainWindow::openProject()
872{
873 if( mayChangeProject(false) )
874 {
875 FileDialog ofd( this, tr( "Open Project" ), "", tr( "LMMS (*.mmp *.mmpz)" ) );
876
877 ofd.setDirectory( ConfigManager::inst()->userProjectsDir() );
878 ofd.setFileMode( FileDialog::ExistingFiles );
879 if( ofd.exec () == QDialog::Accepted &&
880 !ofd.selectedFiles().isEmpty() )
881 {
882 Song *song = Engine::getSong();
883
884 song->stop();
885 setCursor( Qt::WaitCursor );
886 song->loadProject( ofd.selectedFiles()[0] );
887 setCursor( Qt::ArrowCursor );
888 }
889 }
890}
891
892
893

Callers

nothing calls this directly

Calls 5

getSongFunction · 0.85
loadProjectMethod · 0.80
instFunction · 0.50
isEmptyMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected