Changeset View
Changeset View
Standalone View
Standalone View
src/views/tooltips/tooltipmanager.h
Context not available. | |||||
42 | Q_OBJECT | 42 | Q_OBJECT | ||
---|---|---|---|---|---|
43 | 43 | | |||
44 | public: | 44 | public: | ||
45 | enum class HideBehavior { | ||||
elvisangelaccio: I'd call this enum `HideBehavior`. It's already implied from the `ToolTipManager` class that we… | |||||
46 | Instantly, | ||||
47 | Later | ||||
elvisangelaccio: Comma not needed | |||||
48 | }; | ||||
49 | | ||||
45 | explicit ToolTipManager(QWidget* parent); | 50 | explicit ToolTipManager(QWidget* parent); | ||
46 | ~ToolTipManager() override; | 51 | ~ToolTipManager() override; | ||
47 | 52 | | |||
Please call this parameter hideIstantly. Bonus point if you use an enum instead of a bool ;) (see http://www.informit.com/articles/article.aspx?p=1392524) elvisangelaccio: Please call this parameter `hideIstantly`. Bonus point if you use an enum instead of a bool ;)… | |||||
Context not available. | |||||
56 | /** | 61 | /** | ||
57 | * Hides the currently shown tooltip. | 62 | * Hides the currently shown tooltip. | ||
58 | */ | 63 | */ | ||
59 | void hideToolTip(); | 64 | void hideToolTip(const HideBehavior behavior = HideBehavior::Later); | ||
60 | 65 | | |||
61 | signals: | 66 | signals: | ||
62 | /** | 67 | /** | ||
Context not available. |
I'd call this enum HideBehavior. It's already implied from the ToolTipManager class that we are talking about tooltips.