Use standard C99 (and Qt) types for 64-bit integers
[novacoin.git] / src / qt / guiutil.h
1 #ifndef GUIUTIL_H
2 #define GUIUTIL_H
3
4 #include <QtGlobal>
5 #include <QString>
6
7 QT_BEGIN_NAMESPACE
8 class QFont;
9 class QLineEdit;
10 class QWidget;
11 class QDateTime;
12 class QUrl;
13 QT_END_NAMESPACE
14 class SendCoinsRecipient;
15
16 /** Static utility functions used by the Bitcoin Qt UI.
17  */
18 class GUIUtil
19 {
20 public:
21     // Create human-readable string from date
22     static QString dateTimeStr(qint64 nTime);
23     static QString dateTimeStr(const QDateTime &datetime);
24
25     // Render bitcoin addresses in monospace font
26     static QFont bitcoinAddressFont();
27
28     // Set up widgets for address and amounts
29     static void setupAddressWidget(QLineEdit *widget, QWidget *parent);
30     static void setupAmountWidget(QLineEdit *widget, QWidget *parent);
31
32     // Parse "bitcoin:" URL into recipient object, return true on succesful parsing
33     // See Bitcoin URL definition discussion here: https://bitcointalk.org/index.php?topic=33490.0
34     static bool parseBitcoinURL(const QUrl *url, SendCoinsRecipient *out);
35 };
36
37 #endif // GUIUTIL_H