12 class QAbstractItemView;
14 class SendCoinsRecipient;
16 /** Static utility functions used by the Bitcoin Qt UI.
21 // Create human-readable string from date
22 static QString dateTimeStr(qint64 nTime);
23 static QString dateTimeStr(const QDateTime &datetime);
25 // Render bitcoin addresses in monospace font
26 static QFont bitcoinAddressFont();
28 // Set up widgets for address and amounts
29 static void setupAddressWidget(QLineEdit *widget, QWidget *parent);
30 static void setupAmountWidget(QLineEdit *widget, QWidget *parent);
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);
36 // HTML escaping for rich text controls
37 static QString HtmlEscape(const QString& str, bool fMultiLine=false);
38 static QString HtmlEscape(const std::string& str, bool fMultiLine=false);
40 /** Copy a field of the currently selected entry of a view to the clipboard. Does nothing if nothing
42 @param[in] column Data column to extract from the model
43 @param[in] role Data role to extract from the model
44 @see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress
46 static void copyEntryData(QAbstractItemView *view, int column, int role=Qt::EditRole);