Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
guiutil.h
Go to the documentation of this file.
67 /* Alternative color for black/white icons. White part will be filled with this color by default. */
93 QIcon getIcon(const QString& strIcon, ThemedColor color, ThemedColor colorAlternative, const QString& strIconPath = ICONS_PATH);
94 QIcon getIcon(const QString& strIcon, ThemedColor color = ThemedColor::BLUE, const QString& strIconPath = ICONS_PATH);
97 void setIcon(QAbstractButton* button, const QString& strIcon, ThemedColor color, ThemedColor colorAlternative, const QSize& size);
98 void setIcon(QAbstractButton* button, const QString& strIcon, ThemedColor color = ThemedColor::BLUE, const QSize& size = QSize(BUTTON_ICONSIZE, BUTTON_ICONSIZE));
226 TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent);
329 void setFont(const std::vector<QWidget*>& vecWidgets, FontWeight weight, int nPointSize = -1, bool fItalic = false);
336 QFont getFont(FontFamily family, QFont::Weight qWeight, bool fItalic = false, int nPointSize = -1);
391 qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize = 4, qreal startPointSize = 14);
void stretchColumnWidth(int column)
Definition: guiutil.cpp:813
bool isDust(const QString &address, const CAmount &amount)
Definition: guiutil.cpp:473
double getScaledFontSize(int nSize)
get font size with GUIUtil::fontScale applied
Definition: guiutil.cpp:1404
const std::vector< QString > listThemes()
Return a list of all theme css files.
Definition: guiutil.cpp:1139
bool weightFromArg(int nArg, QFont::Weight &weight)
Convert weight value from args (0-8) to QFont::Weight.
Definition: guiutil.cpp:1313
FontFamily getFontFamilyDefault()
set/get font family: GUIUtil::fontFamily
Definition: guiutil.cpp:1303
QFont getFont(FontFamily family, QFont::Weight qWeight, bool fItalic, int nPointSize)
Get a properly weighted QFont object with the selected font.
Definition: guiutil.cpp:1666
int weightToArg(const QFont::Weight weight)
Convert QFont::Weight to an arg value (0-8)
Definition: guiutil.cpp:1334
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
Definition: guiutil.cpp:571
QList< QModelIndex > getEntryData(QAbstractItemView *view, int column)
Return a field of the currently selected entry as a QString.
Definition: guiutil.cpp:514
QFont::Weight supportedWeightFromIndex(int nIndex)
Convert an index to a weight in the supported weights vector.
Definition: guiutil.cpp:1751
void setupAmountWidget(QLineEdit *widget, QWidget *parent)
Definition: guiutil.cpp:300
void setFont(const std::vector< QWidget *> &vecWidgets, FontWeight weight, int nPointSize, bool fItalic)
Workaround to set correct font styles in all themes since there is a bug in macOS which leads to issu...
Definition: guiutil.cpp:1552
FontFamily fontFamilyFromString(const QString &strFamily)
Definition: guiutil.cpp:1273
void setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode)
Definition: guiutil.cpp:758
void on_geometriesChanged()
Definition: guiutil.cpp:833
bool dashThemeActive()
Check if a dash specific theme is activated (light/dark).
Definition: guiutil.cpp:1775
int secondToLastColumnIndex
Definition: guiutil.h:235
QColor getThemedQColor(ThemedColor color)
Helper to get colors for various themes which can't be applied via css for some reason.
Definition: guiutil.cpp:204
void setFontWeightNormal(QFont::Weight weight)
Definition: guiutil.cpp:1366
void loadTheme(QWidget *widget, bool fForce)
Load the theme and update all UI elements according to the appearance settings.
Definition: guiutil.cpp:1782
QFont::Weight getFontWeightNormalDefault()
set/get normal font weight: GUIUtil::fontWeightNormal
Definition: guiutil.cpp:1351
const std::vector< QString > listStyleSheets()
Return a list of all required css files.
Definition: guiutil.cpp:1130
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
Definition: guiutil.cpp:606
ToolTipToRichTextFilter(int size_threshold, QObject *parent=0)
Definition: guiutil.cpp:715
Definition: guiutil.h:393
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent, bool fAllowURI)
Definition: guiutil.cpp:286
QString HtmlEscape(const QString &str, bool fMultiLine)
Definition: guiutil.cpp:481
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text repre...
Definition: guiutil.h:197
QFont::Weight getFontWeightBoldDefault()
set/get bold font weight: GUIUtil::fontWeightBold
Definition: guiutil.cpp:1372
void connectViewHeadersSignals()
Definition: guiutil.cpp:743
Line edit that can be marked as "invalid" to show input validation feedback.
Definition: qvalidatedlineedit.h:13
void migrateQtSettings()
Modify Qt network specific settings on migration.
Definition: guiutil.cpp:1108
int getAvailableWidthForColumn(int column)
Definition: guiutil.cpp:783
bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
Definition: guiutil.cpp:358
void setupAppearance(QWidget *parent, OptionsModel *model)
Definition: guiutil.cpp:309
QString formatBitcoinURI(const SendCoinsRecipient &info)
Definition: guiutil.cpp:445
QFont::Weight toQFontWeight(FontWeight weight)
Convert GUIUtil::FontWeight to QFont::Weight.
Definition: guiutil.cpp:1356
TableViewLastColumnResizingFixer(QTableView *table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent)
Initializes all internal variables and prepares the the resize modes of the last 2 columns of the tab...
Definition: guiutil.cpp:847
void updateMacFocusRects()
Enable/Disable the macOS focus rects depending on the current theme.
Definition: guiutil.cpp:1801
bool isStyleSheetDirectoryCustom()
Check if a custom css directory has been set with -custom-css-dir.
Definition: guiutil.cpp:1125
void updateFonts()
Update the font of all widgets where a custom font has been set with GUIUtil::setFont.
Definition: guiutil.cpp:1563
bool eventFilter(QObject *obj, QEvent *evt)
Definition: guiutil.cpp:722
qreal calculateIdealFontSize(int width, const QString &text, QFont font, qreal minPointSize, qreal font_size)
Definition: guiutil.cpp:1947
Definition: guiutil.h:406
int lastColumnMinimumWidth
Definition: guiutil.h:231
QString fontFamilyToString(FontFamily family)
Definition: guiutil.cpp:1284
Definition: walletmodel.h:39
QIcon getIcon(const QString &strIcon, const ThemedColor color, const ThemedColor colorAlternative, const QString &strIconPath)
Helper to get an icon colorized with the given color (replaces black) and colorAlternative (replaces ...
Definition: guiutil.cpp:216
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:221
int supportedWeightToIndex(QFont::Weight weight)
Convert a weight to an index in the supported weights vector.
Definition: guiutil.cpp:1758
std::vector< QFont::Weight > getSupportedWeights()
Return supported weights for the current font family.
Definition: guiutil.cpp:1745
void disableMacFocusRect(const QWidget *w)
Disable the OS default focus rect for macOS because we have custom focus rects set in the css files...
Definition: guiutil.cpp:1789
void on_sectionResized(int logicalIndex, int oldSize, int newSize)
Definition: guiutil.cpp:821
void setStyleSheetDirectory(const QString &path)
Change the stylesheet directory.
Definition: guiutil.cpp:1120
void mouseReleaseEvent(QMouseEvent *event)
Definition: guiutil.cpp:1959
void disconnectViewHeadersSignals()
Definition: guiutil.cpp:750
int allColumnsMinimumWidth
Definition: guiutil.h:232
void mouseReleaseEvent(QMouseEvent *event)
Definition: guiutil.cpp:1964
fs::path qstringToBoostPath(const QString &path)
Definition: guiutil.cpp:1823
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:25
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 ...
Definition: guiutil.cpp:521
int lastColumnIndex
Definition: guiutil.h:233
QString getThemedStyleQString(ThemedStyle style)
Helper to get css style strings which are injected into rich text through qt.
Definition: guiutil.cpp:210
void adjustTableColumnsWidth()
Definition: guiutil.cpp:798
void setIcon(QAbstractButton *button, const QString &strIcon, const ThemedColor color, const ThemedColor colorAlternative, const QSize &size)
Helper to set an icon for a button with the given color (replaces black) and colorAlternative (replac...
Definition: guiutil.cpp:247
int getColumnsWidth()
Definition: guiutil.cpp:773
bool SetStartOnSystemStartup(bool fAutoStart)
Definition: guiutil.cpp:1104
void clicked(const QPoint &point)
Emitted when the progressbar is clicked.
void loadStyleSheet(QWidget *widget, bool fForceUpdate)
Updates the widgets stylesheet and adds it to the list of ui debug elements.
Definition: guiutil.cpp:1155
void copyEntryData(QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
Definition: guiutil.cpp:501
QString boostPathToQString(const fs::path &path)
Definition: guiutil.cpp:1828
void setApplicationFont()
Set an application wide default font, depends on the selected theme.
Definition: guiutil.cpp:1522
void resizeColumn(int nColumnIndex, int width)
Definition: guiutil.cpp:767