Preferences/ConfigurationPages/NotificationsPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3010
befeff46ec0f
child 3145
a9de05d4a22f
diff -r 9986ec0e559a -r 10516539f238 Preferences/ConfigurationPages/NotificationsPage.py
--- a/Preferences/ConfigurationPages/NotificationsPage.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Preferences/ConfigurationPages/NotificationsPage.py	Fri Oct 18 23:00:41 2013 +0200
@@ -26,8 +26,6 @@
     def __init__(self):
         """
         Constructor
-        
-        @param parent reference to the parent widget (QWidget)
         """
         super(NotificationsPage, self).__init__()
         self.setupUi(self)
@@ -50,7 +48,8 @@
         self.__notification = None
         
         # set initial values
-        self.enableCheckBox.setChecked(Preferences.getUI("NotificationsEnabled"))
+        self.enableCheckBox.setChecked(
+            Preferences.getUI("NotificationsEnabled"))
         self.timeoutSpinBox.setValue(Preferences.getUI("NotificationTimeout"))
         point = Preferences.getUI("NotificationPosition")
         self.xSpinBox.setValue(point.x())
@@ -60,7 +59,8 @@
         """
         Public slot to save the Notifications configuration.
         """
-        Preferences.setUI("NotificationsEnabled", self.enableCheckBox.isChecked())
+        Preferences.setUI(
+            "NotificationsEnabled", self.enableCheckBox.isChecked())
         Preferences.setUI("NotificationTimeout", self.timeoutSpinBox.value())
         Preferences.setUI("NotificationPosition", QPoint(
             self.xSpinBox.value(), self.ySpinBox.value()))
@@ -74,12 +74,16 @@
         """
         if checked:
             from UI.NotificationWidget import NotificationWidget
-            self.__notification = NotificationWidget(parent=self, setPosition=True)
-            self.__notification.setPixmap(UI.PixmapCache.getPixmap("notification48.png"))
+            self.__notification = NotificationWidget(
+                parent=self, setPosition=True)
+            self.__notification.setPixmap(
+                UI.PixmapCache.getPixmap("notification48.png"))
             self.__notification.setHeading(self.trUtf8("Visual Selection"))
-            self.__notification.setText(self.trUtf8("Drag the notification window to"
-                " the desired place and release the button."))
-            self.__notification.move(QPoint(self.xSpinBox.value(), self.ySpinBox.value()))
+            self.__notification.setText(
+                self.trUtf8("Drag the notification window to"
+                            " the desired place and release the button."))
+            self.__notification.move(
+                QPoint(self.xSpinBox.value(), self.ySpinBox.value()))
             self.__notification.show()
         else:
             # retrieve the position
@@ -95,6 +99,7 @@
     Module function to create the configuration page.
     
     @param dlg reference to the configuration dialog
+    @return reference to the instantiated page (ConfigurationPageBase)
     """
     page = NotificationsPage()
     return page

eric ide

mercurial