![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
Utility functions used by the Anoncoin Qt UI. More...
Classes | |
class | TableViewLastColumnResizingFixer |
Makes a QTableView last column feel as if it was being resized from its left border. More... | |
class | ToolTipToRichTextFilter |
Typedefs | |
typedef QProgressBar | ProgressBar |
Functions | |
QString | dateTimeStr (const QDateTime &date) |
QString | dateTimeStr (qint64 nTime) |
QFont | anoncoinAddressFont () |
void | setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent) |
void | setupAmountWidget (QLineEdit *widget, QWidget *parent) |
bool | parseAnoncoinURI (const QUrl &uri, SendCoinsRecipient *out) |
bool | parseAnoncoinURI (QString uri, SendCoinsRecipient *out) |
QString | formatAnoncoinURI (const SendCoinsRecipient &info) |
bool | isDust (const QString &address, qint64 amount) |
QString | HtmlEscape (const QString &str, bool fMultiLine) |
QString | HtmlEscape (const std::string &str, bool fMultiLine) |
void | copyEntryData (QAbstractItemView *view, int column, int role=Qt::EditRole) |
Copy a field of the currently selected entry of a view to the clipboard. More... | |
QString | getSaveFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) |
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when no suffix is provided by the user. More... | |
QString | getOpenFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) |
Get open filename, convenience wrapper for QFileDialog::getOpenFileName. More... | |
Qt::ConnectionType | blockingGUIThreadConnection () |
Get connection type to call object slot in GUI thread with invokeMethod. More... | |
bool | checkPoint (const QPoint &p, const QWidget *w) |
bool | isObscured (QWidget *w) |
void | openDebugLogfile () |
void | SubstituteFonts () |
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. More... | |
bool | GetStartOnSystemStartup () |
bool | SetStartOnSystemStartup (bool fAutoStart) |
void | saveWindowGeometry (const QString &strSetting, QWidget *parent) |
Save window size and position. More... | |
void | restoreWindowGeometry (const QString &strSetting, const QSize &defaultSizeIn, QWidget *parent) |
Restore window size and position. More... | |
void | setClipboard (const QString &str) |
boost::filesystem::path | qstringToBoostPath (const QString &path) |
QString | boostPathToQString (const boost::filesystem::path &path) |
QString | formatDurationStr (int secs) |
QString | formatServicesStr (quint64 mask) |
QString | formatPingTime (double dPingTime) |
Utility functions used by the Anoncoin Qt UI.
typedef QProgressBar GUIUtil::ProgressBar |
QFont GUIUtil::anoncoinAddressFont | ( | ) |
Qt::ConnectionType GUIUtil::blockingGUIThreadConnection | ( | ) |
Get connection type to call object slot in GUI thread with invokeMethod.
The call will be blocking.
Definition at line 345 of file guiutil.cpp.
QString GUIUtil::boostPathToQString | ( | const boost::filesystem::path & | path | ) |
bool GUIUtil::checkPoint | ( | const QPoint & | p, |
const QWidget * | w | ||
) |
void GUIUtil::copyEntryData | ( | QAbstractItemView * | view, |
int | column, | ||
int | role = Qt::EditRole |
||
) |
Copy a field of the currently selected entry of a view to the clipboard.
Does nothing if nothing is selected.
[in] | column | Data column to extract from the model |
[in] | role | Data role to extract from the model |
Definition at line 247 of file guiutil.cpp.
QString GUIUtil::dateTimeStr | ( | const QDateTime & | date | ) |
QString GUIUtil::dateTimeStr | ( | qint64 | nTime | ) |
QString GUIUtil::formatAnoncoinURI | ( | const SendCoinsRecipient & | info | ) |
Definition at line 192 of file guiutil.cpp.
QString GUIUtil::formatDurationStr | ( | int | secs | ) |
QString GUIUtil::formatPingTime | ( | double | dPingTime | ) |
QString GUIUtil::formatServicesStr | ( | quint64 | mask | ) |
QString GUIUtil::getOpenFileName | ( | QWidget * | parent, |
const QString & | caption, | ||
const QString & | dir, | ||
const QString & | filter, | ||
QString * | selectedSuffixOut | ||
) |
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
[in] | parent | Parent window (or 0) |
[in] | caption | Window caption (or empty, for default) |
[in] | dir | Starting directory (or empty, to default to documents directory) |
[in] | filter | Filter specification such as "Comma Separated Files (*.csv)" |
[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. |
Definition at line 310 of file guiutil.cpp.
QString GUIUtil::getSaveFileName | ( | QWidget * | parent, |
const QString & | caption, | ||
const QString & | dir, | ||
const QString & | filter, | ||
QString * | selectedSuffixOut | ||
) |
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when no suffix is provided by the user.
[in] | parent | Parent window (or 0) |
[in] | caption | Window caption (or empty, for default) |
[in] | dir | Starting directory (or empty, to default to documents directory) |
[in] | filter | Filter specification such as "Comma Separated Files (*.csv)" |
[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. |
Definition at line 260 of file guiutil.cpp.
bool GUIUtil::GetStartOnSystemStartup | ( | ) |
QString GUIUtil::HtmlEscape | ( | const QString & | str, |
bool | fMultiLine | ||
) |
QString GUIUtil::HtmlEscape | ( | const std::string & | str, |
bool | fMultiLine | ||
) |
bool GUIUtil::isDust | ( | const QString & | address, |
qint64 | amount | ||
) |
Definition at line 220 of file guiutil.cpp.
bool GUIUtil::isObscured | ( | QWidget * | w | ) |
Definition at line 364 of file guiutil.cpp.
void GUIUtil::openDebugLogfile | ( | ) |
Definition at line 373 of file guiutil.cpp.
bool GUIUtil::parseAnoncoinURI | ( | const QUrl & | uri, |
SendCoinsRecipient * | out | ||
) |
Definition at line 117 of file guiutil.cpp.
bool GUIUtil::parseAnoncoinURI | ( | QString | uri, |
SendCoinsRecipient * | out | ||
) |
boost::filesystem::path GUIUtil::qstringToBoostPath | ( | const QString & | path | ) |
void GUIUtil::restoreWindowGeometry | ( | const QString & | strSetting, |
const QSize & | defaultSize, | ||
QWidget * | parent | ||
) |
Restore window size and position.
Definition at line 745 of file guiutil.cpp.
void GUIUtil::saveWindowGeometry | ( | const QString & | strSetting, |
QWidget * | parent | ||
) |
Save window size and position.
Definition at line 738 of file guiutil.cpp.
void GUIUtil::setClipboard | ( | const QString & | str | ) |
bool GUIUtil::SetStartOnSystemStartup | ( | bool | fAutoStart | ) |
void GUIUtil::setupAddressWidget | ( | QValidatedLineEdit * | widget, |
QWidget * | parent | ||
) |
Definition at line 96 of file guiutil.cpp.
void GUIUtil::setupAmountWidget | ( | QLineEdit * | widget, |
QWidget * | parent | ||
) |
Definition at line 108 of file guiutil.cpp.
void GUIUtil::SubstituteFonts | ( | ) |
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed.
This assures that Qt can word-wrap long tooltip messages. Tooltips longer than the provided size threshold (in characters) are wrapped.
Definition at line 388 of file guiutil.cpp.