4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a menu to select the user agent string. |
7 Module implementing a menu to select the user agent string. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 from PyQt4.QtCore import QByteArray, QXmlStreamReader |
12 from PyQt4.QtCore import QByteArray, QXmlStreamReader |
11 from PyQt4.QtGui import QMenu, QAction, QActionGroup, QInputDialog, QLineEdit |
13 from PyQt4.QtGui import QMenu, QAction, QActionGroup, QInputDialog, QLineEdit |
12 |
14 |
13 from E5Gui import E5MessageBox |
15 from E5Gui import E5MessageBox |
23 |
25 |
24 @param title title of the menu (string) |
26 @param title title of the menu (string) |
25 @param url URL to set user agent for (QUrl) |
27 @param url URL to set user agent for (QUrl) |
26 @param parent reference to the parent widget (QWidget) |
28 @param parent reference to the parent widget (QWidget) |
27 """ |
29 """ |
28 super().__init__(title, parent) |
30 super(UserAgentMenu, self).__init__(title, parent) |
29 |
31 |
30 self.__manager = None |
32 self.__manager = None |
31 self.__url = url |
33 self.__url = url |
32 if self.__url: |
34 if self.__url: |
33 if self.__url.isValid(): |
35 if self.__url.isValid(): |