E5Gui/E5PassivePopup.py

changeset 6125
bb1c79bf4f33
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
--- a/E5Gui/E5PassivePopup.py	Fri Feb 09 18:53:08 2018 +0100
+++ b/E5Gui/E5PassivePopup.py	Fri Feb 09 18:58:21 2018 +0100
@@ -47,6 +47,8 @@
         self.setLineWidth(2)
         self.__hideTimer.timeout.connect(self.hide)
         self.clicked.connect(self.hide)
+        
+        self.__customData = {}  # dictionary to store some custom data
     
     def setView(self, child):
         """
@@ -210,6 +212,28 @@
             x = r.left()
         
         return QPoint(x, y)
+    
+    def setCustomData(self, key, data):
+        """
+        Public method to set some custom data.
+        
+        @param key key for the custom data
+        @type str
+        @param data data to be stored
+        @type any
+        """
+        self.__customData[key] = data
+    
+    def getCustomData(self, key):
+        """
+        Public method to get some custom data.
+        
+        @param key key for the custom data
+        @type str
+        @return stored data
+        @rtype any
+        """
+        return self.__customData[key]
 
 DEFAULT_POPUP_TYPE = E5PassivePopup.Boxed
 DEFAULT_POPUP_TIME = 6 * 1000

eric ide

mercurial