Raven Core  3.0.0
P2P Digital Currency
Classes | Typedefs | Functions
GUIUtil Namespace Reference

Utility functions used by the Raven Qt UI. More...

Classes

class  ClickableLabel
 
class  ClickableProgressBar
 
class  TableViewLastColumnResizingFixer
 Makes a QTableView last column feel as if it was being resized from its left border. More...
 
class  ToolTipToRichTextFilter
 Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. More...
 

Typedefs

typedef ClickableProgressBar ProgressBar
 

Functions

QFont getSubLabelFont ()
 
QFont getSubLabelFontBolded ()
 
QFont getTopLabelFontBolded ()
 
QFont getTopLabelFont (int weight, int pxsize)
 
QFont getTopLabelFont ()
 
QGraphicsDropShadowEffect * getShadowEffect ()
 
QString dateTimeStr (const QDateTime &date)
 
QString dateTimeStr (qint64 nTime)
 
QFont fixedPitchFont ()
 
void setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent)
 
void setupAmountWidget (QLineEdit *widget, QWidget *parent)
 
bool parseRavenURI (const QUrl &uri, SendCoinsRecipient *out)
 
bool parseRavenURI (QString uri, SendCoinsRecipient *out)
 
QString formatRavenURI (const SendCoinsRecipient &info)
 
bool isDust (const QString &address, const CAmount &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...
 
QList< QModelIndex > getEntryData (QAbstractItemView *view, int column)
 Return a field of the currently selected entry as a QString. 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 ()
 
bool openRavenConf ()
 
void SubstituteFonts (const QString &language)
 
bool GetStartOnSystemStartup ()
 
bool SetStartOnSystemStartup (bool fAutoStart)
 
void setClipboard (const QString &str)
 
fs::path qstringToBoostPath (const QString &path)
 
QString boostPathToQString (const fs::path &path)
 
QString formatDurationStr (int secs)
 
QString formatServicesStr (quint64 mask)
 
QString formatPingTime (double dPingTime)
 
QString formatTimeOffset (int64_t nTimeOffset)
 
QString formatNiceTimeOffset (qint64 secs)
 
QString formatBytes (uint64_t bytes)
 
void concatenate (QPainter *painter, QString &catString, int static_width, int left_side, int right_size)
 

Detailed Description

Utility functions used by the Raven Qt UI.

Typedef Documentation

◆ ProgressBar

Definition at line 258 of file guiutil.h.

Function Documentation

◆ blockingGUIThreadConnection()

Qt::ConnectionType GUIUtil::blockingGUIThreadConnection ( )

Get connection type to call object slot in GUI thread with invokeMethod.

The call will be blocking.

Returns
If called from the GUI thread, return a Qt::DirectConnection. If called from another thread, return a Qt::BlockingQueuedConnection.

Definition at line 460 of file guiutil.cpp.

◆ boostPathToQString()

QString GUIUtil::boostPathToQString ( const fs::path &  path)

Definition at line 956 of file guiutil.cpp.

Here is the caller graph for this function:

◆ checkPoint()

bool GUIUtil::checkPoint ( const QPoint &  p,
const QWidget *  w 
)

Definition at line 472 of file guiutil.cpp.

Here is the caller graph for this function:

◆ concatenate()

void GUIUtil::concatenate ( QPainter *  painter,
QString &  catString,
int  static_width,
int  left_side,
int  right_size 
)

Definition at line 1088 of file guiutil.cpp.

Here is the caller graph for this function:

◆ copyEntryData()

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.

Parameters
[in]columnData column to extract from the model
[in]roleData role to extract from the model
See also
TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress

Definition at line 355 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dateTimeStr() [1/2]

QString GUIUtil::dateTimeStr ( const QDateTime &  date)

Definition at line 158 of file guiutil.cpp.

Here is the caller graph for this function:

◆ dateTimeStr() [2/2]

QString GUIUtil::dateTimeStr ( qint64  nTime)

Definition at line 163 of file guiutil.cpp.

Here is the call graph for this function:

◆ fixedPitchFont()

QFont GUIUtil::fixedPitchFont ( )

Definition at line 168 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatBytes()

QString GUIUtil::formatBytes ( uint64_t  bytes)

Definition at line 1066 of file guiutil.cpp.

Here is the caller graph for this function:

◆ formatDurationStr()

QString GUIUtil::formatDurationStr ( int  secs)

Definition at line 961 of file guiutil.cpp.

Here is the caller graph for this function:

◆ formatNiceTimeOffset()

QString GUIUtil::formatNiceTimeOffset ( qint64  secs)

Definition at line 1029 of file guiutil.cpp.

◆ formatPingTime()

QString GUIUtil::formatPingTime ( double  dPingTime)

Definition at line 1019 of file guiutil.cpp.

Here is the caller graph for this function:

◆ formatRavenURI()

QString GUIUtil::formatRavenURI ( const SendCoinsRecipient info)

Definition at line 300 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatServicesStr()

QString GUIUtil::formatServicesStr ( quint64  mask)

Definition at line 981 of file guiutil.cpp.

Here is the caller graph for this function:

◆ formatTimeOffset()

QString GUIUtil::formatTimeOffset ( int64_t  nTimeOffset)

Definition at line 1024 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getEntryData()

QList< QModelIndex > GUIUtil::getEntryData ( QAbstractItemView *  view,
int  column 
)

Return a field of the currently selected entry as a QString.

Does nothing if nothing is selected.

Parameters
[in]columnData column to extract from the model
See also
TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress

Definition at line 368 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getOpenFileName()

QString GUIUtil::getOpenFileName ( QWidget *  parent,
const QString &  caption,
const QString &  dir,
const QString &  filter,
QString *  selectedSuffixOut 
)

Get open filename, convenience wrapper for QFileDialog::getOpenFileName.

Parameters
[in]parentParent window (or 0)
[in]captionWindow caption (or empty, for default)
[in]dirStarting directory (or empty, to default to documents directory)
[in]filterFilter specification such as "Comma Separated Files (*.csv)"
[out]selectedSuffixOutPointer 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 425 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getSaveFileName()

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.

Parameters
[in]parentParent window (or 0)
[in]captionWindow caption (or empty, for default)
[in]dirStarting directory (or empty, to default to documents directory)
[in]filterFilter specification such as "Comma Separated Files (*.csv)"
[out]selectedSuffixOutPointer 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 375 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getShadowEffect()

QGraphicsDropShadowEffect * GUIUtil::getShadowEffect ( )

Definition at line 146 of file guiutil.cpp.

Here is the caller graph for this function:

◆ GetStartOnSystemStartup()

bool GUIUtil::GetStartOnSystemStartup ( )

Definition at line 940 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getSubLabelFont()

QFont GUIUtil::getSubLabelFont ( )

Definition at line 86 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getSubLabelFontBolded()

QFont GUIUtil::getSubLabelFontBolded ( )

Definition at line 98 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getTopLabelFont() [1/2]

QFont GUIUtil::getTopLabelFont ( int  weight,
int  pxsize 
)

Definition at line 122 of file guiutil.cpp.

Here is the caller graph for this function:

◆ getTopLabelFont() [2/2]

QFont GUIUtil::getTopLabelFont ( )

Definition at line 134 of file guiutil.cpp.

◆ getTopLabelFontBolded()

QFont GUIUtil::getTopLabelFontBolded ( )

Definition at line 110 of file guiutil.cpp.

Here is the caller graph for this function:

◆ HtmlEscape() [1/2]

QString GUIUtil::HtmlEscape ( const QString &  str,
bool  fMultiLine 
)

Definition at line 336 of file guiutil.cpp.

Here is the caller graph for this function:

◆ HtmlEscape() [2/2]

QString GUIUtil::HtmlEscape ( const std::string &  str,
bool  fMultiLine 
)

Definition at line 350 of file guiutil.cpp.

Here is the call graph for this function:

◆ isDust()

bool GUIUtil::isDust ( const QString &  address,
const CAmount amount 
)

Definition at line 328 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isObscured()

bool GUIUtil::isObscured ( QWidget *  w)

Definition at line 479 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openDebugLogfile()

void GUIUtil::openDebugLogfile ( )

Definition at line 488 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openRavenConf()

bool GUIUtil::openRavenConf ( )

Definition at line 497 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseRavenURI() [1/2]

bool GUIUtil::parseRavenURI ( const QUrl &  uri,
SendCoinsRecipient out 
)

Definition at line 225 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseRavenURI() [2/2]

bool GUIUtil::parseRavenURI ( QString  uri,
SendCoinsRecipient out 
)

Definition at line 286 of file guiutil.cpp.

Here is the call graph for this function:

◆ qstringToBoostPath()

fs::path GUIUtil::qstringToBoostPath ( const QString &  path)

Definition at line 951 of file guiutil.cpp.

Here is the caller graph for this function:

◆ setClipboard()

void GUIUtil::setClipboard ( const QString &  str)

Definition at line 945 of file guiutil.cpp.

◆ SetStartOnSystemStartup()

bool GUIUtil::SetStartOnSystemStartup ( bool  fAutoStart)

Definition at line 941 of file guiutil.cpp.

Here is the caller graph for this function:

◆ setupAddressWidget()

void GUIUtil::setupAddressWidget ( QValidatedLineEdit widget,
QWidget *  parent 
)

Definition at line 201 of file guiutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupAmountWidget()

void GUIUtil::setupAmountWidget ( QLineEdit *  widget,
QWidget *  parent 
)

Definition at line 216 of file guiutil.cpp.

◆ SubstituteFonts()

void GUIUtil::SubstituteFonts ( const QString &  language)

Definition at line 513 of file guiutil.cpp.

Here is the caller graph for this function: