void MainWindow::loadCustomFiles()
{
    if(customLevelDialog->exec() == QDialog::Accepted)
    {
        openLevel(customLevelDialog->getLevelString(),customLevelDialog->getD3DString(),customLevelDialog->getPlayerDenString(),customLevelDialog->getCivilianDenString(),
                   customLevelDialog->getPlayerCosString(),customLevelDialog->getCivilianCosString(),customLevelDialog->getWheelsString());
        lastOpenDirectory = customLevelDialog->getLastDirectory();
    }
};
void AbstractController::openFile(QWidget* parent) {
  bool canOpen = true;
  if (!_fileSaved) {
    canOpen = confirmErase(parent);
  }

  if (canOpen) {
    QString fileName = QFileDialog::getOpenFileName(parent, "Open file", "../PieceOfCake/resources/levels/", "XML Files (*.xml)");
    if (!checkFileExists(fileName)) {
      qDebug() << "Error:" << fileName << "file not found in AbstractController::openFile";
      return;
    }

    if (!fileName.isEmpty()) {
      initNewDocument(false, fileName);
      openLevel(fileName);
    }
  }
}
void MainWindow::loadNewcastleFiles()
{
    openLevel(rootDir+"\\Levels\\nc_01.lev",rootDir+"\\Levels\\nc_01.d3d",rootDir+"\\Levels\\pcar_nc.den",rootDir+"\\Levels\\nc_01.den",
              rootDir+"\\Levels\\pcar_nc.cos",rootDir+"\\Levels\\nc_01.cos",rootDir+"\\Levels\\nc_wheels.wdf");
};
void MainWindow::loadIviewFiles()
{
    openLevel(rootDir+"\\Levels\\iview.lev",rootDir+"\\Levels\\iview.d3d",rootDir+"\\Levels\\pcar_iview.den",rootDir+"\\Levels\\iview.den",
              rootDir+"\\Levels\\pcar_iview.cos",rootDir+"\\Levels\\iview.cos",rootDir+"\\Levels\\iview_wheels.wdf");
};
void MainWindow::loadTrainFiles()
{
    openLevel(rootDir+"\\Levels\\train.lev",rootDir+"\\Levels\\train.d3d",rootDir+"\\Levels\\pcar_train.den",rootDir+"\\Levels\\train.den",
              rootDir+"\\Levels\\pcar_train.cos",rootDir+"\\Levels\\train.cos",rootDir+"\\Levels\\train_wheels.wdf");
};
void MainWindow::loadNewYorkFiles()
{
    openLevel(rootDir+"\\Levels\\ny_01.lev",rootDir+"\\Levels\\newyork.d3d",rootDir+"\\Levels\\pcar_ny.den",rootDir+"\\Levels\\ny_01.den",
              rootDir+"\\Levels\\pcar_ny.cos",rootDir+"\\Levels\\ny_01.cos",rootDir+"\\Levels\\ny_wheels.wdf");
};
void MainWindow::loadLosAngelesFiles()
{
    openLevel(rootDir+"\\Levels\\LA_01.lev",rootDir+"\\Levels\\LA.d3d",rootDir+"\\Levels\\pcar_LA.den",rootDir+"\\Levels\\LA_01.den",
              rootDir+"\\Levels\\pcar_LA.cos",rootDir+"\\Levels\\LA_01.cos",rootDir+"\\Levels\\LA_wheels.wdf");
};
void MainWindow::loadFriscoFiles()
{
    openLevel(rootDir+"\\Levels\\frisco_01.lev",rootDir+"\\Levels\\frisco.d3d",rootDir+"\\Levels\\pcar_frisco.den",rootDir+"\\Levels\\frisco_01.den",
              rootDir+"\\Levels\\pcar_frisco.cos",rootDir+"\\Levels\\frisco_01.cos",rootDir+"\\Levels\\frisco_wheels.wdf");
};
void MainWindow::loadMiamiFiles()
{
    openLevel(rootDir+"\\Levels\\miami_01.lev",rootDir+"\\Levels\\miami.d3d",rootDir+"\\Levels\\pcar_miami.den",rootDir+"\\Levels\\miami_01.den",
              rootDir+"\\Levels\\pcar_miami.cos",rootDir+"\\Levels\\Miami_01.cos",rootDir+"\\Levels\\miami_wheels.wdf");
};