]> Git Repo - VerusCoin.git/blame - src/qt/guiutil.h
Add context menu for address book page (implements part 1 of issue #648)
[VerusCoin.git] / src / qt / guiutil.h
CommitLineData
0856c1a0
WL
1#ifndef GUIUTIL_H
2#define GUIUTIL_H
3
4#include <QString>
5
e457b021
WL
6QT_BEGIN_NAMESPACE
7class QFont;
8class QLineEdit;
9class QWidget;
a99ac8d3 10class QDateTime;
db7f0234 11class QUrl;
e457b021 12QT_END_NAMESPACE
db7f0234 13class SendCoinsRecipient;
e457b021 14
af836ad5
WL
15/** Static utility functions used by the Bitcoin Qt UI.
16 */
e457b021
WL
17class GUIUtil
18{
19public:
db7f0234 20 // Create human-readable string from date
b0849613
WL
21 static QString dateTimeStr(qint64 nTime);
22 static QString dateTimeStr(const QDateTime &datetime);
e457b021 23
ceb6d4e1 24 // Render bitcoin addresses in monospace font
e457b021
WL
25 static QFont bitcoinAddressFont();
26
db7f0234 27 // Set up widgets for address and amounts
e457b021 28 static void setupAddressWidget(QLineEdit *widget, QWidget *parent);
e457b021 29 static void setupAmountWidget(QLineEdit *widget, QWidget *parent);
db7f0234
WL
30
31 // Parse "bitcoin:" URL into recipient object, return true on succesful parsing
c359ac91 32 // See Bitcoin URL definition discussion here: https://bitcointalk.org/index.php?topic=33490.0
db7f0234 33 static bool parseBitcoinURL(const QUrl *url, SendCoinsRecipient *out);
e0734571
WL
34
35 // HTML escaping for rich text controls
36 static QString HtmlEscape(const QString& str, bool fMultiLine=false);
37 static QString HtmlEscape(const std::string& str, bool fMultiLine=false);
e457b021 38};
0856c1a0
WL
39
40#endif // GUIUTIL_H
This page took 0.033702 seconds and 4 git commands to generate.