src/eric7/PdfViewer/PdfPageSelector.py

branch
pdf_viewer
changeset 9722
63135ab601e7
parent 9700
b74a13a382a8
child 10439
21c28b0f9e41
--- a/src/eric7/PdfViewer/PdfPageSelector.py	Fri Jan 20 17:31:29 2023 +0100
+++ b/src/eric7/PdfViewer/PdfPageSelector.py	Mon Jan 23 17:12:03 2023 +0100
@@ -9,11 +9,16 @@
 
 import contextlib
 
-from PyQt6.QtCore import Qt, pyqtSlot, pyqtSignal
+from PyQt6.QtCore import Qt, pyqtSignal, pyqtSlot
 from PyQt6.QtGui import QIntValidator
 from PyQt6.QtPdf import QPdfDocument
 from PyQt6.QtWidgets import (
-    QToolButton, QHBoxLayout, QWidget, QLabel, QLineEdit, QSizePolicy
+    QHBoxLayout,
+    QLabel,
+    QLineEdit,
+    QSizePolicy,
+    QToolButton,
+    QWidget,
 )
 
 from eric7.EricGui import EricPixmapCache
@@ -22,6 +27,10 @@
 class PdfPageSelector(QWidget):
     """
     Class implementing a widget to select a PDF page to be shown.
+
+    @signal valueChanged(int) emitted to signal the new value of the selector
+    @signal gotoPage() emitted to indicate the want to enter a page number via the
+        Go To dialog
     """
 
     valueChanged = pyqtSignal(int)
@@ -55,7 +64,7 @@
             QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed
         )
         self.__pageLabel = QLabel()
-        
+
         self.__layout = QHBoxLayout()
         self.__layout.addWidget(self.__prevButton)
         self.__layout.addWidget(self.__pageEntry)
@@ -131,18 +140,18 @@
         """
         return self.__value
 
-    def setMaximum(self, max):
+    def setMaximum(self, maximum):
         """
         Public method to set the maximum value.
 
-        Note: max is 0 based.
+        Note: maximum is 0 based.
 
-        @param max maximum value to be set
+        @param maximum maximum value to be set
         @type int
         """
-        self.__maximum = max
+        self.__maximum = maximum
         self.__nextButton.setEnabled(self.__value < self.__maximum)
-        self.__pageButton.setText(str(max + 1))
+        self.__pageButton.setText(str(maximum + 1))
 
     @pyqtSlot()
     def __pageEntered(self):

eric ide

mercurial