5 #ifndef FABCOIN_QT_GUIUTIL_H 6 #define FABCOIN_QT_GUIUTIL_H 12 #include <QHeaderView> 13 #include <QMessageBox> 15 #include <QProgressBar> 19 #include <QToolButton> 25 class QAbstractItemView;
57 QString
HtmlEscape(
const QString& str,
bool fMultiLine=
false);
58 QString
HtmlEscape(
const std::string& str,
bool fMultiLine=
false);
66 void copyEntryData(QAbstractItemView *view,
int column,
int role=Qt::EditRole);
80 QList<QModelIndex>
getEntryData(QAbstractItemView *view,
int column);
94 QString
getSaveFileName(QWidget *parent,
const QString &caption,
const QString &dir,
95 const QString &filter,
96 QString *selectedSuffixOut);
107 QString
getOpenFileName(QWidget *parent,
const QString &caption,
const QString &dir,
108 const QString &filter,
109 QString *selectedSuffixOut);
164 void stretchColumnWidth(
int column);
174 void adjustTableColumnsWidth();
175 int getAvailableWidthForColumn(
int column);
176 int getColumnsWidth();
177 void connectViewHeadersSignals();
178 void disconnectViewHeadersSignals();
179 void setViewHeaderResizeMode(
int logicalIndex, QHeaderView::ResizeMode resizeMode);
180 void resizeColumn(
int nColumnIndex,
int width);
183 void on_sectionResized(
int logicalIndex,
int oldSize,
int newSize);
184 void on_geometriesChanged();
218 void clicked(
const QPoint& point);
220 void mouseReleaseEvent(QMouseEvent *event);
231 void clicked(
const QPoint& point);
233 void mouseReleaseEvent(QMouseEvent *event);
236 #if defined(Q_OS_MAC) && QT_VERSION >= 0x050000 242 bool event(QEvent *
e) {
243 return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) :
false;
250 void formatToolButtons(QToolButton* btn1, QToolButton* btn2 = 0, QToolButton* btn3 = 0);
254 #endif // FABCOIN_QT_GUIUTIL_H void SubstituteFonts(const QString &language)
bool isDust(const QString &address, const CAmount &amount)
Utility functions used by the Fabcoin 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)
int secondToLastColumnIndex
QString dateTimeStr(const QDateTime &date)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
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...
void copyEntryDataFromList(QAbstractItemView *view, int role)
Copy a field of the currently selected entry of a view to the clipboard.
Line edit that can be marked as "invalid" to show input validation feedback.
int64_t CAmount
Amount in lius (Can be negative)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
bool isObscured(QWidget *w)
bool eventFilter(QObject *obj, QEvent *evt)
bool parseFabcoinURI(const QUrl &uri, SendCoinsRecipient *out)
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 formatFabcoinURI(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 ...
bool SetStartOnSystemStartup(bool fAutoStart)
QString formatNiceTimeOffset(qint64 secs)
struct evm_uint160be address(struct evm_env *env)
void formatToolButtons(QToolButton *btn1, QToolButton *btn2, QToolButton *btn3)
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)