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

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

eric ide

mercurial