X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fguiutil.h;h=a7eee0990b2c681b95e0a68549170be07e1f536f;hb=eca170286ef79096b9005c28d0a6e1145b440f60;hp=129ab73038495f6d53ceb06909be258640be1809;hpb=33e0c3a8662a11566cbb7bd382b7f6737f8c96a2;p=novacoin.git diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 129ab73..a7eee09 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -12,6 +12,8 @@ class QUrl; QT_END_NAMESPACE class SendCoinsRecipient; +/** Static utility functions used by the Bitcoin Qt UI. + */ class GUIUtil { public: @@ -30,6 +32,21 @@ public: // See Bitcoin URL definition discussion here: https://bitcointalk.org/index.php?topic=33490.0 static bool parseBitcoinURL(const QUrl *url, SendCoinsRecipient *out); static bool parseBitcoinURL(QString url, SendCoinsRecipient *out); + + /** Get save file name, mimics QFileDialog::getSaveFileName, except that it appends a default suffix + when no suffix is provided by the user. + + @param[in] parent Parent window (or 0) + @param[in] caption Window caption (or empty, for default) + @param[in] dir Starting directory (or empty, to default to documents directory) + @param[in] filter Filter specification such as "Comma Separated Files (*.csv)" + @param[out] selectedSuffixOut Pointer to return the suffix (file type) that was selected (or 0). + Can be useful when choosing the save file format based on suffix. + */ + static QString getSaveFileName(QWidget *parent=0, const QString &caption=QString(), + const QString &dir=QString(), const QString &filter=QString(), + QString *selectedSuffixOut=0); + }; #endif // GUIUTIL_H