Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 3008
7848489bcb92
child 3058
0a02c433f52d
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py	Fri Oct 18 23:00:41 2013 +0200
@@ -16,8 +16,8 @@
 import os
 
 from PyQt4.QtCore import pyqtSlot, QProcess, Qt, QTimer, QCoreApplication
-from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \
-    QLineEdit
+from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, \
+    QTreeWidgetItem, QLineEdit
 
 from E5Gui import E5MessageBox
 
@@ -28,7 +28,8 @@
 
 class HgBookmarksInOutDialog(QDialog, Ui_HgBookmarksInOutDialog):
     """
-    Class implementing a dialog to show a list of incoming or outgoing bookmarks.
+    Class implementing a dialog to show a list of incoming or outgoing
+    bookmarks.
     """
     INCOMING = 0
     OUTGOING = 1
@@ -41,6 +42,7 @@
         @param mode mode of the dialog (HgBookmarksInOutDialog.INCOMING,
             HgBookmarksInOutDialog.OUTGOING)
         @param parent reference to the parent widget (QWidget)
+        @exception ValueError raised to indicate an invalid dialog mode
         """
         super(HgBookmarksInOutDialog, self).__init__(parent)
         self.setupUi(self)
@@ -60,7 +62,8 @@
         self.mode = mode
         self.__hgClient = vcs.getClient()
         
-        self.bookmarksList.headerItem().setText(self.bookmarksList.columnCount(), "")
+        self.bookmarksList.headerItem().setText(
+            self.bookmarksList.columnCount(), "")
         self.bookmarksList.header().setSortIndicator(3, Qt.AscendingOrder)
         
         self.process.finished.connect(self.__procFinished)
@@ -93,6 +96,7 @@
         Public slot to start the bookmarks command.
         
         @param path name of directory to be listed (string)
+        @exception ValueError raised to indicate an invalid dialog mode
         """
         self.errorGroup.hide()
         
@@ -151,7 +155,8 @@
     
     def __finish(self):
         """
-        Private slot called when the process finished or the user pressed the button.
+        Private slot called when the process finished or the user pressed
+        the button.
         """
         if self.process is not None and \
            self.process.state() != QProcess.NotRunning:
@@ -165,7 +170,8 @@
         self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason)
+        self.buttonBox.button(QDialogButtonBox.Close).setFocus(
+            Qt.OtherFocusReason)
         
         self.process = None
         
@@ -209,7 +215,8 @@
         """
         Private method to resize the list columns.
         """
-        self.bookmarksList.header().resizeSections(QHeaderView.ResizeToContents)
+        self.bookmarksList.header().resizeSections(
+            QHeaderView.ResizeToContents)
         self.bookmarksList.header().setStretchLastSection(True)
     
     def __generateItem(self, changeset, name):

eric ide

mercurial