6 #ifndef RAVEN_QT_GUIUTIL_H 7 #define RAVEN_QT_GUIUTIL_H 13 #include <QHeaderView> 14 #include <QMessageBox> 16 #include <QProgressBar> 25 class QAbstractItemView;
31 class QGraphicsDropShadowEffect;
69 QString
HtmlEscape(
const QString& str,
bool fMultiLine=
false);
70 QString
HtmlEscape(
const std::string& str,
bool fMultiLine=
false);
78 void copyEntryData(QAbstractItemView *view,
int column,
int role=Qt::EditRole);
85 QList<QModelIndex>
getEntryData(QAbstractItemView *view,
int column);
99 QString
getSaveFileName(QWidget *parent,
const QString &caption,
const QString &dir,
100 const QString &filter,
101 QString *selectedSuffixOut);
112 QString
getOpenFileName(QWidget *parent,
const QString &caption,
const QString &dir,
113 const QString &filter,
114 QString *selectedSuffixOut);
137 void concatenate(QPainter* painter, QString& strToCon,
int static_width,
int left_side,
int right_size);
173 void stretchColumnWidth(
int column);
183 void adjustTableColumnsWidth();
184 int getAvailableWidthForColumn(
int column);
185 int getColumnsWidth();
186 void connectViewHeadersSignals();
187 void disconnectViewHeadersSignals();
188 void setViewHeaderResizeMode(
int logicalIndex, QHeaderView::ResizeMode resizeMode);
189 void resizeColumn(
int nColumnIndex,
int width);
192 void on_sectionResized(
int logicalIndex,
int oldSize,
int newSize);
193 void on_geometriesChanged();
229 void clicked(
const QPoint& point);
231 void mouseReleaseEvent(QMouseEvent *event);
242 void clicked(
const QPoint& point);
244 void mouseReleaseEvent(QMouseEvent *event);
247 #if defined(Q_OS_MAC) && QT_VERSION >= 0x050000 253 bool event(QEvent *e) {
254 return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) :
false;
263 #endif // RAVEN_QT_GUIUTIL_H void SubstituteFonts(const QString &language)
bool isDust(const QString &address, const CAmount &amount)
Utility functions used by the Raven Qt UI.
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
QList< QModelIndex > getEntryData(QAbstractItemView *view, int column)
Return a field of the currently selected entry as a QString.
void setupAmountWidget(QLineEdit *widget, QWidget *parent)
QGraphicsDropShadowEffect * getShadowEffect()
void concatenate(QPainter *painter, QString &catString, int static_width, int left_side, int right_size)
bool parseRavenURI(const QUrl &uri, SendCoinsRecipient *out)
int secondToLastColumnIndex
QString dateTimeStr(const QDateTime &date)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
QString formatBytes(uint64_t bytes)
QString formatTimeOffset(int64_t nTimeOffset)
bool GetStartOnSystemStartup()
ToolTipToRichTextFilter(int size_threshold, QObject *parent=0)
QString HtmlEscape(const QString &str, bool fMultiLine)
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text repre...
Line edit that can be marked as "invalid" to show input validation feedback.
QFont getTopLabelFontBolded()
int64_t CAmount
Amount in corbies (Can be negative)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
bool isObscured(QWidget *w)
bool eventFilter(QObject *obj, QEvent *evt)
QString formatDurationStr(int secs)
void setClipboard(const QString &str)
int lastColumnMinimumWidth
Makes a QTableView last column feel as if it was being resized from its left border.
ClickableProgressBar ProgressBar
QString formatPingTime(double dPingTime)
int allColumnsMinimumWidth
QString formatRavenURI(const SendCoinsRecipient &info)
fs::path qstringToBoostPath(const QString &path)
QString formatServicesStr(quint64 mask)
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 ...
QFont getTopLabelFont(int weight, int pxsize)
bool SetStartOnSystemStartup(bool fAutoStart)
QString formatNiceTimeOffset(qint64 secs)
QFont getSubLabelFontBolded()
void copyEntryData(QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
QString boostPathToQString(const fs::path &path)