eric7/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.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) 2003 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data for a new property.
8 """
9
10 from PyQt5.QtWidgets import QDialog
11
12 from E5Gui.E5PathPicker import E5PathPickerModes
13
14 from .Ui_SvnPropSetDialog import Ui_SvnPropSetDialog
15
16
17 class SvnPropSetDialog(QDialog, Ui_SvnPropSetDialog):
18 """
19 Class implementing a dialog to enter the data for a new property.
20 """
21 def __init__(self, parent=None):
22 """
23 Constructor
24
25 @param parent parent widget (QWidget)
26 """
27 super().__init__(parent)
28 self.setupUi(self)
29
30 self.propFilePicker.setMode(E5PathPickerModes.OpenFileMode)
31
32 def getData(self):
33 """
34 Public slot used to retrieve the data entered into the dialog.
35
36 @return tuple of three values giving the property name, a flag
37 indicating a file was selected and the text of the property
38 or the selected filename. (string, boolean, string)
39 """
40 if self.fileRadioButton.isChecked():
41 return (self.propNameEdit.text(), True, self.propFilePicker.text())
42 else:
43 return (self.propNameEdit.text(), False,
44 self.propTextEdit.toPlainText())

eric ide

mercurial