Change all double leading underscores with sigle leading underscores.
Also make minor refactoring and stylistic changes.
This commit is contained in:
@@ -10,21 +10,21 @@ class ClickableProgressBar(QProgressBar):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
"""Initialize the instance."""
|
||||
self.__text = ''
|
||||
self._text = ''
|
||||
super().__init__(parent)
|
||||
|
||||
def text(self):
|
||||
"""Return the text displayed on the bar."""
|
||||
return self.__text
|
||||
return self._text
|
||||
|
||||
def set_idle(self):
|
||||
"""Set the bar to a non-downloading status."""
|
||||
self.__text = Constants.CLICK_TO_UPDATE_STR
|
||||
self._text = Constants.CLICK_TO_UPDATE_STR
|
||||
self.setMaximum(self.minimum() + 1)
|
||||
|
||||
def set_updating(self):
|
||||
"""Set the bar to a downloading status."""
|
||||
self.__text = Constants.UPDATING_STR
|
||||
self._text = Constants.UPDATING_STR
|
||||
self.setMaximum(self.minimum())
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
|
||||
Reference in New Issue
Block a user