Added the E5AnimatedWidget class and changed FeaturePermissionBar to use it.

Wed, 05 Aug 2015 19:45:33 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 05 Aug 2015 19:45:33 +0200
changeset 4353
cff7e27fb7b8
parent 4352
86f7a3344d38
child 4354
bc2b247a75df

Added the E5AnimatedWidget class and changed FeaturePermissionBar to use it.

APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
APIs/Python3/eric6.bas file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric6.E5Gui.E5AnimatedWidget.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Helpviewer.FeaturePermissionBar.html file | annotate | diff | comparison | revisions
Documentation/Source/index-eric6.E5Gui.html file | annotate | diff | comparison | revisions
E5Gui/E5AnimatedWidget.py file | annotate | diff | comparison | revisions
Helpviewer/FeaturePermissionBar.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric6.api	Tue Aug 04 19:13:28 2015 +0200
+++ b/APIs/Python3/eric6.api	Wed Aug 05 19:45:33 2015 +0200
@@ -1195,6 +1195,13 @@
 eric6.E5Gui.E5Action.E5Action?1(*args)
 eric6.E5Gui.E5Action.addActions?4(target, actions)
 eric6.E5Gui.E5Action.createActionGroup?4(parent, name=None, exclusive=False)
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.DirectionDown?7
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.DirectionUp?7
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.hide?4()
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.resizeEvent?4(evt)
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.startAnimation?4()
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget.widget?4()
+eric6.E5Gui.E5AnimatedWidget.E5AnimatedWidget?1(direction=DirectionDown, duration=300, parent=None)
 eric6.E5Gui.E5Application.E5Application.getObject?4(name)
 eric6.E5Gui.E5Application.E5Application.getPluginObject?4(name)
 eric6.E5Gui.E5Application.E5Application.getPluginObjectType?4(name)
@@ -2460,8 +2467,7 @@
 eric6.Helpviewer.Download.DownloadUtilities.timeString?4(timeRemaining)
 eric6.Helpviewer.FeaturePermissionBar.FeaturePermissionBar.DefaultHeight?7
 eric6.Helpviewer.FeaturePermissionBar.FeaturePermissionBar.featurePermissionProvided?7
-eric6.Helpviewer.FeaturePermissionBar.FeaturePermissionBar.requestPermission?4(frame, feature)
-eric6.Helpviewer.FeaturePermissionBar.FeaturePermissionBar?1(view)
+eric6.Helpviewer.FeaturePermissionBar.FeaturePermissionBar?1(view, frame, feature)
 eric6.Helpviewer.Feeds.FeedEditDialog.FeedEditDialog.getData?4()
 eric6.Helpviewer.Feeds.FeedEditDialog.FeedEditDialog.on_titleEdit_textChanged?4(txt)
 eric6.Helpviewer.Feeds.FeedEditDialog.FeedEditDialog.on_urlEdit_textChanged?4(txt)
--- a/APIs/Python3/eric6.bas	Tue Aug 04 19:13:28 2015 +0200
+++ b/APIs/Python3/eric6.bas	Wed Aug 05 19:45:33 2015 +0200
@@ -139,6 +139,7 @@
 DownloadModel QAbstractListModel
 DuplicateParamError Exception
 E5Action QAction
+E5AnimatedWidget QWidget
 E5Application QApplication
 E5ArrowItem QAbstractGraphicsShapeItem
 E5ClearableComboBox E5ComboBox
@@ -245,7 +246,7 @@
 ExtToken peg.Symbol
 ExtValue peg.List
 FavIconLabel QLabel
-FeaturePermissionBar QWidget
+FeaturePermissionBar E5AnimatedWidget
 FeedEditDialog QDialog Ui_FeedEditDialog
 FeedsDialog QDialog Ui_FeedsDialog
 FeedsManager QDialog Ui_FeedsManager
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Tue Aug 04 19:13:28 2015 +0200
+++ b/Documentation/Help/source.qhp	Wed Aug 05 19:45:33 2015 +0200
@@ -115,6 +115,7 @@
           </section>
           <section title="eric6.E5Gui" ref="index-eric6.E5Gui.html">
             <section title="eric6.E5Gui.E5Action" ref="eric6.E5Gui.E5Action.html" />
+            <section title="eric6.E5Gui.E5AnimatedWidget" ref="eric6.E5Gui.E5AnimatedWidget.html" />
             <section title="eric6.E5Gui.E5Application" ref="eric6.E5Gui.E5Application.html" />
             <section title="eric6.E5Gui.E5ClickableLabel" ref="eric6.E5Gui.E5ClickableLabel.html" />
             <section title="eric6.E5Gui.E5ComboBox" ref="eric6.E5Gui.E5ComboBox.html" />
@@ -3543,6 +3544,14 @@
       <keyword name="E5Action.setIconText" id="E5Action.setIconText" ref="eric6.E5Gui.E5Action.html#E5Action.setIconText" />
       <keyword name="E5Action.setShortcut" id="E5Action.setShortcut" ref="eric6.E5Gui.E5Action.html#E5Action.setShortcut" />
       <keyword name="E5Action.setShortcuts" id="E5Action.setShortcuts" ref="eric6.E5Gui.E5Action.html#E5Action.setShortcuts" />
+      <keyword name="E5AnimatedWidget" id="E5AnimatedWidget" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget" />
+      <keyword name="E5AnimatedWidget (Constructor)" id="E5AnimatedWidget (Constructor)" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.__init__" />
+      <keyword name="E5AnimatedWidget (Module)" id="E5AnimatedWidget (Module)" ref="eric6.E5Gui.E5AnimatedWidget.html" />
+      <keyword name="E5AnimatedWidget.__animateFrame" id="E5AnimatedWidget.__animateFrame" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.__animateFrame" />
+      <keyword name="E5AnimatedWidget.hide" id="E5AnimatedWidget.hide" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.hide" />
+      <keyword name="E5AnimatedWidget.resizeEvent" id="E5AnimatedWidget.resizeEvent" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.resizeEvent" />
+      <keyword name="E5AnimatedWidget.startAnimation" id="E5AnimatedWidget.startAnimation" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.startAnimation" />
+      <keyword name="E5AnimatedWidget.widget" id="E5AnimatedWidget.widget" ref="eric6.E5Gui.E5AnimatedWidget.html#E5AnimatedWidget.widget" />
       <keyword name="E5Application" id="E5Application" ref="eric6.E5Gui.E5Application.html#E5Application" />
       <keyword name="E5Application (Constructor)" id="E5Application (Constructor)" ref="eric6.E5Gui.E5Application.html#E5Application.__init__" />
       <keyword name="E5Application (Module)" id="E5Application (Module)" ref="eric6.E5Gui.E5Application.html" />
@@ -4895,7 +4904,6 @@
       <keyword name="FeaturePermissionBar.__permissionDenied" id="FeaturePermissionBar.__permissionDenied" ref="eric6.Helpviewer.FeaturePermissionBar.html#FeaturePermissionBar.__permissionDenied" />
       <keyword name="FeaturePermissionBar.__permissionGranted" id="FeaturePermissionBar.__permissionGranted" ref="eric6.Helpviewer.FeaturePermissionBar.html#FeaturePermissionBar.__permissionGranted" />
       <keyword name="FeaturePermissionBar.__permissionUnknown" id="FeaturePermissionBar.__permissionUnknown" ref="eric6.Helpviewer.FeaturePermissionBar.html#FeaturePermissionBar.__permissionUnknown" />
-      <keyword name="FeaturePermissionBar.requestPermission" id="FeaturePermissionBar.requestPermission" ref="eric6.Helpviewer.FeaturePermissionBar.html#FeaturePermissionBar.requestPermission" />
       <keyword name="FeedEditDialog" id="FeedEditDialog" ref="eric6.Helpviewer.Feeds.FeedEditDialog.html#FeedEditDialog" />
       <keyword name="FeedEditDialog (Constructor)" id="FeedEditDialog (Constructor)" ref="eric6.Helpviewer.Feeds.FeedEditDialog.html#FeedEditDialog.__init__" />
       <keyword name="FeedEditDialog (Module)" id="FeedEditDialog (Module)" ref="eric6.Helpviewer.Feeds.FeedEditDialog.html" />
@@ -13945,6 +13953,7 @@
       <file>eric6.E5Graphics.E5ArrowItem.html</file>
       <file>eric6.E5Graphics.E5GraphicsView.html</file>
       <file>eric6.E5Gui.E5Action.html</file>
+      <file>eric6.E5Gui.E5AnimatedWidget.html</file>
       <file>eric6.E5Gui.E5Application.html</file>
       <file>eric6.E5Gui.E5ClickableLabel.html</file>
       <file>eric6.E5Gui.E5ComboBox.html</file>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric6.E5Gui.E5AnimatedWidget.html	Wed Aug 05 19:45:33 2015 +0200
@@ -0,0 +1,147 @@
+<!DOCTYPE html>
+<html><head>
+<title>eric6.E5Gui.E5AnimatedWidget</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric6.E5Gui.E5AnimatedWidget</h1>
+<p>
+Module implementing an animated widget.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#E5AnimatedWidget">E5AnimatedWidget</a></td>
+<td>Class implementing an animated widget.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="E5AnimatedWidget" ID="E5AnimatedWidget"></a>
+<h2>E5AnimatedWidget</h2>
+<p>
+    Class implementing an animated widget.
+</p>
+<h3>Derived from</h3>
+QWidget
+<h3>Class Attributes</h3>
+<table>
+<tr><td>DirectionDown</td></tr><tr><td>DirectionUp</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#E5AnimatedWidget.__init__">E5AnimatedWidget</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#E5AnimatedWidget.__animateFrame">__animateFrame</a></td>
+<td>Private slot to animate the next frame.</td>
+</tr><tr>
+<td><a href="#E5AnimatedWidget.hide">hide</a></td>
+<td>Public slot to hide the animated widget.</td>
+</tr><tr>
+<td><a href="#E5AnimatedWidget.resizeEvent">resizeEvent</a></td>
+<td>Protected method to handle a resize event.</td>
+</tr><tr>
+<td><a href="#E5AnimatedWidget.startAnimation">startAnimation</a></td>
+<td>Public slot to start the animation.</td>
+</tr><tr>
+<td><a href="#E5AnimatedWidget.widget">widget</a></td>
+<td>Public method to get a reference to the animated widget.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="E5AnimatedWidget.__init__" ID="E5AnimatedWidget.__init__"></a>
+<h4>E5AnimatedWidget (Constructor)</h4>
+<b>E5AnimatedWidget</b>(<i>direction=DirectionDown, duration=300, parent=None</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>direction</i> (int (one of DirectionDown or DirectionUp))</dt>
+<dd>
+direction of the animation
+</dd><dt><i>duration</i> (int)</dt>
+<dd>
+duration of the animation
+</dd><dt><i>parent</i> (QWidget)</dt>
+<dd>
+reference to the parent widget
+</dd>
+</dl><a NAME="E5AnimatedWidget.__animateFrame" ID="E5AnimatedWidget.__animateFrame"></a>
+<h4>E5AnimatedWidget.__animateFrame</h4>
+<b>__animateFrame</b>(<i>frame</i>)
+<p>
+        Private slot to animate the next frame.
+</p><dl>
+<dt><i>frame</i> (int)</dt>
+<dd>
+frame number
+</dd>
+</dl><a NAME="E5AnimatedWidget.hide" ID="E5AnimatedWidget.hide"></a>
+<h4>E5AnimatedWidget.hide</h4>
+<b>hide</b>(<i></i>)
+<p>
+        Public slot to hide the animated widget.
+</p><a NAME="E5AnimatedWidget.resizeEvent" ID="E5AnimatedWidget.resizeEvent"></a>
+<h4>E5AnimatedWidget.resizeEvent</h4>
+<b>resizeEvent</b>(<i>evt</i>)
+<p>
+        Protected method to handle a resize event.
+</p><dl>
+<dt><i>evt</i> (QResizeEvent)</dt>
+<dd>
+reference to the event object
+</dd>
+</dl><a NAME="E5AnimatedWidget.startAnimation" ID="E5AnimatedWidget.startAnimation"></a>
+<h4>E5AnimatedWidget.startAnimation</h4>
+<b>startAnimation</b>(<i></i>)
+<p>
+        Public slot to start the animation.
+</p><a NAME="E5AnimatedWidget.widget" ID="E5AnimatedWidget.widget"></a>
+<h4>E5AnimatedWidget.widget</h4>
+<b>widget</b>(<i></i>)
+<p>
+        Public method to get a reference to the animated widget.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+reference to the animated widget
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+QWidget
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file
--- a/Documentation/Source/eric6.Helpviewer.FeaturePermissionBar.html	Tue Aug 04 19:13:28 2015 +0200
+++ b/Documentation/Source/eric6.Helpviewer.FeaturePermissionBar.html	Wed Aug 05 19:45:33 2015 +0200
@@ -45,7 +45,7 @@
     Class implementing the feature permission bar widget.
 </p>
 <h3>Derived from</h3>
-QWidget
+E5AnimatedWidget
 <h3>Class Attributes</h3>
 <table>
 <tr><td>DefaultHeight</td></tr>
@@ -68,9 +68,6 @@
 </tr><tr>
 <td><a href="#FeaturePermissionBar.__permissionUnknown">__permissionUnknown</a></td>
 <td>Private slot handling the user closing the dialog without.</td>
-</tr><tr>
-<td><a href="#FeaturePermissionBar.requestPermission">requestPermission</a></td>
-<td>Public method to ask the user for a permission.</td>
 </tr>
 </table>
 <h3>Static Methods</h3>
@@ -79,13 +76,19 @@
 </table>
 <a NAME="FeaturePermissionBar.__init__" ID="FeaturePermissionBar.__init__"></a>
 <h4>FeaturePermissionBar (Constructor)</h4>
-<b>FeaturePermissionBar</b>(<i>view</i>)
+<b>FeaturePermissionBar</b>(<i>view, frame, feature</i>)
 <p>
         Constructor
 </p><dl>
 <dt><i>view</i> (QWebView)</dt>
 <dd>
 reference to the web view
+</dd><dt><i>frame</i> (QWebFrame)</dt>
+<dd>
+frame sending the request
+</dd><dt><i>feature</i> (QWebPage.Feature)</dt>
+<dd>
+requested feature
 </dd>
 </dl><a NAME="FeaturePermissionBar.__permissionDenied" ID="FeaturePermissionBar.__permissionDenied"></a>
 <h4>FeaturePermissionBar.__permissionDenied</h4>
@@ -102,20 +105,7 @@
 <b>__permissionUnknown</b>(<i></i>)
 <p>
         Private slot handling the user closing the dialog without.
-</p><a NAME="FeaturePermissionBar.requestPermission" ID="FeaturePermissionBar.requestPermission"></a>
-<h4>FeaturePermissionBar.requestPermission</h4>
-<b>requestPermission</b>(<i>frame, feature</i>)
-<p>
-        Public method to ask the user for a permission.
-</p><dl>
-<dt><i>frame</i> (QWebFrame)</dt>
-<dd>
-frame sending the request
-</dd><dt><i>feature</i> (QWebPage.Feature)</dt>
-<dd>
-requested feature
-</dd>
-</dl>
+</p>
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 </body></html>
\ No newline at end of file
--- a/Documentation/Source/index-eric6.E5Gui.html	Tue Aug 04 19:13:28 2015 +0200
+++ b/Documentation/Source/index-eric6.E5Gui.html	Wed Aug 05 19:45:33 2015 +0200
@@ -33,6 +33,9 @@
 <td><a href="eric6.E5Gui.E5Action.html">E5Action</a></td>
 <td>Module implementing an Action class extending QAction.</td>
 </tr><tr>
+<td><a href="eric6.E5Gui.E5AnimatedWidget.html">E5AnimatedWidget</a></td>
+<td>Module implementing an animated widget.</td>
+</tr><tr>
 <td><a href="eric6.E5Gui.E5Application.html">E5Application</a></td>
 <td>Class implementing a specialized application class.</td>
 </tr><tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/E5Gui/E5AnimatedWidget.py	Wed Aug 05 19:45:33 2015 +0200
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2015 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing an animated widget.
+"""
+
+#
+# Code was inspired by qupzilla web browser
+#
+
+from __future__ import unicode_literals
+
+from PyQt5.QtCore import pyqtSlot, QTimeLine, QPoint
+from PyQt5.QtWidgets import QWidget
+
+
+class E5AnimatedWidget(QWidget):
+    """
+    Class implementing an animated widget.
+    """
+    DirectionDown = 0
+    DirectionUp = 1
+    
+    def __init__(self, direction=DirectionDown, duration=300, parent=None):
+        """
+        Constructor
+        
+        @param direction direction of the animation
+        @type int (one of DirectionDown or DirectionUp)
+        @param duration duration of the animation
+        @type int
+        @param parent reference to the parent widget
+        @type QWidget
+        """
+        super(E5AnimatedWidget, self).__init__(parent)
+        
+        self.__direction = direction
+        self.__stepHeight = 0.0
+        self.__stepY = 0.0
+        self.__startY = 0
+        self.__widget = QWidget(self)
+        
+        self.__timeline = QTimeLine(duration)
+        self.__timeline.setFrameRange(0, 100)
+        self.__timeline.frameChanged.connect(self.__animateFrame)
+        
+        self.setMaximumHeight(0)
+    
+    def widget(self):
+        """
+        Public method to get a reference to the animated widget.
+        
+        @return reference to the animated widget
+        @rtype QWidget
+        """
+    
+    @pyqtSlot()
+    def startAnimation(self):
+        """
+        Public slot to start the animation.
+        """
+        if self.__timeline.state() == QTimeLine.Running:
+            return
+        
+        shown = 0
+        hidden = 0
+        
+        if self.__direction == self.DirectionDown:
+            shown = 0
+            hidden = -self.__widget.height()
+        
+        self.__widget.move(QPoint(self.__widget.pos().x(), hidden))
+        
+        self.__stepY = (hidden - shown) / 100.0
+        self.__startY = hidden
+        self.__stepHeight = self.__widget.height() / 100.0
+        
+        self.__timeline.setDirection(QTimeLine.Forward)
+        self.__timeline.start()
+    
+    @pyqtSlot(int)
+    def __animateFrame(self, frame):
+        """
+        Private slot to animate the next frame.
+        
+        @param frame frame number
+        @type int
+        """
+        self.setFixedHeight(frame * self.__stepHeight)
+        self.__widget.move(self.pos().x(),
+                           self.__startY - frame * self.__stepY)
+    
+    @pyqtSlot()
+    def hide(self):
+        """
+        Public slot to hide the animated widget.
+        """
+        if self.__timeline.state() == QTimeLine.Running:
+            return
+        
+        self.__timeline.setDirection(QTimeLine.Backward)
+        self.__timeline.start()
+        
+        self.__timeline.finished.connect(self.close)
+        
+        p = self.parentWidget()
+        if p is not None:
+            p.setFocus()
+    
+    def resizeEvent(self, evt):
+        """
+        Protected method to handle a resize event.
+        
+        @param evt reference to the event object
+        @type QResizeEvent
+        """
+        if evt.size().width() != self.__widget.width():
+            self.__widget.resize(evt.size().width(), self.__widget.height())
+        
+        super(E5AnimatedWidget, self).resizeEvent(evt)
--- a/Helpviewer/FeaturePermissionBar.py	Tue Aug 04 19:13:28 2015 +0200
+++ b/Helpviewer/FeaturePermissionBar.py	Wed Aug 05 19:45:33 2015 +0200
@@ -9,15 +9,16 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import pyqtSignal, QPropertyAnimation, QByteArray, \
-    QEasingCurve, QPoint
-from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QPushButton
+from PyQt5.QtCore import pyqtSignal
+from PyQt5.QtWidgets import QLabel, QHBoxLayout, QPushButton
 from PyQt5.QtWebKitWidgets import QWebFrame, QWebPage
 
+from E5Gui.E5AnimatedWidget import E5AnimatedWidget
+
 import UI.PixmapCache
 
 
-class FeaturePermissionBar(QWidget):
+class FeaturePermissionBar(E5AnimatedWidget):
     """
     Class implementing the feature permission bar widget.
     """
@@ -26,19 +27,23 @@
     
     DefaultHeight = 30
     
-    def __init__(self, view):
+    def __init__(self, view, frame, feature):
         """
         Constructor
         
         @param view reference to the web view
         @type QWebView
+        @param frame frame sending the request
+        @type QWebFrame
+        @param feature requested feature
+        @type QWebPage.Feature
         """
-        super(FeaturePermissionBar, self).__init__(view)
+        super(FeaturePermissionBar, self).__init__(parent=view)
         
         self.__messageLabel = QLabel(self)
         
-        self.__frame = None
-        self.__feature = None
+        self.__frame = frame
+        self.__feature = feature
         
         self.__permissionFeatureTexts = {
             QWebPage.Notifications:
@@ -63,20 +68,6 @@
         self.__layout.addWidget(self.__allowButton)
         self.__layout.addWidget(self.__denyButton)
         self.__layout.addWidget(self.__discardButton)
-        self.setGeometry(0, -self.DefaultHeight, view.width(),
-                         self.DefaultHeight)
-    
-    def requestPermission(self, frame, feature):
-        """
-        Public method to ask the user for a permission.
-        
-        @param frame frame sending the request
-        @type QWebFrame
-        @param feature requested feature
-        @type QWebPage.Feature
-        """
-        self.__frame = frame
-        self.__feature = feature
         
         try:
             self.__messageLabel.setText(
@@ -86,16 +77,9 @@
             self.__messageLabel.setText(
                 self.tr("{0} wants to use an unknown feature.").format(
                     self.__frame.securityOrigin().host()))
-        self.show()
         
-        self.__animation = QPropertyAnimation(self)
-        self.__animation.setTargetObject(self)
-        self.__animation.setPropertyName(QByteArray(b"pos"))
-        self.__animation.setDuration(300)
-        self.__animation.setStartValue(self.pos())
-        self.__animation.setEndValue(QPoint(0, 0))
-        self.__animation.setEasingCurve(QEasingCurve.InOutQuad)
-        self.__animation.start(QPropertyAnimation.DeleteWhenStopped)
+        self.resize(view.width(), self.height())
+        self.startAnimation()
     
     def __permissionDenied(self):
         """
@@ -103,6 +87,7 @@
         """
         self.featurePermissionProvided.emit(self.__frame, self.__feature,
                                             QWebPage.PermissionDeniedByUser)
+        self.hide()
     
     def __permissionGranted(self):
         """
@@ -110,6 +95,7 @@
         """
         self.featurePermissionProvided.emit(self.__frame, self.__feature,
                                             QWebPage.PermissionGrantedByUser)
+        self.hide()
     
     def __permissionUnknown(self):
         """
@@ -117,3 +103,4 @@
         """
         self.featurePermissionProvided.emit(self.__frame, self.__feature,
                                             QWebPage.PermissionUnknown)
+        self.hide()
--- a/Helpviewer/HelpBrowserWV.py	Tue Aug 04 19:13:28 2015 +0200
+++ b/Helpviewer/HelpBrowserWV.py	Wed Aug 05 19:45:33 2015 +0200
@@ -2125,11 +2125,11 @@
         @type QWebPage.Feature
         """
         from .FeaturePermissionBar import FeaturePermissionBar
-        self.__featurePermissionBar = FeaturePermissionBar(self)
+        self.__featurePermissionBar = FeaturePermissionBar(self, frame,
+                                                           feature)
         self.__featurePermissionBar.featurePermissionProvided.connect(
             self.__setFeaturePermission)
-        
-        self.__featurePermissionBar.requestPermission(frame, feature)
+        self.__featurePermissionBar.show()
     
     def __setFeaturePermission(self, frame, feature, policy):
         """
@@ -2151,6 +2151,7 @@
         """
         if self.__featurePermissionBar is not None:
             self.__featurePermissionBar.deleteLater()
+            self.__featurePermissionBar.hide()
             self.__featurePermissionBar = None
     
     def __downloadRequested(self, request):
--- a/eric6.e4p	Tue Aug 04 19:13:28 2015 +0200
+++ b/eric6.e4p	Wed Aug 05 19:45:33 2015 +0200
@@ -26,6 +26,46 @@
     <Source>DataViews/PyCoverageDialog.py</Source>
     <Source>DataViews/PyProfileDialog.py</Source>
     <Source>DataViews/__init__.py</Source>
+    <Source>DebugClients/Python3/AsyncFile.py</Source>
+    <Source>DebugClients/Python3/AsyncIO.py</Source>
+    <Source>DebugClients/Python3/DCTestResult.py</Source>
+    <Source>DebugClients/Python3/DebugBase.py</Source>
+    <Source>DebugClients/Python3/DebugClient.py</Source>
+    <Source>DebugClients/Python3/DebugClientBase.py</Source>
+    <Source>DebugClients/Python3/DebugClientCapabilities.py</Source>
+    <Source>DebugClients/Python3/DebugClientThreads.py</Source>
+    <Source>DebugClients/Python3/DebugConfig.py</Source>
+    <Source>DebugClients/Python3/DebugProtocol.py</Source>
+    <Source>DebugClients/Python3/DebugThread.py</Source>
+    <Source>DebugClients/Python3/FlexCompleter.py</Source>
+    <Source>DebugClients/Python3/PyProfile.py</Source>
+    <Source>DebugClients/Python3/__init__.py</Source>
+    <Source>DebugClients/Python3/coverage/__init__.py</Source>
+    <Source>DebugClients/Python3/coverage/__main__.py</Source>
+    <Source>DebugClients/Python3/coverage/annotate.py</Source>
+    <Source>DebugClients/Python3/coverage/backward.py</Source>
+    <Source>DebugClients/Python3/coverage/bytecode.py</Source>
+    <Source>DebugClients/Python3/coverage/cmdline.py</Source>
+    <Source>DebugClients/Python3/coverage/codeunit.py</Source>
+    <Source>DebugClients/Python3/coverage/collector.py</Source>
+    <Source>DebugClients/Python3/coverage/config.py</Source>
+    <Source>DebugClients/Python3/coverage/control.py</Source>
+    <Source>DebugClients/Python3/coverage/data.py</Source>
+    <Source>DebugClients/Python3/coverage/debug.py</Source>
+    <Source>DebugClients/Python3/coverage/execfile.py</Source>
+    <Source>DebugClients/Python3/coverage/files.py</Source>
+    <Source>DebugClients/Python3/coverage/html.py</Source>
+    <Source>DebugClients/Python3/coverage/misc.py</Source>
+    <Source>DebugClients/Python3/coverage/parser.py</Source>
+    <Source>DebugClients/Python3/coverage/phystokens.py</Source>
+    <Source>DebugClients/Python3/coverage/report.py</Source>
+    <Source>DebugClients/Python3/coverage/results.py</Source>
+    <Source>DebugClients/Python3/coverage/summary.py</Source>
+    <Source>DebugClients/Python3/coverage/templite.py</Source>
+    <Source>DebugClients/Python3/coverage/version.py</Source>
+    <Source>DebugClients/Python3/coverage/xmlreport.py</Source>
+    <Source>DebugClients/Python3/eric6dbgstub.py</Source>
+    <Source>DebugClients/Python3/getpass.py</Source>
     <Source>DebugClients/Python/AsyncFile.py</Source>
     <Source>DebugClients/Python/AsyncIO.py</Source>
     <Source>DebugClients/Python/DCTestResult.py</Source>
@@ -66,46 +106,6 @@
     <Source>DebugClients/Python/coverage/xmlreport.py</Source>
     <Source>DebugClients/Python/eric6dbgstub.py</Source>
     <Source>DebugClients/Python/getpass.py</Source>
-    <Source>DebugClients/Python3/AsyncFile.py</Source>
-    <Source>DebugClients/Python3/AsyncIO.py</Source>
-    <Source>DebugClients/Python3/DCTestResult.py</Source>
-    <Source>DebugClients/Python3/DebugBase.py</Source>
-    <Source>DebugClients/Python3/DebugClient.py</Source>
-    <Source>DebugClients/Python3/DebugClientBase.py</Source>
-    <Source>DebugClients/Python3/DebugClientCapabilities.py</Source>
-    <Source>DebugClients/Python3/DebugClientThreads.py</Source>
-    <Source>DebugClients/Python3/DebugConfig.py</Source>
-    <Source>DebugClients/Python3/DebugProtocol.py</Source>
-    <Source>DebugClients/Python3/DebugThread.py</Source>
-    <Source>DebugClients/Python3/FlexCompleter.py</Source>
-    <Source>DebugClients/Python3/PyProfile.py</Source>
-    <Source>DebugClients/Python3/__init__.py</Source>
-    <Source>DebugClients/Python3/coverage/__init__.py</Source>
-    <Source>DebugClients/Python3/coverage/__main__.py</Source>
-    <Source>DebugClients/Python3/coverage/annotate.py</Source>
-    <Source>DebugClients/Python3/coverage/backward.py</Source>
-    <Source>DebugClients/Python3/coverage/bytecode.py</Source>
-    <Source>DebugClients/Python3/coverage/cmdline.py</Source>
-    <Source>DebugClients/Python3/coverage/codeunit.py</Source>
-    <Source>DebugClients/Python3/coverage/collector.py</Source>
-    <Source>DebugClients/Python3/coverage/config.py</Source>
-    <Source>DebugClients/Python3/coverage/control.py</Source>
-    <Source>DebugClients/Python3/coverage/data.py</Source>
-    <Source>DebugClients/Python3/coverage/debug.py</Source>
-    <Source>DebugClients/Python3/coverage/execfile.py</Source>
-    <Source>DebugClients/Python3/coverage/files.py</Source>
-    <Source>DebugClients/Python3/coverage/html.py</Source>
-    <Source>DebugClients/Python3/coverage/misc.py</Source>
-    <Source>DebugClients/Python3/coverage/parser.py</Source>
-    <Source>DebugClients/Python3/coverage/phystokens.py</Source>
-    <Source>DebugClients/Python3/coverage/report.py</Source>
-    <Source>DebugClients/Python3/coverage/results.py</Source>
-    <Source>DebugClients/Python3/coverage/summary.py</Source>
-    <Source>DebugClients/Python3/coverage/templite.py</Source>
-    <Source>DebugClients/Python3/coverage/version.py</Source>
-    <Source>DebugClients/Python3/coverage/xmlreport.py</Source>
-    <Source>DebugClients/Python3/eric6dbgstub.py</Source>
-    <Source>DebugClients/Python3/getpass.py</Source>
     <Source>DebugClients/Ruby/AsyncFile.rb</Source>
     <Source>DebugClients/Ruby/AsyncIO.rb</Source>
     <Source>DebugClients/Ruby/Completer.rb</Source>
@@ -155,6 +155,7 @@
     <Source>E5Graphics/E5GraphicsView.py</Source>
     <Source>E5Graphics/__init__.py</Source>
     <Source>E5Gui/E5Action.py</Source>
+    <Source>E5Gui/E5AnimatedWidget.py</Source>
     <Source>E5Gui/E5Application.py</Source>
     <Source>E5Gui/E5ClickableLabel.py</Source>
     <Source>E5Gui/E5ComboBox.py</Source>
@@ -1627,14 +1628,14 @@
   <Interfaces/>
   <Others>
     <Other>.hgignore</Other>
-    <Other>APIs/Python/zope-2.10.7.api</Other>
-    <Other>APIs/Python/zope-2.11.2.api</Other>
-    <Other>APIs/Python/zope-3.3.1.api</Other>
     <Other>APIs/Python3/PyQt4.bas</Other>
     <Other>APIs/Python3/PyQt5.bas</Other>
     <Other>APIs/Python3/QScintilla2.bas</Other>
     <Other>APIs/Python3/eric6.api</Other>
     <Other>APIs/Python3/eric6.bas</Other>
+    <Other>APIs/Python/zope-2.10.7.api</Other>
+    <Other>APIs/Python/zope-2.11.2.api</Other>
+    <Other>APIs/Python/zope-3.3.1.api</Other>
     <Other>APIs/QSS/qss.api</Other>
     <Other>APIs/Ruby/Ruby-1.8.7.api</Other>
     <Other>APIs/Ruby/Ruby-1.8.7.bas</Other>
@@ -1645,10 +1646,10 @@
     <Other>CSSs</Other>
     <Other>CodeTemplates</Other>
     <Other>DTDs</Other>
+    <Other>DebugClients/Python3/coverage/doc</Other>
+    <Other>DebugClients/Python3/coverage/htmlfiles</Other>
     <Other>DebugClients/Python/coverage/doc</Other>
     <Other>DebugClients/Python/coverage/htmlfiles</Other>
-    <Other>DebugClients/Python3/coverage/doc</Other>
-    <Other>DebugClients/Python3/coverage/htmlfiles</Other>
     <Other>DesignerTemplates</Other>
     <Other>Dictionaries</Other>
     <Other>Documentation/Help</Other>

eric ide

mercurial