eric7/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/LfRevisionsInputDialog.py

branch
eric7
changeset 8312
800c432b34c8
parent 8218
7c09585bd960
child 8318
962bce857696
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2014 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter a series of revisions.
8 """
9
10 from PyQt5.QtCore import pyqtSlot
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
12
13 from .Ui_LfRevisionsInputDialog import Ui_LfRevisionsInputDialog
14
15
16 class LfRevisionsInputDialog(QDialog, Ui_LfRevisionsInputDialog):
17 """
18 Class implementing a dialog to enter a series of revisions.
19 """
20 def __init__(self, parent=None):
21 """
22 Constructor
23
24 @param parent reference to the parent widget (QWidget)
25 """
26 super().__init__(parent)
27 self.setupUi(self)
28
29 self.buttonBox.button(
30 QDialogButtonBox.StandardButton.Ok).setEnabled(False)
31
32 @pyqtSlot()
33 def on_revisionsEdit_textChanged(self):
34 """
35 Private slot handling a change of revisions.
36 """
37 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
38 bool(self.revisionsEdit.toPlainText()))
39
40 def getRevisions(self):
41 """
42 Public method to retrieve the entered revisions.
43
44 @return list of revisions (list of string)
45 """
46 return self.revisionsEdit.toPlainText().splitlines()

eric ide

mercurial