Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -14,12 +14,14 @@
 
 from E5Gui import E5MessageBox
 
-from .Ui_GreaseMonkeyConfigurationDialog import Ui_GreaseMonkeyConfigurationDialog
+from .Ui_GreaseMonkeyConfigurationDialog import \
+    Ui_GreaseMonkeyConfigurationDialog
 
 import UI.PixmapCache
 
 
-class GreaseMonkeyConfigurationDialog(QDialog, Ui_GreaseMonkeyConfigurationDialog):
+class GreaseMonkeyConfigurationDialog(
+    QDialog, Ui_GreaseMonkeyConfigurationDialog):
     """
     Class implementing the GreaseMonkey scripts configuration dialog.
     """
@@ -31,12 +33,14 @@
         """
         Constructor
         
+        @param manager reference to the manager object (GreaseMonkeyManager)
         @param parent reference to the parent widget (QWidget)
         """
         super(GreaseMonkeyConfigurationDialog, self).__init__(parent)
         self.setupUi(self)
         
-        self.iconLabel.setPixmap(UI.PixmapCache.getPixmap("greaseMonkey48.png"))
+        self.iconLabel.setPixmap(
+            UI.PixmapCache.getPixmap("greaseMonkey48.png"))
         
         self.__manager = manager
         
@@ -50,12 +54,15 @@
         """
         Private slot to open the GreaseMonkey scripts directory.
         """
-        QDesktopServices.openUrl(QUrl.fromLocalFile(self.__manager.scriptsDirectory()))
+        QDesktopServices.openUrl(
+            QUrl.fromLocalFile(self.__manager.scriptsDirectory()))
     
     @pyqtSlot(str)
     def on_downloadLabel_linkActivated(self, link):
         """
         Private slot to open the userscript.org web site.
+        
+        @param link URL (string)
         """
         import Helpviewer.HelpWindow
         Helpviewer.HelpWindow.HelpWindow.mainWindow().newTab(
@@ -66,6 +73,8 @@
     def on_scriptsList_itemDoubleClicked(self, item):
         """
         Private slot to show information about the selected script.
+        
+        @param item reference to the double clicked item (QListWidgetItem)
         """
         script = self.__getScript(item)
         if script is not None:
@@ -79,7 +88,8 @@
         Private method to load all the available scripts.
         """
         for script in self.__manager.allScripts():
-            itm = QListWidgetItem(UI.PixmapCache.getIcon("greaseMonkeyScript.png"),
+            itm = QListWidgetItem(
+                UI.PixmapCache.getIcon("greaseMonkeyScript.png"),
                 script.name(), self.scriptsList)
             itm.setData(GreaseMonkeyConfigurationDialog.ScriptVersionRole,
                 script.version())
@@ -135,7 +145,8 @@
         
         removeIt = E5MessageBox.yesNo(self,
             self.trUtf8("Remove Script"),
-            self.trUtf8("""<p>Are you sure you want to remove <b>{0}</b>?</p>""")
+            self.trUtf8(
+                """<p>Are you sure you want to remove <b>{0}</b>?</p>""")
                 .format(script.name()))
         if removeIt and self.__manager.removeScript(script):
             self.scriptsList.takeItem(self.scriptsList.row(itm))

eric ide

mercurial