Change in plasma-framework[master]: Make tooltipEnabledGlobally public property
Bhushan Shah (Code Review)
noreply at kde.org
Mon Dec 8 16:56:46 UTC 2014
Bhushan Shah has uploaded a new change for review.
https://gerrit.vesnicky.cesnet.cz/r/207
Change subject: Make tooltipEnabledGlobally public property
......................................................................
Make tooltipEnabledGlobally public property
This is case when some users of TooltipArea wants to show some information when tooltips are disabled globally
Change-Id: I88b9f80d779177479730af3f533aabd629654bc0
---
M src/declarativeimports/core/tooltip.cpp
M src/declarativeimports/core/tooltip.h
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.vesnicky.cesnet.cz:29418/plasma-framework refs/changes/07/207/1
diff --git a/src/declarativeimports/core/tooltip.cpp b/src/declarativeimports/core/tooltip.cpp
index 839b8b7..dec3adc 100644
--- a/src/declarativeimports/core/tooltip.cpp
+++ b/src/declarativeimports/core/tooltip.cpp
@@ -75,7 +75,12 @@
KConfigGroup cg(&config, "PlasmaToolTips");
m_interval = cg.readEntry("Delay", 700);
- m_tooltipsEnabledGlobally = (m_interval > 0);
+ bool enabled = (m_interval > 0);
+
+ if (m_tooltipsEnabledGlobally != enabled) {
+ m_tooltipsEnabledGlobally == enabled;
+ emit tooltipsEnabledGloballyChanged();
+ }
}
QQuickItem *ToolTip::mainItem() const
diff --git a/src/declarativeimports/core/tooltip.h b/src/declarativeimports/core/tooltip.h
index 105bf38..b494489 100644
--- a/src/declarativeimports/core/tooltip.h
+++ b/src/declarativeimports/core/tooltip.h
@@ -116,6 +116,11 @@
*/
Q_PROPERTY(bool interactive MEMBER m_interactive WRITE setInteractive NOTIFY interactiveChanged)
+ /**
+ * this property contains if tooltip is globally enabled or not
+ */
+ Q_PROPERTY(bool tooltipsEnabledGlobally MEMBER m_tooltipsEnabledGlobally NOTIFY tooltipsEnabledGloballyChanged)
+
public:
/// @cond INTERNAL_DOCS
ToolTip(QQuickItem *parent = 0);
@@ -175,6 +180,7 @@
void locationChanged();
void activeChanged();
void interactiveChanged();
+ void tooltipsEnabledGloballyChanged();
private Q_SLOTS:
void settingsChanged();
--
To view, visit https://gerrit.vesnicky.cesnet.cz/r/207
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I88b9f80d779177479730af3f533aabd629654bc0
Gerrit-PatchSet: 1
Gerrit-Project: plasma-framework
Gerrit-Branch: master
Gerrit-Owner: Bhushan Shah <bhush94 at gmail.com>
Gerrit-Reviewer: Eike Hein <hein at kde.org>
More information about the Plasma-devel
mailing list