Changeset View
Changeset View
Standalone View
Standalone View
src/qt/guiutil.h
Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | |||||
bool isObscured(QWidget *w); | bool isObscured(QWidget *w); | ||||
// Open debug.log | // Open debug.log | ||||
void openDebugLogfile(); | void openDebugLogfile(); | ||||
// Open the config file | // Open the config file | ||||
bool openBitcoinConf(); | bool openBitcoinConf(); | ||||
// Replace invalid default fonts with known good ones | |||||
void SubstituteFonts(const QString &language); | |||||
/** Qt event filter that intercepts ToolTipChange events, and replaces the | /** Qt event filter that intercepts ToolTipChange events, and replaces the | ||||
* tooltip with a rich text representation if needed. This assures that Qt can | * tooltip with a rich text representation if needed. This assures that Qt can | ||||
* word-wrap long tooltip messages. Tooltips longer than the provided size | * word-wrap long tooltip messages. Tooltips longer than the provided size | ||||
* threshold (in characters) are wrapped. | * threshold (in characters) are wrapped. | ||||
*/ | */ | ||||
class ToolTipToRichTextFilter : public QObject { | class ToolTipToRichTextFilter : public QObject { | ||||
Q_OBJECT | Q_OBJECT | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | Q_SIGNALS: | ||||
* of the click are passed to the signal. | * of the click are passed to the signal. | ||||
*/ | */ | ||||
void clicked(const QPoint &point); | void clicked(const QPoint &point); | ||||
protected: | protected: | ||||
void mouseReleaseEvent(QMouseEvent *event) override; | void mouseReleaseEvent(QMouseEvent *event) override; | ||||
}; | }; | ||||
#if defined(Q_OS_MAC) | |||||
// workaround for Qt OSX Bug: | |||||
// https://bugreports.qt-project.org/browse/QTBUG-15631 | |||||
// QProgressBar uses around 10% CPU even when app is in background | |||||
class ProgressBar : public ClickableProgressBar { | |||||
bool event(QEvent *e) override { | |||||
return (e->type() != QEvent::StyleAnimationUpdate) | |||||
? QProgressBar::event(e) | |||||
: false; | |||||
} | |||||
}; | |||||
#else | |||||
typedef ClickableProgressBar ProgressBar; | typedef ClickableProgressBar ProgressBar; | ||||
#endif | |||||
} // namespace GUIUtil | } // namespace GUIUtil | ||||
#endif // BITCOIN_QT_GUIUTIL_H | #endif // BITCOIN_QT_GUIUTIL_H |