UI/SearchWidget.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3012
d177226027e2
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 UI/SearchWidget.py
--- a/UI/SearchWidget.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/UI/SearchWidget.py	Fri Oct 18 23:00:41 2013 +0200
@@ -21,10 +21,10 @@
     """
     Class implementing the search box for the shel, terminal and log viewer.
     
-    @signal searchNext(text, caseSensitive, wholeWord) emitted when the user pressed
-        the next button (string, boolean, boolean)
-    @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the user pressed
-        the previous button (string, boolean, boolean)
+    @signal searchNext(text, caseSensitive, wholeWord) emitted when the user
+        pressed the next button (string, boolean, boolean)
+    @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the
+        user pressed the previous button (string, boolean, boolean)
     """
     searchNext = pyqtSignal(str, bool, bool)
     searchPrevious = pyqtSignal(str, bool, bool)
@@ -33,6 +33,7 @@
         """
         Constructor
         
+        @param mainWindow reference to the main window (QWidget)
         @param parent reference to the parent widget (QWidget)
         @param spacer flag indicating to add a vertical spacer to the
             main layout (boolean)
@@ -40,11 +41,12 @@
         super(SearchWidget, self).__init__(parent)
         self.setupUi(self)
         if spacer:
-            spacerItem = QSpacerItem(20, 1, QSizePolicy.Minimum, QSizePolicy.Expanding)
+            spacerItem = QSpacerItem(
+                20, 1, QSizePolicy.Minimum, QSizePolicy.Expanding)
             self.verticalLayout.addItem(spacerItem)
         else:
-            # change the size policy of the search combo if the spacer is not wanted,
-            # i.e. it is below the to be searched widget
+            # change the size policy of the search combo if the spacer is not
+            # wanted, i.e. it is below the to be searched widget
             sizePolicy = self.findtextCombo.sizePolicy()
             sizePolicy.setHorizontalPolicy(QSizePolicy.Expanding)
             self.findtextCombo.setSizePolicy(sizePolicy)
@@ -58,7 +60,8 @@
         
         self.findHistory = []
         
-        self.findtextCombo.lineEdit().returnPressed.connect(self.__findByReturnPressed)
+        self.findtextCombo.lineEdit().returnPressed.connect(
+            self.__findByReturnPressed)
     
     @pyqtSlot()
     def on_closeButton_clicked(self):
@@ -138,7 +141,8 @@
     
     def __findByReturnPressed(self):
         """
-        Private slot to handle the returnPressed signal of the findtext combobox.
+        Private slot to handle the returnPressed signal of the findtext
+        combobox.
         """
         if self.__findBackwards:
             self.on_findPrevButton_clicked()
@@ -170,4 +174,5 @@
             self.statusLabel.clear()
         else:
             txt = self.findtextCombo.currentText()
-            self.statusLabel.setText(self.trUtf8("'{0}' was not found.").format(txt))
+            self.statusLabel.setText(
+                self.trUtf8("'{0}' was not found.").format(txt))

eric ide

mercurial