MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / screenshotSave

Method screenshotSave

gui/qt/mainwindow.cpp:1676–1700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676void MainWindow::screenshotSave(const QString& nameFilter, const QString& defaultSuffix, const QString& temppath) {
1677 QFileDialog dialog(this);
1678
1679 dialog.setAcceptMode(QFileDialog::AcceptSave);
1680 dialog.setFileMode(QFileDialog::AnyFile);
1681 dialog.setDirectory(m_dir);
1682 dialog.setNameFilter(nameFilter);
1683 dialog.setWindowTitle(tr("Save Screen"));
1684 dialog.setDefaultSuffix(defaultSuffix);
1685 dialog.exec();
1686
1687 if (!(dialog.selectedFiles().isEmpty())) {
1688 QStringList selected = dialog.selectedFiles();
1689 QString filename = selected.first();
1690 if (filename.isEmpty()) {
1691 QFile::remove(temppath);
1692 } else {
1693 QFile::remove(filename);
1694 QFile::rename(temppath, filename);
1695 }
1696 } else {
1697 QFile::remove(temppath);
1698 }
1699 m_dir.setPath(dialog.directory().absolutePath());
1700}
1701
1702void MainWindow::screenshot() {
1703 QString path = QDir::tempPath() + QDir::separator() + QStringLiteral("cemu_tmp.img");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected