MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / openFile

Method openFile

MiniZincIDE/ide.cpp:471–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471void IDE::openFile(const QString& fileName0)
472{
473 QStringList fileNames;
474 if (fileName0.isEmpty()) {
475 fileNames = QFileDialog::getOpenFileNames(nullptr, tr("Open File"), getLastPath(), "MiniZinc Files (*.mzn *.dzn *.fzn *.json *.mzp *.mzc *.mpc);;Other (*)");
476 if (!fileNames.isEmpty()) {
477 setLastPath(QFileInfo(fileNames.last()).absolutePath() + fileDialogSuffix);
478 }
479 } else {
480 fileNames << fileName0;
481 }
482 if (!fileNames.isEmpty()) {
483 MainWindow* mw = new MainWindow(fileNames);
484 mw->show();
485 }
486}
487
488void IDE::help()
489{

Callers 1

eventMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected