aboutsummaryrefslogtreecommitdiff
path: root/src/main/oshelper.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2023-02-15 10:50:11 -0500
committerluigi1111 <luigi1111w@gmail.com>2023-02-15 10:50:11 -0500
commit5ced4ef54729f3ef6b9b696ef1c595bc896ce0c6 (patch)
tree8e5608e824fde049ef9c0a5a37fd44c87dc6611a /src/main/oshelper.cpp
parentb7ba9437d8cca6df4ecff7f5ae38a53cac5e26b2 (diff)
parent198dfb338cb26177763b5fff835a3740b0a4f0c5 (diff)
downloadmonzero-gui-5ced4ef54729f3ef6b9b696ef1c595bc896ce0c6.tar.gz
monzero-gui-5ced4ef54729f3ef6b9b696ef1c595bc896ce0c6.tar.xz
monzero-gui-5ced4ef54729f3ef6b9b696ef1c595bc896ce0c6.zip
Merge pull request #3878
198dfb3 wizard: redesign seed page (rating89us)
Diffstat (limited to 'src/main/oshelper.cpp')
-rw-r--r--src/main/oshelper.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp
index 8294dd3c..469f3842 100644
--- a/src/main/oshelper.cpp
+++ b/src/main/oshelper.cpp
@@ -160,6 +160,18 @@ QList<QString> OSHelper::grabQrCodesFromScreen() const
return codes;
}
+bool OSHelper::openFile(const QString &filePath) const
+{
+ QString canonicalFilePath = QFileInfo(filePath).canonicalFilePath();
+ QUrl url = QUrl::fromLocalFile(canonicalFilePath);
+ if (!url.isValid())
+ {
+ qWarning() << "Malformed file path" << canonicalFilePath << url.errorString();
+ return false;
+ }
+ return QDesktopServices::openUrl(url);
+}
+
bool OSHelper::openContainingFolder(const QString &filePath) const
{
QString canonicalFilePath = QFileInfo(filePath).canonicalFilePath();
@@ -313,3 +325,9 @@ quint8 OSHelper::getNetworkTypeFromFile(const QString &keysPath) const
}
return getNetworkTypeAndAddressFromFile(walletPath).first;
}
+
+void OSHelper::openSeedTemplate() const
+{
+ QFile::copy(":/wizard/template.pdf", QDir::tempPath() + "/seed_template.pdf");
+ openFile(QDir::tempPath() + "/seed_template.pdf");
+}