eric6/WebBrowser/GreaseMonkey/GreaseMonkeyJsObject.py

Sat, 27 Feb 2021 12:08:23 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Feb 2021 12:08:23 +0100
changeset 8138
169e65a6787c
parent 7923
91e843545d9a
child 8143
2c730d5fd177
permissions
-rw-r--r--

Shell: added functionality to show a prompt when the main client process has exited (e.g. a script ended).

6128
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7781
diff changeset
3 # Copyright (c) 2012 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
6128
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Python side for GreaseMonkey scripts.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt5.QtCore import pyqtSlot, QObject, QSettings
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from PyQt5.QtGui import QGuiApplication
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 class GreaseMonkeyJsObject(QObject):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 Class implementing the Python side for GreaseMonkey scripts.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 def __init__(self, parent=None):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Constructor
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 @param parent reference to the parent object
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 @type QObject
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 super(GreaseMonkeyJsObject, self).__init__(parent)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 self.__settings = None
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 def setSettingsFile(self, name):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 Public method to set the settings file for the GreaseMonkey parameters.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @param name name of the settings file
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 if self.__settings is not None:
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.__settings.sync()
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.__settings = None
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.__settings = QSettings(name, QSettings.IniFormat)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 @pyqtSlot(str, str, str)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 def getValue(self, nspace, name, dValue):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 Public slot to get the value for the named variable for the identified
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 script.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 @param nspace unique script id
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 @param name name of the variable
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 @param dValue default value
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 @return value for the named variable
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 @rtype str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 vName = "GreaseMonkey-{0}/{1}".format(nspace, name)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 sValue = self.__settings.value(vName, dValue)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 if not sValue:
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 return dValue
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 return sValue
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 @pyqtSlot(str, str, str)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 def setValue(self, nspace, name, value):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 Public slot to set the value for the named variable for the identified
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 script.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 @param nspace unique script id
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 @param name name of the variable
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 @param value value to be set
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 @return flag indicating success
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 @rtype bool
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 vName = "GreaseMonkey-{0}/{1}".format(nspace, name)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 self.__settings.setValue(vName, value)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 self.__settings.sync()
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 return True
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 @pyqtSlot(str, str)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 def deleteValue(self, nspace, name):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 Public slot to set delete the named variable for the identified script.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @param nspace unique script id
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 @param name name of the variable
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 @return flag indicating success
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 @rtype bool
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 vName = "GreaseMonkey-{0}/{1}".format(nspace, name)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 self.__settings.remove(vName)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.__settings.sync()
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 return True
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 @pyqtSlot(str)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 def listValues(self, nspace):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 Public slot to list the stored variables for the identified script.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 @param nspace unique script id
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 @return list of stored variables
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 @rtype list of str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 nspaceName = "GreaseMonkey-{0}".format(nspace)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 self.__settings.beginGroup(nspaceName)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 keys = self.__settings.allKeys()
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 self.__settings.endGroup()
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 return keys
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 @pyqtSlot(str)
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 def setClipboard(self, text):
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 Public slot to set some clipboard text.
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 @param text text to be copied to the clipboard
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 @type str
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 """
afc2cda1a743 Implemented support for GreaseMonkey 4.0 for the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 QGuiApplication.clipboard().setText(text)

eric ide

mercurial