Beispiel #1
0
void GameList::ShowContextMenu(const QPoint&)
{
  QMenu* menu = new QMenu(this);
  menu->addAction(tr("Properties"));
  menu->addAction(tr("Open Wiki Page"), this, SLOT(OpenWiki()));
  menu->addAction(tr("Set as Default ISO"), this, SLOT(SetDefaultISO()));
  menu->exec(QCursor::pos());
}
Beispiel #2
0
void GameList::ShowContextMenu(const QPoint&)
{
  QMenu* menu = new QMenu(this);
  DiscIO::Platform platform = GameFile(GetSelectedGame()).GetPlatformID();
  if (platform == DiscIO::Platform::GAMECUBE_DISC || platform == DiscIO::Platform::WII_DISC)
  {
    menu->addAction(tr("Properties"), this, SLOT(OpenProperties()));
    menu->addAction(tr("Open Wiki Page"), this, SLOT(OpenWiki()));
    menu->addAction(tr("Set as Default ISO"), this, SLOT(SetDefaultISO()));
  }
  else
  {
    return;
  }
  menu->exec(QCursor::pos());
}
Beispiel #3
0
void GameList::ShowContextMenu(const QPoint&)
{
  const auto game = GetSelectedGame();
  if (game.isEmpty())
    return;

  QMenu* menu = new QMenu(this);
  DiscIO::Platform platform = GameFile(game).GetPlatformID();
  menu->addAction(tr("Properties"), this, SLOT(OpenProperties()));
  menu->addAction(tr("Wiki"), this, SLOT(OpenWiki()));
  menu->addSeparator();

  if (platform == DiscIO::Platform::GAMECUBE_DISC || platform == DiscIO::Platform::WII_DISC)
  {
    menu->addAction(tr("Default ISO"), this, SLOT(SetDefaultISO()));
    const auto blob_type = GameFile(game).GetBlobType();

    if (blob_type == DiscIO::BlobType::GCZ)
      menu->addAction(tr("Decompress ISO"), this, SLOT(DecompressISO()));
    else if (blob_type == DiscIO::BlobType::PLAIN)
      menu->addAction(tr("Compress ISO"), this, SLOT(CompressISO()));

    menu->addSeparator();
  }
  if (platform == DiscIO::Platform::WII_WAD)
  {
    menu->addAction(tr("Install to the NAND"), this, SLOT(InstallWAD()));

    if (GameFile(game).IsInstalled())
      menu->addAction(tr("Uninstall from the NAND"), this, SLOT(UninstallWAD()));

    menu->addSeparator();
  }

  if (platform == DiscIO::Platform::WII_WAD || platform == DiscIO::Platform::WII_DISC)
  {
    menu->addAction(tr("Open Wii save folder"), this, SLOT(OpenSaveFolder()));
    menu->addAction(tr("Export Wii save (Experimental)"), this, SLOT(ExportWiiSave()));
    menu->addSeparator();
  }

  menu->addAction(tr("Open Containing Folder"), this, SLOT(OpenContainingFolder()));
  menu->addAction(tr("Remove File"), this, SLOT(DeleteFile()));
  menu->exec(QCursor::pos());
}